diff options
author | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 05:55:22 +0000 |
---|---|---|
committer | Oded Shimon <ods15@ods15.dyndns.org> | 2006-10-02 05:55:22 +0000 |
commit | d52480b40d1b98d03ec21ac2ef5c7780ea3d947d (patch) | |
tree | ef1a373d30aa0644ed2859d61b3fe7c94f6342d9 /libavcodec/vorbis_enc.c | |
parent | 1f7e7464e9b8e00381830a4e4a61ac95137fd712 (diff) | |
download | ffmpeg-d52480b40d1b98d03ec21ac2ef5c7780ea3d947d.tar.gz |
Original Commit: r7 | ods15 | 2006-09-17 08:50:47 +0300 (Sun, 17 Sep 2006) | 2 lines
skeleton for residue/floor/mappings header
Originally committed as revision 6418 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vorbis_enc.c')
-rw-r--r-- | libavcodec/vorbis_enc.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c index 8811e3b7fb..3a9d5860f4 100644 --- a/libavcodec/vorbis_enc.c +++ b/libavcodec/vorbis_enc.c @@ -52,12 +52,30 @@ typedef struct { } codebook_t; typedef struct { +} floor_t; + +typedef struct { +} residue_t; + +typedef struct { +} mapping_t; + +typedef struct { int channels; int sample_rate; int blocksize[2]; int ncodebooks; codebook_t * codebooks; + + int nfloors; + floor_t * floors; + + int nresidues; + residue_t * residues; + + int nmappings; + mapping_t * mappings; } venc_context_t; static inline int ilog(unsigned int a) { @@ -136,6 +154,12 @@ static void put_codebook_header(PutBitContext * pb, codebook_t * cb) { } } +static void put_floor_header(PutBitContext * pb, floor_t * fl) { +} + +static void put_residue_header(PutBitContext * pb, residue_t * r) { +} + static int put_main_header(venc_context_t * venc, uint8_t ** out) { int i; PutBitContext pb; @@ -184,6 +208,22 @@ static int put_main_header(venc_context_t * venc, uint8_t ** out) { put_bits(&pb, 8, venc->ncodebooks - 1); for (i = 0; i < venc->ncodebooks; i++) put_codebook_header(&pb, &venc->codebooks[0]); + // time domain, reserved, zero + put_bits(&pb, 6, 0); + put_bits(&pb, 16, 0); + + // floors + put_bits(&pb, 6, venc->nfloors - 1); + for (i = 0; i < venc->nfloors; i++) put_floor_header(&pb, &venc->floors[0]); + + // residues + put_bits(&pb, 6, venc->nresidues - 1); + for (i = 0; i < venc->nresidues; i++) put_residue_header(&pb, &venc->residues[0]); + + // mappings + put_bits(&pb, 6, venc->nmappings - 1); + for (i = 0; i < venc->nmappings; i++) { + } flush_put_bits(&pb); hlens[2] = (put_bits_count(&pb) + 7) / 8; |