aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJindrich Makovicka <jindrich.makovicka@nangu.tv>2011-05-10 15:11:45 +0200
committerAnton Khirnov <anton@khirnov.net>2011-05-17 23:01:42 +0200
commite25c67108a77b2dbf13de1339b5314d07e3ffa02 (patch)
tree916561eb1a041ab148cb2d3b616acbb471cffa59
parent29e3489602aeb72dbd8ceebfcfa7025e8a57acaf (diff)
downloadffmpeg-e25c67108a77b2dbf13de1339b5314d07e3ffa02.tar.gz
libx264: handle closed GOP codec flag
Also update libx264 presets to keep closed gop as default. Signed-off-by: Jindrich Makovicka <makovick@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rwxr-xr-xconfigure4
-rw-r--r--ffpresets/libx264-fast.ffpreset2
-rw-r--r--ffpresets/libx264-fast_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-faster.ffpreset2
-rw-r--r--ffpresets/libx264-faster_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-lossless_fast.ffpreset2
-rw-r--r--ffpresets/libx264-lossless_max.ffpreset2
-rw-r--r--ffpresets/libx264-lossless_medium.ffpreset2
-rw-r--r--ffpresets/libx264-lossless_slow.ffpreset2
-rw-r--r--ffpresets/libx264-lossless_slower.ffpreset2
-rw-r--r--ffpresets/libx264-lossless_ultrafast.ffpreset2
-rw-r--r--ffpresets/libx264-medium.ffpreset2
-rw-r--r--ffpresets/libx264-medium_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-placebo.ffpreset2
-rw-r--r--ffpresets/libx264-placebo_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-slow.ffpreset2
-rw-r--r--ffpresets/libx264-slow_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-slower.ffpreset2
-rw-r--r--ffpresets/libx264-slower_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-superfast.ffpreset2
-rw-r--r--ffpresets/libx264-superfast_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-ultrafast.ffpreset2
-rw-r--r--ffpresets/libx264-ultrafast_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-veryfast.ffpreset2
-rw-r--r--ffpresets/libx264-veryfast_firstpass.ffpreset2
-rw-r--r--ffpresets/libx264-veryslow.ffpreset2
-rw-r--r--ffpresets/libx264-veryslow_firstpass.ffpreset2
-rw-r--r--libavcodec/libx264.c2
28 files changed, 30 insertions, 28 deletions
diff --git a/configure b/configure
index d6a5d69c6c..5b81e0b599 100755
--- a/configure
+++ b/configure
@@ -2891,8 +2891,8 @@ enabled libvpx && {
enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_enc_init_ver -lvpx ||
die "ERROR: libvpx encoder version must be >=0.9.1"; } }
enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &&
- { check_cpp_condition x264.h "X264_BUILD >= 99" ||
- die "ERROR: libx264 version must be >= 0.99."; }
+ { check_cpp_condition x264.h "X264_BUILD >= 115" ||
+ die "ERROR: libx264 version must be >= 0.115."; }
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
diff --git a/ffpresets/libx264-fast.ffpreset b/ffpresets/libx264-fast.ffpreset
index 0fc1f22403..65201331bd 100644
--- a/ffpresets/libx264-fast.ffpreset
+++ b/ffpresets/libx264-fast.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
diff --git a/ffpresets/libx264-fast_firstpass.ffpreset b/ffpresets/libx264-fast_firstpass.ffpreset
index cdcbbbf227..6fdb4b9e55 100644
--- a/ffpresets/libx264-fast_firstpass.ffpreset
+++ b/ffpresets/libx264-fast_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-faster.ffpreset b/ffpresets/libx264-faster.ffpreset
index 3156cd8028..52efc1a325 100644
--- a/ffpresets/libx264-faster.ffpreset
+++ b/ffpresets/libx264-faster.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
diff --git a/ffpresets/libx264-faster_firstpass.ffpreset b/ffpresets/libx264-faster_firstpass.ffpreset
index 9bcf18ae9d..41a87fb6b3 100644
--- a/ffpresets/libx264-faster_firstpass.ffpreset
+++ b/ffpresets/libx264-faster_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-lossless_fast.ffpreset b/ffpresets/libx264-lossless_fast.ffpreset
index b7696b5bcb..49b9ed1add 100644
--- a/ffpresets/libx264-lossless_fast.ffpreset
+++ b/ffpresets/libx264-lossless_fast.ffpreset
@@ -1,5 +1,5 @@
coder=0
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8+parti4x4+partp8x8-partp4x4-partb8x8
me_method=hex
diff --git a/ffpresets/libx264-lossless_max.ffpreset b/ffpresets/libx264-lossless_max.ffpreset
index 75c387f162..f32d7b40c6 100644
--- a/ffpresets/libx264-lossless_max.ffpreset
+++ b/ffpresets/libx264-lossless_max.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
me_method=esa
diff --git a/ffpresets/libx264-lossless_medium.ffpreset b/ffpresets/libx264-lossless_medium.ffpreset
index 116e3343ce..0b84612fcb 100644
--- a/ffpresets/libx264-lossless_medium.ffpreset
+++ b/ffpresets/libx264-lossless_medium.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
me_method=hex
diff --git a/ffpresets/libx264-lossless_slow.ffpreset b/ffpresets/libx264-lossless_slow.ffpreset
index 0d496f6e29..857d3d1986 100644
--- a/ffpresets/libx264-lossless_slow.ffpreset
+++ b/ffpresets/libx264-lossless_slow.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
me_method=umh
diff --git a/ffpresets/libx264-lossless_slower.ffpreset b/ffpresets/libx264-lossless_slower.ffpreset
index 672e0cd637..ef0609f1b6 100644
--- a/ffpresets/libx264-lossless_slower.ffpreset
+++ b/ffpresets/libx264-lossless_slower.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4-partb8x8
me_method=umh
diff --git a/ffpresets/libx264-lossless_ultrafast.ffpreset b/ffpresets/libx264-lossless_ultrafast.ffpreset
index a2eda65edf..4cc84f1b4f 100644
--- a/ffpresets/libx264-lossless_ultrafast.ffpreset
+++ b/ffpresets/libx264-lossless_ultrafast.ffpreset
@@ -1,5 +1,5 @@
coder=0
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partp4x4-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-medium.ffpreset b/ffpresets/libx264-medium.ffpreset
index 3c90ec5d62..685995226d 100644
--- a/ffpresets/libx264-medium.ffpreset
+++ b/ffpresets/libx264-medium.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
diff --git a/ffpresets/libx264-medium_firstpass.ffpreset b/ffpresets/libx264-medium_firstpass.ffpreset
index 2ad0a9cc25..ca304ee24d 100644
--- a/ffpresets/libx264-medium_firstpass.ffpreset
+++ b/ffpresets/libx264-medium_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-placebo.ffpreset b/ffpresets/libx264-placebo.ffpreset
index 9f4719f71d..7923a76c74 100644
--- a/ffpresets/libx264-placebo.ffpreset
+++ b/ffpresets/libx264-placebo.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8
me_method=tesa
diff --git a/ffpresets/libx264-placebo_firstpass.ffpreset b/ffpresets/libx264-placebo_firstpass.ffpreset
index 9f4719f71d..7923a76c74 100644
--- a/ffpresets/libx264-placebo_firstpass.ffpreset
+++ b/ffpresets/libx264-placebo_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8
me_method=tesa
diff --git a/ffpresets/libx264-slow.ffpreset b/ffpresets/libx264-slow.ffpreset
index dabe0ae14e..fcbef4bcfc 100644
--- a/ffpresets/libx264-slow.ffpreset
+++ b/ffpresets/libx264-slow.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=umh
diff --git a/ffpresets/libx264-slow_firstpass.ffpreset b/ffpresets/libx264-slow_firstpass.ffpreset
index 4af64dbe32..74f87b0c2d 100644
--- a/ffpresets/libx264-slow_firstpass.ffpreset
+++ b/ffpresets/libx264-slow_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-slower.ffpreset b/ffpresets/libx264-slower.ffpreset
index 239ee68cb4..741d21f920 100644
--- a/ffpresets/libx264-slower.ffpreset
+++ b/ffpresets/libx264-slower.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8
me_method=umh
diff --git a/ffpresets/libx264-slower_firstpass.ffpreset b/ffpresets/libx264-slower_firstpass.ffpreset
index 4b5b420c29..0be886a156 100644
--- a/ffpresets/libx264-slower_firstpass.ffpreset
+++ b/ffpresets/libx264-slower_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-superfast.ffpreset b/ffpresets/libx264-superfast.ffpreset
index fb2ab8c44f..7f0f50b782 100644
--- a/ffpresets/libx264-superfast.ffpreset
+++ b/ffpresets/libx264-superfast.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-superfast_firstpass.ffpreset b/ffpresets/libx264-superfast_firstpass.ffpreset
index 55ff9a2b7f..87b4f29012 100644
--- a/ffpresets/libx264-superfast_firstpass.ffpreset
+++ b/ffpresets/libx264-superfast_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-ultrafast.ffpreset b/ffpresets/libx264-ultrafast.ffpreset
index 28dc0eb836..561191e399 100644
--- a/ffpresets/libx264-ultrafast.ffpreset
+++ b/ffpresets/libx264-ultrafast.ffpreset
@@ -1,5 +1,5 @@
coder=0
-flags=-loop
+flags=-loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-ultrafast_firstpass.ffpreset b/ffpresets/libx264-ultrafast_firstpass.ffpreset
index 28dc0eb836..561191e399 100644
--- a/ffpresets/libx264-ultrafast_firstpass.ffpreset
+++ b/ffpresets/libx264-ultrafast_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=0
-flags=-loop
+flags=-loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-veryfast.ffpreset b/ffpresets/libx264-veryfast.ffpreset
index bfa3d8fad2..d8c7f7a371 100644
--- a/ffpresets/libx264-veryfast.ffpreset
+++ b/ffpresets/libx264-veryfast.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partb8x8
me_method=hex
diff --git a/ffpresets/libx264-veryfast_firstpass.ffpreset b/ffpresets/libx264-veryfast_firstpass.ffpreset
index ac2332df44..7b2a1e93d2 100644
--- a/ffpresets/libx264-veryfast_firstpass.ffpreset
+++ b/ffpresets/libx264-veryfast_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/ffpresets/libx264-veryslow.ffpreset b/ffpresets/libx264-veryslow.ffpreset
index e07aeb82fa..82333655f9 100644
--- a/ffpresets/libx264-veryslow.ffpreset
+++ b/ffpresets/libx264-veryslow.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=+parti8x8+parti4x4+partp8x8+partp4x4+partb8x8
me_method=umh
diff --git a/ffpresets/libx264-veryslow_firstpass.ffpreset b/ffpresets/libx264-veryslow_firstpass.ffpreset
index e17c04b20b..2bbf4731f4 100644
--- a/ffpresets/libx264-veryslow_firstpass.ffpreset
+++ b/ffpresets/libx264-veryslow_firstpass.ffpreset
@@ -1,5 +1,5 @@
coder=1
-flags=+loop
+flags=+loop+cgop
cmp=+chroma
partitions=-parti8x8-parti4x4-partp8x8-partb8x8
me_method=dia
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index bf5cbc501f..e5fac00469 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -298,6 +298,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT;
+ x4->params.b_open_gop = !(avctx->flags & CODEC_FLAG_CLOSED_GOP);
+
x4->params.i_slice_count = avctx->slices;
x4->params.vui.b_fullrange = avctx->pix_fmt == PIX_FMT_YUVJ420P;