[Ffmpeg-devel] Re: Bethsoft VID demuxer and decoder

Nicholas T ntung
Tue Apr 3 09:43:13 CEST 2007


Sorry I don't have a lot of time...I still have to do the audio pts
and stack revision.

Do you have buffer wrapper functions for allocation / deallocation you
want me to use for the stack revision? The heap is better for large
allocations? I don't see how the multiplication can overflow; sorry.
Could you be more specific? The numbers are 256 or 320 for the width,
multiplied by 200 for the height. Are you talking about integer
overflow or memory overflow?

On 3/28/07, Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
>
> On Tue, Mar 27, 2007 at 06:25:40PM -0700, Nicholas T wrote:
> [...]
>
> > >return -1
> > done, and with the invalid starting block, the av_log is with ERROR
> > instead of VERBOSE.
>
> the code will not work with negative linesize

okay, all  linesizes < width  now fail, as that's rather meaningless.

> i dont know if memset() or simple char copying is faster, either way this
> is unrelated to supporting runs over 3 lines

fixed, though the check above voids the need for this, as bethsoft VID
has frame widths 256 or 320, and the maximum RLE sequence length is
127. But anyway...for style reasons :) Also, I did get rid of the
functions which had been bothering you, and the code does look a bit
better.

> the deocder could be used together with another demuxer, for example
> mplayer and xine use many of our decoders with their own demuxers and they
> might not add such a 0 byte so the decoder shouldnt depend on that being
> there

fixed.

> AV_RB24()

This doesn't multiply by 4.

> indention is wrong

fixed, sorry about that, I don't know how that happened.

> why duplicate AVCodecContext width/height?

The demuxer needs it, because, as you put it, Bethsoft VID is
misdesigned, and doens't have a simple "video frame length" field that
would have reduced a lot of ugly code and trouble... AVFormatContext
doesn't have width/height.

> these 2 nested structs serve no real purpose

they did before you helped me get rid of other excess junk. They are
now removed.

> please keep things in alphabetical order which where before your change

sorry, I fixed it in the other makefile as well.

Nicholas

-- 
http://ntung.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bethsoft.diff
Type: text/x-patch
Size: 21229 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070403/65f00d74/attachment.bin>



More information about the ffmpeg-devel mailing list