Commit 32c1dee5 authored by Antoine Cellerier's avatar Antoine Cellerier

Validate input chroma in transform filter, make it work with Packed YUV...

Validate input chroma in transform filter, make it work with Packed YUV (tested with YUY2 only but should work with other variants). Other misc changes.
parent 7e3fc332
...@@ -125,18 +125,7 @@ static int Create( vlc_object_t *p_this ) ...@@ -125,18 +125,7 @@ static int Create( vlc_object_t *p_this )
switch( p_filter->fmt_in.video.i_chroma ) switch( p_filter->fmt_in.video.i_chroma )
{ {
case VLC_FOURCC('I','4','2','0'): CASE_PLANAR_YUV
case VLC_FOURCC('I','Y','U','V'):
case VLC_FOURCC('J','4','2','0'):
case VLC_FOURCC('Y','V','1','2'):
case VLC_FOURCC('I','4','1','1'):
case VLC_FOURCC('I','4','1','0'):
case VLC_FOURCC('Y','V','U','9'):
case VLC_FOURCC('I','4','2','2'):
case VLC_FOURCC('J','4','2','2'):
case VLC_FOURCC('I','4','4','4'):
case VLC_FOURCC('J','4','4','4'):
case VLC_FOURCC('Y','U','V','A'):
/* Planar YUV */ /* Planar YUV */
p_filter->pf_video_filter = FilterPlanar; p_filter->pf_video_filter = FilterPlanar;
break; break;
......
...@@ -21,8 +21,21 @@ ...@@ -21,8 +21,21 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define CASE_PLANAR_YUV \
case VLC_FOURCC('I','4','2','0'): \
case VLC_FOURCC('I','Y','U','V'): \
case VLC_FOURCC('J','4','2','0'): \
case VLC_FOURCC('Y','V','1','2'): \
case VLC_FOURCC('I','4','1','1'): \
case VLC_FOURCC('I','4','1','0'): \
case VLC_FOURCC('Y','V','U','9'): \
case VLC_FOURCC('I','4','2','2'): \
case VLC_FOURCC('J','4','2','2'): \
case VLC_FOURCC('I','4','4','4'): \
case VLC_FOURCC('J','4','4','4'): \
case VLC_FOURCC('Y','U','V','A'):
#define CASE_PACKED_YUV_422 \ #define CASE_PACKED_YUV_422 \
case VLC_FOURCC('I','U','Y','V'): \
case VLC_FOURCC('U','Y','V','Y'): \ case VLC_FOURCC('U','Y','V','Y'): \
case VLC_FOURCC('U','Y','N','V'): \ case VLC_FOURCC('U','Y','N','V'): \
case VLC_FOURCC('Y','4','2','2'): \ case VLC_FOURCC('Y','4','2','2'): \
...@@ -36,7 +49,6 @@ static inline int GetPackedYuvOffsets( vlc_fourcc_t i_chroma, ...@@ -36,7 +49,6 @@ static inline int GetPackedYuvOffsets( vlc_fourcc_t i_chroma,
{ {
switch( i_chroma ) switch( i_chroma )
{ {
case VLC_FOURCC('I','U','Y','V'): /* <-- FIXME: interlaced */
case VLC_FOURCC('U','Y','V','Y'): case VLC_FOURCC('U','Y','V','Y'):
case VLC_FOURCC('U','Y','N','V'): case VLC_FOURCC('U','Y','N','V'):
case VLC_FOURCC('Y','4','2','2'): case VLC_FOURCC('Y','4','2','2'):
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment