diff options
author | Clément Bœsch <cboesch@gopro.com> | 2017-01-31 16:02:35 +0100 |
---|---|---|
committer | Clément Bœsch <cboesch@gopro.com> | 2017-01-31 16:05:06 +0100 |
commit | 05018c2cdaf3cbf5769bdf90951f707cf99edd52 (patch) | |
tree | 8a6509baa7b9667e2e4eee6c3015729d24eb9f23 | |
parent | a604115f72ad0d77b69193989bbe16174135129d (diff) | |
parent | cc16da75c2f99d92f7a6461100f041352deb6d88 (diff) | |
download | ffmpeg-05018c2cdaf3cbf5769bdf90951f707cf99edd52.tar.gz |
Merge commit 'cc16da75c2f99d92f7a6461100f041352deb6d88'
* commit 'cc16da75c2f99d92f7a6461100f041352deb6d88':
hevc: Add coefficient limiting to speed up IDCT
Noop again as we have these changes already, only random spacing
changes.
Merged-by: Clément Bœsch <cboesch@gopro.com>
-rw-r--r-- | libavcodec/hevc_cabac.c | 4 | ||||
-rw-r--r-- | libavcodec/hevcdsp_template.c | 13 |
2 files changed, 9 insertions, 8 deletions
diff --git a/libavcodec/hevc_cabac.c b/libavcodec/hevc_cabac.c index 457e0871a9..4f90dab1ac 100644 --- a/libavcodec/hevc_cabac.c +++ b/libavcodec/hevc_cabac.c @@ -1490,7 +1490,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, } else { int max_xy = FFMAX(last_significant_coeff_x, last_significant_coeff_y); if (max_xy == 0) - s->hevcdsp.idct_dc[log2_trafo_size-2](coeffs); + s->hevcdsp.idct_dc[log2_trafo_size - 2](coeffs); else { int col_limit = last_significant_coeff_x + last_significant_coeff_y + 4; if (max_xy < 4) @@ -1499,7 +1499,7 @@ void ff_hevc_hls_residual_coding(HEVCContext *s, int x0, int y0, col_limit = FFMIN(8, col_limit); else if (max_xy < 12) col_limit = FFMIN(24, col_limit); - s->hevcdsp.idct[log2_trafo_size-2](coeffs, col_limit); + s->hevcdsp.idct[log2_trafo_size - 2](coeffs, col_limit); } } } diff --git a/libavcodec/hevcdsp_template.c b/libavcodec/hevcdsp_template.c index 1dbd47a45b..665436cce3 100644 --- a/libavcodec/hevcdsp_template.c +++ b/libavcodec/hevcdsp_template.c @@ -223,7 +223,7 @@ static void FUNC(transform_4x4_luma)(int16_t *coeffs) for (i = 0; i < 16; i++) \ for (j = 1; j < end; j += 2) \ o_32[i] += transform[j][i] * src[j * sstep]; \ - TR_16(e_32, src, 1, 2 * sstep, SET, end/2); \ + TR_16(e_32, src, 1, 2 * sstep, SET, end / 2); \ \ for (i = 0; i < 16; i++) { \ assign(dst[i * dstep], e_32[i] + o_32[i]); \ @@ -232,21 +232,22 @@ static void FUNC(transform_4x4_luma)(int16_t *coeffs) } while (0) #define IDCT_VAR4(H) \ - int limit2 = FFMIN(col_limit + 4, H) + int limit2 = FFMIN(col_limit + 4, H) #define IDCT_VAR8(H) \ - int limit = FFMIN(col_limit, H); \ - int limit2 = FFMIN(col_limit + 4, H) + int limit = FFMIN(col_limit, H); \ + int limit2 = FFMIN(col_limit + 4, H) #define IDCT_VAR16(H) IDCT_VAR8(H) #define IDCT_VAR32(H) IDCT_VAR8(H) #define IDCT(H) \ static void FUNC(idct_ ## H ## x ## H )(int16_t *coeffs, \ - int col_limit) { \ + int col_limit) \ +{ \ int i; \ int shift = 7; \ int add = 1 << (shift - 1); \ int16_t *src = coeffs; \ - IDCT_VAR ##H(H); \ + IDCT_VAR ## H(H); \ \ for (i = 0; i < H; i++) { \ TR_ ## H(src, src, H, H, SCALE, limit2); \ |