qiqian / webp

Automatically exported from code.google.com/p/webp
0 stars 0 forks source link

Spec / code mismatch for lossless prediction mode #11 #205

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Reported by Nigel Tao:

=================

The spec at
https://developers.google.com/speed/webp/docs/webp_lossless_bitstream_specificat
ion
and
https://gerrit.chromium.org/gerrit/gitweb?p=webm/libwebp.git;a=blob;f=doc/webp-l
ossless-bitstream-spec.txt;hb=master
says that Predictor Mode 11 means "Select(L, T, TL)".

The code (src/dsp/lossless.c) says:
static uint32_t Predictor11(uint32_t left, const uint32_t* const top) {
  const uint32_t pred = VP8LSelect(top[0], left, top[-1]);
  return pred;
}

In particular, the arguments in the spec are (L, T, TL) and in the
code are (T, L, TL).

======================

Original issue reported on code.google.com by pascal.m...@gmail.com on 9 Jun 2014 at 10:05

GoogleCodeExporter commented 8 years ago

Original comment by pascal.m...@gmail.com on 9 Jun 2014 at 10:06

GoogleCodeExporter commented 8 years ago
doc updated, as per https://gerrit.chromium.org/gerrit/#/c/71605/

The lightest change in the spec was to replace "pL <= pT" by "pL < pT".
libwebp's code is not following the spec's logic (that was the problem), but 
both
are now in sync. ffmpeg webp decoder is ok too.

Original comment by pascal.m...@gmail.com on 18 Sep 2014 at 6:35

GoogleCodeExporter commented 8 years ago

Original comment by pascal.m...@gmail.com on 18 Sep 2014 at 6:35