lkml.org 
[lkml]   [2016]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 09/12] [media] vivid: Local optimization
Hi Philipp:

On Mon, Jul 18, 2016 at 4:16 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:

> I had the best looking result with this variant, btw:
>
> y >>= 4;
> cb >>= 4;
> cr >>= 4;
> if (tpg->real_quantization == V4L2_QUANTIZATION_LIM_RANGE) {
> y = clamp(y, 16, 235);
> cb = clamp(cb, 16, 240);
> cr = clamp(cr, 16, 240);
> } else {
> y = clamp(y, 1, 254);
> cb = clamp(cb, 1, 254);
> cr = clamp(cr, 1, 254);
> }

I like this variant much better than mine. I have applied to my local
tree. So it will be what I post on v5

Thanks for you comments :)


btw: it is scary what the compiler optimizations are capable of doing these days


--
Ricardo Ribalda

\
 
 \ /
  Last update: 2016-07-18 22:21    [W:0.340 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site