Skip to content

Commit aeb7275

Browse files
committed
Fix incorrect pixel type check
1 parent 637cbfd commit aeb7275

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

wrapper/avs_filter.hpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,12 @@ class AVSFilter : public IClip {
6060
int supported_pixel() const {
6161
return vi.pixel_type == VideoInfo::CS_I420 || (
6262
(
63-
(vi.pixel_type & VideoInfo::CS_GENERIC_YUV420) == VideoInfo::CS_GENERIC_YUV420
64-
|| (vi.pixel_type & VideoInfo::CS_GENERIC_YUV422) == VideoInfo::CS_GENERIC_YUV422
65-
|| (vi.pixel_type & VideoInfo::CS_GENERIC_YUV444) == VideoInfo::CS_GENERIC_YUV444
66-
|| (vi.pixel_type & VideoInfo::CS_GENERIC_RGBP) == VideoInfo::CS_GENERIC_RGBP
63+
(vi.pixel_type & ~VideoInfo::CS_Sample_Bits_Mask) == VideoInfo::CS_GENERIC_YUV420
64+
|| (vi.pixel_type & ~VideoInfo::CS_Sample_Bits_Mask) == VideoInfo::CS_GENERIC_YUV422
65+
|| (vi.pixel_type & ~VideoInfo::CS_Sample_Bits_Mask) == VideoInfo::CS_GENERIC_YUV444
66+
|| (vi.pixel_type & ~VideoInfo::CS_Sample_Bits_Mask) == VideoInfo::CS_GENERIC_RGBP
6767
) && (
68-
(vi.pixel_type & VideoInfo::CS_Sample_Bits_8) == VideoInfo::CS_Sample_Bits_8
69-
|| (vi.pixel_type & VideoInfo::CS_Sample_Bits_10) == VideoInfo::CS_Sample_Bits_10
70-
|| (vi.pixel_type & VideoInfo::CS_Sample_Bits_12) == VideoInfo::CS_Sample_Bits_12
71-
|| (vi.pixel_type & VideoInfo::CS_Sample_Bits_14) == VideoInfo::CS_Sample_Bits_14
72-
|| (vi.pixel_type & VideoInfo::CS_Sample_Bits_16) == VideoInfo::CS_Sample_Bits_16
68+
(vi.pixel_type & VideoInfo::CS_Sample_Bits_Mask) != VideoInfo::CS_Sample_Bits_32
7369
)
7470
);
7571
}

0 commit comments

Comments
 (0)