23 #define NOT_MPEG12_H261 0
24 #define MAY_BE_MPEG12_H261 1
25 #define DEFINITELY_MPEG12_H261 2
29 int16_t *
block,
int i, uint8_t *dest,
int line_size,
int qscale)
31 s->dct_unquantize_intra(
s,
block,
i, qscale);
32 s->idsp.idct_put(dest, line_size,
block);
36 int16_t *
block,
int i, uint8_t *dest,
int line_size,
int qscale)
38 if (
s->block_last_index[
i] >= 0) {
39 s->dct_unquantize_inter(
s,
block,
i, qscale);
41 s->idsp.idct_add(dest, line_size,
block);
57 int lowres_flag,
int is_mpeg12)
59 #define IS_MPEG12_H261(s) (is_mpeg12 == MAY_BE_MPEG12_H261 ? ((s)->out_format <= FMT_H261) : is_mpeg12)
60 const int mb_xy =
s->mb_y *
s->mb_stride +
s->mb_x;
62 s->cur_pic.qscale_table[mb_xy] =
s->qscale;
67 if (
s->mbintra_table[mb_xy])
72 s->last_dc[2] = 128 <<
s->intra_dc_precision;
75 s->mbintra_table[mb_xy] = 1;
83 uint8_t *dest_y =
s->dest[0], *dest_cb =
s->dest[1], *dest_cr =
s->dest[2];
84 int dct_linesize, dct_offset;
85 const int linesize =
s->cur_pic.linesize[0];
86 const int uvlinesize =
s->cur_pic.linesize[1];
87 const int block_size = lowres_flag ? 8 >>
s->avctx->lowres : 8;
92 uint8_t *mbskip_ptr = &
s->mbskip_table[mb_xy];
98 }
else if (!
s->cur_pic.reference) {
105 dct_linesize = linesize <<
s->interlaced_dct;
106 dct_offset =
s->interlaced_dct ? linesize : linesize * block_size;
130 op_pix =
s->h264chroma.avg_h264_chroma_pixels_tab;
140 op_pix =
s->hdsp.put_pixels_tab;
141 op_qpix =
s->qdsp.put_qpel_pixels_tab;
143 op_pix =
s->hdsp.put_no_rnd_pixels_tab;
144 op_qpix =
s->qdsp.put_no_rnd_qpel_pixels_tab;
147 ff_mpv_motion(
s, dest_y, dest_cb, dest_cr, 0,
s->last_pic.data, op_pix, op_qpix);
148 op_pix =
s->hdsp.avg_pixels_tab;
149 op_qpix =
s->qdsp.avg_qpel_pixels_tab;
152 ff_mpv_motion(
s, dest_y, dest_cb, dest_cr, 1,
s->next_pic.data, op_pix, op_qpix);
157 if (
s->avctx->skip_idct) {
194 add_dct(
s,
block[3], 3, dest_y + dct_offset + block_size, dct_linesize);
197 if (
s->chroma_y_shift) {
202 dct_linesize = uvlinesize <<
s->interlaced_dct;
203 dct_offset =
s->interlaced_dct ? uvlinesize : uvlinesize*block_size;
209 if (!
s->chroma_x_shift) {
212 add_dct(
s,
block[10], 10, dest_cb+block_size+dct_offset, dct_linesize);
213 add_dct(
s,
block[11], 11, dest_cr+block_size+dct_offset, dct_linesize);
217 }
else if (CONFIG_WMV2_DECODER) {
227 s->avctx->bits_per_raw_sample > 8) {
229 uvlinesize, dct_linesize, dct_offset);
235 put_dct(
s,
block[1], 1, dest_y + block_size, dct_linesize,
s->qscale);
236 put_dct(
s,
block[2], 2, dest_y + dct_offset , dct_linesize,
s->qscale);
237 put_dct(
s,
block[3], 3, dest_y + dct_offset + block_size, dct_linesize,
s->qscale);
240 if (
s->chroma_y_shift) {
248 put_dct(
s,
block[6], 6, dest_cb + dct_offset, dct_linesize,
s->chroma_qscale);
249 put_dct(
s,
block[7], 7, dest_cr + dct_offset, dct_linesize,
s->chroma_qscale);
255 s->idsp.idct_put(dest_y, dct_linesize,
block[0]);
256 s->idsp.idct_put(dest_y + block_size, dct_linesize,
block[1]);
257 s->idsp.idct_put(dest_y + dct_offset, dct_linesize,
block[2]);
258 s->idsp.idct_put(dest_y + dct_offset + block_size, dct_linesize,
block[3]);
261 if (
s->chroma_y_shift) {
262 s->idsp.idct_put(dest_cb, uvlinesize,
block[4]);
263 s->idsp.idct_put(dest_cr, uvlinesize,
block[5]);
265 dct_linesize = uvlinesize <<
s->interlaced_dct;
266 dct_offset =
s->interlaced_dct ? uvlinesize : uvlinesize*block_size;
268 s->idsp.idct_put(dest_cb, dct_linesize,
block[4]);
269 s->idsp.idct_put(dest_cr, dct_linesize,
block[5]);
270 s->idsp.idct_put(dest_cb + dct_offset, dct_linesize,
block[6]);
271 s->idsp.idct_put(dest_cr + dct_offset, dct_linesize,
block[7]);
272 if (!
s->chroma_x_shift) {
273 s->idsp.idct_put(dest_cb + block_size, dct_linesize,
block[8]);
274 s->idsp.idct_put(dest_cr + block_size, dct_linesize,
block[9]);
275 s->idsp.idct_put(dest_cb + block_size + dct_offset, dct_linesize,
block[10]);
276 s->idsp.idct_put(dest_cr + block_size + dct_offset, dct_linesize,
block[11]);