[Ffmpeg-devel] [RFC] bytestream show and change

Michael Niedermayer michaelni
Thu Jan 4 23:08:59 CET 2007


Hi

On Thu, Jan 04, 2007 at 10:56:51PM +0100, Alex Beregszaszi wrote:
> Hi,
> 
> > > > > >> > Since we have bytestream_put and _get which changes the pointer every
> > > > > >> > time, anyone against _change and _show which does the same, but without
> > > > > >> > advancing the pointer?
> > > > > >> 
> > > > > >> are they needed for any code? if no theres no sense in adding them
> > > > > >> currently, also i dont like redundancy (LE/BE* / bytestream_show())
> > > > > >
> > > > > > I'm doing some code, which needs this. Currently it has LES_8/16/32 for
> > > > > > writing such values, and LE_8/16/32 for reading.
> > > > > >
> > > > > > Which is better, adding LES_ or extending bytestream_ and replacing all
> > > > > > LE_ occurances too?
> > > > > 
> > > > > Do not add anything with generic names like LE_*.
> > > > 
> > > > what about
> > > > AV_<L|B><R|W><2|4|8> ?
> > > > 
> > > > so that for example AV_BW4 would be a big endian 32bit write ...
> > > 
> > > And you plan to remove the current bytestream_ stuff? I dont get the
> > > rationale in this.
> > 
> > i am speaking about LE_* BE_* stuff not bytestream_ stuff
> 
> We have actually semi duplicates now. Bytestream stuff and LE/BE lot of
> codes use LE/BE for sequantial reading, thus advancing the pointer after
> reading.
> 
> Per my understanding, this would be the preferred way now:
> * add AV_xyz, where x is L/B (little/big), y is R/W and z is the width
> (2,4,8) (altought I would prefer AV_<R/W><L/B><8/16/32>

iam fine with 16/32/64 too, about 8 iam not sure, *(uint8_t*) works too
but maybe its cleaner if we have a AV_xy8 / AV_xy1 too


> * change bytestream functions to use the above macros
> * change all the old code which uses LE/BE for sequential reading to use
> bytestream
> 
> If I got this right, I will implement it now.

ok

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070104/cba9bbc0/attachment.pgp>



More information about the ffmpeg-devel mailing list