[x265] [PATCH] Encoder: avoid blocking in getEncodedPicture() for zero latency when multiple slices are enabled
Ashok Kumar Mishra
ashok at multicorewareinc.com
Mon Nov 13 15:34:05 CET 2017
Below are some results tested using threadpool with 20 threads and windows
OS. All the test cases used are one frame thread and multiple slices.
With 2 frame threads and multiple slices, performance is far exceeding 60
fps for 1080p.
*--input crowd_run_1080p50.y4m --bitrate 9000 --preset ultrafast --tune
zero-latency --slices 2 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 28.87
After - 38.25
*--input crowd_run_1080p50.y4m --bitrate 9000 --preset ultrafast --tune
zero-latency --slices 4 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 33.93
After - 48.2
*--input crowd_run_1080p50.y4m --bitrate 9000 --preset ultrafast --tune
zero-latency --slices 8 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 37.68
After - 54.62
*--input crowd_run_1080p50.y4m --bitrate 9000 --preset superfast --tune
zero-latency --slices 2 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 23.65
After - 33.38
*--input crowd_run_1080p50.y4m --bitrate 9000 --preset superfast --tune
zero-latency --slices 4 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 33.81
After - 45.18
*--input crowd_run_1080p50.y4m --bitrate 9000 --preset superfast --tune
zero-latency --slices 8 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 38.55
After - 48.05
*--input BasketballDrive_1920x1080_50.y4m --bitrate 9000 --preset ultrafast
--tune zero-latency --slices 2 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 31.67
After - 44.49
*--input BasketballDrive_1920x1080_50.y4m --bitrate 9000 --preset ultrafast
--tune zero-latency --slices 4 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 31.67
After - 44.49
*--input BasketballDrive_1920x1080_50.y4m --bitrate 9000 --preset ultrafast
--tune zero-latency --slices 4 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 41.53
After - 52.44
*--input BasketballDrive_1920x1080_50.y4m --bitrate 9000 --preset ultrafast
--tune zero-latency --slices 8 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 41.65
After - 54.57
*--input BasketballDrive_1920x1080_50.y4m --bitrate 9000 --preset superfast
--tune zero-latency --slices 2 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 24.27
After - 31.13
*--input BasketballDrive_1920x1080_50.y4m --bitrate 9000 --preset superfast
--tune zero-latency --slices 4 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 33.58
After - 46.82
*--input BasketballDrive_1920x1080_50.y4m --bitrate 9000 --preset superfast
--tune zero-latency --slices 8 -o test.hevc --csv
perf_slice_zero_latency_rainstick.csv*
Before - 37.31
After - 50.91
On Mon, Nov 13, 2017 at 7:27 PM, <ashok at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Ashok Kumar Mishra <ashok at multicorewareinc.com>
> # Date 1510320768 -19800
> # Fri Nov 10 19:02:48 2017 +0530
> # Node ID c4632652c590397bd875ee2ca05c8c2f1284f792
> # Parent 563cbe1f4a21dcfe2117ccaa874b713d94434f92
> Encoder: avoid blocking in getEncodedPicture() for zero latency when
> multiple slices are enabled
> Improved performance by 10 - 15 fps depending upon preset and number of
> slices.
>
> diff -r 563cbe1f4a21 -r c4632652c590 source/encoder/encoder.cpp
> --- a/source/encoder/encoder.cpp Wed Nov 08 17:08:18 2017 +0530
> +++ b/source/encoder/encoder.cpp Fri Nov 10 19:02:48 2017 +0530
> @@ -387,7 +387,7 @@
> }
> }
>
> - m_bZeroLatency = !m_param->bframes && !m_param->lookaheadDepth &&
> m_param->frameNumThreads == 1;
> + m_bZeroLatency = !m_param->bframes && !m_param->lookaheadDepth &&
> m_param->frameNumThreads == 1 && m_param->maxSlices == 1;
>
> m_aborted |= parseLambdaFile(m_param);
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20171113/4bc569f6/attachment-0001.html>
More information about the x265-devel
mailing list