From patchwork Tue Oct 17 11:21:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TADANO Tokumei X-Patchwork-Id: 44275 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3e0b:b0:15d:8365:d4b8 with SMTP id bk11csp290099pzc; Tue, 17 Oct 2023 04:22:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFX4Ycr7jKEesQ0pTxxgaJV/c3tlgHW1efWoPbgeUG9Q8ZtazKW/L3tPI8t8SxWtLDN2lC0 X-Received: by 2002:a05:6512:b9f:b0:503:2555:d1e7 with SMTP id b31-20020a0565120b9f00b005032555d1e7mr1896862lfv.45.1697541779397; Tue, 17 Oct 2023 04:22:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697541779; cv=none; d=google.com; s=arc-20160816; b=mRiVXSma6SWtftEGmfF7zLXnLfqI8lNvSdUa9tMa+YKkhuyP4YMUJE8P48AdeSpCQJ g7byB/28fYQRN1kGsaJtOeoZKJKLEyVBMUjg0RObUPyVAeIgK/1a3x1hbRZ8UGEHK4H3 8p2yewlgz8EVThgvlqj6a+8YbDiNglCt8qbyG5G/kfHQ4LiYHr9qf9bW/7EMShyHz4VD fBZBthEx5Br7almddl4iGoR60BYPr1fAMu6oEDdA9r3ZlBwEPTfrU97UBReMMLxQwsT5 U6cRCQws3iOPgYOlTr1cM5vF6+Zg7S4bwHl/lnpK3h9WaoWeBbtmd2RVqOe52jlBtg8K P2/A== 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:references:in-reply-to :message-id:date:to:from:delivered-to; bh=YeCTOOEH4k65minozCgBbMRe5nyR1Hp1L+eFT1asdyU=; fh=ssXC39eKeah6YcPRlt8jBK+nQIpHohGaLsoJm2kZFpQ=; b=QDSHdAmdE7ASI4XK2W2JYJ3Umm2w2qWQOEPEpBy+Qg9D3S8uXDjSCoOy8Dkr0NLp9T I7rSZFVgqkmGoGcSDlxaHru/fyUZO96ekH+PSFWJDdB9zj2uuOthjq0vKdSV4vz1ypt1 i8BOZHQQP8x2391uYp3etUXIQkHMoN1yW9F9VXsV317D8xMw23lEaHH0fA749OBUNxIZ BQJIsLEBXgfBGmxhjG5Mvnd0fIhwqrAuR5KPkFTUL3JPCRFvP97T4x/uf10vNtuYa0sy kxigQhX9x76OmkffEyWN3Nmq5ti/gm/KuOBHYgc9RMmw7PJif+Bs0UgPhpRcYk7IwbiF 2U4Q== ARC-Authentication-Results: i=1; mx.google.com; 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 l7-20020a1709066b8700b0099cbed6da42si637490ejr.157.2023.10.17.04.22.58; Tue, 17 Oct 2023 04:22:59 -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; 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 5CE5468C768; Tue, 17 Oct 2023 14:22:46 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from dmta1019.nifty.com (mta-snd01008.nifty.com [106.153.227.40]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D4B8468C768 for ; Tue, 17 Oct 2023 14:22:43 +0300 (EEST) Received: from osamu-pc.kimura.local by dmta1019.nifty.com with ESMTP id <20231017112240241.DKCG.96055.osamu-pc.kimura.local@nifty.com>; Tue, 17 Oct 2023 20:22:40 +0900 From: TADANO Tokumei To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Oct 2023 20:21:59 +0900 Message-Id: <20231017112159.199755-4-aimingoff@pc.nifty.jp> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230923020023.9288-1-aimingoff@pc.nifty.jp> References: <20230923020023.9288-1-aimingoff@pc.nifty.jp> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v3 3/3] lavc/libaribcaption.c: rename `-replace_fullwidth_ascii` option 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: rL6HpHuZSFNg This patch renames `-replace_fullwidth_ascii` option to `-replace_msz_ascii` to clarify option meaning. Signed-off-by: TADANO Tokumei --- doc/decoders.texi | 12 ++++++------ libavcodec/libaribcaption.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/decoders.texi b/doc/decoders.texi index 36c3404475..eb00e2a9e9 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -427,12 +427,6 @@ If your player cannot handle AVSubtitles with multiple ASS rectangles properly, set this option to @var{true} or define @env{ASS_SINGLE_RECT=1} to change default behavior at compilation. -@item -replace_fullwidth_ascii @var{boolean} -Specify whether to replace MSZ (Middle Size, half width) fullwidth -alphanumerics with halfwidth alphanumerics. - -The default is @var{true}. - @item -force_outline_text @var{boolean} Specify whether always render outline text for all characters regardless of the indication by charactor style. @@ -459,6 +453,12 @@ Specify whether to render replaced DRCS characters as Unicode characters. The default is @var{true}. +@item -replace_msz_ascii @var{boolean} +Specify whether to replace MSZ (Middle Size; half width) fullwidth +alphanumerics with halfwidth alphanumerics. + +The default is @var{true}. + @item -replace_msz_japanese @var{boolean} Specify whether to replace some MSZ (Middle Size; half width) fullwidth japanese special characters with halfwidth ones. diff --git a/libavcodec/libaribcaption.c b/libavcodec/libaribcaption.c index 74822586dc..2a058a4992 100644 --- a/libavcodec/libaribcaption.c +++ b/libavcodec/libaribcaption.c @@ -70,12 +70,12 @@ typedef struct ARIBCaptionContext { int encoding_scheme; int ass_single_rect; char *font; - int replace_fullwidth_ascii; int force_stroke_text; int ignore_background; int ignore_ruby; float stroke_width; int replace_drcs; + int replace_msz_ascii; int replace_msz_japanese; int replace_msz_glyph; @@ -1006,7 +1006,7 @@ static int aribcaption_init(AVCodecContext *avctx) return AVERROR_EXTERNAL; } aribcc_decoder_set_replace_msz_fullwidth_ascii(ctx->decoder, - ctx->replace_fullwidth_ascii); + ctx->replace_msz_ascii); aribcc_decoder_set_replace_msz_fullwidth_japanese(ctx->decoder, ctx->replace_msz_japanese); @@ -1138,8 +1138,6 @@ static const AVOption options[] = { OFFSET(ass_single_rect), AV_OPT_TYPE_BOOL, { .i64 = ASS_SINGLE_RECT }, 0, 1, SD }, { "font", "comma-separated font family [ass, bitmap]", OFFSET(font), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD }, - { "replace_fullwidth_ascii", "replace MSZ fullwidth alphanumerics with halfwidth alphanumerics [ass, bitmap]", - OFFSET(replace_fullwidth_ascii), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD }, { "force_outline_text", "always render characters with outline [(ass), bitmap]", OFFSET(force_stroke_text), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, SD }, { "ignore_background", "ignore rendering caption background [(ass), bitmap]", @@ -1150,6 +1148,8 @@ static const AVOption options[] = { OFFSET(stroke_width), AV_OPT_TYPE_FLOAT, { .dbl = 1.5 }, 0.0, 3.0, SD }, { "replace_drcs", "replace known DRCS [bitmap]", OFFSET(replace_drcs), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD }, + { "replace_msz_ascii", "replace MSZ fullwidth alphanumerics with halfwidth alphanumerics [ass, bitmap]", + OFFSET(replace_msz_ascii), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD }, { "replace_msz_japanese", "replace MSZ fullwidth Japanese with halfwidth [ass, bitmap]", OFFSET(replace_msz_japanese), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD }, { "replace_msz_glyph", "replace MSZ characters with halfwidth glyphs [bitmap]",