diff mbox series

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

Message ID 20210613023421.23039-1-xqq@xqq.im
State New
Headers show
Series [FFmpeg-devel,v2,1/5] avcodec/codec: Add arib_superimpose subtitle codec
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

zheng qian June 13, 2021, 2:34 a.m. UTC
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@xqq.im>
---
 libavcodec/codec_desc.c | 8 ++++++++
 libavcodec/codec_id.h   | 1 +
 libavcodec/version.h    | 4 ++--
 3 files changed, 11 insertions(+), 2 deletions(-)
diff mbox series

Patch

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, \