TICO RAW is an intra-only raw video codec derived from JPEG XS. Nikon
uses it for the R3D NE and N-RAW formats.

It gets its own codec ID and not AV_CODEC_ID_JPEGXS, because a TICO RAW
stream is not a plain JPEG XS stream:
- The picture header signals Cpih = 0 (no colour transform), but the
  decoder applies an inverse Star-Tetrix transform to the four components
  to get the Bayer planes.
- The vendor bytes of the picture header hold a transfer curve (black
  level, slope and pivot) that maps the decoded values to linear sensor
  values. The CAP marker carries a vendor string.
- In the MOV file every frame is wrapped in an NRAW box. The box holds
  the codestream and the camera metadata (picture size, CFA pattern,
  white balance, camera matrix).
- The decoded picture is a Bayer mosaic and not an image.

Only the profile that the Nikon ZR writes is supported by the decoder
that follows. The decoder returns AVERROR_PATCHWELCOME for any other
profile.

Signed-off-by: Alper Kagan AVCI <[email protected]>
---
 doc/APIchanges          | 3 +++
 libavcodec/codec_desc.c | 7 +++++++
 libavcodec/codec_id.h   | 1 +
 libavcodec/version.h    | 2 +-
 4 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index 1096fde9c9..dff8be3369 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2026-06-23.
 
 API changes, most recent first:
 
+2026-11-xx - xxxxxxxxxx - lavc 63.29.100 - codec_id.h
+  Add AV_CODEC_ID_TICO_RAW.
+
 2026-11-xx - xxxxxxxxxx - lavf 63.20.101 - avformat.h
   With AVSEEK_FLAG_PREROLL set, avformat_seek_file() and av_seek_frame()
   move the target back by the audio pre-roll, and discard the pre-roll
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index dd63c2194d..47ee77c571 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -2017,6 +2017,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .long_name = NULL_IF_CONFIG_SMALL("Infinity IMM6"),
         .props     = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_REORDER,
     },
+    {
+        .id        = AV_CODEC_ID_TICO_RAW,
+        .type      = AVMEDIA_TYPE_VIDEO,
+        .name      = "tico_raw",
+        .long_name = NULL_IF_CONFIG_SMALL("intoPIX TICO RAW (Nikon N-RAW, R3D 
NE)"),
+        .props     = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY,
+    },
 
     /* various PCM "codecs" */
     {
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index 8c78bbce37..027622c9b3 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -327,6 +327,7 @@ enum AVCodecID {
     AV_CODEC_ID_ASTC,
     AV_CODEC_ID_RW2,
     AV_CODEC_ID_IMM6,
+    AV_CODEC_ID_TICO_RAW,
 
     /* various PCM "codecs" */
     AV_CODEC_ID_FIRST_AUDIO = 0x10000,     ///< A dummy id pointing at the 
start of audio codecs
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 87b7284a95..5183deb68b 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -29,7 +29,7 @@
 
 #include "version_major.h"
 
-#define LIBAVCODEC_VERSION_MINOR  28
+#define LIBAVCODEC_VERSION_MINOR  29
 #define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
-- 
2.56.1

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

Reply via email to