summaryrefslogtreecommitdiffstats
path: root/libass/ass_types.h
diff options
context:
space:
mode:
authorOleg Oshmyan <chortos@inbox.lv>2013-02-01 23:35:02 +0000
committerGrigori Goronzy <greg@blackbox>2013-03-03 23:17:53 +0100
commit1ae86d2390b3e64b5f6574fa1628461bc403ae14 (patch)
tree9027365853409126cb33d4c64dd907718819219e /libass/ass_types.h
parent0e1702ad7a6a827d400c87b7a98aea11e54d2127 (diff)
downloadlibass-1ae86d2390b3e64b5f6574fa1628461bc403ae14.tar.bz2
libass-1ae86d2390b3e64b5f6574fa1628461bc403ae14.tar.xz
Support reading the YCbCr Matrix header
The value is parsed and stored as an enum constant that the consumer can read from ASS_Track. All output images are still plain RGB, and the consumer is expected to perform its own color correction. Supported header values: (TV|PC).(601|709|240M|FCC) and None. If the header is missing, a special compatibility value is used that should be treated as TV.601 if the accompanying video stream is YCbCr and as None otherwise. If the header is present but has an invalid/unknown value, a different special value is substituted.
Diffstat (limited to 'libass/ass_types.h')
-rw-r--r--libass/ass_types.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libass/ass_types.h b/libass/ass_types.h
index 677ba96..bc003aa 100644
--- a/libass/ass_types.h
+++ b/libass/ass_types.h
@@ -114,6 +114,19 @@ typedef struct ass_track {
int ScaledBorderAndShadow;
int Kerning;
char *Language;
+ enum {
+ YCBCR_DEFAULT = 0, // TV.601 on YCbCr video, None on RGB video
+ YCBCR_UNKNOWN,
+ YCBCR_NONE, // untouched RGB values
+ YCBCR_BT601_TV,
+ YCBCR_BT601_PC,
+ YCBCR_BT709_TV,
+ YCBCR_BT709_PC,
+ YCBCR_SMPTE240M_TV,
+ YCBCR_SMPTE240M_PC,
+ YCBCR_FCC_TV,
+ YCBCR_FCC_PC
+ } YCbCrMatrix;
int default_style; // index of default style
char *name; // file name in case of external subs, 0 for streams