Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectShowSource: Sensible defaults for CMake baseclasses lib, removed dx include path #9

Open
wants to merge 122 commits into
base: MT
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
557aad1
Turn: Add RGB48, RGB64 and planar with alpha formats support.
chikuzen Aug 23, 2016
3e0456a
ConvertTo8/16/Float: true 10-12-14 bit range support. New parameters.
Aug 23, 2016
b09bc11
New params for Info(): c[font]s[size]f[text_color]i[halo_color]i. Fix…
Aug 23, 2016
06d0240
ConvertToRGBxxx: 16 bit/float, RGB48/64,PlanarRGB(A), except PlanarRG…
Aug 24, 2016
3a2b8b3
New: PlanarToRGBA. ToRGB conversions seem to be ready.
Aug 25, 2016
2301c2c
Fix: Convert RGB32->PlanarRGB (alpha->nonalpha)
Aug 25, 2016
976064b
Resizers: RGB48/64, PlanarRGB 8/16/Float
Aug 26, 2016
8a11a08
Resamplers: Alpha plane (YUVA, PlanarRGBA)
Aug 26, 2016
46089bb
Resize: SSE2/4.1 16bit/float in resize_v_sseX_planar_16or32 with pure…
Aug 26, 2016
c97f545
Remove unused code
Aug 26, 2016
721c29b
Convert: RGB48/64,PlanarRGB(A)8/10-16/32 -> YUV(A)8/10-16/32
Aug 26, 2016
8579f2a
Remove unused code
Aug 26, 2016
55057fa
Remove unused code
Aug 26, 2016
7167307
Typo left from earlier trials
Aug 26, 2016
7998456
RGB48/64+PlanarRGB(A) for
Aug 26, 2016
6780ff4
avisynth C: missing alpha fields in VideoFrame struct + planar R,G,B …
Aug 29, 2016
b514645
fix :Convert PlanarRGB->444 at 8 bit
Aug 29, 2016
815d59d
Horizontal/VerticalReduceBy2: PlanarRGB+alpha. NoRGB48/64yet
Aug 29, 2016
b84055d
StackHorizontal/Vertical: PlanarRGB, alpha
Aug 29, 2016
0f04e5f
Merge(Chroma,Luma):Planar RGB, float type fix
Aug 29, 2016
48eb640
fix: typo in default alpha value
Aug 29, 2016
0b6c7ad
make fill_plane and fill_chroma public
Aug 29, 2016
7f92e2c
ShowRed/Green/Blue/Alpha() for RGB48/64 source. New targets RGB48/64/…
Aug 29, 2016
783fe2e
ShowRed/G/B/A parameter check message fix
Aug 29, 2016
98376c9
ShowChannel: kill warnings
Aug 29, 2016
ef2eb0d
ConvertToY: RGB48/64, PlanarRGB8/16/float support
Aug 30, 2016
417282b
HorizontalReduceBy2: RGB48/64. No todo left here.
Aug 30, 2016
5b537c3
resize_h_c_planar: much faster by changing x-y loop order
Aug 30, 2016
3e8f2f8
resizer_h_ssse3_generic for 16bit/float. Resizers are superfast now f…
Aug 30, 2016
cd782ca
ColorYUV for 10-16 bit with native 10,12,14 bitdepth.
Sep 1, 2016
fab87f4
Text overlay native 10-12-14 bit-aware.
Sep 1, 2016
74116e7
Blur/Sharpen: RGB48/64 and Planar RGB(A)
Sep 1, 2016
4446dd4
Conditional (runtime) functions for YUV 16 bit/float and RGB64 and Pl…
Sep 2, 2016
3c6a1cd
Conditional_functions: Remove refactored creates
Sep 2, 2016
79cb2cd
conditional_functions: return from one common place
Sep 2, 2016
d97c5ee
Levels: 10-16 bit support for YUV(A), PlanarRGB(A), 16 bits for RGB48/64
Sep 4, 2016
1b7e57f
RGBAdjust: RGB48/64 and Planar RGB(A) 10-16 bit
Sep 4, 2016
440a2cd
RGBAdjust: code cleanup to templates
Sep 5, 2016
8360ed6
Fix Limiter parameter check (was never true)
Sep 5, 2016
c32c9ec
Allow plugins to use parameter type double
Sep 5, 2016
2639567
Limiter: 10-16 bit YUV support. Todo: show options for 10+ bits
Sep 5, 2016
e536fb1
Convert sse2 for YUV 8->10-16, 16-10->8 bit (with shifts)
Sep 5, 2016
21d0a98
Limiter: port show option for 10-16 bits
Sep 6, 2016
4f67b39
Limiter: Remove old non-templated 8 bit code
Sep 6, 2016
6c85f4c
Revert a false idea (double type support in plugins e.g. virtualdub)
Sep 7, 2016
34db747
Invert: YUV(A)/PlanarRGB(A) 8,10-16,32 bit, RGB48/64, with SSE2
Sep 7, 2016
34ea551
Blur/Sharpen: 10,12,14 bit clamp, TemporalSoften: SAD scale ok for 10…
Sep 7, 2016
105cdfc
PlaneSwap <plane>ToY: 10-12-14 bit aware
Sep 7, 2016
132b5f7
ConvertToY8: 10-12-14 bit aware
Sep 7, 2016
672d8bf
Mask: hbd alpha formats RGB64 and PlanarRGBA (8,10-16,float) support
Sep 7, 2016
6c5d0b0
GreyScale(): RGB64/PlanarRGB(A) + all 10-12-14 bit aware
Sep 8, 2016
0470711
ResetMask: RGB64, planars with alpha (RGBA, YUVA)
Sep 8, 2016
ec2c88c
Layer() for RGB64, ResetMask: new "mask" parameter. Default: max of p…
Sep 8, 2016
6340238
Info(): missing 8 bit YUVA color space descriptions
Sep 8, 2016
3967091
Planar RGBA -> 422/420 conversion chain results YUVA as it works for …
Sep 8, 2016
5c0be9b
ConvertToYUV411: alias for ConvertToYV411. For naming consistency
Sep 8, 2016
e780ae4
Convert: Planar RGB <> YUV: 10-12-14 bit range
Sep 10, 2016
808d9c9
StackVertical: don't reverse frame order for planar RGBs
Sep 10, 2016
8211308
General functions for pixel_type<->pixel_type_name, aliases also acce…
Sep 10, 2016
f55c7d4
ShowChannel() to use GetPixelTypeFromName()
Sep 10, 2016
1827ec4
BlankClip and Colorbars to use GetPixelTypeFromName()
Sep 10, 2016
712f342
FilterInfo to use GetPixelTypeName()
Sep 10, 2016
b2216fd
frame->GetRowSize() and GetHeight() to return 0 if no Alpha plane (fo…
Sep 12, 2016
8f0e2bf
Comment in order to not mislead me again
Sep 12, 2016
37173f1
ConvertToY: make rgb matrix offset_y always 8 bit, conversion later
Sep 12, 2016
53f46a5
Memo why AVSValue will never get 64 bit types in Avisynth(32)
Sep 12, 2016
7a34064
Overlay! Working "add" method for 16 bit input. Big changes, no clean…
Sep 12, 2016
3b603a2
AddBorders: 10-12-14 bit aware, stretch 8 bit colors for RGB (10-16)
Sep 13, 2016
c7c585c
BlankClip: 10-12-14 bit aware
Sep 13, 2016
f15cb76
Tweak: Luma LUT for 10-16 bits, Chroma LUT for 10 bit (old: LUT 8 bit…
Sep 14, 2016
aaf8977
Subtract: Planar RGB(A), YUV(A) 10-16,Float, RGB48 and RGB64
Sep 14, 2016
1ded5d5
ColorKeyMask: RGB64, Planar RGBA 8-16,float.
Sep 14, 2016
152f328
MergeChroma: fix regression for 8 bit (+variable renames)
Sep 15, 2016
873f4f7
MaskHS: 10-16bit,float. Tweak: fix using start/endHue, min/maxSat for…
Sep 15, 2016
cdab57e
Apply template<typename pixel_t> naming style
Sep 15, 2016
53890f5
Tweak dither strength back to base +/-0.5. Use env2->Allocate for RGB…
Sep 16, 2016
cf65dbc
Histogram: "Levels" with bits=10 gives 10-bit wide histogram for 10+ …
Sep 16, 2016
3caef6c
Histogram "levels": parameter: bits=8,9,10,11,12 for finer histograms…
Sep 17, 2016
37599c9
Levels, Tweak, RGBAdjust: dither range fix for 10-16 bit + float
Sep 17, 2016
a6c0d50
ConvertBits(), refactor, YUVA alpha always full scale to retain max. …
Sep 19, 2016
598efff
rec2020 matrix for RGB<->444 and GreyScale. not for YUY2
Sep 19, 2016
47571ad
Merge: SSE2 for 10-14 bits (10-16 for SSE4.1 still work)
Sep 22, 2016
0077f82
Ordered dither for 10-16->8 bit. SSE2 for 8->10-16 bit full scale (RGB).
Sep 22, 2016
547f536
ConvertBits: dither parameter check
Sep 22, 2016
ea0655a
TemporalSoften: SSE2 for SAD 16 bit, bits_per_pixel SAD scaling
Sep 29, 2016
36ef8a7
No need "typename" in non-templated function (compiler compatibility)
Sep 29, 2016
133b9f0
VDubFilter: really allow and convert double/long-type params
Sep 30, 2016
8865287
Merge remote-tracking branch 'chikuzen/turn' into MT
Sep 30, 2016
b450628
CPU feature constants for AVX2, FMA3, F16C (AES, MOVBE) + Info()
Oct 1, 2016
0023d71
Remove MSVC specific version checking from CPUCheckForExtensions
Oct 1, 2016
5dd0d8b
AddAlphaPlane/RemoveAlphaPlane + misc refactor on ->8bit conversion
Oct 1, 2016
2dba164
Avisynth.h: auto fallback to avs2.6 when avs+ VideoInfo:: member func…
Oct 5, 2016
c586ae0
YUV 10-16->10-16 bitdepth conversions to SSE2
Oct 5, 2016
8ab11f4
Missing parenthesis when x64 build
Oct 12, 2016
409069c
Fix some warnings
Oct 12, 2016
cdd15f6
Fix warning
Oct 12, 2016
595744e
AVX code path for 16/32 bit resampler
Oct 12, 2016
fdb0448
Resizers: proper clamping for 10,12,14 bits
Oct 12, 2016
6e942ec
Fix avisynth.h for x64 build
Oct 12, 2016
595d38f
AVX and AVX2 paths for 32->(8..16) and 10..16<->10..16 bitdepth conve…
Oct 12, 2016
e0640b5
Use AVX/AVX2 path for two bitdepth conversion function
Oct 12, 2016
8af39fa
cmakelist.txt: set special avx/avx2 options for files *_avx.cpp and *…
Oct 12, 2016
ffe5071
Test for fixing "Only a single prefetcher is allowed per script."
Oct 12, 2016
0b440c5
Comments in main cmakelist.txt
Oct 12, 2016
87ce6b4
Fix some size_t warnings for x64
Oct 13, 2016
a289325
Overlay: Subtract 10-16 bit. Unify with "Add"
Oct 13, 2016
384f10d
Overlay: Darken/Lighten to 10-16 bit
Oct 13, 2016
3c993d7
Overlay: Blend,Chroma,Luma 10-16 bit
Oct 14, 2016
8f17960
Overlay: Multiply 10-16 bits
Oct 14, 2016
f0cc244
Overlay: Difference 10-16 bit
Oct 14, 2016
e32f825
misc. comment in overlay add
Oct 14, 2016
1f4cf1b
Overlay: Exclusion 10-16 bit
Oct 14, 2016
101e3f1
Misc. line ordering
Oct 14, 2016
87426c7
Overlay: Softlight, Hardlight 10-16 bit. No more left.
Oct 14, 2016
066bc4b
Histogram: Classic 10-16 bit, and 32 bit float
Oct 14, 2016
42331b4
ShowRed/G/B/A: new ShowY/U/V. New:allow PlanarRGB(A)/YUV(A) src and t…
Oct 14, 2016
9d156c6
New script function: ColorSpaceNameToPixelType. Returns a VideoInfo::…
Oct 14, 2016
e10dcb8
AviSource/DirectShowSource: 16-bit RGB input support (BGR[48], BRA[64])
ignus2 Oct 23, 2016
c6d5d77
Merge pull request #7 from ignus2/input
pinterf Oct 23, 2016
0476aa9
DirectShowSource compilation help updated
Oct 26, 2016
b54a6be
Fix Overlay for 8 bit YV12
Oct 26, 2016
dbcfae2
DirectShowSource: Sensible defaults for CMake baseclasses lib, remove…
ignus2 Oct 30, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
AviSource/DirectShowSource: 16-bit RGB input support (BGR[48], BRA[64])
ignus2 committed Oct 23, 2016
commit e10dcb8f640b2a1562dff75af3c6ee125243c82c
44 changes: 39 additions & 5 deletions avs_core/filters/AviSource/avi_source.cpp
Original file line number Diff line number Diff line change
@@ -296,6 +296,10 @@ void AVISource::LocateVideoCodec(const char fourCC[], IScriptEnvironment* env) {
vi.pixel_type = VideoInfo::CS_BGR32;
} else if (pbiSrc->biCompression == BI_RGB && pbiSrc->biBitCount == 24) {
vi.pixel_type = VideoInfo::CS_BGR24;
} else if (pbiSrc->biCompression == '\100ARB') { // BRA@ ie. BRA[64]
vi.pixel_type = VideoInfo::CS_BGR64;
} else if (pbiSrc->biCompression == '\060RGB') { // BGR0 ie. BGR[48]
vi.pixel_type = VideoInfo::CS_BGR48;
} else if (pbiSrc->biCompression == 'YERG') {
vi.pixel_type = VideoInfo::CS_Y8;
} else if (pbiSrc->biCompression == '008Y') {
@@ -409,20 +413,22 @@ AVISource::AVISource(const char filename[], bool fAudio, const char pixel_type[]
bool fYUY2 = pixel_type[0] == 0 || lstrcmpi(pixel_type, "YUY2" ) == 0;
bool fRGB32 = pixel_type[0] == 0 || lstrcmpi(pixel_type, "RGB32") == 0;
bool fRGB24 = pixel_type[0] == 0 || lstrcmpi(pixel_type, "RGB24") == 0;
bool fRGB48 = pixel_type[0] == 0 || lstrcmpi(pixel_type, "RGB48") == 0;
bool fRGB64 = pixel_type[0] == 0 || lstrcmpi(pixel_type, "RGB64") == 0;

if (lstrcmpi(pixel_type, "AUTO") == 0) {
fY8 = fYV12 = fYUY2 = fRGB32 = fRGB24 = true;
fY8 = fYV12 = fYUY2 = fRGB32 = fRGB24 = fRGB48 = fRGB64 = true;
forcedType = false;
}
else if (lstrcmpi(pixel_type, "FULL") == 0) {
fY8 = fYV12 = fYV16 = fYV24 = fYV411 = fYUY2 = fRGB32 = fRGB24 = true;
fY8 = fYV12 = fYV16 = fYV24 = fYV411 = fYUY2 = fRGB32 = fRGB24 = fRGB48 = fRGB64 = true;
forcedType = false;
}

if (!(fY8 || fYV12 || fYV16 || fYV24 || fYV411 || fYUY2 || fRGB32 || fRGB24))
env->ThrowError("AVISource: requested format must be one of YV24, YV16, YV12, YV411, YUY2, Y8, RGB32, RGB24, AUTO or FULL");
if (!(fY8 || fYV12 || fYV16 || fYV24 || fYV411 || fYUY2 || fRGB32 || fRGB24 || fRGB48 || fRGB64))
env->ThrowError("AVISource: requested format must be one of YV24, YV16, YV12, YV411, YUY2, Y8, RGB32, RGB24, RGB48, RGB64, AUTO or FULL");

// try to decompress to YV12, YV411, YV16, YV24, YUY2, Y8, RGB32, and RGB24 in turn
// try to decompress to YV12, YV411, YV16, YV24, YUY2, Y8, RGB32, and RGB24, RGB48, RGB64 in turn
memset(&biDst, 0, sizeof(BITMAPINFOHEADER));
biDst.biSize = sizeof(BITMAPINFOHEADER);
biDst.biWidth = vi.width;
@@ -530,6 +536,34 @@ AVISource::AVISource(const char filename[], bool fAudio, const char pixel_type[]
}
}

// RGB48
if (fRGB48 && bOpen) {
vi.pixel_type = VideoInfo::CS_BGR48;
biDst.biSizeImage = vi.BMPSize();
biDst.biCompression = '\060RGB'; // BGR0 ie. BGR[48]
biDst.biBitCount = 48;
if (ICERR_OK == ICDecompressQuery(hic, pbiSrc, &biDst)) {
_RPT0(0,"AVISource: Opening as BGR0 (BGR[48]).\n");
bOpen = false; // Skip further attempts
} else if (forcedType) {
env->ThrowError("AVISource: the video decompressor couldn't produce RGB48 output");
}
}

// RGB64
if (fRGB64 && bOpen) {
vi.pixel_type = VideoInfo::CS_BGR64;
biDst.biSizeImage = vi.BMPSize();
biDst.biCompression = '\100ARB'; // BRA@ ie. BRA[64]
biDst.biBitCount = 64;
if (ICERR_OK == ICDecompressQuery(hic, pbiSrc, &biDst)) {
_RPT0(0,"AVISource: Opening as BRA@ (BRA[64]).\n");
bOpen = false; // Skip further attempts
} else if (forcedType) {
env->ThrowError("AVISource: the video decompressor couldn't produce RGB64 output");
}
}

// Y8
if (fY8 && bOpen) {
vi.pixel_type = VideoInfo::CS_Y8;
22 changes: 21 additions & 1 deletion plugins/DirectShowSource/directshow_source.cpp
Original file line number Diff line number Diff line change
@@ -141,6 +141,8 @@ const GUID MEDIASUBTYPE_I420 = {FourCC('I420'), 0x0000, 0x0010, {0x80, 0x00, 0x0
// Already defined by platform headers: const GUID MEDIASUBTYPE_NV12 = {FourCC('NV12'), 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
const GUID MEDIASUBTYPE_YV16 = {FourCC('YV16'), 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
const GUID MEDIASUBTYPE_YV24 = {FourCC('YV24'), 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
const GUID MEDIASUBTYPE_BRA64 = { FourCC('BRA\100'), 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; // BRA@ ie. BRA[64]
const GUID MEDIASUBTYPE_BGR48 = { FourCC('BGR\060'), 0x0000, 0x0010,{ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 } }; // BGR0 ie. BGR[48]


// Format a GUID for printing
@@ -289,6 +291,8 @@ GetSample::GetSample(bool _load_audio, bool _load_video, unsigned _media, LOG* _
if (media & mediaARGB) InitMediaType(my_media_types[i++], MEDIATYPE_Video, MEDIASUBTYPE_ARGB32);
if (media & mediaRGB32) InitMediaType(my_media_types[i++], MEDIATYPE_Video, MEDIASUBTYPE_RGB32);
if (media & mediaRGB24) InitMediaType(my_media_types[i++], MEDIATYPE_Video, MEDIASUBTYPE_RGB24);
if (media & mediaRGB64) InitMediaType(my_media_types[i++], MEDIATYPE_Video, MEDIASUBTYPE_BRA64);
if (media & mediaRGB48) InitMediaType(my_media_types[i++], MEDIATYPE_Video, MEDIASUBTYPE_BGR48);
no_my_media_types = i;
if (media == mediaNONE) media = mediaAUTO;
}
@@ -1323,6 +1327,20 @@ SubFormat: KSDATAFORMAT_SUBTYPE_PCM {00000001-0000-0010-8000-00AA00389B71}
}
pixel_type = VideoInfo::CS_BGR32;

} else if (pmt->subtype == MEDIASUBTYPE_BGR48) {
if (!(media & mediaRGB48)) {
dssRPT0(dssNEG, "*** Video: Subtype denied - BGR[48]\n");
return S_FALSE;
}
pixel_type = VideoInfo::CS_BGR48;

} else if (pmt->subtype == MEDIASUBTYPE_BRA64) {
if (!(media & mediaRGB64)) {
dssRPT0(dssNEG, "*** Video: Subtype denied - BRA[64]\n");
return S_FALSE;
}
pixel_type = VideoInfo::CS_BGR64;

} else {
dssRPT2(dssNEG, "*** Video: Subtype rejected - '%s' %s\n", PrintFourCC(pmt->subtype.Data1), PrintGUID(&pmt->subtype));
dssRPT1(dssNEG, "*** Video: Format type - %s\n", PrintGUID(&pmt->formattype));
@@ -2584,6 +2602,8 @@ AVSValue __cdecl Create_DirectShowSource(AVSValue args, void*, IScriptEnvironmen
else if (!lstrcmpi(pixel_type, "AYUV")) { _media = GetSample::mediaAYUV; }
else if (!lstrcmpi(pixel_type, "RGB24")) { _media = GetSample::mediaRGB24; }
else if (!lstrcmpi(pixel_type, "RGB32")) { _media = GetSample::mediaRGB32 | GetSample::mediaARGB; }
else if (!lstrcmpi(pixel_type, "RGB48")) { _media = GetSample::mediaRGB48; }
else if (!lstrcmpi(pixel_type, "RGB64")) { _media = GetSample::mediaRGB64; }
else if (!lstrcmpi(pixel_type, "ARGB")) { _media = GetSample::mediaARGB; }
else if (!lstrcmpi(pixel_type, "RGB")) { _media = GetSample::mediaRGB; }
else if (!lstrcmpi(pixel_type, "YUV")) { _media = GetSample::mediaYUV; }
@@ -2594,7 +2614,7 @@ AVSValue __cdecl Create_DirectShowSource(AVSValue args, void*, IScriptEnvironmen
else if (!lstrcmpi(pixel_type, "YUVEX")) { _media = GetSample::mediaYUVex; }
else if (!lstrcmpi(pixel_type, "FULL")) { _media = GetSample::mediaFULL; }
else {
env->ThrowError("DirectShowSource: pixel_type must be \"RGB24\", \"RGB32\", \"ARGB\", "
env->ThrowError("DirectShowSource: pixel_type must be \"RGB24\", \"RGB32\", \"ARGB\", \"RGB48\", \"RGB64\", "
"\"YUY2\", \"YV12\", \"I420\", \"YV16\", \"YV24\", \"AYUV\", \"Y41P\", "
"\"Y411\", \"NV12\", \"RGB\", \"YUV\" , \"YUVex\", \"AUTO\" or \"FULL\"");
}
6 changes: 4 additions & 2 deletions plugins/DirectShowSource/directshow_source.h
Original file line number Diff line number Diff line change
@@ -266,7 +266,7 @@ class GetSample : public IBaseFilter, public IPin, public IMemInputPin {
AM_MEDIA_TYPE *am_media_type;

unsigned media, no_my_media_types;
AM_MEDIA_TYPE *my_media_types[16]; // 2.6
AM_MEDIA_TYPE *my_media_types[18]; // 2.6

PVideoFrame pvf;

@@ -286,7 +286,9 @@ class GetSample : public IBaseFilter, public IPin, public IMemInputPin {
mediaYV24 = 1<<10,// 2.6
mediaI420 = 1<<11,// 2.6
mediaNV12 = 1<<12,// 2.6
mediaRGB = mediaARGB | mediaRGB32 | mediaRGB24,
mediaRGB64 = 1<<13,
mediaRGB48 = 1<<14,
mediaRGB = mediaARGB | mediaRGB32 | mediaRGB24 | mediaRGB64 | mediaRGB48,
mediaYUV = mediaYUV9 | mediaYV12 | mediaYUY2 | mediaAYUV | mediaY411 | mediaY41P,
mediaYUVex = mediaYUV | mediaYV16 | mediaYV24 | mediaI420 | mediaNV12,
mediaAUTO = mediaRGB | mediaYUV,