Mercurial > libavcodec.hg
comparison cavs.c @ 5242:deb5b8213d4e libavcodec
cosmetic: rename VLC tables to make clear they
are for decoding
author | stefang |
---|---|
date | Sat, 07 Jul 2007 06:49:20 +0000 |
parents | 74b6423a5a0d |
children | dd11d0b32cc9 |
comparison
equal
deleted
inserted
replaced
5241:74b6423a5a0d | 5242:deb5b8213d4e |
---|---|
495 * @param qp quantizer | 495 * @param qp quantizer |
496 * @param dst location of sample block | 496 * @param dst location of sample block |
497 * @param stride line stride in frame buffer | 497 * @param stride line stride in frame buffer |
498 */ | 498 */ |
499 static int decode_residual_block(AVSContext *h, GetBitContext *gb, | 499 static int decode_residual_block(AVSContext *h, GetBitContext *gb, |
500 const residual_vlc_t *r, int esc_golomb_order, | 500 const dec_2dvlc_t *r, int esc_golomb_order, |
501 int qp, uint8_t *dst, int stride) { | 501 int qp, uint8_t *dst, int stride) { |
502 int i,pos = -1; | 502 int i,pos = -1; |
503 int level_code, esc_code, level, run, mask; | 503 int level_code, esc_code, level, run, mask; |
504 int level_buf[64]; | 504 int level_buf[64]; |
505 int run_buf[64]; | 505 int run_buf[64]; |
545 } | 545 } |
546 | 546 |
547 | 547 |
548 static inline void decode_residual_chroma(AVSContext *h) { | 548 static inline void decode_residual_chroma(AVSContext *h) { |
549 if(h->cbp & (1<<4)) | 549 if(h->cbp & (1<<4)) |
550 decode_residual_block(h,&h->s.gb,chroma_2dvlc,0, chroma_qp[h->qp], | 550 decode_residual_block(h,&h->s.gb,chroma_dec,0, chroma_qp[h->qp], |
551 h->cu,h->c_stride); | 551 h->cu,h->c_stride); |
552 if(h->cbp & (1<<5)) | 552 if(h->cbp & (1<<5)) |
553 decode_residual_block(h,&h->s.gb,chroma_2dvlc,0, chroma_qp[h->qp], | 553 decode_residual_block(h,&h->s.gb,chroma_dec,0, chroma_qp[h->qp], |
554 h->cv,h->c_stride); | 554 h->cv,h->c_stride); |
555 } | 555 } |
556 | 556 |
557 static inline int decode_residual_inter(AVSContext *h) { | 557 static inline int decode_residual_inter(AVSContext *h) { |
558 int block; | 558 int block; |
568 /* get quantizer */ | 568 /* get quantizer */ |
569 if(h->cbp && !h->qp_fixed) | 569 if(h->cbp && !h->qp_fixed) |
570 h->qp = (h->qp + get_se_golomb(&h->s.gb)) & 63; | 570 h->qp = (h->qp + get_se_golomb(&h->s.gb)) & 63; |
571 for(block=0;block<4;block++) | 571 for(block=0;block<4;block++) |
572 if(h->cbp & (1<<block)) | 572 if(h->cbp & (1<<block)) |
573 decode_residual_block(h,&h->s.gb,inter_2dvlc,0,h->qp, | 573 decode_residual_block(h,&h->s.gb,inter_dec,0,h->qp, |
574 h->cy + h->luma_scan[block], h->l_stride); | 574 h->cy + h->luma_scan[block], h->l_stride); |
575 decode_residual_chroma(h); | 575 decode_residual_chroma(h); |
576 | 576 |
577 return 0; | 577 return 0; |
578 } | 578 } |
631 d = h->cy + h->luma_scan[block]; | 631 d = h->cy + h->luma_scan[block]; |
632 load_intra_pred_luma(h, top, &left, block); | 632 load_intra_pred_luma(h, top, &left, block); |
633 h->intra_pred_l[h->pred_mode_Y[scan3x3[block]]] | 633 h->intra_pred_l[h->pred_mode_Y[scan3x3[block]]] |
634 (d, top, left, h->l_stride); | 634 (d, top, left, h->l_stride); |
635 if(h->cbp & (1<<block)) | 635 if(h->cbp & (1<<block)) |
636 decode_residual_block(h,gb,intra_2dvlc,1,h->qp,d,h->l_stride); | 636 decode_residual_block(h,gb,intra_dec,1,h->qp,d,h->l_stride); |
637 } | 637 } |
638 | 638 |
639 /* chroma intra prediction */ | 639 /* chroma intra prediction */ |
640 load_intra_pred_chroma(h); | 640 load_intra_pred_chroma(h); |
641 h->intra_pred_c[pred_mode_uv](h->cu, &h->top_border_u[h->mbx*10], | 641 h->intra_pred_c[pred_mode_uv](h->cu, &h->top_border_u[h->mbx*10], |