[FFmpeg-cvslog] Merge commit '65127450add50c3bca307edc0517d2e8382717a0'

Derek Buitenhuis git at videolan.org
Sun Apr 24 13:17:19 CEST 2016


ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Sun Apr 24 12:16:16 2016 +0100| [627115b3e43f21023ff04c51de1fdfcd7296bbb1] | committer: Derek Buitenhuis

Merge commit '65127450add50c3bca307edc0517d2e8382717a0'

* commit '65127450add50c3bca307edc0517d2e8382717a0':
  intrax8: Make x8_init_block_index not use mpegvideo fields

Merged-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=627115b3e43f21023ff04c51de1fdfcd7296bbb1
---

 libavcodec/intrax8.c |   23 +++++++++++------------
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c
index 0388e34..9141c5b 100644
--- a/libavcodec/intrax8.c
+++ b/libavcodec/intrax8.c
@@ -722,22 +722,21 @@ block_placed:
 }
 
 // FIXME maybe merge with ff_*
-static void x8_init_block_index(IntraX8Context *w)
+static void x8_init_block_index(IntraX8Context *w, AVFrame *frame, int mb_y)
 {
-    MpegEncContext *const s = w->s;
-    // not s->linesize as this would be wrong for field pics
+    // not parent codec linesize as this would be wrong for field pics
     // not that IntraX8 has interlacing support ;)
-    const int linesize   = s->current_picture.f->linesize[0];
-    const int uvlinesize = s->current_picture.f->linesize[1];
+    const int linesize   = frame->linesize[0];
+    const int uvlinesize = frame->linesize[1];
 
-    w->dest[0] = s->current_picture.f->data[0];
-    w->dest[1] = s->current_picture.f->data[1];
-    w->dest[2] = s->current_picture.f->data[2];
+    w->dest[0] = frame->data[0];
+    w->dest[1] = frame->data[1];
+    w->dest[2] = frame->data[2];
 
-    w->dest[0] +=  s->mb_y         * linesize   << 3;
+    w->dest[0] +=  mb_y         * linesize   << 3;
     // chroma blocks are on add rows
-    w->dest[1] += (s->mb_y & (~1)) * uvlinesize << 2;
-    w->dest[2] += (s->mb_y & (~1)) * uvlinesize << 2;
+    w->dest[1] += (mb_y & (~1)) * uvlinesize << 2;
+    w->dest[2] += (mb_y & (~1)) * uvlinesize << 2;
 }
 
 av_cold int ff_intrax8_common_init(IntraX8Context *w, MpegEncContext *const s)
@@ -797,7 +796,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant,
     x8_reset_vlc_tables(w);
 
     for (s->mb_y = 0; s->mb_y < s->mb_height * 2; s->mb_y++) {
-        x8_init_block_index(w);
+        x8_init_block_index(w, s->current_picture.f, s->mb_y);
         mb_xy = (s->mb_y >> 1) * s->mb_stride;
 
         for (s->mb_x = 0; s->mb_x < s->mb_width * 2; s->mb_x++) {


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




More information about the ffmpeg-cvslog mailing list