aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/hevc_cabac.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-09-23 21:36:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2014-10-01 12:12:28 +0200
commit9a3653c9ecc4bbbbb502513a70bccd4090ed12b0 (patch)
treeed91a449ea700211ef35076f23d0e1e0e02aeb17 /libavcodec/hevc_cabac.c
parent79551d2c7a772ea971e94f0b8dc03d1e897e8d86 (diff)
downloadffmpeg-9a3653c9ecc4bbbbb502513a70bccd4090ed12b0.tar.gz
hevc: reuse edge emu buffer for coefficients
Kind of hackish but... Reviewed-by: Mickael Raulet <Mickael.Raulet@insa-rennes.fr> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc_cabac.c')
-rw-r--r--libavcodec/hevc_cabac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c
index e2e5fac0ad..3862df7bdf 100644
--- a/libavcodec/hevc_cabac.c
+++ b/libavcodec/hevc_cabac.c
@@ -1079,7 +1079,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0,
int vshift = s->sps->vshift[c_idx];
uint8_t *dst = &s->frame->data[c_idx][(y0 >> vshift) * stride +
((x0 >> hshift) << s->sps->pixel_shift)];
- int16_t *coeffs = lc->tu.coeffs[c_idx > 0];
+ int16_t *coeffs = (int16_t*)(c_idx ? lc->edge_emu_buffer2 : lc->edge_emu_buffer);
uint8_t significant_coeff_group_flag[8][8] = {{0}};
int explicit_rdpcm_flag = 0;
int explicit_rdpcm_dir_flag;
@@ -1552,7 +1552,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0,
}
}
if (lc->tu.cross_pf) {
- int16_t *coeffs_y = lc->tu.coeffs[0];
+ int16_t *coeffs_y = (int16_t*)lc->edge_emu_buffer;
for (i = 0; i < (trafo_size * trafo_size); i++) {
coeffs[i] = coeffs[i] + ((lc->tu.res_scale_val * coeffs_y[i]) >> 3);