diff --git a/vp9/common/vp9_loopfilter.h b/vp9/common/vp9_loopfilter.h index 8b752aa5c..53ec336a4 100644 --- a/vp9/common/vp9_loopfilter.h +++ b/vp9/common/vp9_loopfilter.h @@ -92,10 +92,15 @@ void vp9_loop_filter_partial_frame(struct VP9Common *cm, void vp9_loop_filter_update_sharpness(loop_filter_info_n *lfi, int sharpness_lvl); -extern void vp9_lpf_mbv_w(unsigned char *y_ptr, unsigned char *u_ptr, - unsigned char *v_ptr, int y_stride, int uv_stride, - struct loop_filter_info *lfi); -extern void vp9_lpf_mbh_w(unsigned char *y_ptr, unsigned char *u_ptr, - unsigned char *v_ptr, int y_stride, int uv_stride, - struct loop_filter_info *lfi); +void vp9_mb_lpf_horizontal_edge_w(unsigned char *s, int p, + const unsigned char *blimit, + const unsigned char *limit, + const unsigned char *thresh, + int count); + +void vp9_mb_lpf_vertical_edge_w(unsigned char *s, int p, + const unsigned char *blimit, + const unsigned char *limit, + const unsigned char *thresh, + int count); #endif // VP9_COMMON_VP9_LOOPFILTER_H_ diff --git a/vp9/common/vp9_loopfilter_filters.c b/vp9/common/vp9_loopfilter_filters.c index 18f0fea13..ed7b422df 100644 --- a/vp9/common/vp9_loopfilter_filters.c +++ b/vp9/common/vp9_loopfilter_filters.c @@ -596,7 +596,7 @@ static __inline void wide_mbfilter(int8_t mask, uint8_t hev, } } -static void vp9_mb_lpf_horizontal_edge_w +void vp9_mb_lpf_horizontal_edge_w ( unsigned char *s, int p, diff --git a/vp9/common/vp9_rtcd_defs.sh b/vp9/common/vp9_rtcd_defs.sh index 33ed5a490..d8517bbfa 100644 --- a/vp9/common/vp9_rtcd_defs.sh +++ b/vp9/common/vp9_rtcd_defs.sh @@ -233,11 +233,14 @@ vp9_loop_filter_simple_bh_c=vp9_loop_filter_bhs_c vp9_loop_filter_simple_bh_mmx=vp9_loop_filter_bhs_mmx vp9_loop_filter_simple_bh_sse2=vp9_loop_filter_bhs_sse2 +if [ "$CONFIG_WIDERLPF" = "yes" ]; then prototype void vp9_lpf_mbh_w "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi" -specialize vp9_lpf_mbh_w +specialize vp9_lpf_mbh_w sse2 prototype void vp9_lpf_mbv_w "unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi" -specialize vp9_lpf_mbv_w +specialize vp9_lpf_mbv_w sse2 +fi + # # post proc # diff --git a/vp9/common/x86/vp9_loopfilter_x86.c b/vp9/common/x86/vp9_loopfilter_x86.c index 61b1c77da..9f46eec4c 100644 --- a/vp9/common/x86/vp9_loopfilter_x86.c +++ b/vp9/common/x86/vp9_loopfilter_x86.c @@ -604,6 +604,20 @@ void vp9_loop_filter_mbh_sse2(unsigned char *y_ptr, lfi->lim, lfi->hev_thr, v_ptr); } +#if CONFIG_WIDERLPF +void vp9_lpf_mbh_w_sse2(unsigned char *y_ptr, unsigned char *u_ptr, + unsigned char *v_ptr, int y_stride, int uv_stride, + struct loop_filter_info *lfi) { + vp9_mb_lpf_horizontal_edge_w(y_ptr, y_stride, + lfi->mblim, lfi->lim, lfi->hev_thr, 2); + + /* u,v */ + if (u_ptr) + vp9_mbloop_filter_horizontal_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim, + lfi->lim, lfi->hev_thr, v_ptr); +} +#endif + void vp9_loop_filter_bh8x8_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi) { @@ -624,6 +638,20 @@ void vp9_loop_filter_mbv_sse2(unsigned char *y_ptr, unsigned char *u_ptr, lfi->lim, lfi->hev_thr, v_ptr); } +#if CONFIG_WIDERLPF +void vp9_lpf_mbv_w_sse2(unsigned char *y_ptr, unsigned char *u_ptr, + unsigned char *v_ptr, int y_stride, int uv_stride, + struct loop_filter_info *lfi) { + vp9_mb_lpf_vertical_edge_w(y_ptr, y_stride, + lfi->mblim, lfi->lim, lfi->hev_thr, 2); + + /* u,v */ + if (u_ptr) + vp9_mbloop_filter_vertical_edge_uv_sse2(u_ptr, uv_stride, lfi->mblim, + lfi->lim, lfi->hev_thr, v_ptr); +} +#endif + void vp9_loop_filter_bv8x8_sse2(unsigned char *y_ptr, unsigned char *u_ptr, unsigned char *v_ptr, int y_stride, int uv_stride, struct loop_filter_info *lfi) {