[x265] [PATCH 2 of 4] improve ctuLumaLevel logic by Sad and CMOV
Kavitha Sampath
kavitha at multicorewareinc.com
Thu Aug 13 14:22:50 CEST 2015
yes deepthi
I will update the change in copyFromPic.
On Thu, Aug 13, 2015 at 4:08 PM, Deepthi Nandakumar <
deepthi at multicorewareinc.com> wrote:
> Kavitha,
>
> Can you please pull this neat optimization of Min's into
> picyuv::copyFromPicture?
>
> On Thu, Aug 13, 2015 at 8:52 AM, Min Chen <chenm003 at 163.com> wrote:
>
>> # HG changeset patch
>> # User Min Chen <chenm003 at 163.com>
>> # Date 1439423217 25200
>> # Node ID 09846d1566428a73d70d2fcf2d50324c0dfbbb7f
>> # Parent f627a263bb5c1dcf274ab281a02670449ae891fc
>> improve ctuLumaLevel logic by Sad and CMOV
>> ---
>> source/encoder/frameencoder.cpp | 7 ++++---
>> 1 files changed, 4 insertions(+), 3 deletions(-)
>>
>> diff -r f627a263bb5c -r 09846d156642 source/encoder/frameencoder.cpp
>> --- a/source/encoder/frameencoder.cpp Wed Aug 12 16:35:27 2015 -0700
>> +++ b/source/encoder/frameencoder.cpp Wed Aug 12 16:46:57 2015 -0700
>> @@ -992,13 +992,14 @@
>> }
>>
>> /* calculate maximum and average luma levels */
>> - uint32_t ctuLumaLevel = 0;
>> + static const pixel dummy_zero[MAX_CU_SIZE] = {0};
>> + uint32_t ctuLumaLevel =
>> primitives.pu[best.fencYuv->m_part].sad(best.fencYuv->m_buf[0],
>> best.fencYuv->m_size, dummy_zero, 0);
>> uint32_t ctuNoOfPixels = best.fencYuv->m_size *
>> best.fencYuv->m_size;
>> for (uint32_t i = 0; i < ctuNoOfPixels; i++)
>> {
>> pixel p = best.fencYuv->m_buf[0][i];
>> - ctuLumaLevel += p;
>> - curRow.rowStats.maxLumaLevel = X265_MAX(p,
>> curRow.rowStats.maxLumaLevel);
>> + if (p > curRow.rowStats.maxLumaLevel)
>> + curRow.rowStats.maxLumaLevel = p;
>> }
>> curRow.rowStats.lumaLevel += (double)(ctuLumaLevel) /
>> ctuNoOfPixels;
>>
>>
>> _______________________________________________
>> x265-devel mailing list
>> x265-devel at videolan.org
>> https://mailman.videolan.org/listinfo/x265-devel
>>
>
>
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
>
--
Regards,
Kavitha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20150813/fd16de9a/attachment.html>
More information about the x265-devel
mailing list