From patchwork Sat Jun 12 09:30:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zheng qian X-Patchwork-Id: 28249 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5e:c91a:0:0:0:0:0 with SMTP id z26csp1186856iol; Sat, 12 Jun 2021 02:59:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkXvkYNwKtuji9epyxS6M+hsSWm4mtBx5JY5UIK0EhucDl1qP0SliQVQunPqbTvhQprqw6 X-Received: by 2002:a17:906:d0c9:: with SMTP id bq9mr7231928ejb.313.1623491955689; Sat, 12 Jun 2021 02:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623491955; cv=none; d=google.com; s=arc-20160816; b=lkjpII5zEQIekZqedulN1uab1yu+9cPtDD6IfqNpZ8fXz5M4dpgR2Wg6lUUgOmShHw 58MD3UbKHNEW51uTpYDEyAcRnEU61gXqsO96Mf8jR1PJg1Nn4AIqoR9+8T2d4ru7TlJ3 MIyJb8EZsamVoMYCZZjrv3Sv3rLDT46hHD73uLo8lU/njSn/g69Z7FkZx+MrGFblSC1x q2YOqJytdYahrTx/bII9OiQYCnqK3xGOrSdM8wjbb9sxtRVBjOXi55QWMD5XilyVA2zi r+QFtqbSC0KhlojPez2L8A9UXPv32MmJzkS+zzgsp6yEXqcZc4g0J68dBbfPvHya679X Y4TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=+q8vZfc4bTzHyZekY4QlFsG3kkrEniMehpigomcrVwc=; b=gfQoy4o+HehpVivrLcADi+9cHvhvj0N7shHr44//JCcTkRcW8CJk0QZCu2KQf9Cyth x7m9+Xv93iItEE8ptmoaehkxGaCpsoXufPf7+CxIqbQAIykPaef5YXeAYMtNfdve5Krr Zzsm59Pmo8owiflARX0kZbuatSuGK2q3k51oJzu2HPYK9N3wepB1lnZb7XpKuSOeuh1C 3taE6BJFYvu/7o/j183MjTDqvLugZsR+ldwJuUCQDpDHCR8RqMytk3G71s3bAiUtqx+d laVahkkRHFp/ixF8CNSeKJuNQcirpy2zg6eTrF14UVSXC9ISSWoHNw8sw3qig15fP8dG U3cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@xqq-im.20150623.gappssmtp.com header.s=20150623 header.b=QXV6EtJd; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y3si6818321edo.435.2021.06.12.02.59.15; Sat, 12 Jun 2021 02:59:15 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@xqq-im.20150623.gappssmtp.com header.s=20150623 header.b=QXV6EtJd; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D4D45689986; Sat, 12 Jun 2021 12:59:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.175]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3C22A680860 for ; Sat, 12 Jun 2021 12:59:05 +0300 (EEST) Received: by mail-oi1-f175.google.com with SMTP id t140so8691175oih.0 for ; Sat, 12 Jun 2021 02:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xqq-im.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RgDs9qFWBP8l8gaXRY78QtgfINUAp+xSJoZbXJb4mM4=; b=QXV6EtJdTMx+x5t124mqcY5PMmZLotTU/njZ8kFlx4sKLmLidYeqDhJ/m5hxIOplBn Up+gTkYp4nyCEiOIRnre5K+oMbo6novbQeGFkh/fQr5PzMxiEM1IR3FJ5t3XKx7BIWXc nANyMcHzO61zmOlX/TQ+0WZXt0cmUP1fjZa1V2hezPWZ1afmA2/+MP0KKLIhT107Ogbo kzVlJJKRGK98VWhzpQyRfKJ0JTU5wlanZrPsaSb4vPiyPqnpzPFYk/qY3IB4TraqzqCS 7SVw1/fTuWVPG2rME63TpZjpcoY3KLu6yzZh/2UDrHqfaxTMNtSPLTQNm7lSCaRpy8Hj cVQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=RgDs9qFWBP8l8gaXRY78QtgfINUAp+xSJoZbXJb4mM4=; b=DD/q9iG9AQ21Kcl5rXqqAOyfldtMb+s2ntfWe7pby2gRutSh/lEiKw5MCDGO6/u1e+ 0UtK3xTi5VkY6eCTCjLFTu1ykCAhrvZ/a1ldqApneZKLHZ34ZlpwQq0BMACWez4F+c7f e++oTbfBPvDSz/sS+btqBV/DehM6wrguCzc6Bm18eR9HmYB0mfI4FfR5Y+/odDKMLYu4 Q41JRcLFHMCoOwCrofdgzCEgJKOAYr9tzn7JWCfnQT2Qbg9I8YqZAVPcIFjI2xtRQzrl dIDgGtZrnAvLLcCoc5QYU0FQkyqRxQ/uPYDv3j6yLMlTChPZ1/qj5vZykgD+BNwAdxJA ROBA== X-Gm-Message-State: AOAM530Ztg5NYHmXOE/y/tAEw8vDzKjk01fsAEKrL1caaUY/RgFCJvIA G1IHWppJcxESFcDrU8vYA1n1ANMimseppg== X-Received: by 2002:a17:90b:1808:: with SMTP id lw8mr8601524pjb.30.1623490252860; Sat, 12 Jun 2021 02:30:52 -0700 (PDT) Received: from zhengqian-xps.lan (ngn-nat1.v4.open.ad.jp. [202.222.12.138]) by smtp.gmail.com with ESMTPSA id z3sm487719pfb.127.2021.06.12.02.30.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Jun 2021 02:30:52 -0700 (PDT) From: zheng qian To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Jun 2021 18:30:28 +0900 Message-Id: <20210612093032.64034-1-xqq@xqq.im> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/5] avcodec/codec: Add arib_superimpose subtitle codec X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: zheng qian Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: x5WTJe5J8Q0r 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 --- 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, \