[FFmpeg-devel] [PATCH 4/4] avfilter/vf_colormatrix: add 10 & 12 bit depth support

Thomas Mundt loudmax at yahoo.de
Sun Mar 27 13:09:16 CEST 2016


>>>Ronald S. Bultje <rsbultje at gmail.com> schrieb am Sa, 26.3.2016:
> On Sat, Mar 26, 2016 at 10:04 AM, Thomas Mundt <loudmax-at-yahoo.de at ffmpeg.org> wrote:
> 
>>>>>Kieran Kunhya <kierank at obe.tv> schrieb am Sa, 26.3.2016:
>> >> On Fri, 25 Mar 2016 at 22:32 Thomas Mundt <loudmax-at-yahoo.de at> ffmpeg.org> wrote:
>> >
>> >> Signed-off-by: Thomas Mundt <loudmax at yahoo.de>
>> >> ---
>> >>  libavfilter/vf_colormatrix.c | 182
>> >> ++++++++++++++++++++++++++++++++++++++++++-
>> >>
>>> >
>> > These functions are basically the same, have you considered factoring the
>> > code out?
>> >
>> > Kieran
>>
>> I thought keeping it seperate would be easier to review.
>> But I can do that. Maybe as a subsequent patch?
>
>
> I think he means templating out typelessly like h264/hevc/vp9 do. I agree
> that would probably be nicer. Binary size is same but less duplicated code.
> 
> Ronald

Okay, I tried to solve this with the use of macros. The attached file is the result (interesting part starting at line 203).
It works, but I´m not sure if this is what you expect.
Also I didn´t find a way factoring out the two different av_clip.
One could replace av_clip_uint8 by av_clip with limits 0 and 255. But this would have an impact on speed.
If there is a more elegant way, could you please provide a short example?!

Happy Easter!
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vf_colormatrix.c
Type: text/x-chdr
Size: 21180 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160327/bb29486e/attachment.h>


More information about the ffmpeg-devel mailing list