comparison vorbis_enc.c @ 3876:cd4236d3d477 libavcodec

Original Commit: r76 | ods15 | 2006-09-29 13:16:37 +0300 (Fri, 29 Sep 2006) | 2 lines switch to 2048 block size
author ods15
date Mon, 02 Oct 2006 06:08:23 +0000
parents ad075294470d
children 00623377043e
comparison
equal deleted inserted replaced
3875:ad075294470d 3876:cd4236d3d477
269 mapping_t * mc; 269 mapping_t * mc;
270 int i, book; 270 int i, book;
271 271
272 venc->channels = avccontext->channels; 272 venc->channels = avccontext->channels;
273 venc->sample_rate = avccontext->sample_rate; 273 venc->sample_rate = avccontext->sample_rate;
274 venc->blocksize[0] = venc->blocksize[1] = 9; 274 venc->blocksize[0] = venc->blocksize[1] = 11;
275 275
276 venc->ncodebooks = 10; 276 venc->ncodebooks = 10;
277 venc->codebooks = av_malloc(sizeof(codebook_t) * venc->ncodebooks); 277 venc->codebooks = av_malloc(sizeof(codebook_t) * venc->ncodebooks);
278 278
279 // codebook 0 - floor1 book, values 0..255 279 // codebook 0 - floor1 book, values 0..255
321 venc->nfloors = 1; 321 venc->nfloors = 1;
322 venc->floors = av_malloc(sizeof(floor_t) * venc->nfloors); 322 venc->floors = av_malloc(sizeof(floor_t) * venc->nfloors);
323 323
324 // just 1 floor 324 // just 1 floor
325 fc = &venc->floors[0]; 325 fc = &venc->floors[0];
326 fc->partitions = 3; 326 fc->partitions = 13;
327 fc->partition_to_class = av_malloc(sizeof(int) * fc->partitions); 327 fc->partition_to_class = av_malloc(sizeof(int) * fc->partitions);
328 for (i = 0; i < fc->partitions; i++) fc->partition_to_class[i] = 0; 328 for (i = 0; i < fc->partitions; i++) fc->partition_to_class[i] = 0;
329 fc->nclasses = 1; 329 fc->nclasses = 1;
330 fc->classes = av_malloc(sizeof(floor_class_t) * fc->nclasses); 330 fc->classes = av_malloc(sizeof(floor_class_t) * fc->nclasses);
331 for (i = 0; i < fc->nclasses; i++) { 331 for (i = 0; i < fc->nclasses; i++) {
353 int g = ilog(a); 353 int g = ilog(a);
354 assert(g <= fc->rangebits); 354 assert(g <= fc->rangebits);
355 a ^= 1 << (g-1); 355 a ^= 1 << (g-1);
356 g = 1 << (fc->rangebits - g); 356 g = 1 << (fc->rangebits - g);
357 fc->list[i].x = g + a*2*g;*/ 357 fc->list[i].x = g + a*2*g;*/
358 int a[] = {14, 4, 58, 2, 8, 28, 90}; 358 //int a[] = {14, 4, 58, 2, 8, 28, 90};
359 int a[] = {93,23,372,6,46,186,750,14,33,65,130,260,556,3,10,18,28,39,55,79,111,158,220,312,464,650,850};
359 fc->list[i].x = a[i - 2]; 360 fc->list[i].x = a[i - 2];
360 } 361 }
361 ready_floor(fc); 362 ready_floor(fc);
362 363
363 venc->nresidues = 1; 364 venc->nresidues = 1;