[x265] [PATCH] limitTU: Save intra CU's TU depth when analysis save/load is enabled

Bhavna Hariharan bhavna at multicorewareinc.com
Wed Feb 14 11:37:47 CET 2018


This is an output changing commit for --limit-tu 3 and --limit-tu 4.


Thanks,

Bhavna Hariharan

On Wed, Feb 14, 2018 at 3:46 PM, <bhavna at multicorewareinc.com> wrote:

> # HG changeset patch
> # User Bhavna Hariharan <bhavna at multicorewareinc.com>
> # Date 1518603329 -19800
> #      Wed Feb 14 15:45:29 2018 +0530
> # Node ID 36ab263cc891e0cb5d3dd5ce2c80e35faa0ce996
> # Parent  01b685d6fa33aaab2b7f53aa1e1a2aec0a954025
> limitTU: Save intra CU's TU depth when analysis save/load is enabled
>
> This patch will cause a output mismatch between analysis save and load when
> limit-tu 3/4 is enabled. This change is expected as the load run will have
> only
> the best mode's TU information. For CUs where the neighbour's TU depth is
> unavailable, load encode will evaluate all TU detphs.
>
> diff -r 01b685d6fa33 -r 36ab263cc891 doc/reST/cli.rst
> --- a/doc/reST/cli.rst  Sat Feb 10 06:16:45 2018 +0100
> +++ b/doc/reST/cli.rst  Wed Feb 14 15:45:29 2018 +0530
> @@ -1029,7 +1029,13 @@
>         Level 4 - uses the depth of the neighbouring/ co-located CUs TU
> depth
>         to limit the 1st subTU depth. The 1st subTU depth is taken as the
>         limiting depth for the other subTUs.
> -
> +
> +       Enabling levels 3 or 4 may cause a mismatch in the output
> bitstreams
> +       between option:`--analysis-save` and option:`--analysis-load`
> +       as all neighbouring CUs TU depth may not be available in the
> +       option:`--analysis-load` run as only the best mode's information is
> +       available to it.
> +
>         Default: 0
>
>  .. option:: --nr-intra <integer>, --nr-inter <integer>
> diff -r 01b685d6fa33 -r 36ab263cc891 source/encoder/analysis.cpp
> --- a/source/encoder/analysis.cpp       Sat Feb 10 06:16:45 2018 +0100
> +++ b/source/encoder/analysis.cpp       Wed Feb 14 15:45:29 2018 +0530
> @@ -647,13 +647,12 @@
>          cacheCost[cuIdx] = md.bestMode->rdCost;
>      }
>
> -    /* Save Intra CUs TU depth only when analysis mode is OFF */
> -    if ((m_limitTU & X265_TU_LIMIT_NEIGH) && cuGeom.log2CUSize >= 4 &&
> (!m_param->analysisSave && !m_param->analysisLoad))
> +    if ((m_limitTU & X265_TU_LIMIT_NEIGH) && cuGeom.log2CUSize >= 4)
>      {
>          CUData* ctu = md.bestMode->cu.m_encData->
> getPicCTU(parentCTU.m_cuAddr);
>          int8_t maxTUDepth = -1;
>          for (uint32_t i = 0; i < cuGeom.numPartitions; i++)
> -            maxTUDepth = X265_MAX(maxTUDepth, md.pred[PRED_INTRA].cu.m_
> tuDepth[i]);
> +            maxTUDepth = X265_MAX(maxTUDepth,
> md.bestMode->cu.m_tuDepth[i]);
>          ctu->m_refTuDepth[cuGeom.geomRecurId] = maxTUDepth;
>      }
>
> diff -r 01b685d6fa33 -r 36ab263cc891 source/test/regression-tests.txt
> --- a/source/test/regression-tests.txt  Sat Feb 10 06:16:45 2018 +0100
> +++ b/source/test/regression-tests.txt  Wed Feb 14 15:45:29 2018 +0530
> @@ -23,7 +23,7 @@
>  BasketballDrive_1920x1080_50.y4m,--preset slower --lossless --chromaloc
> 3 --subme 0 --limit-tu 4
>  BasketballDrive_1920x1080_50.y4m,--preset slower --no-cutree
> --analysis-save x265_analysis.dat --analysis-reuse-level 10 --bitrate 7000
> --limit-tu 0::--preset slower --no-cutree --analysis-load x265_analysis.dat
> --analysis-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 --no-cutree
> --analysis-save x265_analysis.dat --bitrate 7000 --tskip-fast --limit-tu
> 4::--preset veryslow --no-cutree --analysis-load x265_analysis.dat
> --bitrate 7000  --tskip-fast --limit-tu 4
> +BasketballDrive_1920x1080_50.y4m,--preset veryslow --no-cutree
> --analysis-save x265_analysis.dat --bitrate 7000 --tskip-fast --limit-tu
> 2::--preset veryslow --no-cutree --analysis-load x265_analysis.dat
> --bitrate 7000  --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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180214/7089932e/attachment.html>


More information about the x265-devel mailing list