Skip to content
48 changes: 48 additions & 0 deletions avs_core/core/avisynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4442,6 +4442,54 @@ PVideoFrame ScriptEnvironment::NewVideoFrameOnDevice(const VideoInfo& vi, int al
case VideoInfo::CS_YUVA420PS:
case VideoInfo::CS_YUVA422PS:
case VideoInfo::CS_YUVA444PS:
// planar 4:4:0
case VideoInfo::CS_YUV440:
case VideoInfo::CS_YUV440P10:
case VideoInfo::CS_YUV440P12:
case VideoInfo::CS_YUV440P14:
case VideoInfo::CS_YUV440P16:
case VideoInfo::CS_YUV440PS:
// planar 4:4:0:A
case VideoInfo::CS_YUVA440:
case VideoInfo::CS_YUVA440P10:
case VideoInfo::CS_YUVA440P12:
case VideoInfo::CS_YUVA440P14:
case VideoInfo::CS_YUVA440P16:
case VideoInfo::CS_YUVA440PS:
// planar 4:1:1
case VideoInfo::CS_YUV411P10:
case VideoInfo::CS_YUV411P12:
case VideoInfo::CS_YUV411P14:
case VideoInfo::CS_YUV411P16:
case VideoInfo::CS_YUV411PS:
// planar 4:1:1:A
case VideoInfo::CS_YUVA411:
case VideoInfo::CS_YUVA411P10:
case VideoInfo::CS_YUVA411P12:
case VideoInfo::CS_YUVA411P14:
case VideoInfo::CS_YUVA411P16:
case VideoInfo::CS_YUVA411PS:
// planar 4:1:0
case VideoInfo::CS_YUV410:
case VideoInfo::CS_YUV410P10:
case VideoInfo::CS_YUV410P12:
case VideoInfo::CS_YUV410P14:
case VideoInfo::CS_YUV410P16:
case VideoInfo::CS_YUV410PS:
// planar 4:1:0:A
case VideoInfo::CS_YUVA410:
case VideoInfo::CS_YUVA410P10:
case VideoInfo::CS_YUVA410P12:
case VideoInfo::CS_YUVA410P14:
case VideoInfo::CS_YUVA410P16:
case VideoInfo::CS_YUVA410PS:
// Y+α 4:0:0:A
case VideoInfo::CS_YA8:
case VideoInfo::CS_YA10:
case VideoInfo::CS_YA12:
case VideoInfo::CS_YA14:
case VideoInfo::CS_YA16:
case VideoInfo::CS_YA32:
break;
default:
ThrowError("Filter Error: Filter attempted to create VideoFrame with invalid pixel_type.");
Expand Down
4 changes: 4 additions & 0 deletions avs_core/core/avisynth.def
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,7 @@ EXPORTS
avs_release_global_lock = _avs_release_global_lock@8

avs_get_cpu_flags_ex = _avs_get_cpu_flags_ex@4
avs_is_440 = _avs_is_440@4
avs_is_ya = _avs_is_ya@4
avs_is_410 = _avs_is_410@4
avs_is_411 = _avs_is_411@4
28 changes: 28 additions & 0 deletions avs_core/core/avisynth_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,34 @@ void AVSC_CC avs_clear_map(AVS_ScriptEnvironment * p, AVS_Map * map)
}
}

extern "C"
int AVSC_CC avs_is_440(const AVS_VideoInfo * p)
{
return ((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YUV440 & AVS_CS_PLANAR_FILTER)) ||
((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YUVA440 & AVS_CS_PLANAR_FILTER));
}

extern "C"
int AVSC_CC avs_is_ya(const AVS_VideoInfo * p)
{
return ((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YA & AVS_CS_PLANAR_FILTER)) ||
((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YA & AVS_CS_PLANAR_FILTER));
}

extern "C"
int AVSC_CC avs_is_410(const AVS_VideoInfo * p)
{
return ((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YUV410 & AVS_CS_PLANAR_FILTER)) ||
((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YUVA410 & AVS_CS_PLANAR_FILTER));
}

extern "C"
int AVSC_CC avs_is_411(const AVS_VideoInfo * p)
{
return ((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YUV411 & AVS_CS_PLANAR_FILTER)) ||
((p->pixel_type & AVS_CS_PLANAR_MASK & ~AVS_CS_SAMPLE_BITS_MASK) == (AVS_CS_GENERIC_YUVA411 & AVS_CS_PLANAR_FILTER));
}



/////////////////////////////////////////////////////////////////////
Expand Down
14 changes: 14 additions & 0 deletions avs_core/core/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,14 @@ unsigned int VideoInfo::GetChannelMask() const
return dwChannelMask >> 4;
}

bool VideoInfo::Is440() const { return ((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YUV440 & CS_PLANAR_FILTER)) ||
((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YUVA440 & CS_PLANAR_FILTER)) ; }
bool VideoInfo::IsYA() const { return ((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YA & CS_PLANAR_FILTER)) ||
((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YA & CS_PLANAR_FILTER)) ; }
bool VideoInfo::Is410() const { return ((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YUV410 & CS_PLANAR_FILTER)) ||
((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YUVA410 & CS_PLANAR_FILTER)) ; }
bool VideoInfo::Is411() const { return ((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YUV411 & CS_PLANAR_FILTER)) ||
((pixel_type & CS_PLANAR_MASK & ~CS_Sample_Bits_Mask) == (CS_GENERIC_YUVA411 & CS_PLANAR_FILTER)) ; }

// end struct VideoInfo

Expand Down Expand Up @@ -1312,6 +1320,12 @@ static const AVS_Linkage avs_linkage = { // struct AVS_Linkage {
&VideoInfo::SetChannelMask, // void (VideoInfo::*SetChannelMask)();
&VideoInfo::GetChannelMask, // int (VideoInfo::*GetChannelMask)() const;

// V13
&VideoInfo::Is440, // bool (VideoInfo::*Is440)() const;
&VideoInfo::IsYA, // bool (VideoInfo::*IsYA)() const;
&VideoInfo::Is410, // bool (VideoInfo::*Is410)() const;
&VideoInfo::Is411, // bool (VideoInfo::*Is411)() const;

// a single { nullptr } initializes the whole placeholder array
{ nullptr }, // void (VideoInfo::* reserved2[64 - 31])(); // Reserve pointer space for Avisynth+

Expand Down
62 changes: 62 additions & 0 deletions avs_core/core/parser/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,12 @@ extern const AVSFunction Script_functions[] = {
/*
{ "IsArrayOf", BUILTIN_FUNC_PREFIX, ".s", IsArrayOf },
*/

{ "Is440", BUILTIN_FUNC_PREFIX, "c", Is440 },
{ "IsYA", BUILTIN_FUNC_PREFIX, "c", IsYA },
{ "Is410", BUILTIN_FUNC_PREFIX, "c", Is410 },
{ "Is411", BUILTIN_FUNC_PREFIX, "c", Is411 },

{ 0 }
};

Expand Down Expand Up @@ -1583,6 +1589,53 @@ static const std::map<int, std::string> pixel_format_table =
{VideoInfo::CS_RGBAP14 , "RGBAP14"},
{VideoInfo::CS_RGBAP16 , "RGBAP16"},
{VideoInfo::CS_RGBAPS , "RGBAPS"},

{VideoInfo::CS_YUV440 , "YUV440"},
{VideoInfo::CS_YUV440P10 , "YUV440P10"},
{VideoInfo::CS_YUV440P12 , "YUV440P12"},
{VideoInfo::CS_YUV440P14 , "YUV440P14"},
{VideoInfo::CS_YUV440P16 , "YUV440P16"},
{VideoInfo::CS_YUV440PS , "YUV440PS"},

{VideoInfo::CS_YUVA440 , "YUVA440"},
{VideoInfo::CS_YUVA440P10 , "YUVA440P10"},
{VideoInfo::CS_YUVA440P12 , "YUVA440P12"},
{VideoInfo::CS_YUVA440P14 , "YUVA440P14"},
{VideoInfo::CS_YUVA440P16 , "YUVA440P16"},
{VideoInfo::CS_YUVA440PS , "YUVA440PS"},

{VideoInfo::CS_YUV411P10 , "YUV411P10"},
{VideoInfo::CS_YUV411P12 , "YUV411P12"},
{VideoInfo::CS_YUV411P14 , "YUV411P14"},
{VideoInfo::CS_YUV411P16 , "YUV411P16"},
{VideoInfo::CS_YUV411PS , "YUV411PS"},

{VideoInfo::CS_YUVA411 , "YUVA411"},
{VideoInfo::CS_YUVA411P10 , "YUVA411P10"},
{VideoInfo::CS_YUVA411P12 , "YUVA411P12"},
{VideoInfo::CS_YUVA411P14 , "YUVA411P14"},
{VideoInfo::CS_YUVA411P16 , "YUVA411P16"},
{VideoInfo::CS_YUVA411PS , "YUVA411PS"},

{VideoInfo::CS_YUV410 , "YUV9"},
{VideoInfo::CS_YUV410P10 , "YUV410P10"},
{VideoInfo::CS_YUV410P12 , "YUV410P12"},
{VideoInfo::CS_YUV410P14 , "YUV410P14"},
{VideoInfo::CS_YUV410P16 , "YUV410P16"},
{VideoInfo::CS_YUV410PS , "YUV410PS"},

{VideoInfo::CS_YUVA410P10 , "YUVA410P10"},
{VideoInfo::CS_YUVA410P12 , "YUVA410P12"},
{VideoInfo::CS_YUVA410P14 , "YUVA410P14"},
{VideoInfo::CS_YUVA410P16 , "YUVA410P16"},
{VideoInfo::CS_YUVA410PS , "YUVA410PS"},

{VideoInfo::CS_YA8, "YA8"},
{VideoInfo::CS_YA10, "YA10"},
{VideoInfo::CS_YA12, "YA12"},
{VideoInfo::CS_YA14, "YA14"},
{VideoInfo::CS_YA16, "YA16"},
{VideoInfo::CS_YA32, "YA32"}
};

static const std::multimap<int, std::string> pixel_format_table_ex =
Expand All @@ -1600,6 +1653,11 @@ static const std::multimap<int, std::string> pixel_format_table_ex =
{VideoInfo::CS_YUVA420, "YUVA420P8"},
{VideoInfo::CS_YUVA422, "YUVA422P8"},
{VideoInfo::CS_YUVA444, "YUVA444P8"},
{VideoInfo::CS_YUV440 , "YUV440P8"},
{VideoInfo::CS_YUVA440, "YUVA440P8"},
{VideoInfo::CS_YUVA411, "YUVA411P8"},
{VideoInfo::CS_YUV410, "YUV410P8"},
{VideoInfo::CS_YUVA410, "YUVA410P8"}
};

const char *GetPixelTypeName(const int pixel_type)
Expand Down Expand Up @@ -2894,3 +2952,7 @@ AVSValue ArraySort(AVSValue args, void* user_data, IScriptEnvironment* env)
return AVSValue(new_val.data(), size);
}

AVSValue Is440(AVSValue args, void*, IScriptEnvironment*) { return VI(args[0]).Is440(); }
AVSValue IsYA(AVSValue args, void*, IScriptEnvironment*) { return VI(args[0]).IsYA(); }
AVSValue Is410(AVSValue args, void*, IScriptEnvironment*) { return VI(args[0]).Is410(); }
AVSValue Is411(AVSValue args, void*, IScriptEnvironment*) { return VI(args[0]).Is411(); }
5 changes: 5 additions & 0 deletions avs_core/core/parser/script.h
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,9 @@ AVSValue ArrayIns(AVSValue args, void*, IScriptEnvironment* env);
AVSValue ArrayDel(AVSValue args, void*, IScriptEnvironment* env);
AVSValue ArraySort(AVSValue args, void*, IScriptEnvironment* env);

AVSValue Is440(AVSValue args, void*, IScriptEnvironment* env);
AVSValue IsYA(AVSValue args, void*, IScriptEnvironment* env);
AVSValue Is410(AVSValue args, void*, IScriptEnvironment* env);
AVSValue Is411(AVSValue args, void*, IScriptEnvironment* env);

#endif // __Script_H__
86 changes: 79 additions & 7 deletions avs_core/include/avisynth.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ enum AvsVersion {
AVISYNTH_CLASSIC_INTERFACE_VERSION_25 = 3,
AVISYNTH_CLASSIC_INTERFACE_VERSION_26BETA = 5,
AVISYNTH_CLASSIC_INTERFACE_VERSION = 6,
AVISYNTH_INTERFACE_VERSION = 12,
AVISYNTH_INTERFACE_VERSION = 13,
AVISYNTHPLUS_INTERFACE_BUGFIX_VERSION = 0 // reset to zero whenever the normal interface version bumps
};

Expand Down Expand Up @@ -480,6 +480,12 @@ struct AVS_Linkage {
void (VideoInfo::* SetChannelMask)(bool isChannelMaskKnown, unsigned int dwChannelMask);
unsigned int (VideoInfo::* GetChannelMask)() const;

// V13
bool (VideoInfo::*Is440)() const;
bool (VideoInfo::*IsYA)() const;
bool (VideoInfo::*Is410)() const;
bool (VideoInfo::*Is411)() const;

/**********************************************************************/
// Reserve pointer space for Avisynth+
void (VideoInfo::* reserved2[64 - 31])();
Expand Down Expand Up @@ -730,21 +736,28 @@ struct VideoInfo {
CS_GENERIC_YUV422 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Width_2 | CS_Sub_Height_1, // 4:2:2 planar
CS_GENERIC_YUV420 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Width_2 | CS_Sub_Height_2, // 4:2:0 planar
CS_GENERIC_Y = CS_PLANAR | CS_INTERLEAVED | CS_YUV, // Y only (4:0:0)
CS_GENERIC_YA = CS_PLANAR | CS_INTERLEAVED | CS_YUVA, // Y plus alpha (4:0:0:A)
CS_GENERIC_RGBP = CS_PLANAR | CS_BGR | CS_RGB_TYPE, // planar RGB. Though name is RGB but plane order G,B,R
CS_GENERIC_RGBAP = CS_PLANAR | CS_BGR | CS_RGBA_TYPE, // planar RGBA
CS_GENERIC_YUVA444 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Width_1 | CS_Sub_Height_1, // 4:4:4:A planar
CS_GENERIC_YUVA422 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Width_2 | CS_Sub_Height_1, // 4:2:2:A planar
CS_GENERIC_YUVA420 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Width_2 | CS_Sub_Height_2, // 4:2:0:A planar
CS_GENERIC_YUV440 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Width_1 | CS_Sub_Height_2, // 4:4:0 planar, 2026-07-29
CS_GENERIC_YUVA440 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Width_1 | CS_Sub_Height_2, // 4:4:0:A planar, 2026-07-29
CS_GENERIC_YUV411 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Width_4 | CS_Sub_Height_1, // 4:1:1 planar, 2026-08-25
CS_GENERIC_YUVA411 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Width_4 | CS_Sub_Height_1, // 4:1:1:A planar, 2026-08-25
CS_GENERIC_YUV410 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Width_4 | CS_Sub_Height_4, // 4:1:0 planar, 2026-08-25
CS_GENERIC_YUVA410 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Width_4 | CS_Sub_Height_4, // 4:1:0:A planar, 2026-08-25

CS_YV24 = CS_GENERIC_YUV444 | CS_Sample_Bits_8, // YVU 4:4:4 planar
CS_YV16 = CS_GENERIC_YUV422 | CS_Sample_Bits_8, // YVU 4:2:2 planar
CS_YV12 = CS_GENERIC_YUV420 | CS_Sample_Bits_8, // YVU 4:2:0 planar
CS_I420 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_UPlaneFirst | CS_Sub_Width_2 | CS_Sub_Height_2, // YUV 4:2:0 planar
CS_IYUV = CS_I420,
CS_YUV9 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Width_4 | CS_Sub_Height_4, // YUV 4:1:0 planar
CS_YV411 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Width_4 | CS_Sub_Height_1, // YUV 4:1:1 planar
CS_YUV9 = CS_GENERIC_YUV410 | CS_Sample_Bits_8, // YUV 4:1:0 planar
CS_YV411 = CS_GENERIC_YUV411 | CS_Sample_Bits_8, // YUV 4:1:1 planar

CS_Y8 = CS_GENERIC_Y | CS_Sample_Bits_8, // Y 4:0:0 planar
CS_Y8 = CS_GENERIC_Y | CS_Sample_Bits_8, // Y 4:0:0 planar

//-------------------------
// AVS16: new planar constants go live! Experimental PF 160613
Expand Down Expand Up @@ -820,9 +833,62 @@ struct VideoInfo {
CS_YUVA422P16 = CS_GENERIC_YUVA422 | CS_Sample_Bits_16, // YUVA 4:2:2 16bit samples
CS_YUVA420P16 = CS_GENERIC_YUVA420 | CS_Sample_Bits_16, // YUVA 4:2:0 16bit samples

CS_YUVA444PS = CS_GENERIC_YUVA444 | CS_Sample_Bits_32, // YUVA 4:4:4 32bit samples
CS_YUVA422PS = CS_GENERIC_YUVA422 | CS_Sample_Bits_32, // YUVA 4:2:2 32bit samples
CS_YUVA420PS = CS_GENERIC_YUVA420 | CS_Sample_Bits_32, // YUVA 4:2:0 32bit samples
CS_YUVA444PS = CS_GENERIC_YUVA444 | CS_Sample_Bits_32, // YUVA 4:4:4 32bit samples
CS_YUVA422PS = CS_GENERIC_YUVA422 | CS_Sample_Bits_32, // YUVA 4:2:2 32bit samples
CS_YUVA420PS = CS_GENERIC_YUVA420 | CS_Sample_Bits_32, // YUVA 4:2:0 32bit samples

// Planar YUV(A) 4:4:0, 2026-07-29
CS_YUV440 = CS_GENERIC_YUV440 | CS_Sample_Bits_8, // YUV 4:4:0 8bit samples
CS_YUV440P10 = CS_GENERIC_YUV440 | CS_Sample_Bits_10, // YUV 4:4:0 10bit samples
CS_YUV440P12 = CS_GENERIC_YUV440 | CS_Sample_Bits_12, // YUV 4:4:0 12bit samples
CS_YUV440P14 = CS_GENERIC_YUV440 | CS_Sample_Bits_14, // YUV 4:4:0 14bit samples
CS_YUV440P16 = CS_GENERIC_YUV440 | CS_Sample_Bits_16, // YUV 4:4:0 16bit samples
CS_YUV440PS = CS_GENERIC_YUV440 | CS_Sample_Bits_32, // YUV 4:4:0 32bit samples

CS_YUVA440 = CS_GENERIC_YUVA440 | CS_Sample_Bits_8, // YUVA 4:4:0 8bit samples
CS_YUVA440P10 = CS_GENERIC_YUVA440 | CS_Sample_Bits_10, // YUVA 4:4:0 10bit samples
CS_YUVA440P12 = CS_GENERIC_YUVA440 | CS_Sample_Bits_12, // YUVA 4:4:0 12bit samples
CS_YUVA440P14 = CS_GENERIC_YUVA440 | CS_Sample_Bits_14, // YUVA 4:4:0 14bit samples
CS_YUVA440P16 = CS_GENERIC_YUVA440 | CS_Sample_Bits_16, // YUVA 4:4:0 16bit samples
CS_YUVA440PS = CS_GENERIC_YUVA440 | CS_Sample_Bits_32, // YUVA 4:4:0 32bit samples

// Planar YUV(A) 4:1:1 additional bitdepths, 2026-08-25
CS_YUV411 = CS_YV411, // YUV 4:1:1 8bit samples
CS_YUV411P10 = CS_GENERIC_YUV411 | CS_Sample_Bits_10, // YUV 4:1:1 10bit samples
CS_YUV411P12 = CS_GENERIC_YUV411 | CS_Sample_Bits_12, // YUV 4:1:1 12bit samples
CS_YUV411P14 = CS_GENERIC_YUV411 | CS_Sample_Bits_14, // YUV 4:1:1 14bit samples
CS_YUV411P16 = CS_GENERIC_YUV411 | CS_Sample_Bits_16, // YUV 4:1:1 16bit samples
CS_YUV411PS = CS_GENERIC_YUV411 | CS_Sample_Bits_32, // YUV 4:1:1 32bit samples

CS_YUVA411 = CS_GENERIC_YUVA411 | CS_Sample_Bits_8, // YUVA 4:1:1 8bit samples
CS_YUVA411P10 = CS_GENERIC_YUVA411 | CS_Sample_Bits_10, // YUVA 4:1:1 10bit samples
CS_YUVA411P12 = CS_GENERIC_YUVA411 | CS_Sample_Bits_12, // YUVA 4:1:1 12bit samples
CS_YUVA411P14 = CS_GENERIC_YUVA411 | CS_Sample_Bits_14, // YUVA 4:1:1 14bit samples
CS_YUVA411P16 = CS_GENERIC_YUVA411 | CS_Sample_Bits_16, // YUVA 4:1:1 16bit samples
CS_YUVA411PS = CS_GENERIC_YUVA411 | CS_Sample_Bits_32, // YUVA 4:1:1 32bit samples

// Planar YUV(A) 4:1:0, 2026-08-25
CS_YUV410 = CS_YUV9, // YUV 4:1:0 8bit samples
CS_YUV410P10 = CS_GENERIC_YUV410 | CS_Sample_Bits_10, // YUV 4:1:0 10bit samples
CS_YUV410P12 = CS_GENERIC_YUV410 | CS_Sample_Bits_12, // YUV 4:1:0 12bit samples
CS_YUV410P14 = CS_GENERIC_YUV410 | CS_Sample_Bits_14, // YUV 4:1:0 14bit samples
CS_YUV410P16 = CS_GENERIC_YUV410 | CS_Sample_Bits_16, // YUV 4:1:0 16bit samples
CS_YUV410PS = CS_GENERIC_YUV410 | CS_Sample_Bits_32, // YUV 4:1:0 32bit samples

CS_YUVA410 = CS_GENERIC_YUVA410 | CS_Sample_Bits_8, // YUVA 4:1:0 8bit samples
CS_YUVA410P10 = CS_GENERIC_YUVA410 | CS_Sample_Bits_10, // YUVA 4:1:0 10bit samples
CS_YUVA410P12 = CS_GENERIC_YUVA410 | CS_Sample_Bits_12, // YUVA 4:1:0 12bit samples
CS_YUVA410P14 = CS_GENERIC_YUVA410 | CS_Sample_Bits_14, // YUVA 4:1:0 14bit samples
CS_YUVA410P16 = CS_GENERIC_YUVA410 | CS_Sample_Bits_16, // YUVA 4:1:0 16bit samples
CS_YUVA410PS = CS_GENERIC_YUVA410 | CS_Sample_Bits_32, // YUVA 4:1:0 32bit samples

// Y plus alpha 4:0:0, 2026-08-25
CS_YA8 = CS_GENERIC_YA | CS_Sample_Bits_8, // Y plus alpha 4:0:0 8bit samples
CS_YA10 = CS_GENERIC_YA | CS_Sample_Bits_10, // Y plus alpha 4:0:0 10bit samples
CS_YA12 = CS_GENERIC_YA | CS_Sample_Bits_12, // Y plus alpha 4:0:0 12bit samples
CS_YA14 = CS_GENERIC_YA | CS_Sample_Bits_14, // Y plus alpha 4:0:0 14bit samples
CS_YA16 = CS_GENERIC_YA | CS_Sample_Bits_16, // Y plus alpha 4:0:0 16bit samples
CS_YA32 = CS_GENERIC_YA | CS_Sample_Bits_32 // Y plus alpha 4:0:0 32bit samples
};

int pixel_type; // changed to int as of 2.5
Expand Down Expand Up @@ -992,6 +1058,12 @@ struct VideoInfo {
void SetChannelMask(bool isChannelMaskKnown, unsigned int dwChannelMask) AVS_BakedCode(AVS_LinkCall_Void(SetChannelMask)(isChannelMaskKnown, dwChannelMask))
unsigned int GetChannelMask() const AVS_BakedCode(return AVS_LinkCallOptDefault(GetChannelMask, 0) )

// v13
bool Is440() const AVS_BakedCode( return AVS_LinkCallOptDefault(Is440, false) )
bool IsYA() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsYA, false) )
bool Is410() const AVS_BakedCode( return AVS_LinkCallOptDefault(Is410, false) )
bool Is411() const AVS_BakedCode( return AVS_LinkCallOpt(Is410, IsYV411) )

}; // end struct VideoInfo


Expand Down
Loading