diff options
author | Clément Bœsch <cboesch@gopro.com> | 2017-01-31 11:20:54 +0100 |
---|---|---|
committer | Clément Bœsch <cboesch@gopro.com> | 2017-01-31 15:31:34 +0100 |
commit | d0e132bab68073588dc55844a31b053fb0ee1c83 (patch) | |
tree | 1c3b3cd8bee776019f2960cfca1d561019cb84d4 | |
parent | c778a9657dc8a425ac65f89d81d64709f2090a9f (diff) | |
parent | 1bd890ad173d79e7906c5e1d06bf0a06cca4519d (diff) | |
download | ffmpeg-d0e132bab68073588dc55844a31b053fb0ee1c83.tar.gz |
Merge commit '1bd890ad173d79e7906c5e1d06bf0a06cca4519d'
* commit '1bd890ad173d79e7906c5e1d06bf0a06cca4519d':
hevc: Separate adding residual to prediction from IDCT
This commit should be a noop but isn't because of the following renames:
- transform_add → add_residual
- transform_skip → dequant
- idct_4x4_luma → transform_4x4_luma
Merged-by: Clément Bœsch <cboesch@gopro.com>
-rw-r--r-- | libavcodec/arm/hevcdsp_idct_neon.S | 8 | ||||
-rw-r--r-- | libavcodec/arm/hevcdsp_init_neon.c | 26 | ||||
-rw-r--r-- | libavcodec/hevc.c | 4 | ||||
-rw-r--r-- | libavcodec/hevc_cabac.c | 6 | ||||
-rw-r--r-- | libavcodec/hevcdsp.c | 12 | ||||
-rw-r--r-- | libavcodec/hevcdsp.h | 6 | ||||
-rw-r--r-- | libavcodec/hevcdsp_template.c | 39 | ||||
-rw-r--r-- | libavcodec/mips/hevcdsp_init_mips.c | 10 | ||||
-rw-r--r-- | libavcodec/x86/hevc_res_add.asm | 36 | ||||
-rw-r--r-- | libavcodec/x86/hevcdsp.h | 28 | ||||
-rw-r--r-- | libavcodec/x86/hevcdsp_init.c | 28 |
11 files changed, 99 insertions, 104 deletions
diff --git a/libavcodec/arm/hevcdsp_idct_neon.S b/libavcodec/arm/hevcdsp_idct_neon.S index 13d540e5ff..e39d00634b 100644 --- a/libavcodec/arm/hevcdsp_idct_neon.S +++ b/libavcodec/arm/hevcdsp_idct_neon.S @@ -97,7 +97,7 @@ function ff_hevc_idct_32x32_dc_neon_8, export=1 bx lr endfunc -function ff_hevc_transform_add_4x4_neon_8, export=1 +function ff_hevc_add_residual_4x4_neon_8, export=1 vldm r1, {q0-q1} vld1.32 d4[0], [r0], r2 vld1.32 d4[1], [r0], r2 @@ -117,7 +117,7 @@ function ff_hevc_transform_add_4x4_neon_8, export=1 bx lr endfunc -function ff_hevc_transform_add_8x8_neon_8, export=1 +function ff_hevc_add_residual_8x8_neon_8, export=1 mov r3, #8 1: subs r3, #1 vld1.16 {q0}, [r1]! @@ -130,7 +130,7 @@ function ff_hevc_transform_add_8x8_neon_8, export=1 bx lr endfunc -function ff_hevc_transform_add_16x16_neon_8, export=1 +function ff_hevc_add_residual_16x16_neon_8, export=1 mov r3, #16 1: subs r3, #1 vld1.16 {q0, q1}, [r1]! @@ -146,7 +146,7 @@ function ff_hevc_transform_add_16x16_neon_8, export=1 bx lr endfunc -function ff_hevc_transform_add_32x32_neon_8, export=1 +function ff_hevc_add_residual_32x32_neon_8, export=1 mov r3, #32 1: subs r3, #1 vldm r1!, {q0-q3} diff --git a/libavcodec/arm/hevcdsp_init_neon.c b/libavcodec/arm/hevcdsp_init_neon.c index 55918077e2..1a3912c609 100644 --- a/libavcodec/arm/hevcdsp_init_neon.c +++ b/libavcodec/arm/hevcdsp_init_neon.c @@ -34,14 +34,14 @@ void ff_hevc_idct_8x8_dc_neon_8(int16_t *coeffs); void ff_hevc_idct_16x16_dc_neon_8(int16_t *coeffs); void ff_hevc_idct_32x32_dc_neon_8(int16_t *coeffs); void ff_hevc_transform_luma_4x4_neon_8(int16_t *coeffs); -void ff_hevc_transform_add_4x4_neon_8(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride); -void ff_hevc_transform_add_8x8_neon_8(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride); -void ff_hevc_transform_add_16x16_neon_8(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride); -void ff_hevc_transform_add_32x32_neon_8(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride); +void ff_hevc_add_residual_4x4_neon_8(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_8x8_neon_8(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_16x16_neon_8(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); +void ff_hevc_add_residual_32x32_neon_8(uint8_t *_dst, int16_t *coeffs, + ptrdiff_t stride); #define PUT_PIXELS(name) \ void name(int16_t *dst, uint8_t *src, \ @@ -156,11 +156,11 @@ av_cold void ff_hevcdsp_init_neon(HEVCDSPContext *c, const int bit_depth) c->idct_dc[1] = ff_hevc_idct_8x8_dc_neon_8; c->idct_dc[2] = ff_hevc_idct_16x16_dc_neon_8; c->idct_dc[3] = ff_hevc_idct_32x32_dc_neon_8; - c->transform_add[0] = ff_hevc_transform_add_4x4_neon_8; - c->transform_add[1] = ff_hevc_transform_add_8x8_neon_8; - c->transform_add[2] = ff_hevc_transform_add_16x16_neon_8; - c->transform_add[3] = ff_hevc_transform_add_32x32_neon_8; - c->idct_4x4_luma = ff_hevc_transform_luma_4x4_neon_8; + c->add_residual[0] = ff_hevc_add_residual_4x4_neon_8; + c->add_residual[1] = ff_hevc_add_residual_8x8_neon_8; + c->add_residual[2] = ff_hevc_add_residual_16x16_neon_8; + c->add_residual[3] = ff_hevc_add_residual_32x32_neon_8; + c->transform_4x4_luma = ff_hevc_transform_luma_4x4_neon_8; put_hevc_qpel_neon[1][0] = ff_hevc_put_qpel_v1_neon_8; put_hevc_qpel_neon[2][0] = ff_hevc_put_qpel_v2_neon_8; put_hevc_qpel_neon[3][0] = ff_hevc_put_qpel_v3_neon_8; diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index 607a8da95e..505249e6b5 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -1052,7 +1052,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0, for (i = 0; i < (size * size); i++) { coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); } - s->hevcdsp.transform_add[log2_trafo_size_c-2](dst, coeffs, stride); + s->hevcdsp.add_residual[log2_trafo_size_c-2](dst, coeffs, stride); } } @@ -1081,7 +1081,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0, for (i = 0; i < (size * size); i++) { coeffs[i] = ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); } - s->hevcdsp.transform_add[log2_trafo_size_c-2](dst, coeffs, stride); + s->hevcdsp.add_residual[log2_trafo_size_c-2](dst, coeffs, stride); } } } else if (s->ps.sps->chroma_format_idc && blk_idx == 3) { diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c index 05b2821840..457e0871a9 100644 --- a/libavcodec/hevc_cabac.c +++ b/libavcodec/hevc_cabac.c @@ -1476,7 +1476,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, FFSWAP(int16_t, coeffs[i], coeffs[16 - i - 1]); } - s->hevcdsp.transform_skip(coeffs, log2_trafo_size); + s->hevcdsp.dequant(coeffs, log2_trafo_size); if (explicit_rdpcm_flag || (s->ps.sps->implicit_rdpcm_enabled_flag && lc->cu.pred_mode == MODE_INTRA && @@ -1486,7 +1486,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, s->hevcdsp.transform_rdpcm(coeffs, log2_trafo_size, mode); } } else if (lc->cu.pred_mode == MODE_INTRA && c_idx == 0 && log2_trafo_size == 2) { - s->hevcdsp.idct_4x4_luma(coeffs); + s->hevcdsp.transform_4x4_luma(coeffs); } else { int max_xy = FFMAX(last_significant_coeff_x, last_significant_coeff_y); if (max_xy == 0) @@ -1510,7 +1510,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, coeffs[i] = coeffs[i] + ((lc->tu.res_scale_val * coeffs_y[i]) >> 3); } } - s->hevcdsp.transform_add[log2_trafo_size-2](dst, coeffs, stride); + s->hevcdsp.add_residual[log2_trafo_size-2](dst, coeffs, stride); } void ff_hevc_hls_mvd_coding(HEVCContext *s, int x0, int y0, int log2_cb_size) diff --git a/libavcodec/hevcdsp.c b/libavcodec/hevcdsp.c index 9d773d960e..23e923f8e5 100644 --- a/libavcodec/hevcdsp.c +++ b/libavcodec/hevcdsp.c @@ -195,13 +195,13 @@ void ff_hevc_dsp_init(HEVCDSPContext *hevcdsp, int bit_depth) #define HEVC_DSP(depth) \ hevcdsp->put_pcm = FUNC(put_pcm, depth); \ - hevcdsp->transform_add[0] = FUNC(transform_add4x4, depth); \ - hevcdsp->transform_add[1] = FUNC(transform_add8x8, depth); \ - hevcdsp->transform_add[2] = FUNC(transform_add16x16, depth); \ - hevcdsp->transform_add[3] = FUNC(transform_add32x32, depth); \ - hevcdsp->transform_skip = FUNC(transform_skip, depth); \ + hevcdsp->add_residual[0] = FUNC(add_residual4x4, depth); \ + hevcdsp->add_residual[1] = FUNC(add_residual8x8, depth); \ + hevcdsp->add_residual[2] = FUNC(add_residual16x16, depth); \ + hevcdsp->add_residual[3] = FUNC(add_residual32x32, depth); \ + hevcdsp->dequant = FUNC(dequant, depth); \ hevcdsp->transform_rdpcm = FUNC(transform_rdpcm, depth); \ - hevcdsp->idct_4x4_luma = FUNC(transform_4x4_luma, depth); \ + hevcdsp->transform_4x4_luma = FUNC(transform_4x4_luma, depth); \ hevcdsp->idct[0] = FUNC(idct_4x4, depth); \ hevcdsp->idct[1] = FUNC(idct_8x8, depth); \ hevcdsp->idct[2] = FUNC(idct_16x16, depth); \ diff --git a/libavcodec/hevcdsp.h b/libavcodec/hevcdsp.h index 9f1f6dd59f..3b7e737f31 100644 --- a/libavcodec/hevcdsp.h +++ b/libavcodec/hevcdsp.h @@ -46,13 +46,13 @@ typedef struct HEVCDSPContext { void (*put_pcm)(uint8_t *_dst, ptrdiff_t _stride, int width, int height, struct GetBitContext *gb, int pcm_bit_depth); - void (*transform_add[4])(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stride); + void (*add_residual[4])(uint8_t *_dst, int16_t *coeffs, ptrdiff_t _stride); - void (*transform_skip)(int16_t *coeffs, int16_t log2_size); + void (*dequant)(int16_t *coeffs, int16_t log2_size); void (*transform_rdpcm)(int16_t *coeffs, int16_t log2_size, int mode); - void (*idct_4x4_luma)(int16_t *coeffs); + void (*transform_4x4_luma)(int16_t *coeffs); void (*idct[4])(int16_t *coeffs, int col_limit); diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c index 78eb3545cd..66b1ac02e7 100644 --- a/libavcodec/hevcdsp_template.c +++ b/libavcodec/hevcdsp_template.c @@ -42,8 +42,8 @@ static void FUNC(put_pcm)(uint8_t *_dst, ptrdiff_t stride, int width, int height } } -static av_always_inline void FUNC(transquant_bypass)(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride, int size) +static av_always_inline void FUNC(add_residual)(uint8_t *_dst, int16_t *res, + ptrdiff_t stride, int size) { int x, y; pixel *dst = (pixel *)_dst; @@ -52,35 +52,35 @@ static av_always_inline void FUNC(transquant_bypass)(uint8_t *_dst, int16_t *coe for (y = 0; y < size; y++) { for (x = 0; x < size; x++) { - dst[x] = av_clip_pixel(dst[x] + *coeffs); - coeffs++; + dst[x] = av_clip_pixel(dst[x] + *res); + res++; } dst += stride; } } -static void FUNC(transform_add4x4)(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride) +static void FUNC(add_residual4x4)(uint8_t *_dst, int16_t *res, + ptrdiff_t stride) { - FUNC(transquant_bypass)(_dst, coeffs, stride, 4); + FUNC(add_residual)(_dst, res, stride, 4); } -static void FUNC(transform_add8x8)(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride) +static void FUNC(add_residual8x8)(uint8_t *_dst, int16_t *res, + ptrdiff_t stride) { - FUNC(transquant_bypass)(_dst, coeffs, stride, 8); + FUNC(add_residual)(_dst, res, stride, 8); } -static void FUNC(transform_add16x16)(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride) +static void FUNC(add_residual16x16)(uint8_t *_dst, int16_t *res, + ptrdiff_t stride) { - FUNC(transquant_bypass)(_dst, coeffs, stride, 16); + FUNC(add_residual)(_dst, res, stride, 16); } -static void FUNC(transform_add32x32)(uint8_t *_dst, int16_t *coeffs, - ptrdiff_t stride) +static void FUNC(add_residual32x32)(uint8_t *_dst, int16_t *res, + ptrdiff_t stride) { - FUNC(transquant_bypass)(_dst, coeffs, stride, 32); + FUNC(add_residual)(_dst, res, stride, 32); } @@ -106,13 +106,11 @@ static void FUNC(transform_rdpcm)(int16_t *_coeffs, int16_t log2_size, int mode) } } -static void FUNC(transform_skip)(int16_t *_coeffs, int16_t log2_size) +static void FUNC(dequant)(int16_t *coeffs, int16_t log2_size) { int shift = 15 - BIT_DEPTH - log2_size; int x, y; int size = 1 << log2_size; - int16_t *coeffs = _coeffs; - if (shift > 0) { int offset = 1 << (shift - 1); @@ -134,8 +132,6 @@ static void FUNC(transform_skip)(int16_t *_coeffs, int16_t log2_size) #define SET(dst, x) (dst) = (x) #define SCALE(dst, x) (dst) = av_clip_int16(((x) + add) >> shift) -#define ADD_AND_SCALE(dst, x) \ - (dst) = av_clip_pixel((dst) + av_clip_int16(((x) + add) >> shift)) #define TR_4x4_LUMA(dst, src, step, assign) \ do { \ @@ -299,7 +295,6 @@ IDCT_DC(32) #undef SET #undef SCALE -#undef ADD_AND_SCALE static void FUNC(sao_band_filter)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride_dst, ptrdiff_t stride_src, diff --git a/libavcodec/mips/hevcdsp_init_mips.c b/libavcodec/mips/hevcdsp_init_mips.c index 3675b93155..776d13e4d3 100644 --- a/libavcodec/mips/hevcdsp_init_mips.c +++ b/libavcodec/mips/hevcdsp_init_mips.c @@ -437,11 +437,11 @@ static av_cold void hevc_dsp_init_msa(HEVCDSPContext *c, c->idct_dc[1] = ff_hevc_idct_dc_8x8_msa; c->idct_dc[2] = ff_hevc_idct_dc_16x16_msa; c->idct_dc[3] = ff_hevc_idct_dc_32x32_msa; - c->transform_add[0] = ff_hevc_addblk_4x4_msa; - c->transform_add[1] = ff_hevc_addblk_8x8_msa; - c->transform_add[2] = ff_hevc_addblk_16x16_msa; - c->transform_add[3] = ff_hevc_addblk_32x32_msa; - c->idct_4x4_luma = ff_hevc_idct_luma_4x4_msa; + c->add_residual[0] = ff_hevc_addblk_4x4_msa; + c->add_residual[1] = ff_hevc_addblk_8x8_msa; + c->add_residual[2] = ff_hevc_addblk_16x16_msa; + c->add_residual[3] = ff_hevc_addblk_32x32_msa; + c->transform_4x4_luma = ff_hevc_idct_luma_4x4_msa; } } #endif // #if HAVE_MSA diff --git a/libavcodec/x86/hevc_res_add.asm b/libavcodec/x86/hevc_res_add.asm index dc3e88a373..869288faf3 100644 --- a/libavcodec/x86/hevc_res_add.asm +++ b/libavcodec/x86/hevc_res_add.asm @@ -1,5 +1,5 @@ ; /* -; * Provide SIMD optimizations for transform_add functions for HEVC decoding +; * Provide SIMD optimizations for add_residual functions for HEVC decoding ; * Copyright (c) 2014 Pierre-Edouard LEPERE ; * ; * This file is part of FFmpeg. @@ -52,7 +52,7 @@ cextern pw_1023 INIT_MMX mmxext ; void ff_hevc_tranform_add_8_mmxext(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) -cglobal hevc_transform_add4_8, 3, 4, 6 +cglobal hevc_add_residual4_8, 3, 4, 6 TR_ADD_MMX_4_8 add r1, 16 lea r0, [r0+r2*2] @@ -135,8 +135,8 @@ cglobal hevc_transform_add4_8, 3, 4, 6 %macro TRANSFORM_ADD_8 0 -; void ff_hevc_transform_add8_8_<opt>(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) -cglobal hevc_transform_add8_8, 3, 4, 8 +; void ff_hevc_add_residual8_8_<opt>(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +cglobal hevc_add_residual8_8, 3, 4, 8 lea r3, [r2*3] TR_ADD_SSE_8_8 add r1, 64 @@ -144,8 +144,8 @@ cglobal hevc_transform_add8_8, 3, 4, 8 TR_ADD_SSE_8_8 RET -; void ff_hevc_transform_add16_8_<opt>(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) -cglobal hevc_transform_add16_8, 3, 4, 7 +; void ff_hevc_add_residual16_8_<opt>(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +cglobal hevc_add_residual16_8, 3, 4, 7 pxor m0, m0 lea r3, [r2*3] TR_ADD_SSE_16_32_8 0, r0, r0+r2 @@ -158,8 +158,8 @@ cglobal hevc_transform_add16_8, 3, 4, 7 %endrep RET -; void ff_hevc_transform_add32_8_<opt>(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) -cglobal hevc_transform_add32_8, 3, 4, 7 +; void ff_hevc_add_residual32_8_<opt>(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +cglobal hevc_add_residual32_8, 3, 4, 7 pxor m0, m0 TR_ADD_SSE_16_32_8 0, r0, r0+16 TR_ADD_SSE_16_32_8 64, r0+r2, r0+r2+16 @@ -179,8 +179,8 @@ TRANSFORM_ADD_8 %if HAVE_AVX2_EXTERNAL INIT_YMM avx2 -; void ff_hevc_transform_add32_8_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) -cglobal hevc_transform_add32_8, 3, 4, 7 +; void ff_hevc_add_residual32_8_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride) +cglobal hevc_add_residual32_8, 3, 4, 7 pxor m0, m0 lea r3, [r2*3] TR_ADD_SSE_16_32_8 0, r0, r0+r2 @@ -195,7 +195,7 @@ cglobal hevc_transform_add32_8, 3, 4, 7 %endif ;----------------------------------------------------------------------------- -; void ff_hevc_transform_add_10(pixel *dst, int16_t *block, int stride) +; void ff_hevc_add_residual_10(pixel *dst, int16_t *block, int stride) ;----------------------------------------------------------------------------- %macro TR_ADD_SSE_8_10 4 mova m0, [%4] @@ -310,7 +310,7 @@ cglobal hevc_transform_add32_8, 3, 4, 7 INIT_MMX mmxext -cglobal hevc_transform_add4_10,3,4, 6 +cglobal hevc_add_residual4_10,3,4, 6 pxor m2, m2 mova m3, [max_pixels_10] TR_ADD_MMX4_10 r0, r2, r1 @@ -320,10 +320,10 @@ cglobal hevc_transform_add4_10,3,4, 6 RET ;----------------------------------------------------------------------------- -; void ff_hevc_transform_add_10(pixel *dst, int16_t *block, int stride) +; void ff_hevc_add_residual_10(pixel *dst, int16_t *block, int stride) ;----------------------------------------------------------------------------- INIT_XMM sse2 -cglobal hevc_transform_add8_10,3,4,6 +cglobal hevc_add_residual8_10,3,4,6 pxor m4, m4 mova m5, [max_pixels_10] lea r3, [r2*3] @@ -334,7 +334,7 @@ cglobal hevc_transform_add8_10,3,4,6 TR_ADD_SSE_8_10 r0, r2, r3, r1 RET -cglobal hevc_transform_add16_10,3,4,6 +cglobal hevc_add_residual16_10,3,4,6 pxor m4, m4 mova m5, [max_pixels_10] @@ -346,7 +346,7 @@ cglobal hevc_transform_add16_10,3,4,6 %endrep RET -cglobal hevc_transform_add32_10,3,4,6 +cglobal hevc_add_residual32_10,3,4,6 pxor m4, m4 mova m5, [max_pixels_10] @@ -361,7 +361,7 @@ cglobal hevc_transform_add32_10,3,4,6 %if HAVE_AVX2_EXTERNAL INIT_YMM avx2 -cglobal hevc_transform_add16_10,3,4,6 +cglobal hevc_add_residual16_10,3,4,6 pxor m4, m4 mova m5, [max_pixels_10] lea r3, [r2*3] @@ -374,7 +374,7 @@ cglobal hevc_transform_add16_10,3,4,6 %endrep RET -cglobal hevc_transform_add32_10,3,4,6 +cglobal hevc_add_residual32_10,3,4,6 pxor m4, m4 mova m5, [max_pixels_10] diff --git a/libavcodec/x86/hevcdsp.h b/libavcodec/x86/hevcdsp.h index ad8168fb5b..3cfdc272cf 100644 --- a/libavcodec/x86/hevcdsp.h +++ b/libavcodec/x86/hevcdsp.h @@ -239,23 +239,23 @@ WEIGHTING_PROTOTYPES(12, sse4); /////////////////////////////////////////////////////////////////////////////// // TRANSFORM_ADD /////////////////////////////////////////////////////////////////////////////// -void ff_hevc_transform_add4_8_mmxext(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add8_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add16_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add32_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual4_8_mmxext(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual8_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual16_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual32_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add8_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add16_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add32_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual8_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual16_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual32_8_avx(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add32_8_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual32_8_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add4_10_mmxext(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add8_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add16_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add32_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual4_10_mmxext(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual8_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual16_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual32_10_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add16_10_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); -void ff_hevc_transform_add32_10_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual16_10_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); +void ff_hevc_add_residual32_10_avx2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride); #endif // AVCODEC_X86_HEVCDSP_H diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index 09eb06d0c9..da73d76638 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -700,7 +700,7 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) if (EXTERNAL_MMXEXT(cpu_flags)) { c->idct_dc[0] = ff_hevc_idct4x4_dc_8_mmxext; c->idct_dc[1] = ff_hevc_idct8x8_dc_8_mmxext; - c->transform_add[0] = ff_hevc_transform_add4_8_mmxext; + c->add_residual[0] = ff_hevc_add_residual4_8_mmxext; } if (EXTERNAL_SSE2(cpu_flags)) { c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2; @@ -716,9 +716,9 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->idct_dc[2] = ff_hevc_idct16x16_dc_8_sse2; c->idct_dc[3] = ff_hevc_idct32x32_dc_8_sse2; - c->transform_add[1] = ff_hevc_transform_add8_8_sse2; - c->transform_add[2] = ff_hevc_transform_add16_8_sse2; - c->transform_add[3] = ff_hevc_transform_add32_8_sse2; + c->add_residual[1] = ff_hevc_add_residual8_8_sse2; + c->add_residual[2] = ff_hevc_add_residual16_8_sse2; + c->add_residual[3] = ff_hevc_add_residual32_8_sse2; } if (EXTERNAL_SSSE3(cpu_flags)) { if(ARCH_X86_64) { @@ -748,9 +748,9 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) } SAO_BAND_INIT(8, avx); - c->transform_add[1] = ff_hevc_transform_add8_8_avx; - c->transform_add[2] = ff_hevc_transform_add16_8_avx; - c->transform_add[3] = ff_hevc_transform_add32_8_avx; + c->add_residual[1] = ff_hevc_add_residual8_8_avx; + c->add_residual[2] = ff_hevc_add_residual16_8_avx; + c->add_residual[3] = ff_hevc_add_residual32_8_avx; } if (EXTERNAL_AVX2(cpu_flags)) { c->sao_band_filter[0] = ff_hevc_sao_band_filter_8_8_avx2; @@ -850,11 +850,11 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->sao_edge_filter[3] = ff_hevc_sao_edge_filter_48_8_avx2; c->sao_edge_filter[4] = ff_hevc_sao_edge_filter_64_8_avx2; - c->transform_add[3] = ff_hevc_transform_add32_8_avx2; + c->add_residual[3] = ff_hevc_add_residual32_8_avx2; } } else if (bit_depth == 10) { if (EXTERNAL_MMXEXT(cpu_flags)) { - c->transform_add[0] = ff_hevc_transform_add4_10_mmxext; + c->add_residual[0] = ff_hevc_add_residual4_10_mmxext; c->idct_dc[0] = ff_hevc_idct4x4_dc_10_mmxext; c->idct_dc[1] = ff_hevc_idct8x8_dc_10_mmxext; } @@ -872,9 +872,9 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) c->idct_dc[2] = ff_hevc_idct16x16_dc_10_sse2; c->idct_dc[3] = ff_hevc_idct32x32_dc_10_sse2; - c->transform_add[1] = ff_hevc_transform_add8_10_sse2; - c->transform_add[2] = ff_hevc_transform_add16_10_sse2; - c->transform_add[3] = ff_hevc_transform_add32_10_sse2; + c->add_residual[1] = ff_hevc_add_residual8_10_sse2; + c->add_residual[2] = ff_hevc_add_residual16_10_sse2; + c->add_residual[3] = ff_hevc_add_residual32_10_sse2; } if (EXTERNAL_SSSE3(cpu_flags) && ARCH_X86_64) { c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_10_ssse3; @@ -1053,8 +1053,8 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) SAO_BAND_INIT(10, avx2); SAO_EDGE_INIT(10, avx2); - c->transform_add[2] = ff_hevc_transform_add16_10_avx2; - c->transform_add[3] = ff_hevc_transform_add32_10_avx2; + c->add_residual[2] = ff_hevc_add_residual16_10_avx2; + c->add_residual[3] = ff_hevc_add_residual32_10_avx2; } } else if (bit_depth == 12) { |