1 diff -ur vlc-2.2.2/configure.ac vlc-2.2.2.ffmpeg3/configure.ac
2 --- vlc-2.2.2/configure.ac 2016-03-24 14:55:02.581707871 +0100
3 +++ vlc-2.2.2.ffmpeg3/configure.ac 2016-03-24 14:42:41.189209910 +0100
5 [ --enable-avcodec libavcodec codec (default enabled)])
6 AS_IF([test "${enable_avcodec}" != "no"], [
7 PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [
8 - PKG_CHECK_EXISTS([libavutil < 55],, [
9 - AC_MSG_ERROR([libavutil versions 55 and later are not supported.])
12 CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
13 CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
15 AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
18 - PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
19 - AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or libav.])
25 AS_IF([test "x${have_avcodec}" = "xyes"], [
28 - PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
29 - AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.])
33 AC_CHECK_HEADERS(dxva2api.h,
36 libav) av_vdpau_ver="55.26.0" ;;
37 ffmpeg) av_vdpau_ver="55.42.100"
38 - PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
39 - AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or libav.])
43 PKG_CHECK_EXISTS([libavutil >= 52.4.0 libavcodec >= ${av_vdpau_ver}], [
44 diff -ur vlc-2.2.2/modules/codec/avcodec/audio.c vlc-2.2.2.ffmpeg3/modules/codec/avcodec/audio.c
45 --- vlc-2.2.2/modules/codec/avcodec/audio.c 2016-01-18 21:49:57.000000000 +0100
46 +++ vlc-2.2.2.ffmpeg3/modules/codec/avcodec/audio.c 2016-03-24 14:44:59.137581977 +0100
48 #include <libavcodec/avcodec.h>
49 #include <libavutil/mem.h>
51 -#include <libavutil/audioconvert.h>
55 diff -ur vlc-2.2.2/modules/codec/avcodec/chroma.c vlc-2.2.2.ffmpeg3/modules/codec/avcodec/chroma.c
56 --- vlc-2.2.2/modules/codec/avcodec/chroma.c 2015-06-30 15:53:31.000000000 +0200
57 +++ vlc-2.2.2.ffmpeg3/modules/codec/avcodec/chroma.c 2016-03-24 14:42:39.442521648 +0100
61 /* Planar YUV formats */
62 - {VLC_CODEC_I444, PIX_FMT_YUV444P, 0, 0, 0 },
63 - {VLC_CODEC_J444, PIX_FMT_YUVJ444P, 0, 0, 0 },
64 + {VLC_CODEC_I444, AV_PIX_FMT_YUV444P, 0, 0, 0 },
65 + {VLC_CODEC_J444, AV_PIX_FMT_YUVJ444P, 0, 0, 0 },
67 - {VLC_CODEC_I440, PIX_FMT_YUV440P, 0, 0, 0 },
68 - {VLC_CODEC_J440, PIX_FMT_YUVJ440P, 0, 0, 0 },
69 + {VLC_CODEC_I440, AV_PIX_FMT_YUV440P, 0, 0, 0 },
70 + {VLC_CODEC_J440, AV_PIX_FMT_YUVJ440P, 0, 0, 0 },
72 - {VLC_CODEC_I422, PIX_FMT_YUV422P, 0, 0, 0 },
73 - {VLC_CODEC_J422, PIX_FMT_YUVJ422P, 0, 0, 0 },
74 + {VLC_CODEC_I422, AV_PIX_FMT_YUV422P, 0, 0, 0 },
75 + {VLC_CODEC_J422, AV_PIX_FMT_YUVJ422P, 0, 0, 0 },
77 - {VLC_CODEC_I420, PIX_FMT_YUV420P, 0, 0, 0 },
78 - {VLC_CODEC_YV12, PIX_FMT_YUV420P, 0, 0, 0 },
79 - {VLC_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P, 0, 0, 0 },
80 - {VLC_CODEC_J420, PIX_FMT_YUVJ420P, 0, 0, 0 },
81 - {VLC_CODEC_I411, PIX_FMT_YUV411P, 0, 0, 0 },
82 - {VLC_CODEC_I410, PIX_FMT_YUV410P, 0, 0, 0 },
83 - {VLC_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P, 0, 0, 0 },
85 - {VLC_FOURCC('N','V','1','2'), PIX_FMT_NV12, 0, 0, 0 },
86 - {VLC_FOURCC('N','V','2','1'), PIX_FMT_NV21, 0, 0, 0 },
88 - {VLC_CODEC_I420_9L, PIX_FMT_YUV420P9LE, 0, 0, 0 },
89 - {VLC_CODEC_I420_9B, PIX_FMT_YUV420P9BE, 0, 0, 0 },
90 - {VLC_CODEC_I420_10L, PIX_FMT_YUV420P10LE, 0, 0, 0 },
91 - {VLC_CODEC_I420_10B, PIX_FMT_YUV420P10BE, 0, 0, 0 },
92 + {VLC_CODEC_I420, AV_PIX_FMT_YUV420P, 0, 0, 0 },
93 + {VLC_CODEC_YV12, AV_PIX_FMT_YUV420P, 0, 0, 0 },
94 + {VLC_FOURCC('I','Y','U','V'), AV_PIX_FMT_YUV420P, 0, 0, 0 },
95 + {VLC_CODEC_J420, AV_PIX_FMT_YUVJ420P, 0, 0, 0 },
96 + {VLC_CODEC_I411, AV_PIX_FMT_YUV411P, 0, 0, 0 },
97 + {VLC_CODEC_I410, AV_PIX_FMT_YUV410P, 0, 0, 0 },
98 + {VLC_FOURCC('Y','V','U','9'), AV_PIX_FMT_YUV410P, 0, 0, 0 },
100 + {VLC_FOURCC('N','V','1','2'), AV_PIX_FMT_NV12, 0, 0, 0 },
101 + {VLC_FOURCC('N','V','2','1'), AV_PIX_FMT_NV21, 0, 0, 0 },
103 + {VLC_CODEC_I420_9L, AV_PIX_FMT_YUV420P9LE, 0, 0, 0 },
104 + {VLC_CODEC_I420_9B, AV_PIX_FMT_YUV420P9BE, 0, 0, 0 },
105 + {VLC_CODEC_I420_10L, AV_PIX_FMT_YUV420P10LE, 0, 0, 0 },
106 + {VLC_CODEC_I420_10B, AV_PIX_FMT_YUV420P10BE, 0, 0, 0 },
107 #if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(51,13,0)
108 - {VLC_CODEC_I422_9L, PIX_FMT_YUV422P9LE, 0, 0, 0 },
109 - {VLC_CODEC_I422_9B, PIX_FMT_YUV422P9BE, 0, 0, 0 },
110 + {VLC_CODEC_I422_9L, AV_PIX_FMT_YUV422P9LE, 0, 0, 0 },
111 + {VLC_CODEC_I422_9B, AV_PIX_FMT_YUV422P9BE, 0, 0, 0 },
113 - {VLC_CODEC_I422_10L, PIX_FMT_YUV422P10LE, 0, 0, 0 },
114 - {VLC_CODEC_I422_10B, PIX_FMT_YUV422P10BE, 0, 0, 0 },
115 + {VLC_CODEC_I422_10L, AV_PIX_FMT_YUV422P10LE, 0, 0, 0 },
116 + {VLC_CODEC_I422_10B, AV_PIX_FMT_YUV422P10BE, 0, 0, 0 },
118 - {VLC_CODEC_YUV420A, PIX_FMT_YUVA420P, 0, 0, 0 },
119 + {VLC_CODEC_YUV420A, AV_PIX_FMT_YUVA420P, 0, 0, 0 },
120 #if LIBAVUTIL_VERSION_CHECK( 51, 45, 0, 74, 100 )
121 {VLC_CODEC_YUV422A, AV_PIX_FMT_YUVA422P, 0, 0, 0 },
124 - {VLC_CODEC_I444_9L, PIX_FMT_YUV444P9LE, 0, 0, 0 },
125 - {VLC_CODEC_I444_9B, PIX_FMT_YUV444P9BE, 0, 0, 0 },
126 - {VLC_CODEC_I444_10L, PIX_FMT_YUV444P10LE, 0, 0, 0 },
127 - {VLC_CODEC_I444_10B, PIX_FMT_YUV444P10BE, 0, 0, 0 },
128 - {VLC_CODEC_I444_16L, PIX_FMT_YUV444P16LE, 0, 0, 0 },
129 - {VLC_CODEC_I444_16B, PIX_FMT_YUV444P16BE, 0, 0, 0 },
130 + {VLC_CODEC_I444_9L, AV_PIX_FMT_YUV444P9LE, 0, 0, 0 },
131 + {VLC_CODEC_I444_9B, AV_PIX_FMT_YUV444P9BE, 0, 0, 0 },
132 + {VLC_CODEC_I444_10L, AV_PIX_FMT_YUV444P10LE, 0, 0, 0 },
133 + {VLC_CODEC_I444_10B, AV_PIX_FMT_YUV444P10BE, 0, 0, 0 },
134 + {VLC_CODEC_I444_16L, AV_PIX_FMT_YUV444P16LE, 0, 0, 0 },
135 + {VLC_CODEC_I444_16B, AV_PIX_FMT_YUV444P16BE, 0, 0, 0 },
137 /* Packed YUV formats */
138 - {VLC_CODEC_YUYV, PIX_FMT_YUYV422, 0, 0, 0 },
139 - {VLC_FOURCC('Y','U','Y','V'), PIX_FMT_YUYV422, 0, 0, 0 },
140 - {VLC_CODEC_UYVY, PIX_FMT_UYVY422, 0, 0, 0 },
141 - {VLC_FOURCC('Y','4','1','1'), PIX_FMT_UYYVYY411, 0, 0, 0 },
142 + {VLC_CODEC_YUYV, AV_PIX_FMT_YUYV422, 0, 0, 0 },
143 + {VLC_FOURCC('Y','U','Y','V'), AV_PIX_FMT_YUYV422, 0, 0, 0 },
144 + {VLC_CODEC_UYVY, AV_PIX_FMT_UYVY422, 0, 0, 0 },
145 + {VLC_FOURCC('Y','4','1','1'), AV_PIX_FMT_UYYVYY411, 0, 0, 0 },
147 /* Packed RGB formats */
148 - VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, PIX_FMT_BGR4, 0x10, 0x06, 0x01 )
149 - VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, PIX_FMT_BGR8, 0xC0, 0x38, 0x07 )
150 + VLC_RGB( VLC_FOURCC('R','G','B','4'), AV_PIX_FMT_RGB4, AV_PIX_FMT_BGR4, 0x10, 0x06, 0x01 )
151 + VLC_RGB( VLC_FOURCC('R','G','B','8'), AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, 0xC0, 0x38, 0x07 )
153 - VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_RGB555, PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f )
154 - VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_RGB565, PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f )
155 - VLC_RGB( VLC_CODEC_RGB24, PIX_FMT_BGR24, PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff )
156 + VLC_RGB( VLC_CODEC_RGB15, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, 0x7c00, 0x03e0, 0x001f )
157 + VLC_RGB( VLC_CODEC_RGB16, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, 0xf800, 0x07e0, 0x001f )
158 + VLC_RGB( VLC_CODEC_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff )
160 - VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff )
161 - VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32_1, PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 )
162 + VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32, AV_PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff )
163 + VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_RGB32_1, AV_PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 )
165 #ifdef AV_PIX_FMT_0BGR32
166 VLC_RGB( VLC_CODEC_RGB32, AV_PIX_FMT_0BGR32, AV_PIX_FMT_0RGB32, 0x000000ff, 0x0000ff00, 0x00ff0000 )
169 - {VLC_CODEC_RGBA, PIX_FMT_RGBA, 0, 0, 0 },
170 - {VLC_CODEC_ARGB, PIX_FMT_ARGB, 0, 0, 0 },
171 - {VLC_CODEC_BGRA, PIX_FMT_BGRA, 0, 0, 0 },
172 - {VLC_CODEC_GREY, PIX_FMT_GRAY8, 0, 0, 0},
173 + {VLC_CODEC_RGBA, AV_PIX_FMT_RGBA, 0, 0, 0 },
174 + {VLC_CODEC_ARGB, AV_PIX_FMT_ARGB, 0, 0, 0 },
175 + {VLC_CODEC_BGRA, AV_PIX_FMT_BGRA, 0, 0, 0 },
176 + {VLC_CODEC_GREY, AV_PIX_FMT_GRAY8, 0, 0, 0},
179 - {VLC_CODEC_RGBP, PIX_FMT_PAL8, 0, 0, 0},
180 + {VLC_CODEC_RGBP, AV_PIX_FMT_PAL8, 0, 0, 0},
182 #if LIBAVUTIL_VERSION_CHECK(51, 42, 0, 74,100)
183 {VLC_CODEC_GBR_PLANAR, AV_PIX_FMT_GBRP, 0, 0, 0 },
185 for( int i = 0; chroma_table[i].i_chroma != 0; i++ )
186 if( chroma_table[i].i_chroma == fourcc )
187 return chroma_table[i].i_chroma_id;
188 - return PIX_FMT_NONE;
189 + return AV_PIX_FMT_NONE;
191 diff -ur vlc-2.2.2/modules/codec/avcodec/encoder.c vlc-2.2.2.ffmpeg3/modules/codec/avcodec/encoder.c
192 --- vlc-2.2.2/modules/codec/avcodec/encoder.c 2015-10-21 19:48:45.000000000 +0200
193 +++ vlc-2.2.2.ffmpeg3/modules/codec/avcodec/encoder.c 2016-03-24 14:49:27.040893692 +0100
197 #include <libavcodec/avcodec.h>
198 -#include <libavutil/audioconvert.h>
201 #include "avcommon.h"
203 else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id,
206 - if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == PIX_FMT_NONE )
207 + if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == AV_PIX_FMT_NONE )
208 return VLC_EGENERIC; /* handed chroma output */
213 if( p_codec->pix_fmts )
215 - const enum PixelFormat *p = p_codec->pix_fmts;
216 + const enum AVPixelFormat *p = p_codec->pix_fmts;
217 for( ; *p != -1; p++ )
219 if( *p == p_context->pix_fmt ) break;
220 @@ -1017,7 +1017,7 @@
224 - p_sys->frame = avcodec_alloc_frame();
225 + p_sys->frame = av_frame_alloc();
229 @@ -1088,7 +1088,7 @@
230 AVFrame *frame = NULL;
231 if( likely(p_pict) ) {
232 frame = p_sys->frame;
233 - avcodec_get_frame_defaults( frame );
234 + av_frame_unref( frame );
235 for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ )
237 p_sys->frame->data[i_plane] = p_pict->p[i_plane].p_pixels;
238 @@ -1329,7 +1329,7 @@
239 //How much we need to copy from new packet
240 const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
242 - avcodec_get_frame_defaults( p_sys->frame );
243 + av_frame_unref( p_sys->frame );
244 p_sys->frame->format = p_sys->p_context->sample_fmt;
245 p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay;
247 @@ -1451,7 +1451,7 @@
248 while( ( p_aout_buf->i_nb_samples >= p_sys->i_frame_size ) ||
249 ( p_sys->b_variable && p_aout_buf->i_nb_samples ) )
251 - avcodec_get_frame_defaults( p_sys->frame );
252 + av_frame_unref( p_sys->frame );
253 if( p_sys->b_variable )
254 p_sys->frame->nb_samples = p_aout_buf->i_nb_samples;
256 @@ -1514,7 +1514,7 @@
257 encoder_t *p_enc = (encoder_t *)p_this;
258 encoder_sys_t *p_sys = p_enc->p_sys;
260 - /*FIXME: we should use avcodec_free_frame, but we don't require so new avcodec that has it*/
261 + /*FIXME: we should use av_frame_free, but we don't require so new avcodec that has it*/
262 av_freep( &p_sys->frame );
265 diff -ur vlc-2.2.2/modules/codec/avcodec/vaapi.c vlc-2.2.2.ffmpeg3/modules/codec/avcodec/vaapi.c
266 --- vlc-2.2.2/modules/codec/avcodec/vaapi.c 2015-02-02 20:42:29.000000000 +0100
267 +++ vlc-2.2.2.ffmpeg3/modules/codec/avcodec/vaapi.c 2016-03-24 14:49:59.504628311 +0100
271 /* Only VLD supported */
272 - p_va->pix_fmt = PIX_FMT_VAAPI_VLD;
273 + p_va->pix_fmt = AV_PIX_FMT_VAAPI_VLD;
276 p_va->release = Release;
277 diff -ur vlc-2.2.2/modules/codec/avcodec/video.c vlc-2.2.2.ffmpeg3/modules/codec/avcodec/video.c
278 --- vlc-2.2.2/modules/codec/avcodec/video.c 2015-10-21 19:48:45.000000000 +0200
279 +++ vlc-2.2.2.ffmpeg3/modules/codec/avcodec/video.c 2016-03-24 14:47:01.769097935 +0100
281 static int ffmpeg_GetFrameBuf ( struct AVCodecContext *, AVFrame * );
282 static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
284 -static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
285 - const enum PixelFormat * );
286 +static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *,
287 + const enum AVPixelFormat * );
289 static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
292 p_sys->p_codec = p_codec;
293 p_sys->i_codec_id = i_codec_id;
294 p_sys->psz_namecodec = psz_namecodec;
295 - p_sys->p_ff_pic = avcodec_alloc_frame();
296 + p_sys->p_ff_pic = av_frame_alloc();
297 p_sys->b_delayed_open = true;
299 vlc_sem_init( &p_sys->sem_mt, 0 );
301 if( ffmpeg_OpenCodec( p_dec ) < 0 )
303 msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
304 - avcodec_free_frame( &p_sys->p_ff_pic );
305 + av_frame_free( &p_sys->p_ff_pic );
306 vlc_sem_destroy( &p_sys->sem_mt );
312 if( p_sys->p_ff_pic )
313 - avcodec_free_frame( &p_sys->p_ff_pic );
314 + av_frame_free( &p_sys->p_ff_pic );
317 vlc_va_Delete( p_sys->p_va );
318 @@ -1004,7 +1004,7 @@
319 if (GetVlcChroma(&dec->fmt_out.video, ctx->pix_fmt) != VLC_SUCCESS)
321 dec->fmt_out.i_codec = dec->fmt_out.video.i_chroma;
322 - if (ctx->pix_fmt == PIX_FMT_PAL8)
323 + if (ctx->pix_fmt == AV_PIX_FMT_PAL8)
326 int width = frame->width;
327 @@ -1180,7 +1180,7 @@
328 if (GetVlcChroma(&p_dec->fmt_out.video, p_context->pix_fmt) != VLC_SUCCESS)
331 - if (p_context->pix_fmt == PIX_FMT_PAL8)
332 + if (p_context->pix_fmt == AV_PIX_FMT_PAL8)
335 p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
336 @@ -1215,7 +1215,7 @@
340 - if( p_context->pix_fmt == PIX_FMT_YUV422P )
341 + if( p_context->pix_fmt == AV_PIX_FMT_YUV422P )
343 if( 2 * p_pic->p[1].i_pitch != p_pic->p[0].i_pitch ||
344 2 * p_pic->p[2].i_pitch != p_pic->p[0].i_pitch )
345 @@ -1313,8 +1313,8 @@
349 -static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
350 - const enum PixelFormat *pi_fmt )
351 +static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
352 + const enum AVPixelFormat *pi_fmt )
354 decoder_t *p_dec = p_context->opaque;
355 decoder_sys_t *p_sys = p_dec->p_sys;
356 @@ -1325,7 +1325,7 @@
358 /* Enumerate available formats */
359 bool can_hwaccel = false;
360 - for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
361 + for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ )
363 const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]);
365 @@ -1341,6 +1341,15 @@
369 +#if (LIBAVCODEC_VERSION_MICRO >= 100) /* FFmpeg only */
370 + if (p_context->active_thread_type)
372 + msg_Warn(p_dec, "thread type %d: disabling hardware acceleration",
373 + p_context->active_thread_type);
378 /* Profile and level information is needed now.
379 * TODO: avoid code duplication with avcodec.c */
380 if( p_context->profile != FF_PROFILE_UNKNOWN)
381 @@ -1352,7 +1361,7 @@
385 - for( size_t i = 0; pi_fmt[i] != PIX_FMT_NONE; i++ )
386 + for( size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ )
388 if( p_va->pix_fmt != pi_fmt[i] )
390 diff -ur vlc-2.2.2/modules/video_chroma/swscale.c vlc-2.2.2.ffmpeg3/modules/video_chroma/swscale.c
391 --- vlc-2.2.2/modules/video_chroma/swscale.c 2015-10-21 19:48:45.000000000 +0200
392 +++ vlc-2.2.2.ffmpeg3/modules/video_chroma/swscale.c 2016-03-24 14:42:39.442521648 +0100
396 #include <libswscale/swscale.h>
397 +#include <libswscale/version.h>
400 # include <TargetConditionals.h>
405 +#if LIBSWSCALE_VERSION_MAJOR < 4
406 #if defined(__i386__) || defined(__x86_64__)
408 i_sws_cpu |= SWS_CPU_CAPS_MMX;
410 if( vlc_CPU_ALTIVEC() )
411 i_sws_cpu |= SWS_CPU_CAPS_ALTIVEC;
417 @@ -257,35 +260,35 @@
420 case VLC_CODEC_YUV422A:
421 - *pi_fmt = PIX_FMT_YUV422P;
422 + *pi_fmt = AV_PIX_FMT_YUV422P;
425 case VLC_CODEC_YUV420A:
426 - *pi_fmt = PIX_FMT_YUV420P;
427 + *pi_fmt = AV_PIX_FMT_YUV420P;
431 - *pi_fmt = PIX_FMT_YUV444P;
432 + *pi_fmt = AV_PIX_FMT_YUV444P;
436 - *pi_fmt = PIX_FMT_BGR32;
437 + *pi_fmt = AV_PIX_FMT_BGR32;
441 - *pi_fmt = PIX_FMT_BGR32_1;
442 + *pi_fmt = AV_PIX_FMT_BGR32_1;
446 - *pi_fmt = PIX_FMT_RGB32;
447 + *pi_fmt = AV_PIX_FMT_RGB32;
451 - *pi_fmt = PIX_FMT_YUV420P;
452 + *pi_fmt = AV_PIX_FMT_YUV420P;
456 - *pi_fmt = PIX_FMT_YUV410P;
457 + *pi_fmt = AV_PIX_FMT_YUV410P;
463 if( p_fmti->i_chroma == VLC_CODEC_YUVP && ALLOW_YUVP )
465 - i_fmti = i_fmto = PIX_FMT_GRAY8;
466 + i_fmti = i_fmto = AV_PIX_FMT_GRAY8;
467 i_sws_flags = SWS_POINT;
471 * Without SWS_ACCURATE_RND the quality is really bad for some conversions */
477 + case AV_PIX_FMT_ARGB:
478 + case AV_PIX_FMT_RGBA:
479 + case AV_PIX_FMT_ABGR:
480 i_sws_flags |= SWS_ACCURATE_RND;
484 const unsigned i_fmto_visible_width = p_fmto->i_visible_width * p_sys->i_extend_factor;
485 for( int n = 0; n < (cfg.b_has_a ? 2 : 1); n++ )
487 - const int i_fmti = n == 0 ? cfg.i_fmti : PIX_FMT_GRAY8;
488 - const int i_fmto = n == 0 ? cfg.i_fmto : PIX_FMT_GRAY8;
489 + const int i_fmti = n == 0 ? cfg.i_fmti : AV_PIX_FMT_GRAY8;
490 + const int i_fmto = n == 0 ? cfg.i_fmto : AV_PIX_FMT_GRAY8;
491 struct SwsContext *ctx;
493 ctx = sws_getContext( i_fmti_visible_width, p_fmti->i_visible_height, i_fmti,