summaryrefslogtreecommitdiff
path: root/libavcodec/hevcdsp_template.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-07-19 14:50:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-22 16:27:26 +0200
commitd7e162d46b4a0fc03ca5161cdcac840152f048cb (patch)
tree80adaf9fa6c8585c83d4eccea37532246670b138 /libavcodec/hevcdsp_template.c
parentae2f048fd757f42bab563c4e4b0fbc75fa425242 (diff)
hevcdsp: remove an unneeded variable in the loop filter
beta0 and beta1 will always be the same within a CU Signed-off-by: Mickaƫl Raulet <mraulet@insa-rennes.fr> cherry picked from commit 4a23d824741a289c7d2d2f2871d1e2621b63fa1b Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevcdsp_template.c')
-rw-r--r--libavcodec/hevcdsp_template.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c
index 7840ec7472..8ebe8d400f 100644
--- a/libavcodec/hevcdsp_template.c
+++ b/libavcodec/hevcdsp_template.c
@@ -1564,7 +1564,7 @@ static void FUNC(put_hevc_epel_bi_w_hv)(uint8_t *_dst, ptrdiff_t _dststride, uin
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;
@@ -1572,6 +1572,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);
@@ -1579,7 +1581,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];
@@ -1706,7 +1707,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),
@@ -1714,7 +1715,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,