From patchwork Tue Oct 18 10:40:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TADANO Tokumei X-Patchwork-Id: 34839 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp2035728pzb; Tue, 18 Oct 2022 03:41:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6F/c0yzpUtJXDdQ70ofse/fvTFeJj6OAbber8WvhUkkt/rS2FlP+Qz5OcXakuvUeWaa/UT X-Received: by 2002:a17:906:eeca:b0:730:6880:c398 with SMTP id wu10-20020a170906eeca00b007306880c398mr1861438ejb.706.1666089685200; Tue, 18 Oct 2022 03:41:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666089685; cv=none; d=google.com; s=arc-20160816; b=p0ZJe9Bmk/e13eSd2rQ7oZjdmEJ6YLuXPZrciF2+aHqraNAihVWzhvob5DI+FTKnIg D3taxKZIAteHJJSUszsBlNdkx7XwEveX4eJhwwTMMs2MsERQ0Lt9dC324rthtspUIjFF wzHlbizj/BRj5L/s82JQyG8+UbXZfJF8MEoeWmsSk6M+7AX8MCNEqyXpmmH6M74FX6s6 k2JoyRHdNduzBKmKzId1RLAu334tTZFm1ggFv4grq3lro7sevEafkzRGVPCRbYmC/xNt B92OYazw1scLkd/o9BEqUxOBimgn8Pz/PezFG8VtQIZnNNeCZV4x4+7sidpr3cWJ+Ods Tuew== 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:dkim-filter:delivered-to; bh=Ws5bZkRrNst8wdLIAycrhXzkSUaa1eL8aH4eWxAYva0=; b=MHXK7+rDdkrnqLmpuazyJcJOcv8IIbwIdpUJfg8SLTpVnKUAH/daOfC60TzcDhhbQe RhdWhwTDBJmtiBbOxLjYbKcjIPz4J1eDdOhaZ6g94huyNxWQ4QNN0OPHDKDQ1+GdJECs U5hKR+JjB7pM7zcsrdRoCCHPFvHWQYDwezVgSEEuff5L6uMGukfWgFzCBqgjPohDeGqv hnycfjpDMJUEXQn86mG5LbT7WjBJLD9kYFfnj5T+bpCO1Cxt3/HaE0Mzoozr/IiAvNqU Lo8xf74luRjnMu0PCzYixwxMkcSVMSm+1TTjXSLZTswphSid6q6ir7tcObOuOSBnKKvH vK1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=hfPxUgx1; 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 xc9-20020a170907074900b0078c24962d30si11935336ejb.963.2022.10.18.03.41.24; Tue, 18 Oct 2022 03:41:25 -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=@nifty.com header.s=dec2015msa header.b=hfPxUgx1; 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 D4CCA68BC6C; Tue, 18 Oct 2022 13:41:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from conssluserg-01.nifty.com (conssluserg-01.nifty.com [210.131.2.80]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 66A8068BCD1 for ; Tue, 18 Oct 2022 13:41:11 +0300 (EEST) Received: from osamu-pc.. (M106073025034.v4.enabler.ne.jp [106.73.25.34]) (authenticated) by conssluserg-01.nifty.com with ESMTP id 29IAelHv017112; Tue, 18 Oct 2022 19:40:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-01.nifty.com 29IAelHv017112 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1666089647; bh=9cjcTxhyt/17Iq2amb8vnNe2dxBvr+JxXOLiWI+mzGE=; h=From:To:Cc:Subject:Date:From; b=hfPxUgx1Jyh5v2ME8Ggvi8c85thEvvg9Rw4xV5skSDkRRuASJUnIyptaIzaYQ9PqZ OBFGQk352yxKhnRhbcYd1JL/Gp9sYt+yFAfjtF7p3Eorsd53yr3nrFLgO8dWjNFTUD oVYOXZr/rUu2ZNRDRUksp+fQ7xr6qDDaEtv3bzsTAAlemKoteSPSrMHEaSzb4/zDu6 L5WfnYnIY5VVM2PF9F0uvKWZxtRaNVRqU4fUcNl4xCnt5ed0wzoC7fPeWbBZoSzbXI ocZQkbTo8tC4jbuoGFrK+qA3MTNEQPjnYICgqMBtSspjc0R24D/GUKlG1Ip265UZIL meuhW0vCwa5hQ== X-Nifty-SrcIP: [106.73.25.34] From: TADANO Tokumei To: ffmpeg-devel@ffmpeg.org Date: Tue, 18 Oct 2022 19:40:24 +0900 Message-Id: <20221018104028.34644-1-aimingoff@pc.nifty.jp> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v6 0/4] add ARIB caption decoder using libaribcaption 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: TADANO Tokumei Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 6ChGsOxAAkVr Ping with rebased patch set. Some minor chages are added. --- This patch set add another ARIB caption decoder using libaribcaption external library: https://github.com/xqq/libaribcaption The library decodes subtitles of ISDB-based TV broadcasting. It is not only for Japanese ARIB STD-B24 caption, but also for Brazilian ABNT NBR 15606-1 and Philippines version of ISDB-T. Unlike libaribb24, it supports 3 types of subtitle outputs: * text: plain text * ass: ASS formatted text * bitmap: bitmap image Default subtitle type is ASS as same as libaribb24, but it can be changed by `-sub_type` option. You can see ARIB caption with ffplay tool: ffplay -sub_type bitmap MPEG.TS Sample files exist under: https://streams.videolan.org/streams/ts/ARIB/ Some of them are encrypted and some don't contain ARIB caption data. Good samples for ARIB caption are: brazil/07-25_20-33-35_UCV - HD_.ts japan/channel2[137]_clear.ts japan/osaka_15.ts --- v6: reflect review results from outside of this ML - check clut table overflow - do not adjust vertical position of ruby for ASS format v5: reflect review comments from Mao Hata - reset correct variable in aribcaption_close() - add aribcaption_close() to some places in aribcaption_init() - check if av_strdup() returns NULL in set_ass_header() v4: reflect review results from outside of this ML. - resize bitmap subtitle image to display fonts with correct aspect ratio - multiple font families can be specified by '-font' option - remove 'rendering_backend' option - add document - minor bug fixes v3: combine former 1/4 and 2/4 due to the patchwork shows build error. v2: combine former 1/5 and 2/5 due to the patchwork shows build error. - fix help option content which incorrectly separated to 2 lines in 2/4. - amend commit message of 4/4. TADANO Tokumei (4): lavc/libaribcaption.c: add ARIB caption decoder using libaribcaption lavc/codec_desc.c: remove AV_CODEC_PROP_TEXT_SUB property lavf/mpegts.c: set some properties for ARIB caption doc/decoders.texi: add document of aribcaption decoder configure | 4 + doc/decoders.texi | 99 +++ libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/codec_desc.c | 1 - libavcodec/libaribb24.c | 1 + libavcodec/libaribcaption.c | 1141 +++++++++++++++++++++++++++++++++++ libavformat/mpegts.c | 19 +- 8 files changed, 1265 insertions(+), 2 deletions(-) create mode 100644 libavcodec/libaribcaption.c