filter_picture.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #define CASE_PLANAR_YUV_SQUARE \
00026 case VLC_CODEC_I420: \
00027 case VLC_CODEC_J420: \
00028 case VLC_CODEC_YV12: \
00029 case VLC_CODEC_I411: \
00030 case VLC_CODEC_I410: \
00031 case VLC_CODEC_I444: \
00032 case VLC_CODEC_J444: \
00033 case VLC_CODEC_YUVA:
00034
00035 #define CASE_PLANAR_YUV_NONSQUARE \
00036 case VLC_CODEC_I422: \
00037 case VLC_CODEC_J422:
00038
00039 #define CASE_PLANAR_YUV \
00040 CASE_PLANAR_YUV_SQUARE \
00041 CASE_PLANAR_YUV_NONSQUARE \
00042
00043 #define CASE_PACKED_YUV_422 \
00044 case VLC_CODEC_UYVY: \
00045 case VLC_CODEC_CYUV: \
00046 case VLC_CODEC_YUYV: \
00047 case VLC_CODEC_YVYU:
00048
00049 static inline int GetPackedYuvOffsets( vlc_fourcc_t i_chroma,
00050 int *i_y_offset, int *i_u_offset, int *i_v_offset )
00051 {
00052 switch( i_chroma )
00053 {
00054 case VLC_CODEC_UYVY:
00055 case VLC_CODEC_CYUV:
00056
00057 *i_y_offset = 1;
00058 *i_u_offset = 0;
00059 *i_v_offset = 2;
00060 return VLC_SUCCESS;
00061 case VLC_CODEC_YUYV:
00062
00063 *i_y_offset = 0;
00064 *i_u_offset = 1;
00065 *i_v_offset = 3;
00066 return VLC_SUCCESS;
00067 case VLC_CODEC_YVYU:
00068
00069 *i_y_offset = 0;
00070 *i_u_offset = 3;
00071 *i_v_offset = 1;
00072 return VLC_SUCCESS;
00073 default:
00074 return VLC_EGENERIC;
00075 }
00076 }
00077
00078
00079
00080
00081 static inline picture_t *CopyInfoAndRelease( picture_t *p_outpic, picture_t *p_inpic )
00082 {
00083 picture_CopyProperties( p_outpic, p_inpic );
00084
00085 picture_Release( p_inpic );
00086
00087 return p_outpic;
00088 }