Mercurial > libavcodec.hg
comparison rv34.c @ 8180:f4a291734ad7 libavcodec
Eliminate direct use of s->current_picture in RV30/40 decoder
author | kostya |
---|---|
date | Thu, 20 Nov 2008 14:05:29 +0000 |
parents | 883feb4edb65 |
children | d8f516ca0002 |
comparison
equal
deleted
inserted
replaced
8179:883feb4edb65 | 8180:f4a291734ad7 |
---|---|
951 } | 951 } |
952 }else{ | 952 }else{ |
953 itype = ittrans16[intra_types[0]]; | 953 itype = ittrans16[intra_types[0]]; |
954 itype = adjust_pred16(itype, r->avail_cache[5-4], r->avail_cache[5-1]); | 954 itype = adjust_pred16(itype, r->avail_cache[5-4], r->avail_cache[5-1]); |
955 r->h.pred16x16[itype](Y, s->linesize); | 955 r->h.pred16x16[itype](Y, s->linesize); |
956 dsp->add_pixels_clamped(s->block[0], Y, s->current_picture.linesize[0]); | 956 dsp->add_pixels_clamped(s->block[0], Y, s->linesize); |
957 dsp->add_pixels_clamped(s->block[1], Y + 8, s->current_picture.linesize[0]); | 957 dsp->add_pixels_clamped(s->block[1], Y + 8, s->linesize); |
958 Y += s->current_picture.linesize[0] * 8; | 958 Y += s->linesize * 8; |
959 dsp->add_pixels_clamped(s->block[2], Y, s->current_picture.linesize[0]); | 959 dsp->add_pixels_clamped(s->block[2], Y, s->linesize); |
960 dsp->add_pixels_clamped(s->block[3], Y + 8, s->current_picture.linesize[0]); | 960 dsp->add_pixels_clamped(s->block[3], Y + 8, s->linesize); |
961 | 961 |
962 itype = ittrans16[intra_types[0]]; | 962 itype = ittrans16[intra_types[0]]; |
963 if(itype == PLANE_PRED8x8) itype = DC_PRED8x8; | 963 if(itype == PLANE_PRED8x8) itype = DC_PRED8x8; |
964 itype = adjust_pred16(itype, r->avail_cache[5-4], r->avail_cache[5-1]); | 964 itype = adjust_pred16(itype, r->avail_cache[5-4], r->avail_cache[5-1]); |
965 r->h.pred8x8[itype](U, s->uvlinesize); | 965 r->h.pred8x8[itype](U, s->uvlinesize); |
1133 r->cbp_chroma[s->mb_x + s->mb_y * s->mb_stride] = cbp >> 16; | 1133 r->cbp_chroma[s->mb_x + s->mb_y * s->mb_stride] = cbp >> 16; |
1134 if(s->pict_type == FF_I_TYPE) | 1134 if(s->pict_type == FF_I_TYPE) |
1135 r->deblock_coefs[mb_pos] = 0; | 1135 r->deblock_coefs[mb_pos] = 0; |
1136 else | 1136 else |
1137 r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r); | 1137 r->deblock_coefs[mb_pos] = rv34_set_deblock_coef(r); |
1138 s->current_picture.qscale_table[s->mb_x + s->mb_y * s->mb_stride] = s->qscale; | 1138 s->current_picture_ptr->qscale_table[s->mb_x + s->mb_y * s->mb_stride] = s->qscale; |
1139 | 1139 |
1140 if(cbp == -1) | 1140 if(cbp == -1) |
1141 return -1; | 1141 return -1; |
1142 | 1142 |
1143 luma_dc_quant = r->block_type == RV34_MB_P_MIX16x16 ? r->luma_dc_quant_p[s->qscale] : r->luma_dc_quant_i[s->qscale]; | 1143 luma_dc_quant = r->block_type == RV34_MB_P_MIX16x16 ? r->luma_dc_quant_p[s->qscale] : r->luma_dc_quant_i[s->qscale]; |
1232 } | 1232 } |
1233 s->pict_type = r->si.type ? r->si.type : FF_I_TYPE; | 1233 s->pict_type = r->si.type ? r->si.type : FF_I_TYPE; |
1234 if(MPV_frame_start(s, s->avctx) < 0) | 1234 if(MPV_frame_start(s, s->avctx) < 0) |
1235 return -1; | 1235 return -1; |
1236 ff_er_frame_start(s); | 1236 ff_er_frame_start(s); |
1237 s->current_picture_ptr = &s->current_picture; | |
1238 r->cur_pts = r->si.pts; | 1237 r->cur_pts = r->si.pts; |
1239 if(s->pict_type != FF_B_TYPE){ | 1238 if(s->pict_type != FF_B_TYPE){ |
1240 r->last_pts = r->next_pts; | 1239 r->last_pts = r->next_pts; |
1241 r->next_pts = r->cur_pts; | 1240 r->next_pts = r->cur_pts; |
1242 } | 1241 } |