forked from ports/contrib
ffmpeg: x264 compile patch
This commit is contained in:
parent
baf9d8b710
commit
247f408812
@ -1,2 +1,3 @@
|
||||
97d3e60b4245903a42d91cfb0b7cbcb0 ffmpeg-20080826-14974-missing-header.patch
|
||||
80ecc64f542516102902150067be1e4b ffmpeg-20080826-14974.tar.bz2
|
||||
a58f8135e58ca23d83443c7263712b80 ffmpeg-x264_fix.patch
|
||||
|
@ -8,11 +8,13 @@ name=ffmpeg
|
||||
version=20080826
|
||||
release=2
|
||||
source=(http://www.dcaf-security.org/distfiles/$name-$version-14974.tar.bz2
|
||||
ffmpeg-20080826-14974-missing-header.patch)
|
||||
ffmpeg-20080826-14974-missing-header.patch
|
||||
ffmpeg-x264_fix.patch)
|
||||
|
||||
build() {
|
||||
cd $name
|
||||
patch -p 1 -i $SRC/ffmpeg-20080826-14974-missing-header.patch
|
||||
patch -p 1 -i $SRC/ffmpeg-x264_fix.patch
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
@ -42,4 +44,3 @@ build() {
|
||||
make SHARED_PP='yes'
|
||||
make DESTDIR=$PKG install install-man
|
||||
}
|
||||
|
||||
|
42
ffmpeg/ffmpeg-x264_fix.patch
Normal file
42
ffmpeg/ffmpeg-x264_fix.patch
Normal file
@ -0,0 +1,42 @@
|
||||
---
|
||||
libavcodec/libx264.c | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: ffmpeg/libavcodec/libx264.c
|
||||
===================================================================
|
||||
--- ffmpeg.orig/libavcodec/libx264.c
|
||||
+++ ffmpeg/libavcodec/libx264.c
|
||||
@@ -162,7 +162,11 @@ X264_init(AVCodecContext *avctx)
|
||||
|
||||
x4->params.i_bframe = avctx->max_b_frames;
|
||||
x4->params.b_cabac = avctx->coder_type == FF_CODER_TYPE_AC;
|
||||
- x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
|
||||
+#if X264_BUILD < 62
|
||||
+ x4->params.b_bframe_adaptive = avctx->b_frame_strategy;
|
||||
+#else
|
||||
+ x4->params.i_bframe_adaptive = avctx->b_frame_strategy;
|
||||
+#endif
|
||||
x4->params.i_bframe_bias = avctx->bframebias;
|
||||
x4->params.b_bframe_pyramid = avctx->flags2 & CODEC_FLAG2_BPYRAMID;
|
||||
avctx->has_b_frames= avctx->flags2 & CODEC_FLAG2_BPYRAMID ? 2 : !!avctx->max_b_frames;
|
||||
@@ -227,8 +231,10 @@ X264_init(AVCodecContext *avctx)
|
||||
x4->params.analyse.i_me_range = avctx->me_range;
|
||||
x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality;
|
||||
|
||||
+#if X264_BUILD < 65
|
||||
x4->params.analyse.b_bidir_me = avctx->bidir_refine > 0;
|
||||
x4->params.analyse.b_bframe_rdo = avctx->flags2 & CODEC_FLAG2_BRDO;
|
||||
+#endif
|
||||
x4->params.analyse.b_mixed_references =
|
||||
avctx->flags2 & CODEC_FLAG2_MIXED_REFS;
|
||||
x4->params.analyse.b_chroma_me = avctx->me_cmp & FF_CMP_CHROMA;
|
||||
@@ -253,7 +259,9 @@ X264_init(AVCodecContext *avctx)
|
||||
x4->params.rc.f_ip_factor = 1/fabs(avctx->i_quant_factor);
|
||||
x4->params.rc.f_pb_factor = avctx->b_quant_factor;
|
||||
x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
|
||||
+#if X264_BUILD < 61
|
||||
x4->params.rc.psz_rc_eq = avctx->rc_eq;
|
||||
+#endif
|
||||
|
||||
x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
|
||||
x4->params.i_log_level = X264_LOG_DEBUG;
|
Loading…
x
Reference in New Issue
Block a user