Anil,

The reason why XDM_GETBUFINFO is used in vidoe decode is to figure out
what the worst case size of a video buffer is. We are decoding
elementary streams with no headers so there is no way knowing ahead of
time what the size of the next encoded frame is. Instead we pass down a
buffer of size X and the decode algorithm returns how many bytes Y it
actually used using outArgs.bytesConsumed. We have to make that *at
least* one frame is passed to the decode algoritm for each process call,
otherwise the decoder will fail and we will have to drop a frame or
possibly quit the app. To make sure we pass at least one full frame, the
decoder is asked what it's worst case encoded frame size is. This value
is used in X above.

If you are using a transport stream where you know the size of the next
encoded frame this logic is not needed, as you know the exact amount of
data to pass to the VIDDEC_process() call every time.

As to why this isn't done for audio, it's basically because audio frames
are a lot smaller and we are pretty sure we'll give the decoder at least
a frame every time. But perhaps we should for consistency.

Best regards,
Niclas


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Anil
Sent: Friday, September 01, 2006 8:38 AM
To: [email protected]
Subject: Question on DaVinci EVm Demo apps


Hi,

 I have got a question  on Codec Engine demo application in
DaVinci-Linux. I was reading through the decoder application source code
to get an idea about the buffer allocation schemes. The demo application
has support for audio, speech and video decoder. For audio decoder and
speech decoder the inputBuf size is decided by the application itself,
whereas for the video decoder the inputBuf size is decided/queried using
the VISA function "VIDDEC_control"
with the cmd_id "XDM_GETBUFINFO". Why is this not done for the other two
decoders (audio and speech) ??
Also the from the header file "xdm.h" it is evident that in the
structure "XDM_AlgBufInfo", minOutBufSize field can give the outputBuf
size, then why is not being used in any of the decoders ??

Warm Regards,
Anil


-------------------------------------------------------DISCLAIMER-------
-----------------------------------------------
The information transmitted herewith is confidential and proprietary
information intended only for use by the individual or entity to which
it is addressed. If the reader of this message is not the intended
recipient, you are hereby notified that any review, retransmission,
dissemination, distribution, copying or other use of, or taking of any
action in reliance upon this information is strictly prohibited. If you
have received this communication in error, please contact the sender and
delete the material from your computer.
------------------------------------------------------------------------
--------------------------------------------------------


_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to