codec/h264/h264dec/cavlc.go: simplified some logic regarding appending of values onto levelVal based on trailing_ones_sign_flag

This commit is contained in:
Saxon 2019-09-09 09:11:50 +09:30
parent 960d41cb4f
commit 46e7f9d303
1 changed files with 1 additions and 5 deletions

View File

@ -56,11 +56,7 @@ func parseLevelInformation(br *bits.BitReader, totalCoeff, trailingOnes int) ([]
if err != nil { if err != nil {
return nil, fmt.Errorf("could not read trailing_ones_sign_flag, failed with error: %v", err) return nil, fmt.Errorf("could not read trailing_ones_sign_flag, failed with error: %v", err)
} }
if b == 0 { levelVal = append(levelVal, 1-int(b)*2)
levelVal = append(levelVal, 1)
continue
}
levelVal = append(levelVal, -1)
} }
var suffixLen int var suffixLen int