[FFmpeg-devel] [libav-devel] [RFC] Cineform HD questions

James Darnley james.darnley at gmail.com
Thu Dec 31 12:59:20 CET 2015


On 2015-12-31 07:02, Kieran Kunhya wrote:
>> Apart from that, again from a quick glance, there are a ton of
>> mallocs/frees. Can these somehow get consolidated?
> 
> Yes, that's what I don't know how to solve easily. They should of
> course be a single allocated buffer that's reused.

Forgive me if I missed something but aren't they just mallocs of a
static size? Space for 8M int16_t each?  Just sum that up and do 1 malloc.

It could even move into an the init function rather than per frame.  Put
one variable or each variable into the private context struct.  If it
aids performance perhaps assign a local variable to each one in the
decode function.

I haven't read the code in detail but I will point out that you have
many style issues.  A space should follow if and while keywords before
the opening parenthesis and the opening brace should be on the same line
too.  I.e.
> if (...) {
not
> if( ... )
> {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 603 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151231/e52201bf/attachment.sig>


More information about the ffmpeg-devel mailing list