The branch, master has been updated
       via  742474bc24e677a507d591d6bc07da83fd7b5d73 (commit)
       via  1ca2c68278ee52837cc61b301c022b7a11722543 (commit)
       via  ca1ab8815cbbf94c24865e5da749fb1540ff255a (commit)
      from  893250a734adf1963f3d5a245f5f363ece778c7f (commit)


- Log -----------------------------------------------------------------
commit 742474bc24e677a507d591d6bc07da83fd7b5d73
Author:     Zhao Zhili <[email protected]>
AuthorDate: Thu Sep 4 17:36:46 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Sat Sep 6 15:11:48 2025 +0000

    avformat/mov: fix unused variable entry in parse_exif_item

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 81753d04e9..216c6a5442 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -10318,7 +10318,6 @@ static int mov_parse_exif_item(AVFormatContext *s,
     MOVContext *c = s->priv_data;
     AVPacketSideData *sd;
     AVExifMetadata ifd = { 0 };
-    AVExifEntry *entry = NULL;
     AVBufferRef *buf;
     int64_t offset = 0, pos = avio_tell(s->pb);
     unsigned orientation_id = av_exif_get_tag_id("Orientation");

commit 1ca2c68278ee52837cc61b301c022b7a11722543
Author:     Zhao Zhili <[email protected]>
AuthorDate: Thu Sep 4 17:30:14 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Sat Sep 6 15:11:48 2025 +0000

    avcodec/pcm: fix some unused variables/functions warning
    
    v is unused when ALAW/MULAW/VIDC are disabled.

diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 71b040c9b6..ea3e66868d 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -38,7 +38,7 @@
 #include "encode.h"
 #include "pcm_tablegen.h"
 
-static av_cold int pcm_encode_init(AVCodecContext *avctx)
+static av_cold av_unused int pcm_encode_init(AVCodecContext *avctx)
 {
     avctx->frame_size = 0;
 #if !CONFIG_HARDCODED_TABLES
@@ -104,10 +104,10 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx)
         }                                                               \
     }
 
-static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
-                            const AVFrame *frame, int *got_packet_ptr)
+static av_unused int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
+                                      const AVFrame *frame, int 
*got_packet_ptr)
 {
-    int n, c, sample_size, v, ret;
+    int n, c, sample_size, ret;
     const short *samples;
     unsigned char *dst;
     const uint8_t *samples_uint8_t;
@@ -230,7 +230,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
 #if CONFIG_PCM_ALAW_ENCODER
     case AV_CODEC_ID_PCM_ALAW:
         for (; n > 0; n--) {
-            v      = *samples++;
+            int v = *samples++;
             *dst++ = linear_to_alaw[(v + 32768) >> 2];
         }
         break;
@@ -238,7 +238,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
 #if CONFIG_PCM_MULAW_ENCODER
     case AV_CODEC_ID_PCM_MULAW:
         for (; n > 0; n--) {
-            v      = *samples++;
+            int v = *samples++;
             *dst++ = linear_to_ulaw[(v + 32768) >> 2];
         }
         break;
@@ -246,7 +246,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
 #if CONFIG_PCM_VIDC_ENCODER
     case AV_CODEC_ID_PCM_VIDC:
         for (; n > 0; n--) {
-            v      = *samples++;
+            int v = *samples++;
             *dst++ = linear_to_vidc[(v + 32768) >> 2];
         }
         break;

commit ca1ab8815cbbf94c24865e5da749fb1540ff255a
Author:     Zhao Zhili <[email protected]>
AuthorDate: Tue Sep 2 10:36:16 2025 +0800
Commit:     Zhao Zhili <[email protected]>
CommitDate: Sat Sep 6 15:11:48 2025 +0000

    avcodec/pcm: use stricter conditional expressions for compilation

diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 7132eeb8de..71b040c9b6 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -227,7 +227,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
             bytestream_put_buffer(&dst, src, n * sample_size);
         }
         break;
-#if CONFIG_PCM_ALAW_DECODER || CONFIG_PCM_ALAW_ENCODER
+#if CONFIG_PCM_ALAW_ENCODER
     case AV_CODEC_ID_PCM_ALAW:
         for (; n > 0; n--) {
             v      = *samples++;
@@ -235,7 +235,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
         }
         break;
 #endif
-#if CONFIG_PCM_MULAW_DECODER || CONFIG_PCM_MULAW_ENCODER
+#if CONFIG_PCM_MULAW_ENCODER
     case AV_CODEC_ID_PCM_MULAW:
         for (; n > 0; n--) {
             v      = *samples++;
@@ -243,7 +243,7 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket 
*avpkt,
         }
         break;
 #endif
-#if CONFIG_PCM_VIDC_DECODER || CONFIG_PCM_VIDC_ENCODER
+#if CONFIG_PCM_VIDC_ENCODER
     case AV_CODEC_ID_PCM_VIDC:
         for (; n > 0; n--) {
             v      = *samples++;
@@ -346,19 +346,19 @@ static av_cold av_unused int 
pcm_lut_decode_init(AVCodecContext *avctx)
     switch (avctx->codec_id) {
     default:
         av_unreachable("pcm_lut_decode_init() only used with alaw, mulaw and 
vidc");
-#if CONFIG_PCM_ALAW_DECODER || CONFIG_PCM_ALAW_ENCODER
+#if CONFIG_PCM_ALAW_DECODER
     case AV_CODEC_ID_PCM_ALAW:
         for (int i = 0; i < 256; i++)
             s->table[i] = alaw2linear(i);
         break;
 #endif
-#if CONFIG_PCM_MULAW_DECODER || CONFIG_PCM_MULAW_ENCODER
+#if CONFIG_PCM_MULAW_DECODER
     case AV_CODEC_ID_PCM_MULAW:
         for (int i = 0; i < 256; i++)
             s->table[i] = ulaw2linear(i);
         break;
 #endif
-#if CONFIG_PCM_VIDC_DECODER || CONFIG_PCM_VIDC_ENCODER
+#if CONFIG_PCM_VIDC_DECODER
     case AV_CODEC_ID_PCM_VIDC:
         for (int i = 0; i < 256; i++)
             s->table[i] = vidc2linear(i);
@@ -570,9 +570,8 @@ static int pcm_decode_frame(AVCodecContext *avctx, AVFrame 
*frame,
             bytestream_get_buffer(&src, samples, n * sample_size);
         }
         break;
-#if CONFIG_PCM_ALAW_DECODER || CONFIG_PCM_ALAW_ENCODER || \
-    CONFIG_PCM_MULAW_DECODER || CONFIG_PCM_MULAW_ENCODER || \
-    CONFIG_PCM_VIDC_DECODER || CONFIG_PCM_VIDC_ENCODER
+#if CONFIG_PCM_ALAW_DECODER || CONFIG_PCM_MULAW_DECODER || \
+    CONFIG_PCM_VIDC_DECODER
     case AV_CODEC_ID_PCM_ALAW:
     case AV_CODEC_ID_PCM_MULAW:
     case AV_CODEC_ID_PCM_VIDC: {
@@ -684,9 +683,7 @@ const FFCodec ff_ ## name_ ## _decoder = {                  
                \
  *       to the table in pcm_decode_init() as well. */
 //            AV_CODEC_ID_*      pcm_* name
 //                          AV_SAMPLE_FMT_*    long name                       
         DecodeContext   decode init func
-#if CONFIG_PCM_ALAW_DECODER || CONFIG_PCM_ALAW_ENCODER
 PCM_CODEC_EXT(ALAW,         S16, alaw,         "PCM A-law / G.711 A-law",      
         PCMLUTDecode,   pcm_lut_decode_init);
-#endif
 PCM_DEC_EXT  (F16LE,        FLT, f16le,        "PCM 16.8 floating point 
little-endian", PCMScaleDecode, pcm_scale_decode_init);
 PCM_DEC_EXT  (F24LE,        FLT, f24le,        "PCM 24.0 floating point 
little-endian", PCMScaleDecode, pcm_scale_decode_init);
 PCM_CODEC    (F32BE,        FLT, f32be,        "PCM 32-bit floating point 
big-endian");
@@ -694,9 +691,7 @@ PCM_CODEC    (F32LE,        FLT, f32le,        "PCM 32-bit 
floating point little
 PCM_CODEC    (F64BE,        DBL, f64be,        "PCM 64-bit floating point 
big-endian");
 PCM_CODEC    (F64LE,        DBL, f64le,        "PCM 64-bit floating point 
little-endian");
 PCM_DECODER  (LXF,          S32P,lxf,          "PCM signed 20-bit 
little-endian planar");
-#if CONFIG_PCM_MULAW_DECODER || CONFIG_PCM_MULAW_ENCODER
 PCM_CODEC_EXT(MULAW,        S16, mulaw,        "PCM mu-law / G.711 mu-law",    
         PCMLUTDecode,   pcm_lut_decode_init);
-#endif
 PCM_CODEC    (S8,           U8,  s8,           "PCM signed 8-bit");
 PCM_CODEC    (S8_PLANAR,    U8P, s8_planar,    "PCM signed 8-bit planar");
 PCM_CODEC    (S16BE,        S16, s16be,        "PCM signed 16-bit big-endian");
@@ -719,7 +714,5 @@ PCM_CODEC    (U32BE,        S32, u32be,        "PCM 
unsigned 32-bit big-endian")
 PCM_CODEC    (U32LE,        S32, u32le,        "PCM unsigned 32-bit 
little-endian");
 PCM_CODEC    (S64BE,        S64, s64be,        "PCM signed 64-bit big-endian");
 PCM_CODEC    (S64LE,        S64, s64le,        "PCM signed 64-bit 
little-endian");
-#if CONFIG_PCM_VIDC_DECODER || CONFIG_PCM_VIDC_ENCODER
 PCM_CODEC_EXT(VIDC,         S16, vidc,         "PCM Archimedes VIDC",          
         PCMLUTDecode,   pcm_lut_decode_init);
-#endif
 PCM_DECODER  (SGA,          U8,  sga,          "PCM SGA");
diff --git a/libavcodec/pcm_tablegen.h b/libavcodec/pcm_tablegen.h
index 60ef9656d5..2fd2e0e4f9 100644
--- a/libavcodec/pcm_tablegen.h
+++ b/libavcodec/pcm_tablegen.h
@@ -102,20 +102,9 @@ static av_cold int vidc2linear(unsigned char u_val)
 #define pcm_vidc_tableinit()
 #include "libavcodec/pcm_tables.h"
 #else
-/* 16384 entries per table */
-#if CONFIG_PCM_ALAW_DECODER || CONFIG_PCM_ALAW_ENCODER
-static uint8_t linear_to_alaw[16384];
-#endif
-#if CONFIG_PCM_MULAW_DECODER || CONFIG_PCM_MULAW_ENCODER
-static uint8_t linear_to_ulaw[16384];
-#endif
-#if CONFIG_PCM_VIDC_DECODER || CONFIG_PCM_VIDC_ENCODER
-static uint8_t linear_to_vidc[16384];
-#endif
 
-#if CONFIG_PCM_ALAW_DECODER  || CONFIG_PCM_ALAW_ENCODER  || \
-    CONFIG_PCM_MULAW_DECODER || CONFIG_PCM_MULAW_ENCODER || \
-    CONFIG_PCM_VIDC_DECODER  || CONFIG_PCM_VIDC_ENCODER
+#if CONFIG_PCM_ALAW_ENCODER  || CONFIG_PCM_MULAW_ENCODER || \
+    CONFIG_PCM_VIDC_ENCODER
 static av_cold void build_xlaw_table(uint8_t *linear_to_xlaw,
                              int (*xlaw2linear)(unsigned char),
                              int mask)
@@ -141,21 +130,24 @@ static av_cold void build_xlaw_table(uint8_t 
*linear_to_xlaw,
 }
 #endif
 
-#if CONFIG_PCM_ALAW_DECODER || CONFIG_PCM_ALAW_ENCODER
+#if CONFIG_PCM_ALAW_ENCODER
+static uint8_t linear_to_alaw[16384];
 static void pcm_alaw_tableinit(void)
 {
     build_xlaw_table(linear_to_alaw, alaw2linear, 0xd5);
 }
 #endif
 
-#if CONFIG_PCM_MULAW_DECODER || CONFIG_PCM_MULAW_ENCODER
+#if CONFIG_PCM_MULAW_ENCODER
+static uint8_t linear_to_ulaw[16384];
 static void pcm_ulaw_tableinit(void)
 {
     build_xlaw_table(linear_to_ulaw, ulaw2linear, 0xff);
 }
 #endif
 
-#if CONFIG_PCM_VIDC_DECODER || CONFIG_PCM_VIDC_ENCODER
+#if CONFIG_PCM_VIDC_ENCODER
+static uint8_t linear_to_vidc[16384];
 static void pcm_vidc_tableinit(void)
 {
     build_xlaw_table(linear_to_vidc, vidc2linear, 0xff);

-----------------------------------------------------------------------

Summary of changes:
 libavcodec/pcm.c          | 37 +++++++++++++++----------------------
 libavcodec/pcm_tablegen.h | 24 ++++++++----------------
 libavformat/mov.c         |  1 -
 3 files changed, 23 insertions(+), 39 deletions(-)


hooks/post-receive
-- 

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

Reply via email to