]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '7b50d60442af8d9527e9da46818011fe15a5265a'
authorClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 13:17:16 +0000 (15:17 +0200)
committerClément Bœsch <clement@stupeflix.com>
Wed, 29 Jun 2016 13:17:16 +0000 (15:17 +0200)
* commit '7b50d60442af8d9527e9da46818011fe15a5265a':
  h264: call ff_h264_fill_mbaff_ref_list() when constructing the normal ref list

Merged-by: Clément Bœsch <clement@stupeflix.com>
1  2 
libavcodec/h264.h
libavcodec/h264_refs.c
libavcodec/h264_slice.c

index 133f4b780c18c8ed33c319d21944bee4ee32b805,034507d3cda251f12e808506b3c0ac742853e299..50fd45a74173cd3b370c0246a4749217238ab4b5
@@@ -714,8 -656,7 +714,7 @@@ int ff_h264_get_slice_type(const H264Sl
   */
  int ff_h264_alloc_tables(H264Context *h);
  
 -int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl);
 +int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl);
- void ff_h264_fill_mbaff_ref_list(H264SliceContext *sl);
  void ff_h264_remove_all_refs(H264Context *h);
  
  /**
index b6bb8f2a871ab5a8314aaada22195c2ec48ac754,b4dfbbcfcd291970da9adc4570c8a03f4188ecde..15957a37e08e922bf7d344f628b81fdc75d65d5e
@@@ -270,7 -227,32 +270,32 @@@ static int pic_num_extract(const H264Co
      return pic_num;
  }
  
 -int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl)
+ static void h264_fill_mbaff_ref_list(H264SliceContext *sl)
+ {
+     int list, i, j;
+     for (list = 0; list < sl->list_count; list++) {
+         for (i = 0; i < sl->ref_count[list]; i++) {
+             H264Ref *frame = &sl->ref_list[list][i];
+             H264Ref *field = &sl->ref_list[list][16 + 2 * i];
+             field[0] = *frame;
+             for (j = 0; j < 3; j++)
+                 field[0].linesize[j] <<= 1;
+             field[0].reference = PICT_TOP_FIELD;
+             field[0].poc       = field[0].parent->field_poc[0];
+             field[1] = field[0];
+             for (j = 0; j < 3; j++)
+                 field[1].data[j] += frame->parent->f->linesize[j];
+             field[1].reference = PICT_BOTTOM_FIELD;
+             field[1].poc       = field[1].parent->field_poc[1];
+         }
+     }
+ }
 +int ff_h264_decode_ref_pic_list_reordering(H264Context *h, H264SliceContext *sl)
  {
      int list, index, pic_structure;
  
Simple merge