Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions avs_core/core/avisynth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4442,6 +4442,20 @@ 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:
break;
default:
ThrowError("Filter Error: Filter attempted to create VideoFrame with invalid pixel_type.");
Expand Down
16 changes: 16 additions & 0 deletions avs_core/core/parser/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,20 @@ 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"},
};

static const std::multimap<int, std::string> pixel_format_table_ex =
Expand All @@ -1601,6 +1615,8 @@ 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"},
};

const char *GetPixelTypeName(const int pixel_type)
Expand Down
20 changes: 19 additions & 1 deletion 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 @@ -823,6 +823,24 @@ struct VideoInfo {
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_GENERIC_YUV440 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Width_1 | CS_Sub_Height_2, // 4:4:0 planar
CS_GENERIC_YUVA440 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Width_1 | CS_Sub_Height_2, // 4:4:0:A planar

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
};

int pixel_type; // changed to int as of 2.5
Expand Down
21 changes: 19 additions & 2 deletions avs_core/include/avisynth_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
#ifndef __AVISYNTH_12_H__
enum {
AVISYNTH_INTERFACE_CLASSIC_VERSION = 6,
AVISYNTH_INTERFACE_VERSION = 12,
AVISYNTH_INTERFACE_VERSION = 13,
AVISYNTHPLUS_INTERFACE_BUGFIX_VERSION = 0 // reset to zero whenever the normal interface version bumps
};
#endif
Expand Down Expand Up @@ -247,7 +247,9 @@ enum {
AVS_CS_GENERIC_RGBAP = AVS_CS_PLANAR | AVS_CS_BGR | AVS_CS_RGBA_TYPE, // planar RGBA
AVS_CS_GENERIC_YUVA444 = AVS_CS_PLANAR | AVS_CS_YUVA | AVS_CS_VPLANEFIRST | AVS_CS_SUB_WIDTH_1 | AVS_CS_SUB_HEIGHT_1, // 4:4:4:A planar
AVS_CS_GENERIC_YUVA422 = AVS_CS_PLANAR | AVS_CS_YUVA | AVS_CS_VPLANEFIRST | AVS_CS_SUB_WIDTH_2 | AVS_CS_SUB_HEIGHT_1, // 4:2:2:A planar
AVS_CS_GENERIC_YUVA420 = AVS_CS_PLANAR | AVS_CS_YUVA | AVS_CS_VPLANEFIRST | AVS_CS_SUB_WIDTH_2 | AVS_CS_SUB_HEIGHT_2 // 4:2:0:A planar
AVS_CS_GENERIC_YUVA420 = AVS_CS_PLANAR | AVS_CS_YUVA | AVS_CS_VPLANEFIRST | AVS_CS_SUB_WIDTH_2 | AVS_CS_SUB_HEIGHT_2, // 4:2:0:A planar
AVS_CS_GENERIC_YUV440 = AVS_CS_PLANAR | AVS_CS_YUV | AVS_CS_VPLANEFIRST | AVS_CS_SUB_WIDTH_1 | AVS_CS_SUB_HEIGHT_2, // 4:4:0 planar
AVS_CS_GENERIC_YUVA440 = AVS_CS_PLANAR | AVS_CS_YUVA | AVS_CS_VPLANEFIRST | AVS_CS_SUB_WIDTH_1 | AVS_CS_SUB_HEIGHT_2 // 4:4:0:A planar
};

// Specific color formats
Expand Down Expand Up @@ -343,6 +345,21 @@ enum {
AVS_CS_YUVA444PS = AVS_CS_GENERIC_YUVA444 | AVS_CS_SAMPLE_BITS_32, // YUVA 4:4:4 32bit samples
AVS_CS_YUVA422PS = AVS_CS_GENERIC_YUVA422 | AVS_CS_SAMPLE_BITS_32, // YUVA 4:2:2 32bit samples
AVS_CS_YUVA420PS = AVS_CS_GENERIC_YUVA420 | AVS_CS_SAMPLE_BITS_32, // YUVA 4:2:0 32bit samples

// Planar YUV(A) 4:4:0 - 2026-07-29
AVS_CS_YUV440 = AVS_CS_GENERIC_YUV440 | AVS_CS_SAMPLE_BITS_8, // YUV 4:4:0 8bit samples
AVS_CS_YUV440P10 = AVS_CS_GENERIC_YUV440 | AVS_CS_SAMPLE_BITS_10, // YUV 4:4:0 10bit samples
AVS_CS_YUV440P12 = AVS_CS_GENERIC_YUV440 | AVS_CS_SAMPLE_BITS_12, // YUV 4:4:0 12bit samples
AVS_CS_YUV440P14 = AVS_CS_GENERIC_YUV440 | AVS_CS_SAMPLE_BITS_14, // YUV 4:4:0 14bit samples
AVS_CS_YUV440P16 = AVS_CS_GENERIC_YUV440 | AVS_CS_SAMPLE_BITS_16, // YUV 4:4:0 16bit samples
AVS_CS_YUV440PS = AVS_CS_GENERIC_YUV440 | AVS_CS_SAMPLE_BITS_32, // YUV 4:4:0 32bit samples

AVS_CS_YUVA440 = AVS_CS_GENERIC_YUVA440 | AVS_CS_SAMPLE_BITS_8, // YUVA 4:4:0 8bit samples
AVS_CS_YUVA440P10 = AVS_CS_GENERIC_YUVA440 | AVS_CS_SAMPLE_BITS_10, // YUVA 4:4:0 10bit samples
AVS_CS_YUVA440P12 = AVS_CS_GENERIC_YUVA440 | AVS_CS_SAMPLE_BITS_12, // YUVA 4:4:0 12bit samples
AVS_CS_YUVA440P14 = AVS_CS_GENERIC_YUVA440 | AVS_CS_SAMPLE_BITS_14, // YUVA 4:4:0 14bit samples
AVS_CS_YUVA440P16 = AVS_CS_GENERIC_YUVA440 | AVS_CS_SAMPLE_BITS_16, // YUVA 4:4:0 16bit samples
AVS_CS_YUVA440PS = AVS_CS_GENERIC_YUVA440 | AVS_CS_SAMPLE_BITS_32, // YUVA 4:4:0 32bit samples
};

// AvsChannelMask enum: Unshifted channel mask constants like in WAVEFORMATEXTENSIBLE
Expand Down
2 changes: 2 additions & 0 deletions distrib/docs/english/source/avisynthdoc/changelist376.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Changes from 3.7.5 to 3.7.6

Additions, changes
~~~~~~~~~~~~~~~~~~
- Added YUV(A) 4:4:0 pixel format constants
- Added ``SetFilterProp``, ``GetFilterProps``, and ``SetFilterPropPassthrough``:

* ``SetFilterProp`` — automatically inject a frame property on the output of a named filter
Expand Down Expand Up @@ -173,6 +174,7 @@ Additions, changes

Build environment, Interface
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Bump to interface version 13 for new color constants
- introduce ``AVS_RESTRICT`` to ``avs/config.h`` (compiler invariant c++ ``__restrict``)
- AVX512: CMake to recognize ``*_avx512b.*`` and ``*_avx512.*`` file pattern, add compiler specific AVX512
compile flags accordingly (AVX512 Base and Ice Lake extensions)
Expand Down