Messages in this thread | | | From | Ricardo Ribalda Delgado <> | Date | Mon, 18 Jul 2016 21:41:53 +0200 | Subject | Re: [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
| |