[FFmpeg-devel] [RFC] libavfilter audio API and related issues
S.N. Hemanth Meenakshisundaram
smeenaks
Tue Jul 6 10:54:52 CEST 2010
> On Thu, Jul 01, 2010 at 01:51:36AM -0700, S.N. Hemanth Meenakshisundaram
> wrote:
>> On 07/01/2010 01:42 AM, S.N. Hemanth Meenakshisundaram wrote:
>>> On 06/25/2010 05:10 PM, Stefano Sabatini wrote:
>>>> On date Friday 2010-06-25 03:52:45 -0700, S.N. Hemanth
>>>> Meenakshisundaram
>>>> encoded:
>>>>> [...]
>>>>
>>>
>>> [...]
>>
>> libavutil changes - some common functions moved from lavc to avoid lavfi
>> dependence on lavc.
Updated libavutil patch for sample format/channel layout utilities with
fixes based on comments.
>>
>> [...]
> is there a reason not to access the table directly?
> this large number of accessor functions are a bit ugly in a lib that
really isnt specific to audio
Now removed the accessor functions and made the SampleFmtInfo table &
sample_fmt_info structure externally visible for direct access similar to
AVPixFmtDescriptor access.
>
>
>> +
>> [...]
>> +
>> +static const char *get_channel_name(int channel_id)
>> +{
>> + if (channel_id<0 || channel_id>=FF_ARRAY_ELEMS(channel_names))
>> + return NULL;
>> + return channel_names[channel_id];
>> +}
>
> just as an internal function this seems useless, direct table access
> make more sense
Removed internal function. Now accessing directly.
>
>
>> +
>> [...]
>
> av_guess_channel_layout() can be implemented by picking the first match
> from channel_layout_map
Done.
>
>
>> [...]
>> +int av_channel_layout_num_channels(int64_t channel_layout)
>> [...]
>
> thats a count of set bits aka population count aka hamming weight
> if we dont have a function for this yet it makes sense to add one with
> appropriate name. Theres no point though to have a function specific
> to audio channels.
Renamed to av_get_hamming_weight and made variable names generic but not
sure where to move it. Should I move this function to common.h or
internal.h in libavutil? I couldn't find an existing function that already
does this. Is there one?
Patch follows
-------------- next part --------------
A non-text attachment was scrubbed...
Name: audio_avutil.diff
Type: text/x-patch
Size: 13560 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100706/422dd5d4/attachment.bin>
More information about the ffmpeg-devel
mailing list