diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-07-12 08:36:03 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-07-26 15:00:11 +0000 |
commit | 73bb8f61d48dbf7237df2e9cacd037f12b84b00a (patch) | |
tree | be31373d956bb43258a2152b110606529f8c6216 /libavcodec/hevcdsp_template.c | |
parent | 56f98e340fca894a76d1ddbe33118b8d8c4db34a (diff) |
hevcdsp: remove an unneeded variable in the loop filter
beta0 and beta1 will always be the same
Diffstat (limited to 'libavcodec/hevcdsp_template.c')
-rw-r--r-- | libavcodec/hevcdsp_template.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c index f02e175196..8dcc83d786 100644 --- a/libavcodec/hevcdsp_template.c +++ b/libavcodec/hevcdsp_template.c @@ -1164,7 +1164,7 @@ static void FUNC(weighted_pred_avg)(uint8_t denom, static void FUNC(hevc_loop_filter_luma)(uint8_t *_pix, ptrdiff_t _xstride, ptrdiff_t _ystride, - int *_beta, int *_tc, + int beta, int *_tc, uint8_t *_no_p, uint8_t *_no_q) { int d, j; @@ -1172,6 +1172,8 @@ static void FUNC(hevc_loop_filter_luma)(uint8_t *_pix, ptrdiff_t xstride = _xstride / sizeof(pixel); ptrdiff_t ystride = _ystride / sizeof(pixel); + beta <<= BIT_DEPTH - 8; + for (j = 0; j < 2; j++) { const int dp0 = abs(P2 - 2 * P1 + P0); const int dq0 = abs(Q2 - 2 * Q1 + Q0); @@ -1179,7 +1181,6 @@ static void FUNC(hevc_loop_filter_luma)(uint8_t *_pix, const int dq3 = abs(TQ2 - 2 * TQ1 + TQ0); const int d0 = dp0 + dq0; const int d3 = dp3 + dq3; - const int beta = _beta[j] << (BIT_DEPTH - 8); const int tc = _tc[j] << (BIT_DEPTH - 8); const int no_p = _no_p[j]; const int no_q = _no_q[j]; @@ -1306,7 +1307,7 @@ static void FUNC(hevc_v_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride, } static void FUNC(hevc_h_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride, - int *beta, int *tc, uint8_t *no_p, + int beta, int *tc, uint8_t *no_p, uint8_t *no_q) { FUNC(hevc_loop_filter_luma)(pix, stride, sizeof(pixel), @@ -1314,7 +1315,7 @@ static void FUNC(hevc_h_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride, } static void FUNC(hevc_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride, - int *beta, int *tc, uint8_t *no_p, + int beta, int *tc, uint8_t *no_p, uint8_t *no_q) { FUNC(hevc_loop_filter_luma)(pix, sizeof(pixel), stride, |