[x265] [PATCH] analysis: patch to be added for quality improvement

Ashok Kumar Mishra ashok at multicorewareinc.com
Tue Jun 23 17:33:21 CEST 2015


Following are the test results for veryslow preset and different thresholds.

*CROWD_RUN - VERYSLOW PRESET*
*---------------------------*
*Before Applying patch (current tip)*
D:\ashok>x265_b_5.exe \\HEVC-TEST-2\testsequences\crowd_run_1080p50.y4m -f
500 -o test_b_5.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 970.06s (0.52 fps), 5913.83 kb/s, Avg QP:40.38,
Global PSNR: 30.595, SSIM Mean Y: 0.8113238 ( 7.243 dB)

*After applying re-order patch*
D:\ashok>x265_a_5.exe \\HEVC-TEST-2\testsequences\crowd_run_1080p50.y4m -f
500 -o test_a_5.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 870.74s (0.57 fps), 5913.88 kb/s, Avg QP:40.35,
Global PSNR: 30.568, SSIM Mean Y: 0.8101584 ( 7.216 dB)

*Thresholds applied inside recursionDepthCheck()*
*if (curCost < avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\crowd_run_1080p50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 1060.48s (0.47 fps), 5915.13 kb/s, Avg QP:40.42,
Global PSNR: 30.595, SSIM Mean Y: 0.8109589 ( 7.234 dB)

*if (16 * curCost < 17 * avgCost && avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\crowd_run_1080p50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 1017.30s (0.49 fps), 5915.71 kb/s, Global PSNR:
30.593, SSIM Mean Y: 0.8108923 ( 7.233 dB)

*if (16 * curCost < 18 * avgCost && avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\crowd_run_1080p50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 999.85s (0.50 fps), 5914.92 kb/s, Global PSNR:
30.590, SSIM Mean Y: 0.8106346 ( 7.227 dB)

*if (16 * curCost < 19 * avgCost && avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\crowd_run_1080p50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 980.95s (0.51 fps), 5916.13 kb/s, Global PSNR:
30.589, SSIM Mean Y: 0.8107235 ( 7.229 dB)

*if (16 * curCost < 20 * avgCost && avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\crowd_run_1080p50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 966.46s (0.52 fps), 5916.07 kb/s, Global PSNR:
30.584, SSIM Mean Y: 0.8105423 ( 7.225 dB)


*****************************************************************************************************
*BASKETBALL - VERYSLOW*
*Before Applying patch (current tip)*
D:\ashok>x265_b.exe C:\testsequences\BasketballDrive_1920x1080_50.y4m -f
500 -o test_b.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 1007.17s (0.50 fps), 6031.79 kb/s, Global PSNR:
38.690, SSIM Mean Y: 0.9101092 (10.463 dB)

*After applying re-order patch*
D:\ashok>x265_a.exe C:\testsequences\BasketballDrive_1920x1080_50.y4m -f
500 -o test_a.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 948.07s (0.53 fps), 6030.40 kb/s, Global PSNR:
38.687, SSIM Mean Y: 0.9100968 (10.462 dB)

*Thresholds applied inside recursionDepthCheck()*
*if (curCost < avgCost)*
D:\ashok>x265.exe C:\testsequences\BasketballDrive_1920x1080_50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 1071.75s (0.47 fps), 6031.65 kb/s, Avg QP:31.01,
Global PSNR: 38.692, SSIM Mean Y: 0.9101030 (10.463 dB)

*if (16 * curCost < 17 * avgCost )*
D:\ashok>x265.exe C:\testsequences\BasketballDrive_1920x1080_50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 1038.35s (0.48 fps), 6031.52 kb/s, Global PSNR:
38.690, SSIM Mean Y: 0.9100965 (10.462 dB)

*if (16 * curCost < 18 * avgCost )*
D:\ashok>x265.exe C:\testsequences\BasketballDrive_1920x1080_50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 1016.25s (0.49 fps), 6031.74 kb/s, Global PSNR:
38.690, SSIM Mean Y: 0.9100760 (10.461 dB)

*if (16 * curCost < 19 * avgCost )*
D:\ashok>x265.exe C:\testsequences\BasketballDrive_1920x1080_50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 1000.71s (0.50 fps), 6032.30 kb/s, Global PSNR:
38.689, SSIM Mean Y: 0.9100497 (10.460 dB)

*if (16 * curCost < 20 * avgCost )*
D:\ashok>x265.exe C:\testsequences\BasketballDrive_1920x1080_50.y4m -f 500
-o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 988.74s (0.51 fps), 6031.83 kb/s, Global PSNR:
38.690, SSIM Mean Y: 0.9100555 (10.460 dB)


***************************************************************************************************************
*DUCKSTAKEOFF - VERYSLOW*
*Before Applying patch (current tip)*
D:\ashok>x265_b_5.exe
\\HEVC-TEST-2\testsequences\ducks_take_off_1080p50.y4m -f 500 -o
test_b_5.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 842.82s (0.59 fps), 6087.13 kb/s, Avg QP:40.72,
Global PSNR: 29.628, SSIM Mean Y: 0.7810376 ( 6.596 dB)

*After Applying re-order patch*
D:\ashok>x265_a_5.exe
\\HEVC-TEST-2\testsequences\ducks_take_off_1080p50.y4m -f 500 -o
test_a_5.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr --tune=ssim
--bitrate 6000
encoded 500 frames in 825.97s (0.61 fps), 6087.05 kb/s, Avg QP:40.72,
Global PSNR: 29.627, SSIM Mean Y: 0.7808962 ( 6.594 dB)

*Thresholds applied inside recursionDepthCheck()*
*if (curCost < avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\ducks_take_off_1080p50.y4m -f
500 -o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 965.32s (0.52 fps), 6087.36 kb/s, Avg QP:40.73,
Global PSNR: 29.628, SSIM Mean Y: 0.7809929 ( 6.595 dB)

*if (16 * curCost < 17 * avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\ducks_take_off_1080p50.y4m -f
500 -o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 915.41s (0.55 fps), 6086.84 kb/s, Avg QP:40.73,
Global PSNR: 29.628, SSIM Mean Y: 0.7809432 ( 6.594 dB)

*if (16 * curCost < 18 * avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\ducks_take_off_1080p50.y4m -f
500 -o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 879.65s (0.57 fps), 6085.83 kb/s, Avg QP:40.73,
Global PSNR: 29.627, SSIM Mean Y: 0.7809602 ( 6.595 dB)

*if (16 * curCost < 19 * avgCost)*
D:\ashok>x265.exe \\HEVC-TEST-2\testsequences\ducks_take_off_1080p50.y4m -f
500 -o test.hevc -r recon.y4m --hash 1 -p veryslow --ssim --psnr
--tune=ssim --bitrate 6000
encoded 500 frames in 857.44s (0.58 fps), 6087.36 kb/s, Avg QP:40.73,
Global PSNR: 29.627, SSIM Mean Y: 0.7809371 ( 6.594 dB)


******************************************************************************************************
*ELFUENTE- VERYSLOW(2000 frames)*
*Before Applying Patch(current tip)*
D:\ashok>x265_b_5.exe
\\HEVC-TEST-2\testsequences\ElFuente_1920x1080_2997fps_8bit.yuv --input-res
1920x1080 -f 2000 --fps 29.97 -o test_b_5.hevc -r recon.yuv --hash 1 -p
veryslow --ssim --psnr --tune=ssim --bitrate 6000
encoded 2000 frames in 3783.78s (0.53 fps), 6327.43 kb/s, Avg QP:19.53,
Global PSNR: 53.717, SSIM Mean Y: 0.9862528 (18.618 dB)

*After applying re-order patch*
D:\ashok>x265_a_5.exe
\\HEVC-TEST-2\testsequences\ElFuente_1920x1080_2997fps_8bit.yuv --input-res
1920x1080 -f 2000 --fps 29.97 -o test_a_5.hevc -r recon.yuv --hash 1 -p
veryslow --ssim --psnr --tune=ssim --bitrate 6000
encoded 2000 frames in 3561.98s (0.56 fps), 6327.02 kb/s, Avg QP:19.52,
Global PSNR: 53.715, SSIM Mean Y: 0.9862407 (18.614 dB)

*Thresholds applied inside recursionDepthCheck()*
*if (curCost < avgCost)*
D:\ashok>x265.exe
\\HEVC-TEST-2\testsequences\ElFuente_1920x1080_2997fps_8bit.yuv --input-res
1920x1080 -f 2000 --fps 29.97 -o test.hevc -r recon.yuv --hash 1 -p
veryslow --ssim --psnr --tune=ssim --bitrate 6000
encoded 2000 frames in 4072.77s (0.49 fps), 6325.48 kb/s, Avg QP:19.53,
Global PSNR: 53.712, SSIM Mean Y: 0.9862487 (18.617 dB)

*if (16 * curCost < 17 * avgCost)*
D:\ashok>x265.exe
\\HEVC-TEST-2\testsequences\ElFuente_1920x1080_2997fps_8bit.yuv --input-res
1920x1080 -f 2000 --fps 29.97 -o test.hevc -r recon.yuv --hash 1 -p
veryslow --ssim --psnr --tune=ssim --bitrate 6000
encoded 2000 frames in 3897.01s (0.51 fps), 6326.22 kb/s, Avg QP:19.53,
Global PSNR: 53.729, SSIM Mean Y: 0.9862480 (18.616 dB)

*if (16 * curCost < 18 * avgCost)*
D:\ashok>x265.exe
\\HEVC-TEST-2\testsequences\ElFuente_1920x1080_2997fps_8bit.yuv --input-res
1920x1080 -f 2000 --fps 29.97 -o test.hevc -r recon.yuv --hash 1 -p
veryslow --ssim --psnr --tune=ssim --bitrate 6000
encoded 2000 frames in 3784.88s (0.53 fps), 6326.61 kb/s, Avg QP:19.53,
Global PSNR: 53.713, SSIM Mean Y: 0.9862482 (18.616 dB)

*if (16 * curCost < 19 * avgCost)*
D:\ashok>x265.exe
\\HEVC-TEST-2\testsequences\ElFuente_1920x1080_2997fps_8bit.yuv --input-res
1920x1080 -f 2000 --fps 29.97 -o test.hevc -r recon.yuv --hash 1 -p
veryslow --ssim --psnr --tune=ssim --bitrate 6000
encoded 2000 frames in 3726.63s (0.54 fps), 6326.28 kb/s, Avg QP:19.53,
Global PSNR: 53.724, SSIM Mean Y: 0.9862465 (18.616 dB)

On Tue, Jun 23, 2015 at 8:45 PM, <ashok at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Ashok Kumar Mishra<ashok at multicorewareinc.com>
> # Date 1435071902 -19800
> #      Tue Jun 23 20:35:02 2015 +0530
> # Node ID fd198cab8822018343056442f8c18878fcbdf2ba
> # Parent  0ea7f7c9544ffdf67c35e234dcf6ca1abbf83c2c
> analysis: patch to be added for quality improvement
>
> diff -r 0ea7f7c9544f -r fd198cab8822 source/encoder/analysis.cpp
> --- a/source/encoder/analysis.cpp       Thu May 21 19:16:28 2015 +0530
> +++ b/source/encoder/analysis.cpp       Tue Jun 23 20:35:02 2015 +0530
> @@ -1177,7 +1177,10 @@
>          md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);
>          md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);
>          checkMerge2Nx2N_rd5_6(md.pred[PRED_SKIP], md.pred[PRED_MERGE],
> cuGeom, false);
> -        foundSkip = md.bestMode && !md.bestMode->cu.getQtRootCbf(0);
> +
> +        /*Don't split if SKIP mode RD cost is less than neighbor CU's RD
> cost*/
> +        if (md.bestMode && md.bestMode->cu.isSkipped(0))
> +            foundSkip = recursionDepthCheck(parentCTU, cuGeom,
> *md.bestMode);
>      }
>
>      // estimate split cost
> @@ -1325,6 +1328,16 @@
>      if (mightSplit && !foundSkip)
>          checkBestMode(md.pred[PRED_SPLIT], depth);
>
> +    if (mightNotSplit)
> +    {
> +        /* early-out statistics */
> +        FrameData& curEncData = *m_frame->m_encData;
> +        FrameData::RCStatCU& cuStat =
> curEncData.m_cuStat[parentCTU.m_cuAddr];
> +        uint64_t temp = cuStat.avgCost[depth] * cuStat.count[depth];
> +        cuStat.count[depth] += 1;
> +        cuStat.avgCost[depth] = (temp + md.bestMode->rdCost) /
> cuStat.count[depth];
> +    }
> +
>      /* Copy best data to encData CTU and recon */
>      md.bestMode->cu.copyToPic(depth);
>      md.bestMode->reconYuv.copyToPicYuv(*m_frame->m_reconPic,
> parentCTU.m_cuAddr, cuGeom.absPartIdx);
> @@ -2024,7 +2037,9 @@
>      {
>          uint64_t avgCost = ((3 * cuCost) + (2 * neighCost)) / ((3 *
> cuCount) + (2 * neighCount));
>          uint64_t curCost = m_param->rdLevel > 1 ? bestMode.rdCost :
> bestMode.sa8dCost;
> -        if (curCost < avgCost && avgCost)
> +        bool bEarlySkip = m_param->rdLevel >= 5 ? (16 * curCost < 19 *
> avgCost) : (curCost < avgCost && avgCost);
> +
> +        if (bEarlySkip)
>              return true;
>      }
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150623/bcbf0f76/attachment-0001.html>


More information about the x265-devel mailing list