avcodec/hevc/dsp_template: Optimize impossible branches away

Saves 1856B of .text here.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2026-01-25 23:23:36 +01:00
parent 2729c52988
commit 0c7f87b136
+2 -2
View File
@@ -132,7 +132,7 @@ static void FUNC(dequant)(int16_t *coeffs, int16_t log2_size)
int x, y;
int size = 1 << log2_size;
if (shift > 0) {
if (BIT_DEPTH <= 9 || shift > 0) {
int offset = 1 << (shift - 1);
for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) {
@@ -140,7 +140,7 @@ static void FUNC(dequant)(int16_t *coeffs, int16_t log2_size)
coeffs++;
}
}
} else if (shift < 0) {
} else if (BIT_DEPTH > 10 && shift < 0) {
for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) {
*coeffs = *(uint16_t*)coeffs << -shift;