]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/vc1: store color-difference reference field type
authorJerome Borsboom <jerome.borsboom@carpalis.nl>
Mon, 23 Apr 2018 18:59:13 +0000 (20:59 +0200)
committerPaul B Mahol <onemda@gmail.com>
Wed, 25 Apr 2018 20:07:20 +0000 (22:07 +0200)
The loop filter for P interlace field pictures needs the reference field type.
For luma, the reference field type was already available. Store the reference
field type for color-difference as well.

Signed-off-by: Jerome Borsboom <jerome.borsboom@carpalis.nl>
libavcodec/vc1_mc.c

index 75c74cad8df706ba1fe27b90e345fd64dbc35698..5eacaaa8ee433421864b185efbdba9a8abe76394 100644 (file)
@@ -344,6 +344,10 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
         v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
         v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
     }
+    if (v->field_mode) {
+        v->mv_f[dir][s->block_index[4] + v->mb_off] = v->cur_field_type != v->ref_field_type[dir];
+        v->mv_f[dir][s->block_index[5] + v->mb_off] = v->cur_field_type != v->ref_field_type[dir];
+    }
 }
 
 /** Do motion compensation for 4-MV macroblock - luminance block
@@ -636,6 +640,10 @@ void ff_vc1_mc_4mv_chroma(VC1Context *v, int dir)
         v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
         v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
     }
+    if (v->field_mode) {
+        v->mv_f[dir][s->block_index[4] + v->mb_off] = v->cur_field_type != chroma_ref_type;
+        v->mv_f[dir][s->block_index[5] + v->mb_off] = v->cur_field_type != chroma_ref_type;
+    }
 }
 
 /** Do motion compensation for 4-MV interlaced frame chroma macroblock (both U and V)