This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit 59b119023fcb7ae72eda2852aa30b11467728208
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Tue Mar 10 22:07:17 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Sat Mar 14 19:31:45 2026 +0100

    avcodec/apv_dsp: Remove dead 8 bit code
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/apv_dsp.c       | 17 ++---------------
 libavcodec/x86/apv_dsp.asm | 46 ----------------------------------------------
 tests/checkasm/apv_dsp.c   | 38 --------------------------------------
 3 files changed, 2 insertions(+), 99 deletions(-)

diff --git a/libavcodec/apv_dsp.c b/libavcodec/apv_dsp.c
index 982ec36910..3513f04cd4 100644
--- a/libavcodec/apv_dsp.c
+++ b/libavcodec/apv_dsp.c
@@ -20,6 +20,7 @@
 
 #include "config.h"
 #include "libavutil/attributes.h"
+#include "libavutil/avassert.h"
 #include "libavutil/common.h"
 
 #include "apv.h"
@@ -100,20 +101,7 @@ static void apv_decode_transquant_c(void *output,
     }
 
     // Output.
-    if (bit_depth == 8) {
-        uint8_t *ptr = output;
-        int bd_shift = 20 - bit_depth;
-
-        for (int y = 0; y < 8; y++) {
-            for (int x = 0; x < 8; x++) {
-                int sample = ((recon_sample[y][x] +
-                               (1 << (bd_shift - 1))) >> bd_shift) +
-                    (1 << (bit_depth - 1));
-                ptr[x] = av_clip_uintp2(sample, bit_depth);
-            }
-            ptr += pitch;
-        }
-    } else {
+    av_assert2(bit_depth > 8 && bit_depth <= 16);
         uint16_t *ptr = output;
         int bd_shift = 20 - bit_depth;
         pitch /= 2; // Pitch was in bytes, 2 bytes per sample.
@@ -127,7 +115,6 @@ static void apv_decode_transquant_c(void *output,
             }
             ptr += pitch;
         }
-    }
 }
 
 av_cold void ff_apv_dsp_init(APVDSPContext *dsp)
diff --git a/libavcodec/x86/apv_dsp.asm b/libavcodec/x86/apv_dsp.asm
index e2f30fff13..2196759379 100644
--- a/libavcodec/x86/apv_dsp.asm
+++ b/libavcodec/x86/apv_dsp.asm
@@ -230,52 +230,6 @@ cglobal apv_decode_transquant, 5, 7, 16, output, pitch, 
input, qmatrix, bit_dept
     ; m11 = zero
     ; m12 = vector (1 << bit_depth) - 1
 
-    cmp       bit_depthd, 8
-    jne       store_10
-
-    lea       tmpq, [pitchq + 2*pitchq]
-%macro NORMALISE_AND_STORE_8 4
-    vpaddd    m%1, m%1, m8
-    vpaddd    m%2, m%2, m8
-    vpaddd    m%3, m%3, m8
-    vpaddd    m%4, m%4, m8
-    vpsrad    m%1, m%1, xm9
-    vpsrad    m%2, m%2, xm9
-    vpsrad    m%3, m%3, xm9
-    vpsrad    m%4, m%4, xm9
-    vpaddd    m%1, m%1, m10
-    vpaddd    m%2, m%2, m10
-    vpaddd    m%3, m%3, m10
-    vpaddd    m%4, m%4, m10
-    ; m%1 = A0-3 A4-7
-    ; m%2 = B0-3 B4-7
-    ; m%3 = C0-3 C4-7
-    ; m%4 = D0-3 D4-7
-    vpackusdw m%1, m%1, m%2
-    vpackusdw m%3, m%3, m%4
-    ; m%1 = A0-3 B0-3 A4-7 B4-7
-    ; m%2 = C0-3 D0-3 C4-7 D4-7
-    vpermq    m%1, m%1, q3120
-    vpermq    m%2, m%3, q3120
-    ; m%1 = A0-3 A4-7 B0-3 B4-7
-    ; m%2 = C0-3 C4-7 D0-3 D4-7
-    vpackuswb m%1, m%1, m%2
-    ; m%1 = A0-3 A4-7 C0-3 C4-7 B0-3 B4-7 D0-3 D4-7
-    vextracti128  xm%2, m%1, 1
-    vmovq     [outputq],            xm%1
-    vmovq     [outputq + pitchq],   xm%2
-    vpextrq   [outputq + 2*pitchq], xm%1, 1
-    vpextrq   [outputq + tmpq],     xm%2, 1
-    lea       outputq, [outputq + 4*pitchq]
-%endmacro
-
-    NORMALISE_AND_STORE_8 0, 1, 2, 3
-    NORMALISE_AND_STORE_8 4, 5, 6, 7
-
-    RET
-
-store_10:
-
 %macro NORMALISE_AND_STORE_10 2
     vpaddd    m%1, m%1, m8
     vpaddd    m%2, m%2, m8
diff --git a/tests/checkasm/apv_dsp.c b/tests/checkasm/apv_dsp.c
index 6d3a356838..68c0f0313c 100644
--- a/tests/checkasm/apv_dsp.c
+++ b/tests/checkasm/apv_dsp.c
@@ -24,41 +24,6 @@
 #include "libavutil/mem_internal.h"
 #include "libavcodec/apv_dsp.h"
 
-
-static void check_decode_transquant_8(void)
-{
-    LOCAL_ALIGNED_16(int16_t, input,      [64]);
-    LOCAL_ALIGNED_16(int16_t, qmatrix,    [64]);
-    LOCAL_ALIGNED_16(uint8_t, new_output, [64]);
-    LOCAL_ALIGNED_16(uint8_t, ref_output, [64]);
-
-    declare_func(void,
-                 void *output,
-                 ptrdiff_t pitch,
-                 const int16_t *input,
-                 const int16_t *qmatrix,
-                 int bit_depth,
-                 int qp_shift);
-
-    for (int i = 0; i < 64; i++) {
-        // Any signed 12-bit integer.
-        input[i] = rnd() % 2048 - 1024;
-
-        // qmatrix input is premultiplied by level_scale, so
-        // range is 1 to 255 * 71.  Interesting values are all
-        // at the low end of that, though.
-        qmatrix[i] = rnd() % 16 + 16;
-    }
-
-    call_ref(ref_output, 8, input, qmatrix, 8, 4);
-    call_new(new_output, 8, input, qmatrix, 8, 4);
-
-    if (memcmp(new_output, ref_output, 64 * sizeof(*ref_output)))
-        fail();
-
-    bench_new(new_output, 8, input, qmatrix, 8, 4);
-}
-
 static void check_decode_transquant_10(void)
 {
     LOCAL_ALIGNED_16( int16_t, input,      [64]);
@@ -99,9 +64,6 @@ void checkasm_check_apv_dsp(void)
 
     ff_apv_dsp_init(&dsp);
 
-    if (check_func(dsp.decode_transquant, "decode_transquant_8"))
-        check_decode_transquant_8();
-
     if (check_func(dsp.decode_transquant, "decode_transquant_10"))
         check_decode_transquant_10();
 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to