]> granicus.if.org Git - libvpx/commitdiff
Bug fix: error-concealment enabled changed postproc output
authorScott LaVarnway <slavarnway@google.com>
Sat, 26 Jan 2013 01:06:32 +0000 (17:06 -0800)
committerScott LaVarnway <slavarnway@google.com>
Sat, 26 Jan 2013 01:06:32 +0000 (17:06 -0800)
When error concealment is enabled, it swaps the mi and prev_mi ptrs after
each frame is decoded.  The postproc uses the mi ptr for the mode info context.
Now the postproc will use the correct mode info context.

Change-Id: I537ae5450f319c624999b44525bb52bb30047b7b

vp8/common/mfqe.c
vp8/common/onyxc_int.h
vp8/common/postproc.c
vp8/decoder/onyxd_if.c
vp8/encoder/onyx_if.c

index 8a8f92f6818bccd325e8ed1a1e99f8f13bf784e9..069332660e3276c4075fde9cf7c1069efdbf3e3a 100644 (file)
@@ -280,7 +280,7 @@ void vp8_multiframe_quality_enhance
 
     FRAME_TYPE frame_type = cm->frame_type;
     /* Point at base of Mb MODE_INFO list has motion vectors etc */
-    const MODE_INFO *mode_info_context = cm->mi;
+    const MODE_INFO *mode_info_context = cm->show_frame_mi;
     int mb_row;
     int mb_col;
     int totmap, map[4];
index 03c97187a122e4d9aef8aa415404d2585ed432ed..276dd72ead07721a2dc8652a6d7078f7986258e3 100644 (file)
@@ -127,7 +127,8 @@ typedef struct VP8Common
     MODE_INFO *prev_mip; /* MODE_INFO array 'mip' from last decoded frame */
     MODE_INFO *prev_mi;  /* 'mi' from last frame (points into prev_mip) */
 #endif
-
+    MODE_INFO *show_frame_mi;  /* MODE_INFO for the last decoded frame
+                                  to show */
     LOOPFILTERTYPE filter_type;
 
     loop_filter_info_n lf_info;
index fd313b6fe768fa236917148323fe7c007210233a..e40fb111cd774850dd8594c4602a9512203276d0 100644 (file)
@@ -334,7 +334,7 @@ void vp8_deblock(VP8_COMMON                 *cm,
     double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
     int ppl = (int)(level + .5);
 
-    const MODE_INFO *mode_info_context = cm->mi;
+    const MODE_INFO *mode_info_context = cm->show_frame_mi;
     int mbr, mbc;
 
     /* The pixel thresholds are adjusted according to if or not the macroblock
index 24fc8783aa9c618e2ba69957bb17d850b8e5b310..e9654839c6d0a3248cefb95d1790e4f718e36e9d 100644 (file)
@@ -419,7 +419,13 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, size_t size,
 
     vp8_clear_system_state();
 
-#if CONFIG_ERROR_CONCEALMENT
+    if (cm->show_frame)
+    {
+        cm->current_video_frame++;
+        cm->show_frame_mi = cm->mi;
+    }
+
+    #if CONFIG_ERROR_CONCEALMENT
     /* swap the mode infos to storage for future error concealment */
     if (pbi->ec_enabled && pbi->common.prev_mi)
     {
@@ -441,9 +447,6 @@ int vp8dx_receive_compressed_data(VP8D_COMP *pbi, size_t size,
     }
 #endif
 
-    if (cm->show_frame)
-        cm->current_video_frame++;
-
     pbi->ready_for_new_data = 0;
     pbi->last_time_stamp = time_stamp;
 
index 7eb7193bf75f8f1323f391dbc25b5d955dc5d711..92f9818577436368e5e665c480e9da8c92256179 100644 (file)
@@ -5362,6 +5362,7 @@ int vp8_get_preview_raw_frame(VP8_COMP *cpi, YV12_BUFFER_CONFIG *dest, vp8_ppfla
 #endif
 
 #if CONFIG_POSTPROC
+        cpi->common.show_frame_mi = cpi->common.mi;
         ret = vp8_post_proc_frame(&cpi->common, dest, flags);
 #else