<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">From 63e81aa126caa5c9de263634a20af2a8eb85324a Mon Sep 17 00:00:00 2001<br>From: yaswanthsastry <<a href="mailto:yaswanth.sastry@multicorewareinc.com">yaswanth.sastry@multicorewareinc.com</a>><br>Date: Mon, 18 Nov 2024 20:49:25 +0530<br>Subject: [PATCH] Deprecated pmode and pme features<br> removing corresponding test cases from regression and smoke test CLI's<br><br>---<br> doc/reST/cli.rst                 | 30 +++++++++++++++---------------<br> source/test/regression-tests.txt |  6 ------<br> source/test/smoke-tests.txt      |  2 --<br> source/x265cli.cpp               | 10 ++++++++++<br> 4 files changed, 25 insertions(+), 23 deletions(-)<br><br>diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst<br>index f9e7818ca..6bb99f92e 100755<br>--- a/doc/reST/cli.rst<br>+++ b/doc/reST/cli.rst<br>@@ -301,8 +301,8 @@ Performance Options<br>        in the system doesn't obey this constraint, we may spawn fewer threads<br>   than cores which has been empirically shown to be better for performance. <br> <br>-       If the four pool features: :option:`--wpp`, :option:`--pmode`,<br>-       :option:`--pme` and :option:`--lookahead-slices` are all disabled,<br>+   If the four pool features: :option:`--wpp`, :option:`--pmode(deprecated)`,<br>+   :option:`--pme(deprecated)` and :option:`--lookahead-slices` are all disabled,<br>       then :option:`--pools` is ignored and no thread pools are created.<br> <br>       If "none" is specified, then all four of the thread pool features are<br>@@ -344,7 +344,7 @@ Performance Options<br> <br>         Default: Enabled<br> <br>-.. option:: --pmode, --no-pmode<br>+.. option:: --pmode, --no-pmode ( deprecated from release 4.1 )<br> <br>         Parallel mode decision, or distributed mode analysis. When enabled<br>   the encoder will distribute the analysis work of each CU (merge,<br>@@ -354,31 +354,31 @@ Performance Options<br>  6 there is generally always enough work to distribute to warrant the<br>         overhead, assuming your CPUs are not already saturated.<br>      <br>-     --pmode will increase utilization without reducing compression<br>+       --pmode(deprecated) will increase utilization without reducing compression<br>   efficiency. In fact, since the modes are all measured in parallel it<br>         makes certain early-outs impractical and thus you usually get<br>        slightly better compression when it is enabled (at the expense of<br>    not skipping improbable modes). This bypassing of early-outs can<br>-     cause pmode to slow down encodes, especially at faster presets.<br>+      cause pmode(deprecated) to slow down encodes, especially at faster presets.<br> <br>      This feature is implicitly disabled when no thread pool is present.<br> <br>      Default disabled<br> <br>-.. option:: --pme, --no-pme<br>+.. option:: --pme, --no-pme ( deprecated from release 4.1 )<br> <br>         Parallel motion estimation. When enabled the encoder will distribute<br>         motion estimation across multiple worker threads when more than two<br>  references require motion searches for a given CU. Only recommended<br>-  if x265 is not already saturating CPU cores. :option:`--pmode` is<br>+    if x265 is not already saturating CPU cores. :option:`--pmode(deprecated)` is<br>        much more effective than this option, since the amount of work it<br>-    distributes is substantially higher. With --pme it is not unusual<br>+    distributes is substantially higher. With --pme(deprecated) it is not unusual<br>        for the overhead of distributing the work to outweigh the<br>    parallelism benefits.<br>        <br>     This feature is implicitly disabled when no thread pool is present.<br> <br>-      --pme will increase utilization on many core systems with no effect<br>+  --pme(deprecated) will increase utilization on many core systems with no effect<br>      on the output bitstream.<br>     <br>     Default disabled<br>@@ -932,14 +932,14 @@ will not reuse analysis if slice type parameters do not match.<br> .. option:: --analysis-save <filename><br> <br>   Encoder outputs analysis information of each frame. Analysis data from save mode is<br>-  written to the file specified. Requires cutree, pmode to be off. Default disabled.<br>+   written to the file specified. Requires cutree, pmode(deprecated) to be off. Default disabled.<br>       <br>     The amount of analysis data stored is determined by :option:`--analysis-save-reuse-level`.<br>   <br> .. option:: --analysis-load <filename><br> <br>         Encoder reuses analysis information from the file specified. By reading the analysis data written by<br>- an earlier encode of the same sequence, substantial redundant work may be avoided. Requires cutree, pmode<br>+    an earlier encode of the same sequence, substantial redundant work may be avoided. Requires cutree, pmode(deprecated)<br>        to be off. Default disabled.<br> <br>     The amount of analysis data reused is determined by :option:`--analysis-load-reuse-level`.<br>@@ -1845,8 +1845,8 @@ Quality, rate control and rate distortion options<br>  In pass 1 analysis information like motion vector, depth, reference and prediction<br>   modes of the final best CTU partition is stored for each CTU.<br>        Multipass analysis refinement cannot be enabled when :option:`--analysis-save`/:option:`--analysis-load`<br>-     is enabled and both will be disabled when enabled together. This feature requires :option:`--pmode`/:option:`--pme`<br>-  to be disabled and hence pmode/pme will be disabled when enabled at the same time.<br>+   is enabled and both will be disabled when enabled together. This feature requires :option:`--pmode(deprecated)`/:option:`--pme(deprecated)`<br>+  to be disabled and hence pmode/pme(deprecated) will be disabled when enabled at the same time.<br> <br>   Default: disabled.<br> <br>@@ -1857,8 +1857,8 @@ Quality, rate control and rate distortion options<br>      distortion get lower(negative)qp offsets and vice-versa for low distortion CTUs in pass 2.<br>   This helps to improve the subjective quality.<br>        Multipass refinement of qp cannot be enabled when :option:`--analysis-save`/:option:`--analysis-load`<br>-        is enabled and both will be disabled when enabled together. It requires :option:`--pmode`/:option:`--pme` to be<br>-      disabled and hence pmode/pme will be disabled when enabled along with it.<br>+    is enabled and both will be disabled when enabled together. It requires :option:`--pmode`(deprecated)/:option:`--pme(deprecated)` to be<br>+      disabled and hence pmode/pme(deprecated) will be disabled when enabled along with it.<br> <br>    Default: disabled.<br> <br>diff --git a/source/test/regression-tests.txt b/source/test/regression-tests.txt<br>index ed41b416d..875a4d2eb 100644<br>--- a/source/test/regression-tests.txt<br>+++ b/source/test/regression-tests.txt<br>@@ -22,12 +22,10 @@ BasketballDrive_1920x1080_50.y4m,--preset medium --analysis-save x265_analysis.d<br> BasketballDrive_1920x1080_50.y4m,--preset slow --nr-intra 100 -F4 --aq-strength 3 --qg-size 16 --limit-refs 1<br> BasketballDrive_1920x1080_50.y4m,--preset slower --lossless --chromaloc 3 --subme 0 --limit-tu 4<br> BasketballDrive_1920x1080_50.y4m,--preset slower --analysis-save x265_analysis.dat --analysis-save-reuse-level 10 --bitrate 7000 --limit-tu 0::--preset slower --analysis-load x265_analysis.dat --analysis-load-reuse-level 10 --bitrate 7000 --limit-tu 0<br>-BasketballDrive_1920x1080_50.y4m,--preset veryslow --crf 4 --cu-lossless --pmode --limit-refs 1 --aq-mode 3 --limit-tu 3<br> BasketballDrive_1920x1080_50.y4m,--preset veryslow --analysis-save x265_analysis.dat --analysis-save-reuse-level 5 --crf 18 --tskip-fast --limit-tu 2::--preset veryslow --analysis-load x265_analysis.dat  --analysis-load-reuse-level 5 --crf 18 --tskip-fast --limit-tu 2<br> BasketballDrive_1920x1080_50.y4m,--preset veryslow --recon-y4m-exec "ffplay -i pipe:0 -autoexit"<br> Coastguard-4k.y4m,--preset ultrafast --recon-y4m-exec "ffplay -i pipe:0 -autoexit"<br> Coastguard-4k.y4m,--preset superfast --tune grain --overscan=crop<br>-Coastguard-4k.y4m,--preset superfast --tune grain --pme --aq-strength 2 --merange 190<br> Coastguard-4k.y4m,--preset veryfast --no-cutree --analysis-save x265_analysis.dat --analysis-save-reuse-level 1 --qp 35::--preset veryfast --no-cutree --analysis-load x265_analysis.dat --analysis-load-reuse-level 1 --qp 35<br> Coastguard-4k.y4m,--preset medium --rdoq-level 1 --tune ssim --no-signhide --me umh --slices 2<br> Coastguard-4k.y4m,--preset slow --tune psnr --cbqpoffs -1 --crqpoffs 1 --limit-refs 1<br>@@ -60,14 +58,12 @@ FourPeople_1280x720_60.y4m,--preset medium --qp 38 --no-psy-rd<br> FourPeople_1280x720_60.y4m,--preset medium --recon-y4m-exec "ffplay -i pipe:0 -autoexit"<br> FourPeople_1280x720_60.y4m,--preset veryslow --numa-pools "none"<br> Keiba_832x480_30.y4m,--preset superfast --no-fast-intra --nr-intra 1000 -F4<br>-Keiba_832x480_30.y4m,--preset medium --pmode --tune grain<br> Keiba_832x480_30.y4m,--preset slower --fast-intra --nr-inter 500 -F4 --limit-refs 0<br> Kimono1_1920x1080_24_10bit_444.yuv,--preset superfast --weightb<br> Kimono1_1920x1080_24_10bit_444.yuv,--preset medium --min-cu-size 32<br> KristenAndSara_1280x720_60.y4m,--preset ultrafast --strong-intra-smoothing<br> KristenAndSara_1280x720_60.y4m,--preset superfast --min-cu-size 16 --qg-size 16 --limit-refs 1<br> KristenAndSara_1280x720_60.y4m,--preset medium --no-cutree --max-tu-size 16<br>-KristenAndSara_1280x720_60.y4m,--preset slower --pmode --max-tu-size 8 --limit-refs 0 --limit-modes --limit-tu 1<br> NebutaFestival_2560x1600_60_10bit_crop.yuv,--preset superfast --tune psnr<br> NebutaFestival_2560x1600_60_10bit_crop.yuv,--preset medium --tune grain --limit-refs 2<br> NebutaFestival_2560x1600_60_10bit_crop.yuv,--preset slow --no-cutree --analysis-save x265_analysis.dat --rd 5 --analysis-save-reuse-level 10 --bitrate 9000 --vbv-maxrate 9000 --vbv-bufsize 9000::--preset slow --no-cutree --analysis-load x265_analysis.dat --rd 5 --analysis-load-reuse-level 10 --bitrate 9000 --vbv-maxrate 9000 --vbv-bufsize 9000<br>@@ -76,13 +72,11 @@ News-4k.y4m,--preset superfast --lookahead-slices 6 --aq-mode 0<br> News-4k.y4m,--preset superfast --slices 4 --aq-mode 0 <br> News-4k.y4m,--preset medium --tune ssim --no-sao --qg-size 16<br> News-4k.y4m,--preset veryslow --rskip 0<br>-News-4k.y4m,--preset veryslow --pme --crf 40<br> OldTownCross_1920x1080_50_10bit_422.yuv,--preset superfast --weightp<br> OldTownCross_1920x1080_50_10bit_422.yuv,--preset medium --no-weightp<br> OldTownCross_1920x1080_50_10bit_422.yuv,--preset slower --tune fastdecode<br> ParkScene_1920x1080_24_10bit_444.yuv,--preset superfast --weightp --lookahead-slices 4<br> ParkScene_1920x1080_24.y4m,--preset medium --qp 40 --rdpenalty 2 --tu-intra-depth 3<br>-ParkScene_1920x1080_24.y4m,--preset medium --pme --tskip-fast --tskip --min-keyint 48 --weightb --limit-refs 3<br> ParkScene_1920x1080_24.y4m,--preset slower --no-weightp<br> ParkScene_1920x1080_24.y4m,--tune grain --aq-motion<br> RaceHorses_416x240_30.y4m,--preset superfast --no-cutree<br>diff --git a/source/test/smoke-tests.txt b/source/test/smoke-tests.txt<br>index a88a225b4..89f8ce452 100644<br>--- a/source/test/smoke-tests.txt<br>+++ b/source/test/smoke-tests.txt<br>@@ -8,10 +8,8 @@ big_buck_bunny_360p24.y4m,--preset=medium --bitrate 1000 -F4 --cu-lossless --sca<br> big_buck_bunny_360p24.y4m,--preset=slower --no-weightp --qg-size 16<br> washdc_422_ntsc.y4m,--preset=faster --no-strong-intra-smoothing --keyint 1 --qg-size 16<br> washdc_422_ntsc.y4m,--preset=medium --qp 40 --nr-inter 400 -F4<br>-washdc_422_ntsc.y4m,--preset=veryslow --pmode --tskip --rdoq-level 0<br> old_town_cross_444_720p50.y4m,--preset=ultrafast --weightp --keyint -1<br> old_town_cross_444_720p50.y4m,--preset=fast --keyint 20 --min-cu-size 16<br>-old_town_cross_444_720p50.y4m,--preset=slow --sao-non-deblock --pmode --qg-size 32<br> RaceHorses_416x240_30_10bit.yuv,--preset=veryfast --max-tu-size 8<br> RaceHorses_416x240_30_10bit.yuv,--preset=slower --bitrate 500 -F4 --rdoq-level 1<br> CrowdRun_1920x1080_50_10bit_444.yuv,--preset=ultrafast --constrained-intra --min-keyint 5 --keyint 10<br>diff --git a/source/x265cli.cpp b/source/x265cli.cpp<br>index a7d5f492a..7a892d043 100755<br>--- a/source/x265cli.cpp<br>+++ b/source/x265cli.cpp<br>@@ -787,6 +787,16 @@ namespace X265_NS {<br>                     if (!this->qpfile)<br>                         x265_log_file(param, X265_LOG_ERROR, "%s qpfile not found or error in opening qp file\n", optarg);<br>                 }<br>+                OPT("pme")<br>+                {<br>+                    x265_log_file(param, X265_LOG_ERROR, " pme feature is deprecated from release 4.1 \n", optarg);<br>+                    return true;<br>+                }<br>+                OPT("pmode")<br>+                {<br>+                    x265_log_file(param, X265_LOG_ERROR, " pmode feature is deprecated from release 4.1 \n", optarg);<br>+                    return true;<br>+                }<br>                 OPT("dolby-vision-rpu")<br>                 {<br>                     this->dolbyVisionRpu = x265_fopen(optarg, "rb");<br>-- <br>2.37.3.windows.1<br><br></div></div>