[x265] [PATCH]Deprecating pmode and pme features

Yaswanth Sastry yaswanth.sastry at multicorewareinc.com
Mon Nov 18 16:04:13 UTC 2024


>From 63e81aa126caa5c9de263634a20af2a8eb85324a Mon Sep 17 00:00:00 2001
From: yaswanthsastry <yaswanth.sastry at multicorewareinc.com>
Date: Mon, 18 Nov 2024 20:49:25 +0530
Subject: [PATCH] Deprecating pmode and pme features

---
 doc/reST/cli.rst                 | 30 +++++++++++++++---------------
 source/test/regression-tests.txt |  6 ------
 source/test/smoke-tests.txt      |  2 --
 source/x265cli.cpp               | 10 ++++++++++
 4 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/doc/reST/cli.rst b/doc/reST/cli.rst
index f9e7818ca..6bb99f92e 100755
--- a/doc/reST/cli.rst
+++ b/doc/reST/cli.rst
@@ -301,8 +301,8 @@ Performance Options
  in the system doesn't obey this constraint, we may spawn fewer threads
  than cores which has been empirically shown to be better for performance.

- If the four pool features: :option:`--wpp`, :option:`--pmode`,
- :option:`--pme` and :option:`--lookahead-slices` are all disabled,
+ If the four pool features: :option:`--wpp`, :option:`--pmode(deprecated)`,
+ :option:`--pme(deprecated)` and :option:`--lookahead-slices` are all
disabled,
  then :option:`--pools` is ignored and no thread pools are created.

  If "none" is specified, then all four of the thread pool features are
@@ -344,7 +344,7 @@ Performance Options

  Default: Enabled

-.. option:: --pmode, --no-pmode
+.. option:: --pmode, --no-pmode ( deprecated from release 4.1 )

  Parallel mode decision, or distributed mode analysis. When enabled
  the encoder will distribute the analysis work of each CU (merge,
@@ -354,31 +354,31 @@ Performance Options
  6 there is generally always enough work to distribute to warrant the
  overhead, assuming your CPUs are not already saturated.

- --pmode will increase utilization without reducing compression
+ --pmode(deprecated) will increase utilization without reducing compression
  efficiency. In fact, since the modes are all measured in parallel it
  makes certain early-outs impractical and thus you usually get
  slightly better compression when it is enabled (at the expense of
  not skipping improbable modes). This bypassing of early-outs can
- cause pmode to slow down encodes, especially at faster presets.
+ cause pmode(deprecated) to slow down encodes, especially at faster
presets.

  This feature is implicitly disabled when no thread pool is present.

  Default disabled

-.. option:: --pme, --no-pme
+.. option:: --pme, --no-pme ( deprecated from release 4.1 )

  Parallel motion estimation. When enabled the encoder will distribute
  motion estimation across multiple worker threads when more than two
  references require motion searches for a given CU. Only recommended
- if x265 is not already saturating CPU cores. :option:`--pmode` is
+ if x265 is not already saturating CPU cores.
:option:`--pmode(deprecated)` is
  much more effective than this option, since the amount of work it
- distributes is substantially higher. With --pme it is not unusual
+ distributes is substantially higher. With --pme(deprecated) it is not
unusual
  for the overhead of distributing the work to outweigh the
  parallelism benefits.

  This feature is implicitly disabled when no thread pool is present.

- --pme will increase utilization on many core systems with no effect
+ --pme(deprecated) will increase utilization on many core systems with no
effect
  on the output bitstream.

  Default disabled
@@ -932,14 +932,14 @@ will not reuse analysis if slice type parameters do
not match.
 .. option:: --analysis-save <filename>

  Encoder outputs analysis information of each frame. Analysis data from
save mode is
- written to the file specified. Requires cutree, pmode to be off. Default
disabled.
+ written to the file specified. Requires cutree, pmode(deprecated) to be
off. Default disabled.

  The amount of analysis data stored is determined by
:option:`--analysis-save-reuse-level`.

 .. option:: --analysis-load <filename>

  Encoder reuses analysis information from the file specified. By reading
the analysis data written by
- an earlier encode of the same sequence, substantial redundant work may be
avoided. Requires cutree, pmode
+ an earlier encode of the same sequence, substantial redundant work may be
avoided. Requires cutree, pmode(deprecated)
  to be off. Default disabled.

  The amount of analysis data reused is determined by
:option:`--analysis-load-reuse-level`.
@@ -1845,8 +1845,8 @@ Quality, rate control and rate distortion options
  In pass 1 analysis information like motion vector, depth, reference and
prediction
  modes of the final best CTU partition is stored for each CTU.
  Multipass analysis refinement cannot be enabled when
:option:`--analysis-save`/:option:`--analysis-load`
- is enabled and both will be disabled when enabled together. This feature
requires :option:`--pmode`/:option:`--pme`
- to be disabled and hence pmode/pme will be disabled when enabled at the
same time.
+ is enabled and both will be disabled when enabled together. This feature
requires :option:`--pmode(deprecated)`/:option:`--pme(deprecated)`
+ to be disabled and hence pmode/pme(deprecated) will be disabled when
enabled at the same time.

  Default: disabled.

@@ -1857,8 +1857,8 @@ Quality, rate control and rate distortion options
  distortion get lower(negative)qp offsets and vice-versa for low
distortion CTUs in pass 2.
  This helps to improve the subjective quality.
  Multipass refinement of qp cannot be enabled when
:option:`--analysis-save`/:option:`--analysis-load`
- is enabled and both will be disabled when enabled together. It requires
:option:`--pmode`/:option:`--pme` to be
- disabled and hence pmode/pme will be disabled when enabled along with it.
+ is enabled and both will be disabled when enabled together. It requires
:option:`--pmode`(deprecated)/:option:`--pme(deprecated)` to be
+ disabled and hence pmode/pme(deprecated) will be disabled when enabled
along with it.

  Default: disabled.

diff --git a/source/test/regression-tests.txt
b/source/test/regression-tests.txt
index ed41b416d..875a4d2eb 100644
--- a/source/test/regression-tests.txt
+++ b/source/test/regression-tests.txt
@@ -22,12 +22,10 @@ BasketballDrive_1920x1080_50.y4m,--preset medium
--analysis-save x265_analysis.d
 BasketballDrive_1920x1080_50.y4m,--preset slow --nr-intra 100 -F4
--aq-strength 3 --qg-size 16 --limit-refs 1
 BasketballDrive_1920x1080_50.y4m,--preset slower --lossless --chromaloc 3
--subme 0 --limit-tu 4
 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
-BasketballDrive_1920x1080_50.y4m,--preset veryslow --crf 4 --cu-lossless
--pmode --limit-refs 1 --aq-mode 3 --limit-tu 3
 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
 BasketballDrive_1920x1080_50.y4m,--preset veryslow --recon-y4m-exec
"ffplay -i pipe:0 -autoexit"
 Coastguard-4k.y4m,--preset ultrafast --recon-y4m-exec "ffplay -i pipe:0
-autoexit"
 Coastguard-4k.y4m,--preset superfast --tune grain --overscan=crop
-Coastguard-4k.y4m,--preset superfast --tune grain --pme --aq-strength 2
--merange 190
 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
 Coastguard-4k.y4m,--preset medium --rdoq-level 1 --tune ssim --no-signhide
--me umh --slices 2
 Coastguard-4k.y4m,--preset slow --tune psnr --cbqpoffs -1 --crqpoffs 1
--limit-refs 1
@@ -60,14 +58,12 @@ FourPeople_1280x720_60.y4m,--preset medium --qp 38
--no-psy-rd
 FourPeople_1280x720_60.y4m,--preset medium --recon-y4m-exec "ffplay -i
pipe:0 -autoexit"
 FourPeople_1280x720_60.y4m,--preset veryslow --numa-pools "none"
 Keiba_832x480_30.y4m,--preset superfast --no-fast-intra --nr-intra 1000 -F4
-Keiba_832x480_30.y4m,--preset medium --pmode --tune grain
 Keiba_832x480_30.y4m,--preset slower --fast-intra --nr-inter 500 -F4
--limit-refs 0
 Kimono1_1920x1080_24_10bit_444.yuv,--preset superfast --weightb
 Kimono1_1920x1080_24_10bit_444.yuv,--preset medium --min-cu-size 32
 KristenAndSara_1280x720_60.y4m,--preset ultrafast --strong-intra-smoothing
 KristenAndSara_1280x720_60.y4m,--preset superfast --min-cu-size 16
--qg-size 16 --limit-refs 1
 KristenAndSara_1280x720_60.y4m,--preset medium --no-cutree --max-tu-size 16
-KristenAndSara_1280x720_60.y4m,--preset slower --pmode --max-tu-size 8
--limit-refs 0 --limit-modes --limit-tu 1
 NebutaFestival_2560x1600_60_10bit_crop.yuv,--preset superfast --tune psnr
 NebutaFestival_2560x1600_60_10bit_crop.yuv,--preset medium --tune grain
--limit-refs 2
 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
@@ -76,13 +72,11 @@ News-4k.y4m,--preset superfast --lookahead-slices 6
--aq-mode 0
 News-4k.y4m,--preset superfast --slices 4 --aq-mode 0
 News-4k.y4m,--preset medium --tune ssim --no-sao --qg-size 16
 News-4k.y4m,--preset veryslow --rskip 0
-News-4k.y4m,--preset veryslow --pme --crf 40
 OldTownCross_1920x1080_50_10bit_422.yuv,--preset superfast --weightp
 OldTownCross_1920x1080_50_10bit_422.yuv,--preset medium --no-weightp
 OldTownCross_1920x1080_50_10bit_422.yuv,--preset slower --tune fastdecode
 ParkScene_1920x1080_24_10bit_444.yuv,--preset superfast --weightp
--lookahead-slices 4
 ParkScene_1920x1080_24.y4m,--preset medium --qp 40 --rdpenalty 2
--tu-intra-depth 3
-ParkScene_1920x1080_24.y4m,--preset medium --pme --tskip-fast --tskip
--min-keyint 48 --weightb --limit-refs 3
 ParkScene_1920x1080_24.y4m,--preset slower --no-weightp
 ParkScene_1920x1080_24.y4m,--tune grain --aq-motion
 RaceHorses_416x240_30.y4m,--preset superfast --no-cutree
diff --git a/source/test/smoke-tests.txt b/source/test/smoke-tests.txt
index a88a225b4..89f8ce452 100644
--- a/source/test/smoke-tests.txt
+++ b/source/test/smoke-tests.txt
@@ -8,10 +8,8 @@ big_buck_bunny_360p24.y4m,--preset=medium --bitrate 1000
-F4 --cu-lossless --sca
 big_buck_bunny_360p24.y4m,--preset=slower --no-weightp --qg-size 16
 washdc_422_ntsc.y4m,--preset=faster --no-strong-intra-smoothing --keyint 1
--qg-size 16
 washdc_422_ntsc.y4m,--preset=medium --qp 40 --nr-inter 400 -F4
-washdc_422_ntsc.y4m,--preset=veryslow --pmode --tskip --rdoq-level 0
 old_town_cross_444_720p50.y4m,--preset=ultrafast --weightp --keyint -1
 old_town_cross_444_720p50.y4m,--preset=fast --keyint 20 --min-cu-size 16
-old_town_cross_444_720p50.y4m,--preset=slow --sao-non-deblock --pmode
--qg-size 32
 RaceHorses_416x240_30_10bit.yuv,--preset=veryfast --max-tu-size 8
 RaceHorses_416x240_30_10bit.yuv,--preset=slower --bitrate 500 -F4
--rdoq-level 1
 CrowdRun_1920x1080_50_10bit_444.yuv,--preset=ultrafast --constrained-intra
--min-keyint 5 --keyint 10
diff --git a/source/x265cli.cpp b/source/x265cli.cpp
index a7d5f492a..7a892d043 100755
--- a/source/x265cli.cpp
+++ b/source/x265cli.cpp
@@ -787,6 +787,16 @@ namespace X265_NS {
                     if (!this->qpfile)
                         x265_log_file(param, X265_LOG_ERROR, "%s qpfile
not found or error in opening qp file\n", optarg);
                 }
+                OPT("pme")
+                {
+                    x265_log_file(param, X265_LOG_ERROR, " pme feature is
deprecated from release 4.1 \n", optarg);
+                    return true;
+                }
+                OPT("pmode")
+                {
+                    x265_log_file(param, X265_LOG_ERROR, " pmode feature
is deprecated from release 4.1 \n", optarg);
+                    return true;
+                }
                 OPT("dolby-vision-rpu")
                 {
                     this->dolbyVisionRpu = x265_fopen(optarg, "rb");
-- 
2.37.3.windows.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20241118/fa4ca4bd/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: application/octet-stream
Size: 12344 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20241118/fa4ca4bd/attachment-0001.obj>


More information about the x265-devel mailing list