mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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>
This commit is contained in:
commit
05018c2cda
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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); \
|
||||
|
Loading…
Reference in New Issue
Block a user