| Index: patches/to_upstream/14_vp8_encode_options.patch
|
| ===================================================================
|
| --- patches/to_upstream/14_vp8_encode_options.patch (revision 65184)
|
| +++ patches/to_upstream/14_vp8_encode_options.patch (working copy)
|
| @@ -1,6 +1,6 @@
|
| -diff -rpu -N orig/ffpresets/libvpx-1080p.ffpreset ffmpeg-mt/ffpresets/libvpx-1080p.ffpreset
|
| +diff -wurp -N orig/ffpresets/libvpx-1080p.ffpreset ffmpeg-mt/ffpresets/libvpx-1080p.ffpreset
|
| --- orig/ffpresets/libvpx-1080p.ffpreset 1969-12-31 16:00:00 -0800
|
| -+++ ffmpeg-mt/ffpresets/libvpx-1080p.ffpreset 2010-10-11 16:55:58 -0700
|
| ++++ ffmpeg-mt/ffpresets/libvpx-1080p.ffpreset 2010-11-04 08:10:04 -0700
|
| @@ -0,0 +1,13 @@
|
| +vcodec=libvpx
|
| +g=120
|
| @@ -9,15 +9,15 @@
|
| +profile=1
|
| +qmax=51
|
| +qmin=11
|
| -+token_partitions=4
|
| ++slices=4
|
| +vb=2M
|
| +
|
| +#ignored unless using -pass 2
|
| +maxrate=24M
|
| +minrate=100k
|
| -diff -rpu -N orig/ffpresets/libvpx-1080p50_60.ffpreset ffmpeg-mt/ffpresets/libvpx-1080p50_60.ffpreset
|
| +diff -wurp -N orig/ffpresets/libvpx-1080p50_60.ffpreset ffmpeg-mt/ffpresets/libvpx-1080p50_60.ffpreset
|
| --- orig/ffpresets/libvpx-1080p50_60.ffpreset 1969-12-31 16:00:00 -0800
|
| -+++ ffmpeg-mt/ffpresets/libvpx-1080p50_60.ffpreset 2010-10-11 16:55:58 -0700
|
| ++++ ffmpeg-mt/ffpresets/libvpx-1080p50_60.ffpreset 2010-11-04 08:10:04 -0700
|
| @@ -0,0 +1,13 @@
|
| +vcodec=libvpx
|
| +g=120
|
| @@ -26,15 +26,15 @@
|
| +profile=1
|
| +qmax=51
|
| +qmin=11
|
| -+token_partitions=4
|
| ++slices=4
|
| +vb=2M
|
| +
|
| +#ignored unless using -pass 2
|
| +maxrate=24M
|
| +minrate=100k
|
| -diff -rpu -N orig/ffpresets/libvpx-360p.ffpreset ffmpeg-mt/ffpresets/libvpx-360p.ffpreset
|
| +diff -wurp -N orig/ffpresets/libvpx-360p.ffpreset ffmpeg-mt/ffpresets/libvpx-360p.ffpreset
|
| --- orig/ffpresets/libvpx-360p.ffpreset 1969-12-31 16:00:00 -0800
|
| -+++ ffmpeg-mt/ffpresets/libvpx-360p.ffpreset 2010-10-11 16:55:58 -0700
|
| ++++ ffmpeg-mt/ffpresets/libvpx-360p.ffpreset 2010-11-04 08:10:04 -0700
|
| @@ -0,0 +1,12 @@
|
| +vcodec=libvpx
|
| +g=120
|
| @@ -48,9 +48,9 @@
|
| +#ignored unless using -pass 2
|
| +maxrate=1.5M
|
| +minrate=40k
|
| -diff -rpu -N orig/ffpresets/libvpx-720p.ffpreset ffmpeg-mt/ffpresets/libvpx-720p.ffpreset
|
| +diff -wurp -N orig/ffpresets/libvpx-720p.ffpreset ffmpeg-mt/ffpresets/libvpx-720p.ffpreset
|
| --- orig/ffpresets/libvpx-720p.ffpreset 1969-12-31 16:00:00 -0800
|
| -+++ ffmpeg-mt/ffpresets/libvpx-720p.ffpreset 2010-10-11 16:55:58 -0700
|
| ++++ ffmpeg-mt/ffpresets/libvpx-720p.ffpreset 2010-11-04 08:10:04 -0700
|
| @@ -0,0 +1,13 @@
|
| +vcodec=libvpx
|
| +g=120
|
| @@ -59,15 +59,15 @@
|
| +profile=0
|
| +qmax=51
|
| +qmin=11
|
| -+token_partitions=4
|
| ++slices=4
|
| +vb=2M
|
| +
|
| +#ignored unless using -pass 2
|
| +maxrate=24M
|
| +minrate=100k
|
| -diff -rpu -N orig/ffpresets/libvpx-720p50_60.ffpreset ffmpeg-mt/ffpresets/libvpx-720p50_60.ffpreset
|
| +diff -wurp -N orig/ffpresets/libvpx-720p50_60.ffpreset ffmpeg-mt/ffpresets/libvpx-720p50_60.ffpreset
|
| --- orig/ffpresets/libvpx-720p50_60.ffpreset 1969-12-31 16:00:00 -0800
|
| -+++ ffmpeg-mt/ffpresets/libvpx-720p50_60.ffpreset 2010-10-11 16:55:58 -0700
|
| ++++ ffmpeg-mt/ffpresets/libvpx-720p50_60.ffpreset 2010-11-04 08:10:04 -0700
|
| @@ -0,0 +1,13 @@
|
| +vcodec=libvpx
|
| +g=120
|
| @@ -76,15 +76,15 @@
|
| +profile=0
|
| +qmax=51
|
| +qmin=11
|
| -+token_partitions=4
|
| ++slices=4
|
| +vb=2M
|
| +
|
| +#ignored unless using -pass 2
|
| +maxrate=24M
|
| +minrate=100k
|
| -diff -rpu -N orig/libavcodec/avcodec.h ffmpeg-mt/libavcodec/avcodec.h
|
| ---- orig/libavcodec/avcodec.h 2010-10-11 16:55:52 -0700
|
| -+++ ffmpeg-mt/libavcodec/avcodec.h 2010-10-11 16:55:58 -0700
|
| +diff -wurp -N orig/libavcodec/avcodec.h ffmpeg-mt/libavcodec/avcodec.h
|
| +--- orig/libavcodec/avcodec.h 2010-11-04 08:09:58 -0700
|
| ++++ ffmpeg-mt/libavcodec/avcodec.h 2010-11-04 08:10:04 -0700
|
| @@ -652,6 +652,7 @@ typedef struct RcOverride{
|
| #define CODEC_FLAG2_PSY 0x00080000 ///< Use psycho visual optimizations.
|
| #define CODEC_FLAG2_SSIM 0x00100000 ///< Compute SSIM during encoding, error[] values are undefined.
|
| @@ -93,7 +93,7 @@
|
|
|
| /* Unsupported options :
|
| * Syntax Arithmetic coding (SAC)
|
| -@@ -2792,6 +2793,19 @@ typedef struct AVCodecContext {
|
| +@@ -2801,6 +2802,19 @@ typedef struct AVCodecContext {
|
| * - decoding: Set by libavcodec.
|
| */
|
| int active_thread_type;
|
| @@ -113,9 +113,9 @@
|
| } AVCodecContext;
|
|
|
| /**
|
| -diff -rpu -N orig/libavcodec/libvpxenc.c ffmpeg-mt/libavcodec/libvpxenc.c
|
| ---- orig/libavcodec/libvpxenc.c 2010-10-11 16:55:53 -0700
|
| -+++ ffmpeg-mt/libavcodec/libvpxenc.c 2010-10-11 16:55:58 -0700
|
| +diff -wurp -N orig/libavcodec/libvpxenc.c ffmpeg-mt/libavcodec/libvpxenc.c
|
| +--- orig/libavcodec/libvpxenc.c 2010-11-04 08:09:59 -0700
|
| ++++ ffmpeg-mt/libavcodec/libvpxenc.c 2010-11-04 08:10:04 -0700
|
| @@ -218,11 +218,21 @@ static av_cold int vp8_init(AVCodecConte
|
| }
|
| dump_enc_cfg(avctx, &enccfg);
|
| @@ -177,19 +177,18 @@
|
|
|
| dump_enc_cfg(avctx, &enccfg);
|
| /* Construct Encoder Context */
|
| -@@ -310,6 +338,8 @@ static av_cold int vp8_init(AVCodecConte
|
| - av_log(avctx, AV_LOG_DEBUG, "vpx_codec_control\n");
|
| +@@ -311,6 +339,7 @@ static av_cold int vp8_init(AVCodecConte
|
| codecctl_int(avctx, VP8E_SET_CPUUSED, cpuused);
|
| codecctl_int(avctx, VP8E_SET_NOISE_SENSITIVITY, avctx->noise_reduction);
|
| + codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->slices));
|
| + codecctl_int(avctx, VP8E_SET_ENABLEAUTOALTREF, !!(avctx->flags2 & CODEC_FLAG2_ALT_REF));
|
| -+ codecctl_int(avctx, VP8E_SET_TOKEN_PARTITIONS, av_log2(avctx->token_partitions));
|
|
|
| //provide dummy value to initialize wrapper, values will be updated each _encode()
|
| vpx_img_wrap(&ctx->rawimg, VPX_IMG_FMT_I420, avctx->width, avctx->height, 1,
|
| -diff -rpu -N orig/libavcodec/options.c ffmpeg-mt/libavcodec/options.c
|
| ---- orig/libavcodec/options.c 2010-10-11 16:55:54 -0700
|
| -+++ ffmpeg-mt/libavcodec/options.c 2010-10-11 16:55:58 -0700
|
| -@@ -429,6 +429,8 @@ static const AVOption options[]={
|
| +diff -wurp -N orig/libavcodec/options.c ffmpeg-mt/libavcodec/options.c
|
| +--- orig/libavcodec/options.c 2010-11-04 08:10:00 -0700
|
| ++++ ffmpeg-mt/libavcodec/options.c 2010-11-04 08:10:05 -0700
|
| +@@ -430,6 +430,8 @@ static const AVOption options[]={
|
| {"thread_type", "select multithreading type", OFFSET(thread_type), FF_OPT_TYPE_INT, FF_THREAD_SLICE|FF_THREAD_FRAME, 0, INT_MAX, V|E|D, "thread_type"},
|
| {"slice", NULL, 0, FF_OPT_TYPE_CONST, FF_THREAD_SLICE, INT_MIN, INT_MAX, V|E|D, "thread_type"},
|
| {"frame", NULL, 0, FF_OPT_TYPE_CONST, FF_THREAD_FRAME, INT_MIN, INT_MAX, V|E|D, "thread_type"},
|
|
|