diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 05:55:30 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 05:55:30 +0000 |
commit | 8016c73f4c89176695b9e60fad51a26b3a5a76c2 (patch) | |
tree | 6f486f2115447e84d032c4b4b6d00cdedded5dce /libavcodec/vorbis_enc.c | |
parent | beaec74a944446345bfc59c8711c586c059ed0fb (diff) | |
download | ffmpeg-8016c73f4c89176695b9e60fad51a26b3a5a76c2.tar.gz |
Original Commit: r11 | ods15 | 2006-09-17 19:41:28 +0300 (Sun, 17 Sep 2006) | 4 lines
modes header syntax
that's the last of the headers! woo
Originally committed as revision 6422 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r-- | libavcodec/vorbis_enc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index 50c3c2b6d4..1793b55c07 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -87,6 +87,11 @@ typedef struct { } mapping_t; typedef struct { + int blockflag; + int mapping; +} vorbis_mode_t; + +typedef struct { int channels; int sample_rate; int blocksize[2]; @@ -102,6 +107,9 @@ typedef struct { int nmappings; mapping_t * mappings; + + int nmodes; + vorbis_mode_t * modes; } venc_context_t; static inline int ilog(unsigned int a) { @@ -320,6 +328,15 @@ static int put_main_header(venc_context_t * venc, uint8_t ** out) { } } + // modes + put_bits(&pb, 6, venc->nmodes - 1); + for (i = 0; i < venc->nmodes; i++) { + put_bits(&pb, 1, venc->modes[i].blockflag); + put_bits(&pb, 16, 0); // reserved window type + put_bits(&pb, 16, 0); // reserved transform type + put_bits(&pb, 8, venc->modes[i].mapping); + } + flush_put_bits(&pb); hlens[2] = (put_bits_count(&pb) + 7) / 8; |