/*****************************************************************************
* i422_i420.c : Planar YUV 4:2:2 to Planar YUV 4:2:0 conversion module for vlc
*****************************************************************************
- * Copyright (C) 2000, 2001 - 2007 the VideoLAN team
+ * Copyright (C) 2000, 2001 - 2007 VLC authors and VideoLAN
* $Id$
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Damien Fouilleul <damienf@videolan.org>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_filter.h>
-#include <vlc_vout.h>
#define SRC_FOURCC "I422,J422"
#define DEST_FOURCC "I420,IYUV,J420,YV12,YUVA"
switch( p_filter->fmt_in.video.i_chroma )
{
- case VLC_FOURCC('I','4','2','2'):
- case VLC_FOURCC('J','4','2','2'):
+ case VLC_CODEC_I422:
+ case VLC_CODEC_J422:
switch( p_filter->fmt_out.video.i_chroma )
{
- case VLC_FOURCC('I','4','2','0'):
- case VLC_FOURCC('I','Y','U','V'):
- case VLC_FOURCC('J','4','2','0'):
+ case VLC_CODEC_I420:
+ case VLC_CODEC_J420:
p_filter->pf_video_filter = I422_I420_Filter;
break;
- case VLC_FOURCC('Y','V','1','2'):
+ case VLC_CODEC_YV12:
p_filter->pf_video_filter = I422_YV12_Filter;
break;
- case VLC_FOURCC('Y','U','V','A'):
+ case VLC_CODEC_YUV420A:
p_filter->pf_video_filter = I422_YUVA_Filter;
break;
for ( ; i_y--; )
{
- vlc_memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
- vlc_memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
- vlc_memcpy(p_du, p_u, i_width/2); p_du -= i_dpuv; p_u -= 2*i_spuv;
- vlc_memcpy(p_dv, p_v, i_width/2); p_dv -= i_dpuv; p_v -= 2*i_spuv;
+ memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
+ memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
+ memcpy(p_du, p_u, i_width/2); p_du -= i_dpuv; p_u -= 2*i_spuv;
+ memcpy(p_dv, p_v, i_width/2); p_dv -= i_dpuv; p_v -= 2*i_spuv;
}
}
for ( ; i_y--; )
{
- vlc_memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
- vlc_memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
- vlc_memcpy(p_du, p_u, i_width/2); p_du -= i_dpuv; p_u -= 2*i_spuv;
- vlc_memcpy(p_dv, p_v, i_width/2); p_dv -= i_dpuv; p_v -= 2*i_spuv;
+ memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
+ memcpy(p_dy, p_y, i_width); p_dy -= i_dpy; p_y -= i_spy;
+ memcpy(p_du, p_u, i_width/2); p_du -= i_dpuv; p_u -= 2*i_spuv;
+ memcpy(p_dv, p_v, i_width/2); p_dv -= i_dpuv; p_v -= 2*i_spuv;
}
}
picture_t *p_dest )
{
I422_I420( p_filter, p_source, p_dest );
- vlc_memset( p_dest->p[A_PLANE].p_pixels, 0xff,
+ memset( p_dest->p[A_PLANE].p_pixels, 0xff,
p_dest->p[A_PLANE].i_lines * p_dest->p[A_PLANE].i_pitch );
}