[vlc-commits] [Git][videolan/vlc][master] dav1d: fix tautology

Tristan Matthews (@tmatth) gitlab at videolan.org
Wed Oct 23 10:30:47 UTC 2024



Tristan Matthews pushed to branch master at VideoLAN / VLC


Commits:
f1a90394 by Tristan Matthews at 2024-10-23T10:17:47+00:00
dav1d: fix tautology

Fixes "warning: comparison is always false due to limited range of data type" as hbd will never be 0.

- - - - -


1 changed file:

- modules/codec/dav1d.c


Changes:

=====================================
modules/codec/dav1d.c
=====================================
@@ -115,14 +115,14 @@ static vlc_fourcc_t FindVlcChroma(const Dav1dPicture *img)
         img->seq_hdr->pri == DAV1D_COLOR_PRI_BT709 &&
         img->seq_hdr->trc == DAV1D_TRC_SRGB )
     {
-        if( img->seq_hdr->hbd < 0 || img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table_rgb) )
+        if( img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table_rgb) )
             return 0;
         return chroma_table_rgb[img->seq_hdr->hbd];
     }
 
     if( img->seq_hdr->layout < 0 || img->seq_hdr->layout >= (int)ARRAY_SIZE(chroma_table) )
         return 0;
-    if( img->seq_hdr->hbd < 0 || img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table[0]) )
+    if( img->seq_hdr->hbd >= (int)ARRAY_SIZE(chroma_table[0]) )
         return 0;
 
     return chroma_table[img->seq_hdr->layout][img->seq_hdr->hbd];



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f1a90394435471e75fee6f13383079a3d0272ec4

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/f1a90394435471e75fee6f13383079a3d0272ec4
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list