Add loopfilter initialization fix in multithreading code
Modified loopfilter initialization to avoid unnecessary operations. Change-Id: I9fd1a5a49edc1cb8116c2a72a6908b1e437459ec
This commit is contained in:
parent
bead039d4d
commit
29d586b462
@ -201,6 +201,7 @@ typedef struct VP8Common
|
|||||||
|
|
||||||
void vp8_adjust_mb_lf_value(MACROBLOCKD *mbd, int *filter_level);
|
void vp8_adjust_mb_lf_value(MACROBLOCKD *mbd, int *filter_level);
|
||||||
void vp8_init_loop_filter(VP8_COMMON *cm);
|
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);
|
extern void vp8_loop_filter_frame(VP8_COMMON *cm, MACROBLOCKD *mbd, int filt_val);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -281,11 +281,11 @@ THREAD_FUNCTION vp8_thread_loop_filter(void *p_data)
|
|||||||
|
|
||||||
YV12_BUFFER_CONFIG *post = &cm->new_frame;
|
YV12_BUFFER_CONFIG *post = &cm->new_frame;
|
||||||
loop_filter_info *lfi = cm->lf_info;
|
loop_filter_info *lfi = cm->lf_info;
|
||||||
|
int frame_type = cm->frame_type;
|
||||||
|
|
||||||
int mb_row;
|
int mb_row;
|
||||||
int mb_col;
|
int mb_col;
|
||||||
|
|
||||||
|
|
||||||
int baseline_filter_level[MAX_MB_SEGMENTS];
|
int baseline_filter_level[MAX_MB_SEGMENTS];
|
||||||
int filter_level;
|
int filter_level;
|
||||||
int alt_flt_enabled = mbd->segmentation_enabled;
|
int alt_flt_enabled = mbd->segmentation_enabled;
|
||||||
@ -319,7 +319,10 @@ THREAD_FUNCTION vp8_thread_loop_filter(void *p_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the loop filter for this frame.
|
// 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
|
// Set up the buffer pointers
|
||||||
y_ptr = post->y_buffer;
|
y_ptr = post->y_buffer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user