cosmetic: rename VLC tables to make clear they

are for decoding

Originally committed as revision 9517 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Stefan Gehrer 2007-07-07 06:49:20 +00:00
parent 07caa46e99
commit ce7088b9a8
3 changed files with 10 additions and 10 deletions

View File

@ -497,7 +497,7 @@ static inline int get_ue_code(GetBitContext *gb, int order) {
* @param stride line stride in frame buffer * @param stride line stride in frame buffer
*/ */
static int decode_residual_block(AVSContext *h, GetBitContext *gb, static int decode_residual_block(AVSContext *h, GetBitContext *gb,
const residual_vlc_t *r, int esc_golomb_order, const dec_2dvlc_t *r, int esc_golomb_order,
int qp, uint8_t *dst, int stride) { int qp, uint8_t *dst, int stride) {
int i,pos = -1; int i,pos = -1;
int level_code, esc_code, level, run, mask; int level_code, esc_code, level, run, mask;
@ -547,10 +547,10 @@ static int decode_residual_block(AVSContext *h, GetBitContext *gb,
static inline void decode_residual_chroma(AVSContext *h) { static inline void decode_residual_chroma(AVSContext *h) {
if(h->cbp & (1<<4)) if(h->cbp & (1<<4))
decode_residual_block(h,&h->s.gb,chroma_2dvlc,0, chroma_qp[h->qp], decode_residual_block(h,&h->s.gb,chroma_dec,0, chroma_qp[h->qp],
h->cu,h->c_stride); h->cu,h->c_stride);
if(h->cbp & (1<<5)) if(h->cbp & (1<<5))
decode_residual_block(h,&h->s.gb,chroma_2dvlc,0, chroma_qp[h->qp], decode_residual_block(h,&h->s.gb,chroma_dec,0, chroma_qp[h->qp],
h->cv,h->c_stride); h->cv,h->c_stride);
} }
@ -570,7 +570,7 @@ static inline int decode_residual_inter(AVSContext *h) {
h->qp = (h->qp + get_se_golomb(&h->s.gb)) & 63; h->qp = (h->qp + get_se_golomb(&h->s.gb)) & 63;
for(block=0;block<4;block++) for(block=0;block<4;block++)
if(h->cbp & (1<<block)) if(h->cbp & (1<<block))
decode_residual_block(h,&h->s.gb,inter_2dvlc,0,h->qp, decode_residual_block(h,&h->s.gb,inter_dec,0,h->qp,
h->cy + h->luma_scan[block], h->l_stride); h->cy + h->luma_scan[block], h->l_stride);
decode_residual_chroma(h); decode_residual_chroma(h);
@ -633,7 +633,7 @@ static int decode_mb_i(AVSContext *h, int cbp_code) {
h->intra_pred_l[h->pred_mode_Y[scan3x3[block]]] h->intra_pred_l[h->pred_mode_Y[scan3x3[block]]]
(d, top, left, h->l_stride); (d, top, left, h->l_stride);
if(h->cbp & (1<<block)) if(h->cbp & (1<<block))
decode_residual_block(h,gb,intra_2dvlc,1,h->qp,d,h->l_stride); decode_residual_block(h,gb,intra_dec,1,h->qp,d,h->l_stride);
} }
/* chroma intra prediction */ /* chroma intra prediction */

View File

@ -144,13 +144,13 @@ DECLARE_ALIGNED_8(typedef, struct) {
int16_t ref; int16_t ref;
} vector_t; } vector_t;
typedef struct residual_vlc_t { typedef struct dec_2dvlc_t {
int8_t rltab[59][3]; int8_t rltab[59][3];
int8_t level_add[27]; int8_t level_add[27];
int8_t golomb_order; int8_t golomb_order;
int inc_limit; int inc_limit;
int8_t max_run; int8_t max_run;
} residual_vlc_t; } dec_2dvlc_t;
typedef struct { typedef struct {
MpegEncContext s; MpegEncContext s;

View File

@ -117,7 +117,7 @@ const vector_t ff_cavs_intra_mv = {0,0,1,REF_INTRA};
#define EOB 0,0,0 #define EOB 0,0,0
static const residual_vlc_t intra_2dvlc[7] = { static const dec_2dvlc_t intra_dec[7] = {
{ {
{ //level / run / table_inc { //level / run / table_inc
{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1}, { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
@ -254,7 +254,7 @@ static const residual_vlc_t intra_2dvlc[7] = {
} }
}; };
static const residual_vlc_t inter_2dvlc[7] = { static const dec_2dvlc_t inter_dec[7] = {
{ {
{ //level / run { //level / run
{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1}, { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},
@ -391,7 +391,7 @@ static const residual_vlc_t inter_2dvlc[7] = {
} }
}; };
static const residual_vlc_t chroma_2dvlc[5] = { static const dec_2dvlc_t chroma_dec[5] = {
{ {
{ //level / run { //level / run
{ 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1}, { 1, 1, 1},{ -1, 1, 1},{ 1, 2, 1},{ -1, 2, 1},{ 1, 3, 1},{ -1, 3, 1},