Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 0/3] Some small ASS conversion fixes
@ 2022-11-13 19:07 Oneric
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 1/3] avcodec/ass: fix comment Oneric
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Oneric @ 2022-11-13 19:07 UTC (permalink / raw)
  To: ffmpeg-devel

This fixes colours and font selection for files converted to ASS.

To avoid a bug with patchwork’s diff download stripping CRLFs,
I formatted the updates of reference files as binary.
They intentionally contain CRLF characters and without them do
not pass FATE. tests/ref/fate/sub-scc keeps a text diff since it
alone is marked as "diff eol=crlf" in .gitattributes.

Oneric (3):
  avcodec/ass: fix comment
  avcodec/ass: accurately preserve colours
  avcodec/ass: specify a permissive encoding

 libavcodec/ass.c                 |   5 +++--
 tests/ref/fate/sub-aqtitle       | Bin 3213 -> 3233 bytes
 tests/ref/fate/sub-cc            | Bin 839 -> 859 bytes
 tests/ref/fate/sub-cc-realtime   | Bin 1524 -> 1544 bytes
 tests/ref/fate/sub-cc-scte20     | Bin 945 -> 965 bytes
 tests/ref/fate/sub-charenc       | Bin 6008 -> 6028 bytes
 tests/ref/fate/sub-jacosub       | Bin 1783 -> 1803 bytes
 tests/ref/fate/sub-microdvd      | Bin 1375 -> 1395 bytes
 tests/ref/fate/sub-movtext       | Bin 783 -> 803 bytes
 tests/ref/fate/sub-mpl2          | Bin 870 -> 890 bytes
 tests/ref/fate/sub-mpsub         | Bin 2517 -> 2537 bytes
 tests/ref/fate/sub-mpsub-frames  | Bin 736 -> 756 bytes
 tests/ref/fate/sub-pjs           | Bin 860 -> 880 bytes
 tests/ref/fate/sub-realtext      | Bin 939 -> 959 bytes
 tests/ref/fate/sub-sami          | Bin 1981 -> 2001 bytes
 tests/ref/fate/sub-sami2         | Bin 9970 -> 9990 bytes
 tests/ref/fate/sub-scc           |   3 ++-
 tests/ref/fate/sub-srt           | Bin 6301 -> 6321 bytes
 tests/ref/fate/sub-srt-badsyntax | Bin 1561 -> 1581 bytes
 tests/ref/fate/sub-stl           | Bin 2241 -> 2261 bytes
 tests/ref/fate/sub-subviewer     | Bin 780 -> 800 bytes
 tests/ref/fate/sub-subviewer1    | Bin 1494 -> 1514 bytes
 tests/ref/fate/sub-vplayer       | Bin 742 -> 762 bytes
 tests/ref/fate/sub-webvtt        | Bin 1985 -> 2005 bytes
 tests/ref/fate/sub-webvtt2       | Bin 1648 -> 1668 bytes
 25 files changed, 5 insertions(+), 3 deletions(-)

-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [FFmpeg-devel] [PATCH 1/3] avcodec/ass: fix comment
  2022-11-13 19:07 [FFmpeg-devel] [PATCH 0/3] Some small ASS conversion fixes Oneric
@ 2022-11-13 19:07 ` Oneric
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours Oneric
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 3/3] avcodec/ass: specify a permissive encoding Oneric
  2 siblings, 0 replies; 7+ messages in thread
From: Oneric @ 2022-11-13 19:07 UTC (permalink / raw)
  To: ffmpeg-devel

There is no v4 ASS. There are versions 1 to 4 of SSA (with only v4
being supported by softsub renderers), ASS which declares itself as v4+
or v4.00+, and the rarely used v4++/v4.00++, which isn't fully supported
by libass.
As reflected by the [V4+ Styles] section header, FFmpeg uses ASS, not
SSA v4, so adjust the comment accordingly.
---
 libavcodec/ass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index 728cfb1ab5..fdf55f36ca 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -44,7 +44,7 @@ int ff_ass_subtitle_header_full(AVCodecContext *avctx,
              "\r\n"
              "[V4+ Styles]\r\n"
 
-             /* ASSv4 header */
+             /* ASS (v4+) header */
              "Format: Name, "
              "Fontname, Fontsize, "
              "PrimaryColour, SecondaryColour, OutlineColour, BackColour, "
-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours
  2022-11-13 19:07 [FFmpeg-devel] [PATCH 0/3] Some small ASS conversion fixes Oneric
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 1/3] avcodec/ass: fix comment Oneric
@ 2022-11-13 19:07 ` Oneric
  2022-11-13 19:12   ` Nicolas George
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 3/3] avcodec/ass: specify a permissive encoding Oneric
  2 siblings, 1 reply; 7+ messages in thread
From: Oneric @ 2022-11-13 19:07 UTC (permalink / raw)
  To: ffmpeg-devel

Colour values used in ASS files without a "YCbCr Matrix" header set to
"None" are subject to colour mangling, due to how ASS was historically
conceived. A more in-depth description can be found in the documetation
inside libass' public ass_types.h header. The important part is, if this
header is not set to "None", the final output colours can deviate from
the literal value specified in the file. When converting from non-ASS
formats we do not want any colour shift to happen, so let's set the
appropiate header.

NB: ffmpeg's subtitle filter, does not follow libass' documentation
regarding colour mangling, thus hiding the bug. Anything based on
VSFilter, XySubFilter or e.g. mpv do and might show the issue.
(Of course native ASS subs, which _do_ rely on colour mangling won't
 work properly with the subtitle filter, but this can be fixed another
 time)
---
Link to libass’ docs regarding colour mangling:
  https://github.com/libass/libass/blob/3df19c2e809b16c9cf7c925fa3bb573e2e6f4fdd/libass/ass_types.h#L152-L232
---
 libavcodec/ass.c                 |   1 +
 tests/ref/fate/sub-aqtitle       | Bin 3213 -> 3233 bytes
 tests/ref/fate/sub-cc            | Bin 839 -> 859 bytes
 tests/ref/fate/sub-cc-realtime   | Bin 1524 -> 1544 bytes
 tests/ref/fate/sub-cc-scte20     | Bin 945 -> 965 bytes
 tests/ref/fate/sub-charenc       | Bin 6008 -> 6028 bytes
 tests/ref/fate/sub-jacosub       | Bin 1783 -> 1803 bytes
 tests/ref/fate/sub-microdvd      | Bin 1375 -> 1395 bytes
 tests/ref/fate/sub-movtext       | Bin 783 -> 803 bytes
 tests/ref/fate/sub-mpl2          | Bin 870 -> 890 bytes
 tests/ref/fate/sub-mpsub         | Bin 2517 -> 2537 bytes
 tests/ref/fate/sub-mpsub-frames  | Bin 736 -> 756 bytes
 tests/ref/fate/sub-pjs           | Bin 860 -> 880 bytes
 tests/ref/fate/sub-realtext      | Bin 939 -> 959 bytes
 tests/ref/fate/sub-sami          | Bin 1981 -> 2001 bytes
 tests/ref/fate/sub-sami2         | Bin 9970 -> 9990 bytes
 tests/ref/fate/sub-scc           |   1 +
 tests/ref/fate/sub-srt           | Bin 6301 -> 6321 bytes
 tests/ref/fate/sub-srt-badsyntax | Bin 1561 -> 1581 bytes
 tests/ref/fate/sub-stl           | Bin 2241 -> 2261 bytes
 tests/ref/fate/sub-subviewer     | Bin 780 -> 800 bytes
 tests/ref/fate/sub-subviewer1    | Bin 1494 -> 1514 bytes
 tests/ref/fate/sub-vplayer       | Bin 742 -> 762 bytes
 tests/ref/fate/sub-webvtt        | Bin 1985 -> 2005 bytes
 tests/ref/fate/sub-webvtt2       | Bin 1648 -> 1668 bytes
 25 files changed, 2 insertions(+)

diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index fdf55f36ca..d2ea4c62c3 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -41,6 +41,7 @@ int ff_ass_subtitle_header_full(AVCodecContext *avctx,
              "PlayResX: %d\r\n"
              "PlayResY: %d\r\n"
              "ScaledBorderAndShadow: yes\r\n"
+             "YCbCr Matrix: None\r\n"
              "\r\n"
              "[V4+ Styles]\r\n"
 
diff --git a/tests/ref/fate/sub-aqtitle b/tests/ref/fate/sub-aqtitle
index af0c06d7c2809e2bfe8859f2f53cafd3c1808889..ae5edcd9abe039d33dd3e2da496fd991dcbe8490 100644
GIT binary patch
delta 29
kcmeB`TqrrAK`7EW$+<|uH?gEBv%*TjFF!AJV;w&a0GM_O{{R30

delta 10
RcmZ1|*(*7rVdE5D9sm~71J3{e

diff --git a/tests/ref/fate/sub-cc b/tests/ref/fate/sub-cc
index 13f393cc86b9f797be24f37a07aafc7272c22e59..516d26af9ab09613f939d004826e44c80b3b1054 100644
GIT binary patch
delta 29
kcmX@kcAITNgHWV%l5>%QZ(>PNW`&i4Uw&Td#=4VC0HTfx{Qv*}

delta 10
Rcmcc3cARZO!^SDcnE)Fg1kC^d

diff --git a/tests/ref/fate/sub-cc-realtime b/tests/ref/fate/sub-cc-realtime
index 169361f540e4dff43a132df1111395e55a19ff73..98dfef55019719911d6c5d9faa0c057cc324f227 100644
GIT binary patch
delta 29
kcmeyu-N7@VK`7EW$+<|uH?gEBv%*TjFF!AJV_g|50H13Lk^lez

delta 10
RcmeC+`NBP+VdIn%Rsb0Q1Y!UH

diff --git a/tests/ref/fate/sub-cc-scte20 b/tests/ref/fate/sub-cc-scte20
index be28084887a9b7fb80ae4ff3369cf7192a978919..a97d29f70ba1d3984887eacb6e833abb8a406902 100644
GIT binary patch
delta 29
kcmdnUew2MegHWV%l5>%QZ(>PNW`&i4Uw&Td#yVqW0G!DRJ^%m!

delta 10
RcmX@gzL9-G!^SCw%m5g91P%ZI

diff --git a/tests/ref/fate/sub-charenc b/tests/ref/fate/sub-charenc
index 4efacb073d14b43002b58ab0b4aa55e9d34de029..339137ae0b5485c4c954f859316cf8b413b01505 100644
GIT binary patch
delta 29
kcmeyN*P}n7K`7EW$+<|uH?gEBv%*TjFF!AJW8E(?0I0?bbpQYW

delta 10
RcmeCt|DiXbVdIn^VgMYG1w{Y=

diff --git a/tests/ref/fate/sub-jacosub b/tests/ref/fate/sub-jacosub
index b574dda54dfdee55a07f13c808ee3baa6e100798..32086d9365399ae3a968f9f61c6e3fa83a35ff65 100644
GIT binary patch
delta 29
kcmey)+s!wjK`7EW$+<|uH?gEBv%*TjFF!AJV_hX10HB5npa1{>

delta 10
RcmeC?`_4O|VdIo?HUJr21aJTV

diff --git a/tests/ref/fate/sub-microdvd b/tests/ref/fate/sub-microdvd
index 4ddb254c698245958b12e3ab0e988ef6359592a8..11440c28243f00cf99f07ff91ab2eb1c23dc2cc1 100644
GIT binary patch
delta 29
kcmcc5^_gozgHWV%l5>%QZ(>PNW`&i4Uw&Td#=3_r0I1jtPXGV_

delta 10
Rcmey&b)RcO!^SE1SpXeE1s?za

diff --git a/tests/ref/fate/sub-movtext b/tests/ref/fate/sub-movtext
index 6e2d2e35dbd94d6dded683b59436645805723372..973e9f16457906c4bf9bd95d7053b2c4e405e68a 100644
GIT binary patch
delta 29
kcmeBYTg*10K`7EW$+<|uH?gEBv%*TjFF!AJW8Fk10F~YfRR910

delta 10
RcmZ3?*3UMfVdIp3CIA+|1SJ3f

diff --git a/tests/ref/fate/sub-mpl2 b/tests/ref/fate/sub-mpl2
index f78cf6849530c0015fe58a6cc7cb1584d6c4c4ce..d740fbc365460187e6b4edcf3faa00bdb5638196 100644
GIT binary patch
delta 29
kcmaFH_KR&ogHWV%l5>%QZ(>PNW`&i4Uw&Td#<~|w0I8G<S^xk5

delta 10
Rcmeyx_Ka;p!^SDkm;fD&1u6gl

diff --git a/tests/ref/fate/sub-mpsub b/tests/ref/fate/sub-mpsub
index 1a8e757585a91121cb27f360b352fecc34340d8b..4c3d37fa42206d262e221b1d0b81312289329143 100644
GIT binary patch
delta 29
kcmcaA{8D&AgHWV%l5>%QZ(>PNW`&i4Uw&Td#=3A$0H=Qn$N&HU

delta 10
RcmaDUd{uZt!^SD0oB$jT1egE-

diff --git a/tests/ref/fate/sub-mpsub-frames b/tests/ref/fate/sub-mpsub-frames
index abd52ad277212d34a93b31b2114345e91f3ea1dc..4f69e68948d66530152459e31f60883b528532f5 100644
GIT binary patch
delta 29
kcmaFB`h|5ugHWV%l5>%QZ(>PNW`&i4Uw&Td#=0aX0H*>9#sB~S

delta 10
Rcmeyu`hayp!^SBIOaL4N1eO2*

diff --git a/tests/ref/fate/sub-pjs b/tests/ref/fate/sub-pjs
index 378190a3eb0aa64fd983bc10dd1caa512ba6c92e..a32720514305771ae40b9182a9c469e098b6b1aa 100644
GIT binary patch
delta 29
kcmcb^_JM6egHWV%l5>%QZ(>PNW`&i4Uw&Td#=3h<0H;t3JOBUy

delta 10
Rcmeysc86_3!^SChm;fBa1q=WH

diff --git a/tests/ref/fate/sub-realtext b/tests/ref/fate/sub-realtext
index 04b1664f8968cc550ce6f695f3bd68544ce3c0cb..d80db64dafcc51c0536b968eb0416444bbdb2a21 100644
GIT binary patch
delta 29
kcmZ3@zMp+UgHWV%l5>%QZ(>PNW`&i4Uw&Td#yVYQ0Gn+JEC2ui

delta 10
RcmdnbzM6eP!^SDv%m5ex1N;C0

diff --git a/tests/ref/fate/sub-sami b/tests/ref/fate/sub-sami
index dbd1cc310d670d6a2874af6d669b8e0d43c3b7cd..3f194bdd0253eff13af8df85876f656e9fca8658 100644
GIT binary patch
delta 29
kcmdnXf02JegHWV%l5>%QZ(>PNW`&i4Uw&Td#yWd;0HHMsb^rhX

delta 10
Rcmcb}zn6bP!^SDL>;M_<1V#V=

diff --git a/tests/ref/fate/sub-sami2 b/tests/ref/fate/sub-sami2
index dbec842d2b0181ebc0a7e8eefbd2991273255efb..bab07e4c0709cb420c1c248782e95bbf015b844f 100644
GIT binary patch
delta 29
kcmez5+vYc+K`7EW$+<|uH?gEBv%*TjFF!AJV_k_F0IdWIF#rGn

delta 10
RcmZqk`{X;JVdIn{H2@tM1pxp6

diff --git a/tests/ref/fate/sub-scc b/tests/ref/fate/sub-scc
index 62cbf6fa4a..ff667eb4ec 100644
--- a/tests/ref/fate/sub-scc
+++ b/tests/ref/fate/sub-scc
@@ -4,6 +4,7 @@ ScriptType: v4.00+
 PlayResX: 384
 PlayResY: 288
 ScaledBorderAndShadow: yes
+YCbCr Matrix: None
 
 [V4+ Styles]
 Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
diff --git a/tests/ref/fate/sub-srt b/tests/ref/fate/sub-srt
index b4eed235ce01f1f85bb26fd49fcdc123467c4740..a6ed4f31df47709db51272dff3bd889cb9ffc317 100644
GIT binary patch
delta 29
kcmbPhxY2MzgHWV%l5>%QZ(>PNW`&i4Uw&Td#yWWk0HHDpYXATM

delta 10
RcmdmJIM;AO!^SDH5&#*V1Umo#

diff --git a/tests/ref/fate/sub-srt-badsyntax b/tests/ref/fate/sub-srt-badsyntax
index 61f472a84b9aac22954215b60df7acdecd05fddc..27bdd48c404370d047697c06b710e44aaa371b74 100644
GIT binary patch
delta 29
kcmbQqvzBK<gHWV%l5>%QZ(>PNW`&i4Uw&Td#=6<80GVkDf&c&j

delta 10
RcmZ3>Gm~dR!^SBySpgU81X2J1

diff --git a/tests/ref/fate/sub-stl b/tests/ref/fate/sub-stl
index 0f326c21730c959e9428cd96a5eca21014b5c888..3e847a68beb5d6cfca08ea4612027d72eda9958a 100644
GIT binary patch
delta 29
kcmX>ocvWyhgHWV%l5>%QZ(>PNW`&i4Uw&Td#yV#X0HTTthX4Qo

delta 10
RcmcaAcu;Uc!^SC&8~_?#1Xln6

diff --git a/tests/ref/fate/sub-subviewer b/tests/ref/fate/sub-subviewer
index c68a6442be223b8c98cef6e3a67b5a176cd434c9..e910e154ba6203eca72f994d2f3cfd40d50f5ebc 100644
GIT binary patch
delta 29
kcmeBSTfjD<K`7EW$+<|uH?gEBv%*TjFF!AJV_hE;0F^KbOaK4?

delta 10
RcmZ3$*26ZTVdIn@CIA+M1RMYW

diff --git a/tests/ref/fate/sub-subviewer1 b/tests/ref/fate/sub-subviewer1
index e88729ad5ec990202f9d23f96288a36eb5a845bb..2d253288e1db9f2c2061512b6c85ebaefc5c51b0 100644
GIT binary patch
delta 29
kcmcb{{fc`+gHWV%l5>%QZ(>PNW`&i4Uw&Td#<~br0Hy^Bw*UYD

delta 10
RcmaFGeT{oU!^SCLtN<II1cv|s

diff --git a/tests/ref/fate/sub-vplayer b/tests/ref/fate/sub-vplayer
index d83db9e09fce65590dd76ed3fac7fa6cdf146f60..ef9cb2d9e5eec004f9d1ae70112bf4fee6a0bbfb 100644
GIT binary patch
delta 29
kcmaFH`ipf!gHWV%l5>%QZ(>PNW`&i4Uw&Td#<~n90H|IH*Z=?k

delta 10
Rcmeyx`iyl#!^SCTOaL5w1gHQ2

diff --git a/tests/ref/fate/sub-webvtt b/tests/ref/fate/sub-webvtt
index dea535b19b20e00c4249950af9b511a2e1a617f9..091cfb5d3f73c97c82146d67bb0447f3fd8bebe7 100644
GIT binary patch
delta 29
kcmX@ef0chigHWV%l5>%QZ(>PNW`&i4Uw&Td#yV$q0HPfVf&c&j

delta 10
Rcmcc0e~^Dd!^SC&>;M`)1X2J1

diff --git a/tests/ref/fate/sub-webvtt2 b/tests/ref/fate/sub-webvtt2
index 357b8178ea1cf224ad47dcf78b24f1948ece6665..56afed8944071d465eba2a8c0308af88863e54b6 100644
GIT binary patch
delta 29
kcmeys)51HUK`7EW$+<|uH?gEBv%*TjFF!AJW8EiK0H3)F2mk;8

delta 10
RcmZqS{lGJ!VdIn!tN<Cn1lRxo

-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [FFmpeg-devel] [PATCH 3/3] avcodec/ass: specify a permissive encoding
  2022-11-13 19:07 [FFmpeg-devel] [PATCH 0/3] Some small ASS conversion fixes Oneric
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 1/3] avcodec/ass: fix comment Oneric
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours Oneric
@ 2022-11-13 19:07 ` Oneric
  2 siblings, 0 replies; 7+ messages in thread
From: Oneric @ 2022-11-13 19:07 UTC (permalink / raw)
  To: ffmpeg-devel

The Encoding field (and the \fe tag) allows to limit font selection to
only those fonts declaring support for the specified codepage in their
OS/2's table "Code Page Character Range" field.
Particularly, Encoding=0 means only font's declaring support for "ANSI",
or rather "Latin (Western European)", are allowed to be selected.
Specifying Encoding=1 allows all fonts to be considered.
We do not want to limit font selection, so specify Encoding=1.

NB: at the time of writing libass only partially supports this field,
thus hiding the issue in any libass-based renderer. A VSFilter-based
DirectShow filter or XySubFilter will reveal the issue when a font not
declaring support for latin characters is specified in a style.
---
 libavcodec/ass.c                 |   2 +-
 tests/ref/fate/sub-aqtitle       | Bin 3233 -> 3233 bytes
 tests/ref/fate/sub-cc            | Bin 859 -> 859 bytes
 tests/ref/fate/sub-cc-realtime   | Bin 1544 -> 1544 bytes
 tests/ref/fate/sub-cc-scte20     | Bin 965 -> 965 bytes
 tests/ref/fate/sub-charenc       | Bin 6028 -> 6028 bytes
 tests/ref/fate/sub-jacosub       | Bin 1803 -> 1803 bytes
 tests/ref/fate/sub-microdvd      | Bin 1395 -> 1395 bytes
 tests/ref/fate/sub-movtext       | Bin 803 -> 803 bytes
 tests/ref/fate/sub-mpl2          | Bin 890 -> 890 bytes
 tests/ref/fate/sub-mpsub         | Bin 2537 -> 2537 bytes
 tests/ref/fate/sub-mpsub-frames  | Bin 756 -> 756 bytes
 tests/ref/fate/sub-pjs           | Bin 880 -> 880 bytes
 tests/ref/fate/sub-realtext      | Bin 959 -> 959 bytes
 tests/ref/fate/sub-sami          | Bin 2001 -> 2001 bytes
 tests/ref/fate/sub-sami2         | Bin 9990 -> 9990 bytes
 tests/ref/fate/sub-scc           |   2 +-
 tests/ref/fate/sub-srt           | Bin 6321 -> 6321 bytes
 tests/ref/fate/sub-srt-badsyntax | Bin 1581 -> 1581 bytes
 tests/ref/fate/sub-stl           | Bin 2261 -> 2261 bytes
 tests/ref/fate/sub-subviewer     | Bin 800 -> 800 bytes
 tests/ref/fate/sub-subviewer1    | Bin 1514 -> 1514 bytes
 tests/ref/fate/sub-vplayer       | Bin 762 -> 762 bytes
 tests/ref/fate/sub-webvtt        | Bin 2005 -> 2005 bytes
 tests/ref/fate/sub-webvtt2       | Bin 1668 -> 1668 bytes
 25 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ass.c b/libavcodec/ass.c
index d2ea4c62c3..5058dc8337 100644
--- a/libavcodec/ass.c
+++ b/libavcodec/ass.c
@@ -65,7 +65,7 @@ int ff_ass_subtitle_header_full(AVCodecContext *avctx,
              "0,0,"                 /* Spacing, Angle */
              "%d,1,0,"              /* BorderStyle, Outline, Shadow */
              "%d,10,10,10,"         /* Alignment, Margin[LRV] */
-             "0\r\n"                /* Encoding */
+             "1\r\n"                /* Encoding */
 
              "\r\n"
              "[Events]\r\n"
diff --git a/tests/ref/fate/sub-aqtitle b/tests/ref/fate/sub-aqtitle
index ae5edcd9abe039d33dd3e2da496fd991dcbe8490..2980d394278644f0a1b8361833ed2bb4bd2a506b 100644
GIT binary patch
delta 14
WcmZ1|xlnS$D@I1c&951^aRC4;vjw35

delta 14
WcmZ1|xlnS$D@I0x&951^aRC4;tp%U}

diff --git a/tests/ref/fate/sub-cc b/tests/ref/fate/sub-cc
index 516d26af9ab09613f939d004826e44c80b3b1054..5e4f5ff7fcdeb665d7de42a3d8856474e9ee2765 100644
GIT binary patch
delta 14
Vcmcc3cAIU(J4Qys&F>j=7y&P41*8A~

delta 14
Vcmcc3cAIU(J4Qx>&F>j=7y&O}1)~4}

diff --git a/tests/ref/fate/sub-cc-realtime b/tests/ref/fate/sub-cc-realtime
index 98dfef55019719911d6c5d9faa0c057cc324f227..22f09d5cddbf7181760a9db32cc4aa21f83574cb 100644
GIT binary patch
delta 14
VcmeC+>EPM$j*-!D^Ls`~762yY1iAnK

delta 14
VcmeC+>EPM$j*-z|^Ls`~762yS1i1hJ

diff --git a/tests/ref/fate/sub-cc-scte20 b/tests/ref/fate/sub-cc-scte20
index a97d29f70ba1d3984887eacb6e833abb8a406902..cded979cb874371943ce5eb0648b472fec9d5d1b 100644
GIT binary patch
delta 14
WcmX@gew2N~J4Qys&F>knF#-TC76s%0

delta 14
WcmX@gew2N~J4Qx>&F>knF#-TC5C!7^

diff --git a/tests/ref/fate/sub-charenc b/tests/ref/fate/sub-charenc
index 339137ae0b5485c4c954f859316cf8b413b01505..67e209856fccd5e1aebbacbe4c966ec769aebcd2 100644
GIT binary patch
delta 14
VcmeCt@6q4zijmQ9^J~V1q5vy`1(^T<

delta 14
VcmeCt@6q4zijmP^^J~V1q5vy=1(*N;

diff --git a/tests/ref/fate/sub-jacosub b/tests/ref/fate/sub-jacosub
index 32086d9365399ae3a968f9f61c6e3fa83a35ff65..9f555fb7470fa81d30e7668ede0fa883b105d729 100644
GIT binary patch
delta 14
VcmeC?>*m|=ijmQ9^J_*0RsbhH1jGOU

delta 14
VcmeC?>*m|=ijmP^^J_*0RsbhB1j7IT

diff --git a/tests/ref/fate/sub-microdvd b/tests/ref/fate/sub-microdvd
index 11440c28243f00cf99f07ff91ab2eb1c23dc2cc1..fa418f53db612e33dd6839b9ed1ce5ba8985e82f 100644
GIT binary patch
delta 14
Vcmey&^_gqKCq_oY&7T<?m;o}B1^NI0

delta 14
Vcmey&^_gqKCq_nt&7T<?m;o}51^EB~

diff --git a/tests/ref/fate/sub-movtext b/tests/ref/fate/sub-movtext
index 973e9f16457906c4bf9bd95d7053b2c4e405e68a..f96af3f8cfeab191fd2386219fa05352b9348fc9 100644
GIT binary patch
delta 14
VcmZ3?wwP_h4@O4A%|98n7y&7?1qJ{B

delta 14
VcmZ3?wwP_h4@O3V%|98n7y&7+1qA>A

diff --git a/tests/ref/fate/sub-mpl2 b/tests/ref/fate/sub-mpl2
index d740fbc365460187e6b4edcf3faa00bdb5638196..f4e46e48e98bca0002f7cdfe4c78e02fa7dd436a 100644
GIT binary patch
delta 14
Vcmeyx_KR)9D@I1c&952z838h$1^oa3

delta 14
Vcmeyx_KR)9D@I0x&952z838hw1^fU2

diff --git a/tests/ref/fate/sub-mpsub b/tests/ref/fate/sub-mpsub
index 4c3d37fa42206d262e221b1d0b81312289329143..28c36ea40ca5bfb08e30c2ae7add905a9135c398 100644
GIT binary patch
delta 14
WcmaDU{8D(sD@I1c&952%u>$}z00wFR

delta 14
WcmaDU{8D(sD@I0x&952%u>$}y`UYtL

diff --git a/tests/ref/fate/sub-mpsub-frames b/tests/ref/fate/sub-mpsub-frames
index 4f69e68948d66530152459e31f60883b528532f5..44a23b273ac88ef7181122fd35148d8e6ce5daca 100644
GIT binary patch
delta 14
Vcmeyu`h|7FD@I1c&950b838cf1!({P

delta 14
Vcmeyu`h|7FD@I0x&950b838cZ1!w>O

diff --git a/tests/ref/fate/sub-pjs b/tests/ref/fate/sub-pjs
index a32720514305771ae40b9182a9c469e098b6b1aa..0eb6880a14681ca8bbf0247b2c77bd866c50e601 100644
GIT binary patch
delta 14
Vcmeys_JM7~D@I1c&950-838ed1>XPw

delta 14
Vcmeys_JM7~D@I0x&950-838eX1>OJv

diff --git a/tests/ref/fate/sub-realtext b/tests/ref/fate/sub-realtext
index d80db64dafcc51c0536b968eb0416444bbdb2a21..347a8c0eabcb1037a837d3514e820a3fbdac9b96 100644
GIT binary patch
delta 14
WcmdnbzMp-=D@I1c&951+FaiKALIutM

delta 14
WcmdnbzMp-=D@I0x&951+FaiKAJO#}F

diff --git a/tests/ref/fate/sub-sami b/tests/ref/fate/sub-sami
index 3f194bdd0253eff13af8df85876f656e9fca8658..7c1eff3bccc134dc3b81b0d166ebe83872007046 100644
GIT binary patch
delta 14
Wcmcb}f02K~D@I1c&951su>t@u{stHT

delta 14
Wcmcb}f02K~D@I0x&951su>t@u_y!jM

diff --git a/tests/ref/fate/sub-sami2 b/tests/ref/fate/sub-sami2
index bab07e4c0709cb420c1c248782e95bbf015b844f..9b5dcbe7a2c185c1e3ea0f559bcf0ba289d261e1 100644
GIT binary patch
delta 14
VcmZqkYxCRiijmQ9^J_+FRRAo~1yuk5

delta 14
VcmZqkYxCRiijmP^^J_+FRRAo^1yle4

diff --git a/tests/ref/fate/sub-scc b/tests/ref/fate/sub-scc
index ff667eb4ec..a9ff3676be 100644
--- a/tests/ref/fate/sub-scc
+++ b/tests/ref/fate/sub-scc
@@ -8,7 +8,7 @@ YCbCr Matrix: None
 
 [V4+ Styles]
 Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
-Style: Default,Monospace,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,3,1,0,2,10,10,10,0
+Style: Default,Monospace,16,&Hffffff,&Hffffff,&H0,&H0,0,0,0,0,100,100,0,0,3,1,0,2,10,10,10,1
 
 [Events]
 Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
diff --git a/tests/ref/fate/sub-srt b/tests/ref/fate/sub-srt
index a6ed4f31df47709db51272dff3bd889cb9ffc317..7449090fd063f5a8b7e948568db736f47d4c7832 100644
GIT binary patch
delta 14
WcmdmJxY2OKD@I1c&951ci2(pFzXlBe

delta 14
WcmdmJxY2OKD@I0x&951ci2(pFxdsdX

diff --git a/tests/ref/fate/sub-srt-badsyntax b/tests/ref/fate/sub-srt-badsyntax
index 27bdd48c404370d047697c06b710e44aaa371b74..b77cada3f5710ff27d0d7dacc7d56119fd23700c 100644
GIT binary patch
delta 14
VcmZ3>vzBMWD@I1c&951qSO6-;1tkCg

delta 14
VcmZ3>vzBMWD@I0x&951qSO6-&1tb6f

diff --git a/tests/ref/fate/sub-stl b/tests/ref/fate/sub-stl
index 3e847a68beb5d6cfca08ea4612027d72eda9958a..3bf1f0d43fa614c4354348c2fc28946caa554ed3 100644
GIT binary patch
delta 14
WcmcaAcvW!2D@I1c&950>u>k-up9U!a

delta 14
WcmcaAcvW!2D@I0x&950>u>k-unFc5T

diff --git a/tests/ref/fate/sub-subviewer b/tests/ref/fate/sub-subviewer
index e910e154ba6203eca72f994d2f3cfd40d50f5ebc..b3d69bfd1f3983aba6ee76718778b31decf0b1a1 100644
GIT binary patch
delta 14
VcmZ3$wt#KJD@I1c&950v838E91n&R<

delta 14
VcmZ3$wt#KJD@I0x&950v838E31nvL;

diff --git a/tests/ref/fate/sub-subviewer1 b/tests/ref/fate/sub-subviewer1
index 2d253288e1db9f2c2061512b6c85ebaefc5c51b0..4c19890ff143fad91649ec2e89d0f22c71b0fbfc 100644
GIT binary patch
delta 14
WcmaFG{fc|TD@I1c&952%GXnrJSO!@D

delta 14
WcmaFG{fc|TD@I0x&952%GXnrJQU+K6

diff --git a/tests/ref/fate/sub-vplayer b/tests/ref/fate/sub-vplayer
index ef9cb2d9e5eec004f9d1ae70112bf4fee6a0bbfb..3949a2be89c06a43407fd324432ff4272d09ac7b 100644
GIT binary patch
delta 14
Vcmeyx`iphLD@I1c&952x838ed1$zJh

delta 14
Vcmeyx`iphLD@I0x&952x838eX1$qDg

diff --git a/tests/ref/fate/sub-webvtt b/tests/ref/fate/sub-webvtt
index 091cfb5d3f73c97c82146d67bb0447f3fd8bebe7..2317c7d5a0500c4fc576db99e8c074d74e43c821 100644
GIT binary patch
delta 14
Wcmcc0f0cj3D@I1c&950>u>t@vZU!U(

delta 14
Wcmcc0f0cj3D@I0x&950>u>t@vXa*wy

diff --git a/tests/ref/fate/sub-webvtt2 b/tests/ref/fate/sub-webvtt2
index 56afed8944071d465eba2a8c0308af88863e54b6..1d236eabdcef44467ff14d3e7b6fd1445283c111 100644
GIT binary patch
delta 14
VcmZqSZQ<SUijmQ9^J~VLEC45A1uOsn

delta 14
VcmZqSZQ<SUijmP^^J~VLEC4541uFmm

-- 
2.30.2

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours
  2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours Oneric
@ 2022-11-13 19:12   ` Nicolas George
  2022-11-13 19:21     ` Oneric
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas George @ 2022-11-13 19:12 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 1542 bytes --]

Oneric (12022-11-13):
>  tests/ref/fate/sub-aqtitle       | Bin 3213 -> 3233 bytes
>  tests/ref/fate/sub-cc            | Bin 839 -> 859 bytes
>  tests/ref/fate/sub-cc-realtime   | Bin 1524 -> 1544 bytes
>  tests/ref/fate/sub-cc-scte20     | Bin 945 -> 965 bytes
>  tests/ref/fate/sub-charenc       | Bin 6008 -> 6028 bytes
>  tests/ref/fate/sub-jacosub       | Bin 1783 -> 1803 bytes
>  tests/ref/fate/sub-microdvd      | Bin 1375 -> 1395 bytes
>  tests/ref/fate/sub-movtext       | Bin 783 -> 803 bytes
>  tests/ref/fate/sub-mpl2          | Bin 870 -> 890 bytes
>  tests/ref/fate/sub-mpsub         | Bin 2517 -> 2537 bytes
>  tests/ref/fate/sub-mpsub-frames  | Bin 736 -> 756 bytes
>  tests/ref/fate/sub-pjs           | Bin 860 -> 880 bytes
>  tests/ref/fate/sub-realtext      | Bin 939 -> 959 bytes
>  tests/ref/fate/sub-sami          | Bin 1981 -> 2001 bytes
>  tests/ref/fate/sub-sami2         | Bin 9970 -> 9990 bytes
>  tests/ref/fate/sub-srt           | Bin 6301 -> 6321 bytes
>  tests/ref/fate/sub-srt-badsyntax | Bin 1561 -> 1581 bytes
>  tests/ref/fate/sub-stl           | Bin 2241 -> 2261 bytes
>  tests/ref/fate/sub-subviewer     | Bin 780 -> 800 bytes
>  tests/ref/fate/sub-subviewer1    | Bin 1494 -> 1514 bytes
>  tests/ref/fate/sub-vplayer       | Bin 742 -> 762 bytes
>  tests/ref/fate/sub-webvtt        | Bin 1985 -> 2005 bytes
>  tests/ref/fate/sub-webvtt2       | Bin 1648 -> 1668 bytes

These are text files. Please fix this so that we can review the patch.

Regards,

-- 
  Nicolas George

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours
  2022-11-13 19:12   ` Nicolas George
@ 2022-11-13 19:21     ` Oneric
  2022-11-13 19:39       ` Soft Works
  0 siblings, 1 reply; 7+ messages in thread
From: Oneric @ 2022-11-13 19:21 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 832 bytes --]

Thanks for taking a look!

On Sun, Nov 13, 2022 at 20:12:46 +0100, Nicolas George wrote:
> Oneric (12022-11-13):
> >  [...]
> >  tests/ref/fate/sub-webvtt2       | Bin 1648 -> 1668 bytes
> 
> These are text files. Please fix this so that we can review the patch.

As explained in the cover letter, those files are intentionally using CRLF
line endings and patchwork bugs (or at least used to bug) out if it
receives patches with CRLF line endings. The last few times this always
caused some debate, so I used binary diffs to workaround it this time.
It just adds the "YCbCr Matrix: None" line in every file and changes
the Encoding field to "1" instead of "0".

If you prefer and believe the patchwork bugs won’t cause confusion,
I can of course immediately send a v2 with plain text diffs.

Regards

Oneric

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours
  2022-11-13 19:21     ` Oneric
@ 2022-11-13 19:39       ` Soft Works
  0 siblings, 0 replies; 7+ messages in thread
From: Soft Works @ 2022-11-13 19:39 UTC (permalink / raw)
  To: FFmpeg development discussions and patches



> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Oneric
> Sent: Sunday, November 13, 2022 8:22 PM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately
> preserve colours
> 
> Thanks for taking a look!
> 
> On Sun, Nov 13, 2022 at 20:12:46 +0100, Nicolas George wrote:
> > Oneric (12022-11-13):
> > >  [...]
> > >  tests/ref/fate/sub-webvtt2       | Bin 1648 -> 1668 bytes
> >
> > These are text files. Please fix this so that we can review the
> patch.
> 
> As explained in the cover letter, those files are intentionally using
> CRLF
> line endings and patchwork bugs (or at least used to bug) out if it
> receives patches with CRLF line endings. The last few times this
> always
> caused some debate, so I used binary diffs to workaround it this
> time.
> It just adds the "YCbCr Matrix: None" line in every file and changes
> the Encoding field to "1" instead of "0".
> 
> If you prefer and believe the patchwork bugs won’t cause confusion,
> I can of course immediately send a v2 with plain text diffs.

IMO, this is not necessary, because those might be better visible
but nobody would be able to properly apply them.

I would even go one step further and specify those files which
are causing trouble in a .gitattributes file, because this will 
allow this (creating patches for those files as binary) to be 
handled automatically by git.

The .gitattributes solution worked successfully as tested here:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/BN0P223MB0358900908A4B2A6A37C3296BA769@BN0P223MB0358.NAMP223.PROD.OUTLOOK.COM/


PS: Thanks for your patch, will look at it later

softworkz
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-13 19:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-13 19:07 [FFmpeg-devel] [PATCH 0/3] Some small ASS conversion fixes Oneric
2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 1/3] avcodec/ass: fix comment Oneric
2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 2/3] avcodec/ass: accurately preserve colours Oneric
2022-11-13 19:12   ` Nicolas George
2022-11-13 19:21     ` Oneric
2022-11-13 19:39       ` Soft Works
2022-11-13 19:07 ` [FFmpeg-devel] [PATCH 3/3] avcodec/ass: specify a permissive encoding Oneric

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git