[Ffmpeg-devel] [PATCH] flacenc - lpc and options

Justin Ruggles jruggle
Sun Jul 2 05:33:22 CEST 2006


Michael Niedermayer wrote:
> [...]
> 
>>>[...]
>>>
>>>
>>>>+    /**
>>>>+     * sets audio frame size using frame duration in milliseconds
>>>>+     * - encoding: set by user.
>>>>+     * - decoding: unused.
>>>>+     */
>>>>+    int block_time_ms;
>>>
>>>
>>>iam a little unsure about this, maybe you could leave this one out for now
>>>and set it just based on compression_level
>>>
>>>[...]
>>>
>>
>>This was to give the user the option to set the block size. Do you think
>>the user should instead be able to set AVCodecContext.frame_size
>>explicitly before calling encode_init()?  Currently it is set by the
>>encoder only, but i see no reason not to let the user set it.  The
>>encoders currently don't check the value anyway and would just
>>over-write it with what it's supposed to be.  Would there be anything
>>wrong with some encoders checking first for a user-preferred value?  I
>>could change the comment to something like:
>>/**
>> * samples per packet.
>> * - encoding: set by user, but may be changed by 'init'.
>> * - decoding: set by lavc.
>> */
>>int frame_size;
>>
>>or would it be better to let the user set it and return an error if it
>>is an invalid value for that codec, like is done with most of the other
>>parameters?
> 
> 
> hmm, iam more in favor of check & error
> 
> [...]
> 

I took out block_time_ms and switched to using frame_size which already
has the ability to be set using AVOption. If frame_size > 0, it is used
for the block size. Otherwise, a predefined block size is used based on
the compression level. An error is returned if frame_size is
out-of-range for a valid FLAC file.

I have made a few other very minor changes as well.

-Justin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: flac-lpc.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060701/e22b4658/attachment.asc>



More information about the ffmpeg-devel mailing list