Merge commit '89f11f498b9c15bc71494a11a7ec560f4adf630d'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Feb 2013 14:56:24 +0000 (15:56 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 6 Feb 2013 14:57:45 +0000 (15:57 +0100)
* commit '89f11f498b9c15bc71494a11a7ec560f4adf630d':
  qtrle: fix the topmost line for 1bit

Conflicts:
tests/ref/fate/qtrle-1bit

See: 1af91978dbab35ba9fdede187577c00d643ae33b

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
cmdutils.c
libavcodec/qtrle.c

diff --cc cmdutils.c
Simple merge
@@@ -62,16 -62,10 +62,18 @@@ static void qtrle_decode_1bpp(QtrleCont
      unsigned char *rgb = s->frame.data[0];
      int pixel_limit = s->frame.linesize[0] * s->avctx->height;
      int skip;
-     lines_to_change++;
 +    /* skip & 0x80 appears to mean 'start a new line', which can be interpreted
 +     * as 'go to next line' during the decoding of a frame but is 'go to first
 +     * line' at the beginning. Since we always interpret it as 'go to next line'
 +     * in the decoding loop (which makes code simpler/faster), the first line
 +     * would not be counted, so we count one more.
 +     * See: https://ffmpeg.org/trac/ffmpeg/ticket/226
 +     * In the following decoding loop, row_ptr will be the position of the
 +     * _next_ row. */
  
+     row_ptr  -= row_inc;
+     pixel_ptr = row_ptr;
+     lines_to_change++;
      while (lines_to_change) {
          skip     =              bytestream2_get_byte(&s->g);
          rle_code = (signed char)bytestream2_get_byte(&s->g);