PR #21310 opened by Ramiro Polla (ramiro)
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21310
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21310.patch

SOF48 (0xf0) was used in a public draft of the standard (FCD 14495).
In the final specification it is called SOF55 (0xf7).


>From 2ae359e8e29b2c44de06223c1faedc5b6ffecfad Mon Sep 17 00:00:00 2001
From: Ramiro Polla <[email protected]>
Date: Mon, 13 Oct 2025 17:24:07 +0200
Subject: [PATCH] avcodec/jpegls: rename SOF48 to SOF55

SOF48 (0xf0) was used in a public draft of the standard (FCD 14495).
In the final specification it is called SOF55 (0xf7).
---
 libavcodec/jpeglsenc.c | 2 +-
 libavcodec/mjpeg.h     | 2 +-
 libavcodec/mjpegdec.c  | 8 ++++----
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index edc3fa600c..64440de242 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -373,7 +373,7 @@ static int encode_picture_ls(AVCodecContext *avctx, 
AVPacket *pkt,
 
     /* write our own JPEG header, can't use mjpeg_picture_header */
     put_marker_byteu(&pb, SOI);
-    put_marker_byteu(&pb, SOF48);
+    put_marker_byteu(&pb, SOF55);
     bytestream2_put_be16u(&pb, 8 + comps * 3); // header size depends on 
components
     bytestream2_put_byteu(&pb, (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 
8);  // bpp
     bytestream2_put_be16u(&pb, avctx->height);
diff --git a/libavcodec/mjpeg.h b/libavcodec/mjpeg.h
index cd5d0af2ac..e66e39714d 100644
--- a/libavcodec/mjpeg.h
+++ b/libavcodec/mjpeg.h
@@ -100,7 +100,7 @@ enum JpegMarker {
     JPG4  = 0xf4,
     JPG5  = 0xf5,
     JPG6  = 0xf6,
-    SOF48 = 0xf7,       ///< JPEG-LS
+    SOF55 = 0xf7,       ///< JPEG-LS
     LSE   = 0xf8,       ///< JPEG-LS extension parameters
     JPG9  = 0xf9,
     JPG10 = 0xfa,
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 05150e982c..4448a8dccb 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -2428,7 +2428,7 @@ redo_for_pal8:
         ret = -1;
 
         if (!CONFIG_JPEGLS_DECODER &&
-            (start_code == SOF48 || start_code == LSE)) {
+            (start_code == SOF55 || start_code == LSE)) {
             av_log(avctx, AV_LOG_ERROR, "JPEG-LS support not enabled.\n");
             return AVERROR(ENOSYS);
         }
@@ -2439,7 +2439,7 @@ redo_for_pal8:
             case SOF1:
             case SOF2:
             case SOF3:
-            case SOF48:
+            case SOF55:
                 break;
             default:
                 goto skip;
@@ -2493,7 +2493,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
             if ((ret = ff_mjpeg_decode_sof(s)) < 0)
                 goto fail;
             break;
-        case SOF48:
+        case SOF55:
             avctx->profile     = AV_PROFILE_MJPEG_JPEG_LS;
 #if FF_API_CODEC_PROPS
 FF_DISABLE_DEPRECATION_WARNINGS
@@ -2588,7 +2588,7 @@ eoi_parser:
             case SOF1:
             case SOF2:
             case SOF3:
-            case SOF48:
+            case SOF55:
                 s->got_picture = 0;
                 goto the_end_no_picture;
             }
-- 
2.49.1

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

Reply via email to