[FFmpeg-devel] [PATCH 1/5] avcodec/codec: Add arib_superimpose subtitle codec

zheng qian xqq at xqq.im
Sat Jun 12 12:30:28 EEST 2021


This patchset introduces ARIB STD-B24 superimpose support.
ARIB superimpose is almost same as ARIB caption but has a silent difference.

ARIB superimpose is utilized to transmit emergency alert and newsflash in
Japan DTV. Since superimpose is designed to be displayed once received by
the television, ARIB superimpose utilizes mpegts private_stream_2 stream
rather than the private_stream_1 that is used by arib_caption, which means
superimpose packet doesn't have PTS (AV_NOPTS_VALUE).

Purpose of introducing arib_superimpose codec is mainly:

1) Let mpegtsenc to be able to remux ARIB superimpose stream correctly

2) Let ffmpeg-based player to be able to recognize ARIB superimpose stream
then extract binary data and render it onto screen

Signed-off-by: zheng qian <xqq at xqq.im>
---
 libavcodec/codec_desc.c | 8 ++++++++
 libavcodec/codec_id.h   | 1 +
 libavcodec/version.h    | 4 ++--
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 35527dcc37..afb22756a3 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -3407,6 +3407,14 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .props     = AV_CODEC_PROP_TEXT_SUB,
         .profiles  = NULL_IF_CONFIG_SMALL(ff_arib_caption_profiles),
     },
+    {
+        .id        = AV_CODEC_ID_ARIB_SUPERIMPOSE,
+        .type      = AVMEDIA_TYPE_SUBTITLE,
+        .name      = "arib_superimpose",
+        .long_name = NULL_IF_CONFIG_SMALL("ARIB STD-B24 superimpose"),
+        .props     = AV_CODEC_PROP_TEXT_SUB,
+        .profiles  = NULL_IF_CONFIG_SMALL(ff_arib_caption_profiles),
+    },
 
     /* other kind of codecs and pseudo-codecs */
     {
diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h
index d49f9af36c..839ffd3861 100644
--- a/libavcodec/codec_id.h
+++ b/libavcodec/codec_id.h
@@ -543,6 +543,7 @@ enum AVCodecID {
     AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
     AV_CODEC_ID_TTML,
     AV_CODEC_ID_ARIB_CAPTION,
+    AV_CODEC_ID_ARIB_SUPERIMPOSE,
 
     /* other specific kind of codecs (generally used for attachments) */
     AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,           ///< A dummy ID pointing at the start of various fake codecs.
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 5b1e9e77f3..1288cecebe 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -28,8 +28,8 @@
 #include "libavutil/version.h"
 
 #define LIBAVCODEC_VERSION_MAJOR  59
-#define LIBAVCODEC_VERSION_MINOR   1
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MINOR   2
+#define LIBAVCODEC_VERSION_MICRO 100
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \
-- 
2.29.2



More information about the ffmpeg-devel mailing list