Ticket #7470: vlc-2.2.2-ffmpeg3.patch
File vlc-2.2.2-ffmpeg3.patch, 17.0 KB (added by , 8 years ago) |
---|
-
configure
a b 36537 36537 36538 36538 if test -n "$PKG_CONFIG" && \ 36539 36539 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavutil < 55\""; } >&5 36540 ($PKG_CONFIG --exists --print-errors "libavutil <55") 2>&536540 ($PKG_CONFIG --exists --print-errors "libavutil > 55") 2>&5 36541 36541 ac_status=$? 36542 36542 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 36543 36543 test $ac_status = 0; }; then … … 36831 36831 ffmpeg) 36832 36832 if test -n "$PKG_CONFIG" && \ 36833 36833 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec >= 57.10.100\""; } >&5 36834 ($PKG_CONFIG --exists --print-errors "libavcodec >= 57.10.100") 2>&536834 ($PKG_CONFIG --exists --print-errors "libavcodec >= 60.10.100") 2>&5 36835 36835 ac_status=$? 36836 36836 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 36837 36837 test $ac_status = 0; }; then … … 36915 36915 ffmpeg) 36916 36916 if test -n "$PKG_CONFIG" && \ 36917 36917 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec >= 57.10.100\""; } >&5 36918 ($PKG_CONFIG --exists --print-errors "libavcodec >= 57.10.100") 2>&536918 ($PKG_CONFIG --exists --print-errors "libavcodec >= 60.10.100") 2>&5 36919 36919 ac_status=$? 36920 36920 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 36921 36921 test $ac_status = 0; }; then … … 45107 45107 ffmpeg) av_vdpau_ver="55.42.100" 45108 45108 if test -n "$PKG_CONFIG" && \ 45109 45109 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libavcodec >= 57.10.100\""; } >&5 45110 ($PKG_CONFIG --exists --print-errors "libavcodec >= 57.10.100") 2>&545110 ($PKG_CONFIG --exists --print-errors "libavcodec >= 60.10.100") 2>&5 45111 45111 ac_status=$? 45112 45112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 45113 45113 test $ac_status = 0; }; then -
modules/codec/avcodec/audio.c
a b 36 36 #include <vlc_codec.h> 37 37 #include <vlc_avcodec.h> 38 38 39 #include "avcodec.h" 40 39 41 #include <libavcodec/avcodec.h> 40 42 #include <libavutil/mem.h> 41 43 42 #include <libavutil/audioconvert.h>43 44 #include "avcodec.h"45 44 46 45 /***************************************************************************** 47 46 * decoder_sys_t : decoder descriptor -
modules/codec/avcodec/avcommon_compat.h
a b 506 506 507 507 #endif /* HAVE_LIBAVUTIL_AVUTIL_H */ 508 508 509 #if LIBAVUTIL_VERSION_MAJOR >= 55 510 # define FF_API_AUDIOCONVERT 1 511 #endif 512 513 /* libavutil/pixfmt.h */ 514 #ifndef PixelFormat 515 # define PixelFormat AVPixelFormat 516 #endif 517 509 518 #ifdef HAVE_LIBAVFORMAT_AVFORMAT_H 510 519 # include <libavformat/avformat.h> 511 520 -
modules/codec/avcodec/chroma.c
a b 62 62 } chroma_table[] = 63 63 { 64 64 /* Planar YUV formats */ 65 {VLC_CODEC_I444, PIX_FMT_YUV444P, 0, 0, 0 },66 {VLC_CODEC_J444, PIX_FMT_YUVJ444P, 0, 0, 0 },65 {VLC_CODEC_I444, AV_PIX_FMT_YUV444P, 0, 0, 0 }, 66 {VLC_CODEC_J444, AV_PIX_FMT_YUVJ444P, 0, 0, 0 }, 67 67 68 {VLC_CODEC_I440, PIX_FMT_YUV440P, 0, 0, 0 },69 {VLC_CODEC_J440, PIX_FMT_YUVJ440P, 0, 0, 0 },68 {VLC_CODEC_I440, AV_PIX_FMT_YUV440P, 0, 0, 0 }, 69 {VLC_CODEC_J440, AV_PIX_FMT_YUVJ440P, 0, 0, 0 }, 70 70 71 {VLC_CODEC_I422, PIX_FMT_YUV422P, 0, 0, 0 },72 {VLC_CODEC_J422, PIX_FMT_YUVJ422P, 0, 0, 0 },71 {VLC_CODEC_I422, AV_PIX_FMT_YUV422P, 0, 0, 0 }, 72 {VLC_CODEC_J422, AV_PIX_FMT_YUVJ422P, 0, 0, 0 }, 73 73 74 {VLC_CODEC_I420, PIX_FMT_YUV420P, 0, 0, 0 },75 {VLC_CODEC_YV12, PIX_FMT_YUV420P, 0, 0, 0 },76 {VLC_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P, 0, 0, 0 },77 {VLC_CODEC_J420, PIX_FMT_YUVJ420P, 0, 0, 0 },78 {VLC_CODEC_I411, PIX_FMT_YUV411P, 0, 0, 0 },79 {VLC_CODEC_I410, PIX_FMT_YUV410P, 0, 0, 0 },80 {VLC_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P, 0, 0, 0 },81 82 {VLC_FOURCC('N','V','1','2'), PIX_FMT_NV12, 0, 0, 0 },83 {VLC_FOURCC('N','V','2','1'), PIX_FMT_NV21, 0, 0, 0 },84 85 {VLC_CODEC_I420_9L, PIX_FMT_YUV420P9LE, 0, 0, 0 },86 {VLC_CODEC_I420_9B, PIX_FMT_YUV420P9BE, 0, 0, 0 },87 {VLC_CODEC_I420_10L, PIX_FMT_YUV420P10LE, 0, 0, 0 },88 {VLC_CODEC_I420_10B, PIX_FMT_YUV420P10BE, 0, 0, 0 },74 {VLC_CODEC_I420, AV_PIX_FMT_YUV420P, 0, 0, 0 }, 75 {VLC_CODEC_YV12, AV_PIX_FMT_YUV420P, 0, 0, 0 }, 76 {VLC_FOURCC('I','Y','U','V'), AV_PIX_FMT_YUV420P, 0, 0, 0 }, 77 {VLC_CODEC_J420, AV_PIX_FMT_YUVJ420P, 0, 0, 0 }, 78 {VLC_CODEC_I411, AV_PIX_FMT_YUV411P, 0, 0, 0 }, 79 {VLC_CODEC_I410, AV_PIX_FMT_YUV410P, 0, 0, 0 }, 80 {VLC_FOURCC('Y','V','U','9'), AV_PIX_FMT_YUV410P, 0, 0, 0 }, 81 82 {VLC_FOURCC('N','V','1','2'), AV_PIX_FMT_NV12, 0, 0, 0 }, 83 {VLC_FOURCC('N','V','2','1'), AV_PIX_FMT_NV21, 0, 0, 0 }, 84 85 {VLC_CODEC_I420_9L, AV_PIX_FMT_YUV420P9LE, 0, 0, 0 }, 86 {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 }, 87 {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 }, 88 {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 }, 89 89 #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,13,0) 90 {VLC_CODEC_I422_9L, PIX_FMT_YUV422P9LE, 0, 0, 0 },91 {VLC_CODEC_I422_9B, PIX_FMT_YUV422P9BE, 0, 0, 0 },90 {VLC_CODEC_I422_9L, AV_PIX_FMT_YUV422P9LE, 0, 0, 0 }, 91 {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 }, 92 92 #endif 93 {VLC_CODEC_I422_10L, PIX_FMT_YUV422P10LE, 0, 0, 0 },94 {VLC_CODEC_I422_10B, PIX_FMT_YUV422P10BE, 0, 0, 0 },93 {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 }, 94 {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 }, 95 95 96 {VLC_CODEC_YUV420A, PIX_FMT_YUVA420P, 0, 0, 0 },96 {VLC_CODEC_YUV420A, AV_PIX_FMT_YUVA420P, 0, 0, 0 }, 97 97 #if LIBAVUTIL_VERSION_CHECK( 51, 45, 0, 74, 100 ) 98 98 {VLC_CODEC_YUV422A, AV_PIX_FMT_YUVA422P, 0, 0, 0 }, 99 99 #endif 100 100 101 {VLC_CODEC_I444_9L, PIX_FMT_YUV444P9LE, 0, 0, 0 },102 {VLC_CODEC_I444_9B, PIX_FMT_YUV444P9BE, 0, 0, 0 },103 {VLC_CODEC_I444_10L, PIX_FMT_YUV444P10LE, 0, 0, 0 },104 {VLC_CODEC_I444_10B, PIX_FMT_YUV444P10BE, 0, 0, 0 },105 {VLC_CODEC_I444_16L, PIX_FMT_YUV444P16LE, 0, 0, 0 },106 {VLC_CODEC_I444_16B, PIX_FMT_YUV444P16BE, 0, 0, 0 },101 {VLC_CODEC_I444_9L, AV_PIX_FMT_YUV444P9LE, 0, 0, 0 }, 102 {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 }, 103 {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 }, 104 {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 }, 105 {VLC_CODEC_I444_16L, AV_PIX_FMT_YUV444P16LE, 0, 0, 0 }, 106 {VLC_CODEC_I444_16B, AV_PIX_FMT_YUV444P16BE, 0, 0, 0 }, 107 107 108 108 /* Packed YUV formats */ 109 {VLC_CODEC_YUYV, PIX_FMT_YUYV422, 0, 0, 0 },110 {VLC_FOURCC('Y','U','Y','V'), PIX_FMT_YUYV422, 0, 0, 0 },111 {VLC_CODEC_UYVY, PIX_FMT_UYVY422, 0, 0, 0 },112 {VLC_FOURCC('Y','4','1','1'), PIX_FMT_UYYVYY411, 0, 0, 0 },109 {VLC_CODEC_YUYV, AV_PIX_FMT_YUYV422, 0, 0, 0 }, 110 {VLC_FOURCC('Y','U','Y','V'), AV_PIX_FMT_YUYV422, 0, 0, 0 }, 111 {VLC_CODEC_UYVY, AV_PIX_FMT_UYVY422, 0, 0, 0 }, 112 {VLC_FOURCC('Y','4','1','1'), AV_PIX_FMT_UYYVYY411, 0, 0, 0 }, 113 113 114 114 /* Packed RGB formats */ 115 VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4,PIX_FMT_BGR4, 0x10, 0x06, 0x01 )116 VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8,PIX_FMT_BGR8, 0xC0, 0x38, 0x07 )115 VLC_RGB( VLC_FOURCC('R','G','B','4'), AV_PIX_FMT_RGB4, AV_PIX_FMT_BGR4, 0x10, 0x06, 0x01 ) 116 VLC_RGB( VLC_FOURCC('R','G','B','8'), AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, 0xC0, 0x38, 0x07 ) 117 117 118 VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_RGB555,PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f )119 VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_RGB565,PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f )120 VLC_RGB( VLC_CODEC_RGB24, PIX_FMT_BGR24,PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff )118 VLC_RGB( VLC_CODEC_RGB15, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f ) 119 VLC_RGB( VLC_CODEC_RGB16, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f ) 120 VLC_RGB( VLC_CODEC_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff ) 121 121 122 VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32,PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff )123 VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32_1,PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 )122 VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff ) 123 VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32_1, AV_PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 ) 124 124 125 125 #ifdef AV_PIX_FMT_0BGR32 126 126 VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 ) 127 127 #endif 128 128 129 {VLC_CODEC_RGBA, PIX_FMT_RGBA, 0, 0, 0 },130 {VLC_CODEC_ARGB, PIX_FMT_ARGB, 0, 0, 0 },131 {VLC_CODEC_BGRA, PIX_FMT_BGRA, 0, 0, 0 },132 {VLC_CODEC_GREY, PIX_FMT_GRAY8, 0, 0, 0},129 {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 }, 130 {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 }, 131 {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 }, 132 {VLC_CODEC_GREY, AV_PIX_FMT_GRAY8, 0, 0, 0}, 133 133 134 134 /* Paletized RGB */ 135 {VLC_CODEC_RGBP, PIX_FMT_PAL8, 0, 0, 0},135 {VLC_CODEC_RGBP, AV_PIX_FMT_PAL8, 0, 0, 0}, 136 136 137 137 #if LIBAVUTIL_VERSION_CHECK(51, 42, 0, 74,100) 138 138 {VLC_CODEC_GBR_PLANAR, AV_PIX_FMT_GBRP, 0, 0, 0 }, … … 201 201 for( int i = 0; chroma_table[i].i_chroma != 0; i++ ) 202 202 if( chroma_table[i].i_chroma == fourcc ) 203 203 return chroma_table[i].i_chroma_id; 204 return PIX_FMT_NONE;204 return AV_PIX_FMT_NONE; 205 205 } -
modules/codec/avcodec/encoder.c
a b 41 41 #include <vlc_cpu.h> 42 42 43 43 #include <libavcodec/avcodec.h> 44 #include <libavutil/audioconvert.h>45 44 46 45 #include "avcodec.h" 47 46 #include "avcommon.h" … … 311 310 else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id, 312 311 &psz_namecodec ) ) 313 312 { 314 if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == PIX_FMT_NONE )313 if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == AV_PIX_FMT_NONE ) 315 314 return VLC_EGENERIC; /* handed chroma output */ 316 315 317 316 i_cat = VIDEO_ES; … … 1017 1016 } 1018 1017 } 1019 1018 1020 p_sys->frame = av codec_alloc_frame();1019 p_sys->frame = av_frame_alloc(); 1021 1020 if( !p_sys->frame ) 1022 1021 { 1023 1022 goto error; … … 1088 1087 AVFrame *frame = NULL; 1089 1088 if( likely(p_pict) ) { 1090 1089 frame = p_sys->frame; 1091 avcodec_get_frame_defaults( frame ); 1090 av_frame_unref( frame ); 1091 1092 1092 for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ ) 1093 1093 { 1094 1094 p_sys->frame->data[i_plane] = p_pict->p[i_plane].p_pixels; … … 1329 1329 //How much we need to copy from new packet 1330 1330 const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes; 1331 1331 1332 av codec_get_frame_defaults( p_sys->frame );1332 av_frame_unref( p_sys->frame ); 1333 1333 p_sys->frame->format = p_sys->p_context->sample_fmt; 1334 1334 p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay; 1335 1335 … … 1451 1451 while( ( p_aout_buf->i_nb_samples >= p_sys->i_frame_size ) || 1452 1452 ( p_sys->b_variable && p_aout_buf->i_nb_samples ) ) 1453 1453 { 1454 avcodec_get_frame_defaults( p_sys->frame ); 1454 av_frame_unref( p_sys->frame ); 1455 1455 1456 if( p_sys->b_variable ) 1456 1457 p_sys->frame->nb_samples = p_aout_buf->i_nb_samples; 1457 1458 else -
modules/codec/avcodec/vaapi.c
a b 595 595 return err; 596 596 597 597 /* Only VLD supported */ 598 p_va->pix_fmt = PIX_FMT_VAAPI_VLD;598 p_va->pix_fmt = AV_PIX_FMT_VAAPI_VLD; 599 599 p_va->setup = Setup; 600 600 p_va->get = Get; 601 601 p_va->release = Release; -
modules/codec/avcodec/video.c
a b 234 234 p_sys->p_codec = p_codec; 235 235 p_sys->i_codec_id = i_codec_id; 236 236 p_sys->psz_namecodec = psz_namecodec; 237 p_sys->p_ff_pic = av codec_alloc_frame();237 p_sys->p_ff_pic = av_frame_alloc(); 238 238 p_sys->b_delayed_open = true; 239 239 p_sys->p_va = NULL; 240 240 vlc_sem_init( &p_sys->sem_mt, 0 ); … … 446 446 if( ffmpeg_OpenCodec( p_dec ) < 0 ) 447 447 { 448 448 msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec ); 449 av codec_free_frame( &p_sys->p_ff_pic );449 av_frame_free( &p_sys->p_ff_pic ); 450 450 vlc_sem_destroy( &p_sys->sem_mt ); 451 451 free( p_sys ); 452 452 return VLC_EGENERIC; … … 826 826 wait_mt( p_sys ); 827 827 828 828 if( p_sys->p_ff_pic ) 829 av codec_free_frame( &p_sys->p_ff_pic );829 av_frame_free( &p_sys->p_ff_pic ); 830 830 831 831 if( p_sys->p_va ) 832 832 vlc_va_Delete( p_sys->p_va ); … … 1004 1004 if (GetVlcChroma(&dec->fmt_out.video, ctx->pix_fmt) != VLC_SUCCESS) 1005 1005 return NULL; 1006 1006 dec->fmt_out.i_codec = dec->fmt_out.video.i_chroma; 1007 if (ctx->pix_fmt == PIX_FMT_PAL8)1007 if (ctx->pix_fmt == AV_PIX_FMT_PAL8) 1008 1008 return NULL; 1009 1009 1010 1010 int width = frame->width; … … 1180 1180 if (GetVlcChroma(&p_dec->fmt_out.video, p_context->pix_fmt) != VLC_SUCCESS) 1181 1181 goto no_dr; 1182 1182 1183 if (p_context->pix_fmt == PIX_FMT_PAL8)1183 if (p_context->pix_fmt == AV_PIX_FMT_PAL8) 1184 1184 goto no_dr; 1185 1185 1186 1186 p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma; … … 1215 1215 goto no_dr; 1216 1216 } 1217 1217 1218 if( p_context->pix_fmt == PIX_FMT_YUV422P )1218 if( p_context->pix_fmt == AV_PIX_FMT_YUV422P ) 1219 1219 { 1220 1220 if( 2 * p_pic->p[1].i_pitch != p_pic->p[0].i_pitch || 1221 1221 2 * p_pic->p[2].i_pitch != p_pic->p[0].i_pitch ) … … 1325 1325 1326 1326 /* Enumerate available formats */ 1327 1327 bool can_hwaccel = false; 1328 for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )1328 for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ ) 1329 1329 { 1330 1330 const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]); 1331 1331 if (dsc == NULL) … … 1352 1352 if( p_va == NULL ) 1353 1353 goto end; 1354 1354 1355 for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )1355 for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ ) 1356 1356 { 1357 1357 if( p_va->pix_fmt != pi_fmt[i] ) 1358 1358 continue; -
modules/video_chroma/swscale.c
a b 36 36 #include <vlc_cpu.h> 37 37 38 38 #include <libswscale/swscale.h> 39 #include <libswscale/version.h> 39 40 40 41 #ifdef __APPLE__ 41 42 # include <TargetConditionals.h> … … 235 236 { 236 237 int i_sws_cpu = 0; 237 238 239 #if LIBSWSCALE_VERSION_MAJOR < 4 238 240 #if defined(__i386__) || defined(__x86_64__) 239 241 if( vlc_CPU_MMX() ) 240 242 i_sws_cpu |= SWS_CPU_CAPS_MMX; … … 248 250 if( vlc_CPU_ALTIVEC() ) 249 251 i_sws_cpu |= SWS_CPU_CAPS_ALTIVEC; 250 252 #endif 253 #endif 251 254 252 255 return i_sws_cpu; 253 256 } … … 257 260 switch( fmt ) 258 261 { 259 262 case VLC_CODEC_YUV422A: 260 *pi_fmt = PIX_FMT_YUV422P;263 *pi_fmt = AV_PIX_FMT_YUV422P; 261 264 *pb_has_a = true; 262 265 break; 263 266 case VLC_CODEC_YUV420A: 264 *pi_fmt = PIX_FMT_YUV420P;267 *pi_fmt = AV_PIX_FMT_YUV420P; 265 268 *pb_has_a = true; 266 269 break; 267 270 case VLC_CODEC_YUVA: 268 *pi_fmt = PIX_FMT_YUV444P;271 *pi_fmt = AV_PIX_FMT_YUV444P; 269 272 *pb_has_a = true; 270 273 break; 271 274 case VLC_CODEC_RGBA: 272 *pi_fmt = PIX_FMT_BGR32;275 *pi_fmt = AV_PIX_FMT_BGR32; 273 276 *pb_has_a = true; 274 277 break; 275 278 case VLC_CODEC_ARGB: 276 *pi_fmt = PIX_FMT_BGR32_1;279 *pi_fmt = AV_PIX_FMT_BGR32_1; 277 280 *pb_has_a = true; 278 281 break; 279 282 case VLC_CODEC_BGRA: 280 *pi_fmt = PIX_FMT_RGB32;283 *pi_fmt = AV_PIX_FMT_RGB32; 281 284 *pb_has_a = true; 282 285 break; 283 286 case VLC_CODEC_YV12: 284 *pi_fmt = PIX_FMT_YUV420P;287 *pi_fmt = AV_PIX_FMT_YUV420P; 285 288 *pb_swap_uv = true; 286 289 break; 287 290 case VLC_CODEC_YV9: 288 *pi_fmt = PIX_FMT_YUV410P;291 *pi_fmt = AV_PIX_FMT_YUV410P; 289 292 *pb_swap_uv = true; 290 293 break; 291 294 default: … … 314 317 { 315 318 if( p_fmti->i_chroma == VLC_CODEC_YUVP && ALLOW_YUVP ) 316 319 { 317 i_fmti = i_fmto = PIX_FMT_GRAY8;320 i_fmti = i_fmto = AV_PIX_FMT_GRAY8; 318 321 i_sws_flags = SWS_POINT; 319 322 } 320 323 } … … 327 330 * Without SWS_ACCURATE_RND the quality is really bad for some conversions */ 328 331 switch( i_fmto ) 329 332 { 330 case PIX_FMT_ARGB:331 case PIX_FMT_RGBA:332 case PIX_FMT_ABGR:333 case AV_PIX_FMT_ARGB: 334 case AV_PIX_FMT_RGBA: 335 case AV_PIX_FMT_ABGR: 333 336 i_sws_flags |= SWS_ACCURATE_RND; 334 337 break; 335 338 } … … 403 406 const unsigned i_fmto_visible_width = p_fmto->i_visible_width * p_sys->i_extend_factor; 404 407 for( int n = 0; n < (cfg.b_has_a ? 2 : 1); n++ ) 405 408 { 406 const int i_fmti = n == 0 ? cfg.i_fmti : PIX_FMT_GRAY8;407 const int i_fmto = n == 0 ? cfg.i_fmto : PIX_FMT_GRAY8;409 const int i_fmti = n == 0 ? cfg.i_fmti : AV_PIX_FMT_GRAY8; 410 const int i_fmto = n == 0 ? cfg.i_fmto : AV_PIX_FMT_GRAY8; 408 411 struct SwsContext *ctx; 409 412 410 413 ctx = sws_getContext( i_fmti_visible_width, p_fmti->i_visible_height, i_fmti,