mirror of https://bitbucket.org/ausocean/av.git
codec/h264/h264dec/cavlc.go: simplified logic in loop to count leading zeros in formCoeffTokenMap
This commit is contained in:
parent
88857ec5b9
commit
89452d55d3
|
@ -108,15 +108,13 @@ func formCoeffTokenMap(lines [][]string) ([nColumns]tokenMap, error) {
|
|||
// Count the leading zeros.
|
||||
var nZeros int
|
||||
for _, c := range v {
|
||||
if c == ' ' {
|
||||
continue
|
||||
if c == '1' {
|
||||
break
|
||||
}
|
||||
|
||||
if c == '0' {
|
||||
nZeros++
|
||||
continue
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
// This will be the value of the coeff_token (without leading zeros).
|
||||
|
|
Loading…
Reference in New Issue