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

Git pushed a commit to branch release/4.4
in repository ffmpeg.

commit fb70a2da758af21986c570f962737f79144acde3
Author:     Michael Niedermayer <[email protected]>
AuthorDate: Sat Feb 14 23:00:02 2026 +0100
Commit:     Michael Niedermayer <[email protected]>
CommitDate: Tue May 5 18:55:02 2026 +0200

    avcodec/cfhd: Add CFHDSegment enum and named identifiers
    
    Signed-off-by: Michael Niedermayer <[email protected]>
    (cherry picked from commit 2263e05e419c1f9b613c018e4ffed73707715e1a)
    Signed-off-by: Michael Niedermayer <[email protected]>
---
 libavcodec/cfhd.c    |  4 ++--
 libavcodec/cfhd.h    |  9 +++++++++
 libavcodec/cfhdenc.c | 12 ++++++------
 3 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index 39dd2d7bf2..4031b2020b 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -639,7 +639,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, 
int *got_frame,
         } else
             av_log(avctx, AV_LOG_DEBUG,  "Unknown tag %i data %x\n", tag, 
data);
 
-        if (tag == BitstreamMarker && data == 0xf0f &&
+        if (tag == BitstreamMarker && data == CoefficientSegment &&
             s->coded_format != AV_PIX_FMT_NONE) {
             int lowpass_height = s->plane[s->channel_num].band[0][0].height;
             int lowpass_width  = s->plane[s->channel_num].band[0][0].width;
@@ -711,7 +711,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, 
int *got_frame,
         coeff_data = s->plane[s->channel_num].subband[s->subband_num_actual];
 
         /* Lowpass coefficients */
-        if (tag == BitstreamMarker && data == 0xf0f) {
+        if (tag == BitstreamMarker && data == CoefficientSegment) {
             int lowpass_height, lowpass_width, lowpass_a_height, 
lowpass_a_width;
 
             if (!s->a_width || !s->a_height) {
diff --git a/libavcodec/cfhd.h b/libavcodec/cfhd.h
index 19e5c7cf03..ff634e688f 100644
--- a/libavcodec/cfhd.h
+++ b/libavcodec/cfhd.h
@@ -95,6 +95,15 @@ enum CFHDParam {
     ChannelHeight    = 105,
 };
 
+enum CFHDSegment {
+    LowPassSegment      = 0x1a4a,
+    LowPassEndSegment   = 0x1b4b,
+    HighPassSegment     = 0x0d0d,
+    BandSegment         = 0x0e0e,
+    HighPassEndSegment  = 0x0c0c,
+    CoefficientSegment  = 0x0f0f,
+};
+
 #define VLC_BITS       9
 #define SUBBAND_COUNT 10
 #define SUBBAND_COUNT_3D 17
diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c
index f73bb7154f..77f29e59ac 100644
--- a/libavcodec/cfhdenc.c
+++ b/libavcodec/cfhdenc.c
@@ -624,7 +624,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
         }
 
         bytestream2_put_be16(pby, BitstreamMarker);
-        bytestream2_put_be16(pby, 0x1a4a);
+        bytestream2_put_be16(pby, LowPassSegment);
 
         pos = bytestream2_tell_p(pby);
 
@@ -650,7 +650,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
         bytestream2_put_be16(pby, 16);
 
         bytestream2_put_be16(pby, BitstreamMarker);
-        bytestream2_put_be16(pby, 0x0f0f);
+        bytestream2_put_be16(pby, CoefficientSegment);
 
         for (int i = 0; i < height; i++) {
             for (int j = 0; j < width; j++)
@@ -659,7 +659,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
         }
 
         bytestream2_put_be16(pby, BitstreamMarker);
-        bytestream2_put_be16(pby, 0x1b4b);
+        bytestream2_put_be16(pby, LowPassEndSegment);
 
         for (int l = 0; l < 3; l++) {
             for (int i = 0; i < 3; i++) {
@@ -674,7 +674,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
             int height = s->plane[p].band[l][0].height;
 
             bytestream2_put_be16(pby, BitstreamMarker);
-            bytestream2_put_be16(pby, 0x0d0d);
+            bytestream2_put_be16(pby, HighPassSegment);
 
             bytestream2_put_be16(pby, WaveletType);
             bytestream2_put_be16(pby, 3 + 2 * (l == 2));
@@ -711,7 +711,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
                 int count = 0, padd = 0;
 
                 bytestream2_put_be16(pby, BitstreamMarker);
-                bytestream2_put_be16(pby, 0x0e0e);
+                bytestream2_put_be16(pby, BandSegment);
 
                 bytestream2_put_be16(pby, SubbandNumber);
                 bytestream2_put_be16(pby, i + 1);
@@ -781,7 +781,7 @@ static int cfhd_encode_frame(AVCodecContext *avctx, 
AVPacket *pkt,
             }
 
             bytestream2_put_be16(pby, BitstreamMarker);
-            bytestream2_put_be16(pby, 0x0c0c);
+            bytestream2_put_be16(pby, HighPassEndSegment);
         }
 
         s->plane[p].size = bytestream2_tell_p(pby) - pos;

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

Reply via email to