comparison mpegvideo.c @ 1553:541681146f83 libavcodec

move q_*_matrix out of MpegEncContext (40k ->23k) dct_quantize() is even slightly faster now, dont ask my why ...
author michael
date Wed, 22 Oct 2003 10:59:39 +0000
parents 26c6ecba99a1
children d736e24bf303
comparison
equal deleted inserted replaced
1552:26c6ecba99a1 1553:541681146f83
440 440
441 /* Allocate MB type table */ 441 /* Allocate MB type table */
442 CHECKED_ALLOCZ(s->mb_type , mb_array_size * sizeof(uint8_t)) //needed for encoding 442 CHECKED_ALLOCZ(s->mb_type , mb_array_size * sizeof(uint8_t)) //needed for encoding
443 443
444 CHECKED_ALLOCZ(s->lambda_table, mb_array_size * sizeof(int)) 444 CHECKED_ALLOCZ(s->lambda_table, mb_array_size * sizeof(int))
445
446 CHECKED_ALLOCZ(s->q_intra_matrix, 64*32 * sizeof(int))
447 CHECKED_ALLOCZ(s->q_inter_matrix, 64*32 * sizeof(int))
445 } 448 }
446 449
447 CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture)) 450 CHECKED_ALLOCZ(s->picture, MAX_PICTURE_COUNT * sizeof(Picture))
448 451
449 CHECKED_ALLOCZ(s->error_status_table, mb_array_size*sizeof(uint8_t)) 452 CHECKED_ALLOCZ(s->error_status_table, mb_array_size*sizeof(uint8_t))
558 av_freep(&s->avctx->stats_out); 561 av_freep(&s->avctx->stats_out);
559 av_freep(&s->ac_stats); 562 av_freep(&s->ac_stats);
560 av_freep(&s->error_status_table); 563 av_freep(&s->error_status_table);
561 av_freep(&s->mb_index2xy); 564 av_freep(&s->mb_index2xy);
562 av_freep(&s->lambda_table); 565 av_freep(&s->lambda_table);
566 av_freep(&s->q_intra_matrix);
567 av_freep(&s->q_inter_matrix);
563 568
564 for(i=0; i<MAX_PICTURE_COUNT; i++){ 569 for(i=0; i<MAX_PICTURE_COUNT; i++){
565 free_picture(s, &s->picture[i]); 570 free_picture(s, &s->picture[i]);
566 } 571 }
567 av_freep(&s->picture); 572 av_freep(&s->picture);