[FFmpeg-cvslog] lavc/libaribcaption: rename `replace_fullwidth_ascii` to `replace_msz_ascii`

TADANO Tokumei git at videolan.org
Sun Oct 29 18:56:50 EET 2023


ffmpeg | branch: release/6.1 | TADANO Tokumei <aimingoff at pc.nifty.jp> | Tue Oct 17 22:13:35 2023 +0900| [1cff6e41bf2b8a53ebba516dde9f592c63581f14] | committer: Jan Ekström

lavc/libaribcaption: rename `replace_fullwidth_ascii` to `replace_msz_ascii`

This should hopefully clarify that the option only affects MSZ
full-width characters, and not all full-width ASCII. Additionally,
this matches the prefix with the upstream option.

Signed-off-by: TADANO Tokumei <aimingoff at pc.nifty.jp>
(cherry picked from commit a824c6f2f627474b4fc9044c3d43297c9767b758)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1cff6e41bf2b8a53ebba516dde9f592c63581f14
---

 doc/decoders.texi           | 12 ++++++------
 libavcodec/libaribcaption.c |  8 ++++----
 libavcodec/version.h        |  2 +-
 3 files changed, 11 insertions(+), 11 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.
 
- at 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}.
 
+ at 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 29642cd817..e87f303aa8 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]",
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 1030154c0e..1cf9651391 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
 #include "version_major.h"
 
 #define LIBAVCODEC_VERSION_MINOR  31
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MICRO 102
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \



More information about the ffmpeg-cvslog mailing list