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

Git pushed a commit to branch master
in repository ffmpeg.

commit 0c7f87b136cf0c339ac334c45b72923ef903891c
Author:     Andreas Rheinhardt <[email protected]>
AuthorDate: Sun Jan 25 23:23:36 2026 +0100
Commit:     Andreas Rheinhardt <[email protected]>
CommitDate: Thu Jan 29 12:25:33 2026 +0100

    avcodec/hevc/dsp_template: Optimize impossible branches away
    
    Saves 1856B of .text here.
    
    Signed-off-by: Andreas Rheinhardt <[email protected]>
---
 libavcodec/hevc/dsp_template.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hevc/dsp_template.c b/libavcodec/hevc/dsp_template.c
index 573cf9ee1e..f703f6d071 100644
--- a/libavcodec/hevc/dsp_template.c
+++ b/libavcodec/hevc/dsp_template.c
@@ -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;

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

Reply via email to