ref: b2f77866aa69639d4126a1daa87a2c121e4c3ab4
parent: cf49034b14efd1ab24fbda45782d0a761d4f124d
parent: 29d586b462f2c37bd468dd51cf32ef5982777056
author: Yunqing Wang <yunqingwang@google.com>
date: Wed Jun 30 02:56:36 EDT 2010
Merge "Add loopfilter initialization fix in multithreading code"
--- a/vp8/common/onyxc_int.h
+++ b/vp8/common/onyxc_int.h
@@ -201,6 +201,7 @@
void vp8_adjust_mb_lf_value(MACROBLOCKD *mbd, int *filter_level);
void vp8_init_loop_filter(VP8_COMMON *cm);
+void vp8_frame_init_loop_filter(loop_filter_info *lfi, int frame_type);
extern void vp8_loop_filter_frame(VP8_COMMON *cm, MACROBLOCKD *mbd, int filt_val);
#endif
--- a/vp8/decoder/threading.c
+++ b/vp8/decoder/threading.c
@@ -281,11 +281,11 @@
YV12_BUFFER_CONFIG *post = &cm->new_frame;
loop_filter_info *lfi = cm->lf_info;
+ int frame_type = cm->frame_type;
int mb_row;
int mb_col;
-
int baseline_filter_level[MAX_MB_SEGMENTS];
int filter_level;
int alt_flt_enabled = mbd->segmentation_enabled;
@@ -319,7 +319,10 @@
}
// Initialize the loop filter for this frame.
- vp8_init_loop_filter(cm);
+ if ((cm->last_filter_type != cm->filter_type) || (cm->last_sharpness_level != cm->sharpness_level))
+ vp8_init_loop_filter(cm);
+ else if (frame_type != cm->last_frame_type)
+ vp8_frame_init_loop_filter(lfi, frame_type);
// Set up the buffer pointers
y_ptr = post->y_buffer;