[FFmpeg-devel] [PATCH] ALS decoder
Michael Niedermayer
michaelni
Sun Aug 23 23:50:38 CEST 2009
On Sun, Aug 23, 2009 at 11:31:32PM +0200, Thilo Borgmann wrote:
[...]
> >> +static void parse_bs_info(uint32_t bs_info, unsigned int n, unsigned int div,
> >> + unsigned int **div_blocks, unsigned int *num_blocks)
> >> +{
> >
> >> + if (n < 31 && ((bs_info >> (30 - n)) & 1)) {
> >> + // if the level is valid and the investigated bit n is set
> >> + // then recursively check both children at bits (2n+1) and (2n+2)
> >> + n *= 2;
> >> + div += 1;
> >
> > this sounds like it could use get_bits()
> Have I missed get_bits() supports random access?
> As far as I can see, using get_bits() for the desired parsing would
> require a copy of the GetBitContext for each iterative call an this
> would be way too much overhead, I think. Am I wrong?
hmm, no, lets leave this one, i cant see how it could be done cleanly
either when i look more careully now, sorry
[...]
> >> +static av_cold int decode_init(AVCodecContext *avctx)
> >> ...
> >> + if (sconf->floating) {
> >> + avctx->sample_fmt = SAMPLE_FMT_FLT;
> >
> >> + avctx->bits_per_raw_sample = 32;
> >
> > why is this not set to 24 for simplifying that if(), i dont think
> > bits_per_raw_sample has a meaning currently for floats but maybe i
> > forgot something
> I dont't care. Just consolidate yourselves.
set it to the value that is most convenient, i think that is 24
floats dont have 32 significnat bits anyway in terms of precission
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090823/495df9a6/attachment.pgp>
More information about the ffmpeg-devel
mailing list