[FFmpeg-devel] [RFC/PATCH 6/8] tidsp: add mp4v configuration

Felipe Contreras felipe.contreras
Tue Sep 7 12:29:23 CEST 2010


On Tue, Sep 7, 2010 at 12:57 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Tue, Sep 07, 2010 at 12:44:12PM +0300, Felipe Contreras wrote:
>> On Tue, Sep 7, 2010 at 5:45 AM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
>> > On Sun, Sep 5, 2010 at 6:15 PM, Felipe Contreras
>> > <felipe.contreras at gmail.com> wrote:
>> >> +struct mp4vdec_args {
>> >> + ? ? ? uint32_t size;
>> >> + ? ? ? uint16_t num_streams;
>> >> +
>> >> + ? ? ? uint16_t in_id;
>> >> + ? ? ? uint16_t in_type;
>> >> + ? ? ? uint16_t in_count;
>> >> +
>> >> + ? ? ? uint16_t out_id;
>> >> + ? ? ? uint16_t out_type;
>> >> + ? ? ? uint16_t out_count;
>> >> +
>> >> + ? ? ? uint16_t reserved;
>> >> +
>> >> + ? ? ? uint32_t max_width;
>> >> + ? ? ? uint32_t max_height;
>> >> + ? ? ? uint32_t color_format;
>> >> + ? ? ? uint32_t max_framerate;
>> >> + ? ? ? uint32_t max_bitrate;
>> >> + ? ? ? uint32_t endianness;
>> >> + ? ? ? uint32_t profile;
>> >> + ? ? ? int32_t max_level;
>> >> + ? ? ? uint32_t mode;
>> >> + ? ? ? int32_t preroll;
>> >> + ? ? ? uint32_t display_width;
>> >> +};
>> >
>> > What are all these?
>>
>> These are arguments needed to start the DSP algorithm.
>>
>> > Why are they specifically-sized fields? Can you
>> > document some of them? Do they describe bitstream (in which case they
>> > should likely be read from AVCodecContext rather than be copied here,
>> > no?)? Do they describe the system (e.g. endianness, in which case you
>> > shouldn't make it a variable since it's highly unlikely that halfway
>> > the movie, the endianness of the running system will switch)? Do they
>> > describe the hardware (max_bitrate - is that static or configurable or
>> > dependent on hardware/driver version?)?
>>
>> You can think of a DSP algorithm as a normal program, written in C
>> code even, except that it runs in a separate processor (C64x). You
>> communicate to it through the tidspbridge driver, and each algorithm
>> requires different arguments, but of course the fields have to have
>> specific sizes.
>
> one would expect that such a communication struct be in a header and
> documented

Right, but AFAIK there's no documentation. This is the best link I
could find describing what I originally used to write such struct:
http://lxr.post-tech.com/source/hardware/ti/omap3/omx/video/src/openmax_il/video_decode/inc/OMX_VideoDec_DSP.h

If you want proper documentation, and a library that properly provides
access to all these fields, I guess you should contact a TI
representative. That's not something I can do, nor am I interested in
doing, all I want is these codecs to work, and I know for a fact that
many of these fields aren't even read by the DSP code, so I'm not even
going to try to make sense of all of them.

Cheers.

-- 
Felipe Contreras



More information about the ffmpeg-devel mailing list