[Ffmpeg-devel] [PATCH] GSM-MS decoder and encoder
Michael Niedermayer
michaelni
Fri Feb 16 22:00:57 CET 2007
Hi
On Wed, Feb 14, 2007 at 03:29:23PM +0100, Michel Bardiaux wrote:
[...]
> // gsm.h miss some essential constants
> #define GSM_BLOCK_SIZE 33
> +#define GSM_MS_BLOCK_SIZE 65
> #define GSM_FRAME_SIZE 160
>
> static int libgsm_init(AVCodecContext *avctx) {
> - if (avctx->channels > 1 || avctx->sample_rate != 8000)
> + if (avctx->channels > 1 || avctx->sample_rate != 8000 || avctx->bit_rate != 13000)
is 13000 exactly correct isnt it 13200 for CODEC_ID_GSM?
[...]
> @@ -356,6 +357,10 @@
> put_le16(pb, 16); /* fwHeadFlags */
> put_le32(pb, 0); /* dwPTSLow */
> put_le32(pb, 0); /* dwPTSHigh */
> + } else if (enc->codec_id == CODEC_ID_GSM_MS) {
> + put_le16(pb, 2); /* wav_extra_size */
> + hdrsize += 2;
> + put_le16(pb, 320); /* wSamplesPerBlock */
isnt this simply avctx->frame_size ? i mean hardcoding 320 looks a little ugly
unless its really needed ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- 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/20070216/19abb990/attachment.pgp>
More information about the ffmpeg-devel
mailing list