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( ... )
> {


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to