From patchwork Sun Jul 3 10:26:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TADANO Tokumei X-Patchwork-Id: 34763 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:8b27:b0:88:1bbf:7fd2 with SMTP id l39csp2138534pzh; Sun, 3 Jul 2022 03:27:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJeVpZ1Ia18G2ds5rj2gM7fQhUy0rfqcMU09pyVz8Da1RH88BUAtWsT8oYLtT7HI3eUOBZ X-Received: by 2002:a05:6402:50d0:b0:436:d04:ebb8 with SMTP id h16-20020a05640250d000b004360d04ebb8mr31502366edb.255.1656844031831; Sun, 03 Jul 2022 03:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656844031; cv=none; d=google.com; s=arc-20160816; b=qJtd2tGRw6WMoiCKU/N+cbLR/NIOUUsehYP2hjOYFW9e5m0IaEuntx8Znvzj62Lj+k qPF+v5JrlJam7BvgUMeEZTDW5l8WoXQYJADC8tGFXjJQ7Q8mrEqUf8bzP0ESlgQPzOCW +d+61k8UFPC2kZn9Pbg10m24v+sMTHqBun3FiQ7nQFpgRjoGA1b9ENGw+9Nuc3DdEmfE g6bR6vHQEgqbc88PNlva8MOSA4k0EYhHh66NrjOnh4IeS5zTQto+oM5v4zp/83Y50Yot QM0gYHtOWMha5VRNQbXeM+OCmyFwJlZGrYvmhYpQZvI8Xz7FGdGpvFSyxL5lZmpC61RN 8FVg== 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=tSdeAnuKezJBATnE+IjlseNebbjJRhnXrqTh8yfcXvs=; b=PBtf/cZd5e1MaHPDTrckemSkv2yQRIQbz3eu+BrSWkd6ZGgvFHCmKDFO3lL8d2Mzn+ A3ZM6BVkdm1FPu7L5chQTTTjhW6x08lWJcYckAHIO9p2uOwXnqmX+5CltTW97TqxMmET VOlbkhJ4uRchv98d3SLPxz3bxF3LVizhLpn8p4QDyjobct0/5DuYGKNG7hUD0eQaLSKk 0kZfHv0/T4NwHtqEwVLUj79apMkLZbchZHDlNWkpiG9oDtwr7HnvMtqCCd2YH0qBB1TH VY6TYjtDiRgYg0Ol9xcrZPlTMg/mHf6RWU8dsEPV0B3SFsmn8h0Yf/6z/r6xAWUcB6D7 TN/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com header.s=dec2015msa header.b=k9Mpr+St; 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 hq36-20020a1709073f2400b0072a7286345bsi4132561ejc.352.2022.07.03.03.27.11; Sun, 03 Jul 2022 03:27:11 -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=k9Mpr+St; 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 81B3068B97A; Sun, 3 Jul 2022 13:26:57 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from conssluserg-05.nifty.com (conssluserg-05.nifty.com [210.131.2.90]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4867268B97A for ; Sun, 3 Jul 2022 13:26:48 +0300 (EEST) Received: from osamu-pc.kimura.local (M106073025034.v4.enabler.ne.jp [106.73.25.34]) (authenticated) by conssluserg-05.nifty.com with ESMTP id 263AQhZc012696; Sun, 3 Jul 2022 19:26:43 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-05.nifty.com 263AQhZc012696 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1656844003; bh=x0LomzceVeWf0C+uX7Q4Nil+g5E3g6PaAmRNX19dilo=; h=From:To:Cc:Subject:Date:From; b=k9Mpr+StvB7SPkFJqRFcAza87DnmTWZqXxueSivm1Ay5Uq68hPYHoDvHVv6ImiO9/ HQYOkDHwE+BiQuV3tRA1XjIRAFZapQ0wVXa3eDhnGOqn8sK+V4mGW+0rmarZGsyDq8 kbpgHKtxFldffEIRZwufyJFeH9GbCMEHOAX3DxzwHH7gUnpEu+HoGjIcqaABPpN/WZ c248upaXS4lqSOkpJwrvATCWQ7Q5WdnZKybcqWnkj1TImNlExnjxHd3nbxa90ZlSLp LNaP1v9EOtbp8Hfv7OXRuMlAHTWHpzcCH4J353pRMzH2Z4+49Ig7ZEZevfXwdJKrLc ENOMGbIMXRzUg== X-Nifty-SrcIP: [106.73.25.34] From: TADANO Tokumei To: ffmpeg-devel@ffmpeg.org Date: Sun, 3 Jul 2022 19:26:23 +0900 Message-Id: <20220703102627.398185-1-aimingoff@pc.nifty.jp> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 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: XXt5HWXD8qwU 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 --- 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 | 1143 +++++++++++++++++++++++++++++++++++ libavformat/mpegts.c | 19 +- 8 files changed, 1267 insertions(+), 2 deletions(-) create mode 100644 libavcodec/libaribcaption.c