image_data_s image_data, mv_colorspace_e dst_colorspace,
unsigned long *cvt_buffer_size)
{
- enum PixelFormat pixel_format = PIX_FMT_NONE;
+ enum AVPixelFormat pixel_format = AV_PIX_FMT_NONE;
MEDIA_VISION_FUNCTION_ENTER();
switch (dst_colorspace) {
case MEDIA_VISION_COLORSPACE_Y800:
- pixel_format = PIX_FMT_GRAY8;
+ pixel_format = AV_PIX_FMT_GRAY8;
break;
case MEDIA_VISION_COLORSPACE_I420:
- pixel_format = PIX_FMT_YUV420P;
+ pixel_format = AV_PIX_FMT_YUV420P;
break;
case MEDIA_VISION_COLORSPACE_NV12:
- pixel_format = PIX_FMT_NV12;
+ pixel_format = AV_PIX_FMT_NV12;
break;
case MEDIA_VISION_COLORSPACE_YV12:
/* the same as I420 with inversed U and V */
- pixel_format = PIX_FMT_YUV420P;
+ pixel_format = AV_PIX_FMT_YUV420P;
break;
case MEDIA_VISION_COLORSPACE_NV21:
- pixel_format = PIX_FMT_NV21;
+ pixel_format = AV_PIX_FMT_NV21;
break;
case MEDIA_VISION_COLORSPACE_YUYV:
- pixel_format = PIX_FMT_YUYV422;
+ pixel_format = AV_PIX_FMT_YUYV422;
break;
case MEDIA_VISION_COLORSPACE_UYVY:
- pixel_format = PIX_FMT_UYVY422;
+ pixel_format = AV_PIX_FMT_UYVY422;
break;
case MEDIA_VISION_COLORSPACE_422P:
- pixel_format = PIX_FMT_YUV422P;
+ pixel_format = AV_PIX_FMT_YUV422P;
break;
case MEDIA_VISION_COLORSPACE_RGB565:
- pixel_format = PIX_FMT_RGB565BE;
+ pixel_format = AV_PIX_FMT_RGB565BE;
break;
case MEDIA_VISION_COLORSPACE_RGBA:
- pixel_format = PIX_FMT_RGBA;
+ pixel_format = AV_PIX_FMT_RGBA;
break;
case MEDIA_VISION_COLORSPACE_RGB888:
*cvt_buffer_size = image_data.image_width * image_data.image_height * 3;
AVPicture src_picture;
AVPicture dst_picture;
- avpicture_fill(&src_picture, (uint8_t*)src_buffer, PIX_FMT_RGB24,
+ avpicture_fill(&src_picture, (uint8_t*)src_buffer, AV_PIX_FMT_RGB24,
image_data.image_width, image_data.image_height);
avpicture_alloc(&dst_picture, pixel_format,
image_data.image_width, image_data.image_height);
struct SwsContext *context = sws_getContext(
- image_data.image_width, image_data.image_height, PIX_FMT_RGB24,
+ image_data.image_width, image_data.image_height, AV_PIX_FMT_RGB24,
image_data.image_width, image_data.image_height, pixel_format,
SWS_FAST_BILINEAR, 0, 0, 0);