[x265] [PATCH] cutree: bug fixes. correct the timescale used in getQScale()
Deepthi Nandakumar
deepthi at multicorewareinc.com
Sat Dec 28 05:50:18 CET 2013
On Fri, Dec 27, 2013 at 11:07 PM, Aarthi Thirumalai <
aarthi at multicorewareinc.com> wrote:
> # HG changeset patch
> # User Aarthi Thirumalai
> # Date 1388165826 -19800
> # Fri Dec 27 23:07:06 2013 +0530
> # Node ID 964e5bc90ad2a0f80980409046a13b4cbaf11a03
> # Parent 8b5c5fe7fbc923684af45e5ff7a0ed5ed6e83db9
> cutree: bug fixes. correct the timescale used in getQScale()
>
> diff -r 8b5c5fe7fbc9 -r 964e5bc90ad2 source/encoder/ratecontrol.cpp
> --- a/source/encoder/ratecontrol.cpp Fri Dec 27 15:30:41 2013 +0530
> +++ b/source/encoder/ratecontrol.cpp Fri Dec 27 23:07:06 2013 +0530
> @@ -633,10 +633,11 @@
>
> if (cfg->param.rc.cuTree)
> {
> - double scale =
> curSlice->getSPS()->getVuiParameters()->getTimingInfo()->getTimeScale();
> - double units =
> curSlice->getSPS()->getVuiParameters()->getTimingInfo()->getNumUnitsInTick();
> - double timescale = units / scale;
> - q = pow(BASE_FRAME_DURATION / CLIP_DURATION(frameDuration *
> timescale), 1 - cfg->param.rc.qCompress);
> + // Scale and units are obtained from rateNum and rateDenom for
> videos with fixed frame rates.
> + double scale = cfg->param.frameRate * 2;
> + double numTicks = 1;
> + double timescale = numTicks / scale;
> + q = pow(BASE_FRAME_DURATION / CLIP_DURATION(2 * timescale), 1 -
> cfg->param.rc.qCompress);
>
Good catch. Currently, these SPS/VUI parameters arent even set.
}
> else
> q = pow(rce->blurredComplexity, 1 - cfg->param.rc.qCompress);
> diff -r 8b5c5fe7fbc9 -r 964e5bc90ad2 source/encoder/slicetype.cpp
> --- a/source/encoder/slicetype.cpp Fri Dec 27 15:30:41 2013 +0530
> +++ b/source/encoder/slicetype.cpp Fri Dec 27 23:07:06 2013 +0530
> @@ -1394,7 +1394,7 @@
> memset(Frames[b]->propagateCost, 0, widthInCU * sizeof(uint16_t));
>
> uint16_t StrideInCU = (uint16_t)widthInCU;
> - for (uint16_t block_y = 0; block_y < heightInCU; block_y += 16)
> + for (uint16_t block_y = 0; block_y < heightInCU; block_y++)
> {
> int cuIndex = block_y * StrideInCU;
> /* TODO This function go into ASM */
> @@ -1404,7 +1404,7 @@
>
> if (referenced)
> propagate_cost += widthInCU;
> - for (uint16_t block_x = 0; block_x < widthInCU; block_x += 16,
> cuIndex++)
> + for (uint16_t block_x = 0; block_x < widthInCU; block_x++,
> cuIndex++)
> {
> int propagate_amount = scratch[block_x];
> /* Don't propagate for an intra block. */
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20131228/738014dc/attachment.html>
More information about the x265-devel
mailing list