Mercurial > libavcodec.hg
comparison imgconvert.c @ 4517:75701d9842cc libavcodec
consistency renaming: yuv422 --> yuyv422
author | diego |
---|---|
date | Mon, 12 Feb 2007 23:23:05 +0000 |
parents | 8f6fd50d2f40 |
children | 48442cb0ebfa |
comparison
equal
deleted
inserted
replaced
4516:8f6fd50d2f40 | 4517:75701d9842cc |
---|---|
800 } | 800 } |
801 } | 801 } |
802 | 802 |
803 /* XXX: totally non optimized */ | 803 /* XXX: totally non optimized */ |
804 | 804 |
805 static void yuv422_to_yuv420p(AVPicture *dst, const AVPicture *src, | 805 static void yuyv422_to_yuv420p(AVPicture *dst, const AVPicture *src, |
806 int width, int height) | 806 int width, int height) |
807 { | 807 { |
808 const uint8_t *p, *p1; | 808 const uint8_t *p, *p1; |
809 uint8_t *lum, *cr, *cb, *lum1, *cr1, *cb1; | 809 uint8_t *lum, *cr, *cb, *lum1, *cr1, *cb1; |
810 int w; | 810 int w; |
948 cr1 += dst->linesize[2]; | 948 cr1 += dst->linesize[2]; |
949 } | 949 } |
950 } | 950 } |
951 | 951 |
952 | 952 |
953 static void yuv422_to_yuv422p(AVPicture *dst, const AVPicture *src, | 953 static void yuyv422_to_yuv422p(AVPicture *dst, const AVPicture *src, |
954 int width, int height) | 954 int width, int height) |
955 { | 955 { |
956 const uint8_t *p, *p1; | 956 const uint8_t *p, *p1; |
957 uint8_t *lum, *cr, *cb, *lum1, *cr1, *cb1; | 957 uint8_t *lum, *cr, *cb, *lum1, *cr1, *cb1; |
958 int w; | 958 int w; |
981 cb1 += dst->linesize[1]; | 981 cb1 += dst->linesize[1]; |
982 cr1 += dst->linesize[2]; | 982 cr1 += dst->linesize[2]; |
983 } | 983 } |
984 } | 984 } |
985 | 985 |
986 static void yuv422p_to_yuv422(AVPicture *dst, const AVPicture *src, | 986 static void yuv422p_to_yuyv422(AVPicture *dst, const AVPicture *src, |
987 int width, int height) | 987 int width, int height) |
988 { | 988 { |
989 uint8_t *p, *p1; | 989 uint8_t *p, *p1; |
990 const uint8_t *lum, *cr, *cb, *lum1, *cr1, *cb1; | 990 const uint8_t *lum, *cr, *cb, *lum1, *cr1, *cb1; |
991 int w; | 991 int w; |
1083 cr1 += dst->linesize[2]; | 1083 cr1 += dst->linesize[2]; |
1084 } | 1084 } |
1085 } | 1085 } |
1086 | 1086 |
1087 | 1087 |
1088 static void yuv420p_to_yuv422(AVPicture *dst, const AVPicture *src, | 1088 static void yuv420p_to_yuyv422(AVPicture *dst, const AVPicture *src, |
1089 int width, int height) | 1089 int width, int height) |
1090 { | 1090 { |
1091 int w, h; | 1091 int w, h; |
1092 uint8_t *line1, *line2, *linesrc = dst->data[0]; | 1092 uint8_t *line1, *line2, *linesrc = dst->data[0]; |
1093 uint8_t *lum1, *lum2, *lumsrc = src->data[0]; | 1093 uint8_t *lum1, *lum2, *lumsrc = src->data[0]; |
1941 The other conversion functions are just optimisations for common cases. | 1941 The other conversion functions are just optimisations for common cases. |
1942 */ | 1942 */ |
1943 static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = { | 1943 static const ConvertEntry convert_table[PIX_FMT_NB][PIX_FMT_NB] = { |
1944 [PIX_FMT_YUV420P] = { | 1944 [PIX_FMT_YUV420P] = { |
1945 [PIX_FMT_YUYV422] = { | 1945 [PIX_FMT_YUYV422] = { |
1946 .convert = yuv420p_to_yuv422, | 1946 .convert = yuv420p_to_yuyv422, |
1947 }, | 1947 }, |
1948 [PIX_FMT_RGB555] = { | 1948 [PIX_FMT_RGB555] = { |
1949 .convert = yuv420p_to_rgb555 | 1949 .convert = yuv420p_to_rgb555 |
1950 }, | 1950 }, |
1951 [PIX_FMT_RGB565] = { | 1951 [PIX_FMT_RGB565] = { |
1964 .convert = yuv420p_to_uyvy422, | 1964 .convert = yuv420p_to_uyvy422, |
1965 }, | 1965 }, |
1966 }, | 1966 }, |
1967 [PIX_FMT_YUV422P] = { | 1967 [PIX_FMT_YUV422P] = { |
1968 [PIX_FMT_YUYV422] = { | 1968 [PIX_FMT_YUYV422] = { |
1969 .convert = yuv422p_to_yuv422, | 1969 .convert = yuv422p_to_yuyv422, |
1970 }, | 1970 }, |
1971 [PIX_FMT_UYVY422] = { | 1971 [PIX_FMT_UYVY422] = { |
1972 .convert = yuv422p_to_uyvy422, | 1972 .convert = yuv422p_to_uyvy422, |
1973 }, | 1973 }, |
1974 }, | 1974 }, |
1999 .convert = yuvj444p_to_rgb24 | 1999 .convert = yuvj444p_to_rgb24 |
2000 }, | 2000 }, |
2001 }, | 2001 }, |
2002 [PIX_FMT_YUYV422] = { | 2002 [PIX_FMT_YUYV422] = { |
2003 [PIX_FMT_YUV420P] = { | 2003 [PIX_FMT_YUV420P] = { |
2004 .convert = yuv422_to_yuv420p, | 2004 .convert = yuyv422_to_yuv420p, |
2005 }, | 2005 }, |
2006 [PIX_FMT_YUV422P] = { | 2006 [PIX_FMT_YUV422P] = { |
2007 .convert = yuv422_to_yuv422p, | 2007 .convert = yuyv422_to_yuv422p, |
2008 }, | 2008 }, |
2009 }, | 2009 }, |
2010 [PIX_FMT_UYVY422] = { | 2010 [PIX_FMT_UYVY422] = { |
2011 [PIX_FMT_YUV420P] = { | 2011 [PIX_FMT_YUV420P] = { |
2012 .convert = uyvy422_to_yuv420p, | 2012 .convert = uyvy422_to_yuv420p, |