Imported Debian patch 1.4-3~trusty
[deb_x265.git] / debian / patches / make_it_clear_that_--fast-cbf_is_innefective_at_lower_rd_levels.patch
diff --git a/debian/patches/make_it_clear_that_--fast-cbf_is_innefective_at_lower_rd_levels.patch b/debian/patches/make_it_clear_that_--fast-cbf_is_innefective_at_lower_rd_levels.patch
new file mode 100644 (file)
index 0000000..d1ee9cb
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/source/encoder/encoder.cpp
++++ b/source/encoder/encoder.cpp
+@@ -1330,6 +1330,12 @@
+         p->bBPyramid = 0;
+     /* Disable features which are not supported by the current RD level */
++    if (p->rdLevel < 5)
++    {
++        if (p->bEnableCbfFastMode)      /* impossible */
++            x265_log(p, X265_LOG_WARNING, "--fast-cbf disabled, requires --rdlevel 5 or higher\n");
++        p->bEnableCbfFastMode = 0;
++    }
+     if (p->rdLevel < 4)
+     {
+         if (p->psyRdoq > 0)             /* impossible */