[FFmpeg-devel] Invalid block align in wmav2 encoder

Michael Niedermayer michaelni
Wed Aug 6 21:38:14 CEST 2008


On Tue, Aug 05, 2008 at 03:24:08PM -0700, Sebastien Cote wrote:
> Hi,
> 
> I am encoding using FFMPEG's wmav2 audio codec and I think there is an error when calculating the block align value.
> 
> In wmaenc.c the block align is defined as:
> 
> avctx->block_align= s->block_align= avctx->bit_rate*(int64_t)s->frame_len / (avctx->sample_rate*8);
> 
> 
> If the sampling rate is 44100 and I am encoding at 64kbps, I get 64000*2048 / (44100 * 8) = 371.5
> 
> Shouldn't this value be rounded up to the nearest integer instead of being rounded down?

why do you think so?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- 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/20080806/ccfc8c4b/attachment.pgp>



More information about the ffmpeg-devel mailing list