[−][src]Enum libass_sys::ASS_YCbCrMatrix
Support for (xy-)vsfilter mangled colors
Generally, xy-vsfilter emulates the classic vsfilter behavior of rendering directly into the (usually YCbCr) video. vsfilter is hardcoded to use BT.601(TV) as target colorspace when converting the subtitle RGB color to the video colorspace. This led to major breakage when HDTV video was introduced: HDTV typically uses BT.709(TV), but vsfilter still used BT.601(TV) for conversion.
This means classic vsfilter will mangle colors as follows:
screen_rgb = bt_709tv_to_rgb(rgb_to_bt601tv(ass_rgb))
Or in general:
screen_rgb = video_csp_to_rgb(rgb_to_bt601tv(ass_rgb))
where video_csp is the colorspace of the video with which the subtitle was muxed.
xy-vsfilter did not fix this, but instead introduced explicit rules how colors were mangled by adding a "YCbCr Matrix" header. If this header specifies a real colorspace (like BT.601(TV) etc.), xy-vsfilter behaves exactly like vsfilter, but using the specified colorspace for conversion of ASS input RGB to screen RGB:
screen_rgb = video_csp_to_rgb(rgb_to_ycbcr_header_csp(ass_rgb))
Further, xy-vsfilter behaves like vsfilter with no changes if the header is missing.
The special value "None" means untouched RGB values. Keep in mind that some version of xy-vsfilter are buggy and don't interpret this correctly. It appears some people are advocating that this header value is intended for situations where exact colors do not matter.
Note that newer Aegisub versions (the main application to produce ASS subtitle scripts) have an option that tries not to mangle the colors. It is said that if the header is not set to BT.601(TV), the colors are supposed not to be mangled, even if the "YCbCr Matrix" header is not set to "None". In other words, the video colorspace as detected by Aegisub is the same as identified in the file header.
In general, misinterpreting this header or not using it will lead to slightly different subtitle colors, which can matter if the subtitle attempts to match solid colored areas in the video.
Note that libass doesn't change colors based on this header. It absolutely can't do that, because the video colorspace is required in order to handle this as intended by xy-vsfilter.
Variants
YCBCR_DEFAULT
YCBCR_UNKNOWN
YCBCR_NONE
YCBCR_BT601_TV
YCBCR_BT601_PC
YCBCR_BT709_TV
YCBCR_BT709_PC
YCBCR_SMPTE240M_TV
YCBCR_SMPTE240M_PC
YCBCR_FCC_TV
YCBCR_FCC_PC
Trait Implementations
impl PartialEq<ASS_YCbCrMatrix> for ASS_YCbCrMatrix
[src]
fn eq(&self, other: &ASS_YCbCrMatrix) -> bool
[src]
#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Copy for ASS_YCbCrMatrix
[src]
impl Clone for ASS_YCbCrMatrix
[src]
fn clone(&self) -> ASS_YCbCrMatrix
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for ASS_YCbCrMatrix
[src]
impl Hash for ASS_YCbCrMatrix
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for ASS_YCbCrMatrix
[src]
Auto Trait Implementations
impl Sync for ASS_YCbCrMatrix
impl Send for ASS_YCbCrMatrix
impl Unpin for ASS_YCbCrMatrix
impl RefUnwindSafe for ASS_YCbCrMatrix
impl UnwindSafe for ASS_YCbCrMatrix
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,