diff options
author | Rodeo <[email protected]> | 2014-01-25 23:15:25 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2014-01-25 23:15:25 +0000 |
commit | 90795a32478ff917df5a8b6a8bb817998d41ed58 (patch) | |
tree | 75ab80e7d3572f885e0dbcda77e3f871956e130e | |
parent | 3db701933facbed318f5edb6589903caa5f78c64 (diff) |
Bump libav to v10_alpha2.
Misc. fixes and improvements.
Also add a patch to fix some interlaced VC-1 samples.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5993 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | contrib/ffmpeg/A00-qsv.patch | 20 | ||||
-rw-r--r-- | contrib/ffmpeg/A01-vc1-numref.patch | 39 | ||||
-rw-r--r-- | contrib/ffmpeg/A01-vc1-segfault.patch | 53 | ||||
-rw-r--r-- | contrib/ffmpeg/A02-vc1-interlaced.patch | 27 | ||||
-rw-r--r-- | contrib/ffmpeg/P01-solaris.patch | 4 | ||||
-rw-r--r-- | contrib/ffmpeg/P02-darwin-pic.patch | 6 | ||||
-rw-r--r-- | contrib/ffmpeg/module.defs | 2 |
7 files changed, 55 insertions, 96 deletions
diff --git a/contrib/ffmpeg/A00-qsv.patch b/contrib/ffmpeg/A00-qsv.patch index c4e7361b3..95289a15d 100644 --- a/contrib/ffmpeg/A00-qsv.patch +++ b/contrib/ffmpeg/A00-qsv.patch @@ -1,5 +1,5 @@ diff --git a/configure b/configure -index 910c47d..328702e 100755 +index 945a012..3fdc346 100755 --- a/configure +++ b/configure @@ -132,6 +132,7 @@ Component options: @@ -10,7 +10,7 @@ index 910c47d..328702e 100755 --enable-vaapi enable VAAPI code --enable-vda enable VDA code --enable-vdpau enable VDPAU code -@@ -1126,6 +1127,7 @@ EXTERNAL_LIBRARY_LIST=" +@@ -1137,6 +1138,7 @@ EXTERNAL_LIBRARY_LIST=" HWACCEL_LIST=" dxva2 @@ -18,7 +18,7 @@ index 910c47d..328702e 100755 vaapi vda vdpau -@@ -1776,6 +1778,7 @@ zmbv_encoder_deps="zlib" +@@ -1797,6 +1799,7 @@ zmbv_encoder_deps="zlib" # hardware accelerators dxva2_deps="dxva2api_h" @@ -26,7 +26,7 @@ index 910c47d..328702e 100755 vaapi_deps="va_va_h" vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads" vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore" -@@ -1787,6 +1790,8 @@ h263_vdpau_hwaccel_deps="vdpau" +@@ -1808,6 +1811,8 @@ h263_vdpau_hwaccel_deps="vdpau" h263_vdpau_hwaccel_select="h263_decoder" h264_dxva2_hwaccel_deps="dxva2" h264_dxva2_hwaccel_select="h264_decoder" @@ -35,7 +35,7 @@ index 910c47d..328702e 100755 h264_vaapi_hwaccel_deps="vaapi" h264_vaapi_hwaccel_select="h264_decoder" h264_vda_hwaccel_deps="vda" -@@ -3820,6 +3825,7 @@ check_header dxva.h +@@ -3853,6 +3858,7 @@ check_header dxva.h check_header dxva2api.h check_header io.h check_header malloc.h @@ -44,7 +44,7 @@ index 910c47d..328702e 100755 check_header sys/mman.h check_header sys/param.h diff --git a/libavcodec/Makefile b/libavcodec/Makefile -index 6dfb9a0..4e2d840 100644 +index 75426c4..87bbc81 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -4,6 +4,7 @@ FFLIBS = avutil @@ -55,7 +55,7 @@ index 6dfb9a0..4e2d840 100644 vaapi.h \ vda.h \ vdpau.h \ -@@ -59,6 +60,7 @@ OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \ +@@ -60,6 +61,7 @@ OBJS-$(CONFIG_MPEGAUDIODSP) += mpegaudiodsp.o \ OBJS-$(CONFIG_MPEGVIDEO) += mpegvideo.o mpegvideo_motion.o OBJS-$(CONFIG_MPEGVIDEOENC) += mpegvideo_enc.o mpeg12data.o \ motion_est.o ratecontrol.o @@ -63,7 +63,7 @@ index 6dfb9a0..4e2d840 100644 OBJS-$(CONFIG_RANGECODER) += rangecoder.o RDFT-OBJS-$(CONFIG_HARDCODED_TABLES) += sin_tables.o OBJS-$(CONFIG_RDFT) += rdft.o $(RDFT-OBJS-yes) -@@ -195,6 +197,7 @@ OBJS-$(CONFIG_H264_DECODER) += h264.o \ +@@ -198,6 +200,7 @@ OBJS-$(CONFIG_H264_DECODER) += h264.o \ h264_loopfilter.o h264_direct.o \ cabac.o h264_sei.o h264_ps.o \ h264_refs.o h264_cavlc.o h264_cabac.o @@ -71,7 +71,7 @@ index 6dfb9a0..4e2d840 100644 OBJS-$(CONFIG_HEVC_DECODER) += hevc.o hevc_mvs.o hevc_ps.o hevc_sei.o \ hevc_cabac.o hevc_refs.o hevcpred.o \ hevcdsp.o hevc_filter.o cabac.o -@@ -688,6 +691,7 @@ SKIPHEADERS += %_tablegen.h \ +@@ -691,6 +694,7 @@ SKIPHEADERS += %_tablegen.h \ SKIPHEADERS-$(CONFIG_DXVA2) += dxva2.h dxva2_internal.h SKIPHEADERS-$(CONFIG_LIBSCHROEDINGER) += libschroedinger.h SKIPHEADERS-$(CONFIG_MPEG_XVMC_DECODER) += xvmc.h @@ -80,7 +80,7 @@ index 6dfb9a0..4e2d840 100644 SKIPHEADERS-$(CONFIG_VDA) += vda.h SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c -index 044f585..99d4d23 100644 +index 2e56ec1..e9053ac 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -154,6 +154,7 @@ void avcodec_register_all(void) diff --git a/contrib/ffmpeg/A01-vc1-numref.patch b/contrib/ffmpeg/A01-vc1-numref.patch new file mode 100644 index 000000000..29e84e5a6 --- /dev/null +++ b/contrib/ffmpeg/A01-vc1-numref.patch @@ -0,0 +1,39 @@ +From 1ad55faa4d730f437bce612531132f00556d29fb Mon Sep 17 00:00:00 2001 +From: Michael Niedermayer <[email protected]> +Date: Sun, 19 Jan 2014 17:13:51 +0100 +Subject: [PATCH] vc1: Always reset numref when parsing a new frame header. + +Fixes an issue where the B-frame coding mode switches from interlaced +fields to interlaced frames, causing incorrect decisions in the motion +compensation code and resulting in visual artifacts. + +CC: [email protected] +Signed-off-by: Tim Walker <[email protected]> +--- + libavcodec/vc1.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c +index acefce6..a7f2aab 100644 +--- a/libavcodec/vc1.c ++++ b/libavcodec/vc1.c +@@ -842,6 +842,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) + int mbmodetab, imvtab, icbptab, twomvbptab, fourmvbptab; /* useful only for debugging */ + int field_mode, fcm; + ++ v->numref = 0; + v->p_frame_skipped = 0; + if (v->second_field) { + v->s.pict_type = (v->fptype & 1) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; +@@ -1011,8 +1012,6 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) + v->reffield = get_bits1(gb); + v->ref_field_type[0] = v->reffield ^ !v->cur_field_type; + } +- } else { +- v->numref = 0; + } + if (v->extended_mv) + v->mvrange = get_unary(gb, 0, 3); +-- +1.8.3.4 (Apple Git-47) + diff --git a/contrib/ffmpeg/A01-vc1-segfault.patch b/contrib/ffmpeg/A01-vc1-segfault.patch deleted file mode 100644 index 24470b9ac..000000000 --- a/contrib/ffmpeg/A01-vc1-segfault.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 475d00d67752a426529c977c13fffc883a191fa0 Mon Sep 17 00:00:00 2001 -From: Michael Niedermayer <[email protected]> -Date: Thu, 25 Apr 2013 21:31:18 +0200 -Subject: [PATCH] vc1dsp: add avg_no_rnd_vc1_chroma_mc4_c() - -Signed-off-by: Michael Niedermayer <[email protected]> -Signed-off-by: Tim Walker <[email protected]> ---- - libavcodec/vc1dsp.c | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/libavcodec/vc1dsp.c b/libavcodec/vc1dsp.c -index 7ef580d..2f510c4 100644 ---- a/libavcodec/vc1dsp.c -+++ b/libavcodec/vc1dsp.c -@@ -728,6 +728,26 @@ static void avg_no_rnd_vc1_chroma_mc8_c(uint8_t *dst/*align 8*/, uint8_t *src/*a - } - } - -+static void avg_no_rnd_vc1_chroma_mc4_c(uint8_t *dst/*align 8*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y){ -+ const int A=(8-x)*(8-y); -+ const int B=( x)*(8-y); -+ const int C=(8-x)*( y); -+ const int D=( x)*( y); -+ int i; -+ -+ assert(x<8 && y<8 && x>=0 && y>=0); -+ -+ for(i=0; i<h; i++) -+ { -+ dst[0] = avg2(dst[0], ((A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1] + 32 - 4) >> 6)); -+ dst[1] = avg2(dst[1], ((A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2] + 32 - 4) >> 6)); -+ dst[2] = avg2(dst[2], ((A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3] + 32 - 4) >> 6)); -+ dst[3] = avg2(dst[3], ((A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4] + 32 - 4) >> 6)); -+ dst+= stride; -+ src+= stride; -+ } -+} -+ - #if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER - - static void sprite_h_c(uint8_t *dst, const uint8_t *src, int offset, int advance, int count) -@@ -845,6 +865,7 @@ av_cold void ff_vc1dsp_init(VC1DSPContext* dsp) { - dsp->put_no_rnd_vc1_chroma_pixels_tab[0]= put_no_rnd_vc1_chroma_mc8_c; - dsp->avg_no_rnd_vc1_chroma_pixels_tab[0]= avg_no_rnd_vc1_chroma_mc8_c; - dsp->put_no_rnd_vc1_chroma_pixels_tab[1] = put_no_rnd_vc1_chroma_mc4_c; -+ dsp->avg_no_rnd_vc1_chroma_pixels_tab[1] = avg_no_rnd_vc1_chroma_mc4_c; - - #if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER - dsp->sprite_h = sprite_h_c; --- -1.8.5.1 - diff --git a/contrib/ffmpeg/A02-vc1-interlaced.patch b/contrib/ffmpeg/A02-vc1-interlaced.patch deleted file mode 100644 index 3db287d92..000000000 --- a/contrib/ffmpeg/A02-vc1-interlaced.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 52151e23889cea0d41f44b9b35d9216786992ff1 Mon Sep 17 00:00:00 2001 -From: Tim Walker <[email protected]> -Date: Sat, 11 Jan 2014 23:08:23 +0100 -Subject: [PATCH] vc1: enable the interlaced B-frame codepath. - -This should have been done in 1fb013a57c6d98d3f425506eb25f32b2cf7ddc6f, but was missed because FFmpeg had moved that code elsewhere. - -Signed-off-by: Tim Walker <[email protected]> ---- - libavcodec/vc1.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c -index 319230a..acefce6 100644 ---- a/libavcodec/vc1.c -+++ b/libavcodec/vc1.c -@@ -1188,7 +1188,6 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb) - if (v->bfraction == 0) { - return -1; - } -- return -1; // This codepath is still incomplete thus it is disabled - } - if (v->extended_mv) - v->mvrange = get_unary(gb, 0, 3); --- -1.8.5.1 - diff --git a/contrib/ffmpeg/P01-solaris.patch b/contrib/ffmpeg/P01-solaris.patch index fc0aeb287..e9f0ce3f4 100644 --- a/contrib/ffmpeg/P01-solaris.patch +++ b/contrib/ffmpeg/P01-solaris.patch @@ -1,8 +1,8 @@ diff --git a/configure b/configure -index e9fc08c..86ebc37 100755 +index 945a012..704ee87 100755 --- a/configure +++ b/configure -@@ -3589,7 +3589,7 @@ EOF +@@ -3593,7 +3593,7 @@ EOF check_cc <<EOF || die "endian test failed" unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; EOF diff --git a/contrib/ffmpeg/P02-darwin-pic.patch b/contrib/ffmpeg/P02-darwin-pic.patch index fc43504bc..ee1fa01a2 100644 --- a/contrib/ffmpeg/P02-darwin-pic.patch +++ b/contrib/ffmpeg/P02-darwin-pic.patch @@ -1,8 +1,8 @@ diff --git a/configure b/configure -index e9fc08c..72bff03 100755 +index 945a012..e9b706f 100755 --- a/configure +++ b/configure -@@ -3263,6 +3263,7 @@ case $target_os in +@@ -3267,6 +3267,7 @@ case $target_os in SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)' objformat="macho" enabled x86_64 && objformat="macho64" @@ -10,7 +10,7 @@ index e9fc08c..72bff03 100755 enabled_any pic shared || { check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; } ;; -@@ -3502,7 +3503,7 @@ esc(){ +@@ -3506,7 +3507,7 @@ esc(){ echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs index 6f39c8e1c..875065505 100644 --- a/contrib/ffmpeg/module.defs +++ b/contrib/ffmpeg/module.defs @@ -5,7 +5,7 @@ $(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,YASM BZIP2 ZLIB FDKAAC)) endif $(eval $(call import.CONTRIB.defs,FFMPEG)) -FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v10_alpha1-90-g63debaa.tar.bz2 +FFMPEG.FETCH.url = http://download.handbrake.fr/handbrake/contrib/libav-v10_alpha2.tar.bz2 FFMPEG.CONFIGURE.deps = FFMPEG.CONFIGURE.env = |