From patchwork Tue Oct 17 13:13:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: TADANO Tokumei X-Patchwork-Id: 44283 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3e0b:b0:15d:8365:d4b8 with SMTP id bk11csp355154pzc; Tue, 17 Oct 2023 06:14:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFtYFDl+vXyFiayyDcppYL7unP/eZNb0hyFRrrs1o+9wJXC7JZq7C9lNBGc1eS/vYjE6y8D X-Received: by 2002:a05:6402:4405:b0:53e:343a:76c4 with SMTP id y5-20020a056402440500b0053e343a76c4mr2586539eda.30.1697548483509; Tue, 17 Oct 2023 06:14:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697548483; cv=none; d=google.com; s=arc-20160816; b=jKy2e6a1LXwNn1BgthWCFMbfXnKV2kiIjJuk/h9nO1p1wCZCkQrh71q/47/zJqNJkw nAZ3CjddBG/54cPMGRwzqTaBlMC01+FDp2TYiOs2dds1ttQGpU23nIJCAp86vSinBZdU gpGCupTcTN5E+CYbWoQ0omfQpvg/MU7n0aU68uRnYySX+Bh9Ki/45hI3edl2K+38B9HF 7a3GS6WrB6RVhlFoJDUWwzdVeMAkhClcsSD81Y5pnTAkukB3McHEYPvLClUtzycbTO2c rDF17sjkH8lR3HgFgZiqRik2UfrKX8/lyu4LxEbjAt9qv2bDPnkPdvz0FrWFP7viV+De 4ILQ== 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=FTMJ+VV11G5X2kqOABzU+zlX1AAF468m6+cyA/WjNU0e018SLA5Bs1jqmHpxYFxIRl VoF9ft3nWoiidJJEgqPOSxCZmHLcMUcZvLiyD3XsEu920S/pDM9PAyPq+f3lPqcPpgv0 Mok4y2cHo/eswMBlOY/TuVyAUp4zyhV5j8+5TrKN/ZOd7zZoi26T84ix8dMAdyZG4WoC b+2fLmT1MxN38Meav51pe6XDBT90Ytnu92THbE/a+VnyB5/oQFuEYIscNbhNCYKNrAxP ZYSUu5rjDeAPh9mXRAU3wn0HJryJToe3k4RYZgTQPPRQT8p9Pvzeq8z3qmVYpHUjJ2vr oyhg== 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 z66-20020a509e48000000b0053ebbd59684si700167ede.461.2023.10.17.06.14.28; Tue, 17 Oct 2023 06:14:43 -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 2F12868CA16; Tue, 17 Oct 2023 16:14:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from dmta1020.nifty.com (mta-snd01012.nifty.com [106.153.227.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 135E368CA0A for ; Tue, 17 Oct 2023 16:14:09 +0300 (EEST) Received: from osamu-pc.kimura.local by dmta1020.nifty.com with ESMTP id <20231017131406384.UOUW.131070.osamu-pc.kimura.local@nifty.com>; Tue, 17 Oct 2023 22:14:06 +0900 From: TADANO Tokumei To: ffmpeg-devel@ffmpeg.org Date: Tue, 17 Oct 2023 22:13:35 +0900 Message-Id: <20231017131335.201277-4-aimingoff@pc.nifty.jp> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231017131335.201277-1-aimingoff@pc.nifty.jp> References: <20231017131335.201277-1-aimingoff@pc.nifty.jp> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v4 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: Uv1R+jcm2rhs 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]",