go.image/vp8l: use the default code length for repeated codes.

This fixes the lossless_vec_2_13.webp conformance test.

LGTM=r
R=r, pascal.massimino
CC=golang-codereviews
https://golang.org/cl/143610043
This commit is contained in:
Nigel Tao 2014-09-26 11:09:06 +10:00
parent 96df300f7f
commit a704c116ac

View File

@ -180,7 +180,10 @@ func (d *decoder) decodeCodeLengths(dst []uint32, codeLengthCodeLengths []uint32
} }
} }
prevCodeLength := uint32(0) // The spec says that "if code 16 [meaning repeat] is used before
// a non-zero value has been emitted, a value of 8 is repeated."
prevCodeLength := uint32(8)
for symbol := 0; symbol < len(dst); { for symbol := 0; symbol < len(dst); {
if maxSymbol == 0 { if maxSymbol == 0 {
break break