20 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
* |
* |
23 |
* $Id: decoder.c,v 1.54 2004-04-11 09:41:27 syskin Exp $ |
* $Id: decoder.c,v 1.56 2004-04-19 12:42:01 syskin Exp $ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
222 |
dec->time = dec->time_base = dec->last_time_base = 0; |
dec->time = dec->time_base = dec->last_time_base = 0; |
223 |
dec->low_delay = 0; |
dec->low_delay = 0; |
224 |
dec->packed_mode = 0; |
dec->packed_mode = 0; |
225 |
|
dec->time_inc_resolution = 1; /* until VOL header says otherwise */ |
226 |
|
|
227 |
dec->fixed_dimensions = (dec->width > 0 && dec->height > 0); |
dec->fixed_dimensions = (dec->width > 0 && dec->height > 0); |
228 |
|
|
1361 |
xvid_dec_frame_t * frame, xvid_dec_stats_t * stats, |
xvid_dec_frame_t * frame, xvid_dec_stats_t * stats, |
1362 |
int coding_type, int quant) |
int coding_type, int quant) |
1363 |
{ |
{ |
1364 |
|
const int brightness = XVID_VERSION_MINOR(frame->version) >= 1 ? frame->brightness : 0; |
1365 |
|
|
1366 |
if (dec->cartoon_mode) |
if (dec->cartoon_mode) |
1367 |
frame->general &= ~XVID_FILMEFFECT; |
frame->general &= ~XVID_FILMEFFECT; |
1368 |
|
|
1369 |
if ((frame->general & (XVID_DEBLOCKY|XVID_DEBLOCKUV|XVID_FILMEFFECT) || frame->brightness!=0) |
if ((frame->general & (XVID_DEBLOCKY|XVID_DEBLOCKUV|XVID_FILMEFFECT) || brightness!=0) |
1370 |
&& mbs != NULL) /* post process */ |
&& mbs != NULL) /* post process */ |
1371 |
{ |
{ |
1372 |
/* note: image is stored to tmp */ |
/* note: image is stored to tmp */ |
1373 |
image_copy(&dec->tmp, img, dec->edged_width, dec->height); |
image_copy(&dec->tmp, img, dec->edged_width, dec->height); |
1374 |
image_postproc(&dec->postproc, &dec->tmp, dec->edged_width, |
image_postproc(&dec->postproc, &dec->tmp, dec->edged_width, |
1375 |
mbs, dec->mb_width, dec->mb_height, dec->mb_width, |
mbs, dec->mb_width, dec->mb_height, dec->mb_width, |
1376 |
frame->general, frame->brightness, dec->frames, (coding_type == B_VOP)); |
frame->general, brightness, dec->frames, (coding_type == B_VOP)); |
1377 |
img = &dec->tmp; |
img = &dec->tmp; |
1378 |
} |
} |
1379 |
|
|
1493 |
goto repeat; |
goto repeat; |
1494 |
} |
} |
1495 |
|
|
1496 |
|
if(dec->frames == 0 && coding_type != I_VOP) { |
1497 |
|
/* 1st frame is not an i-vop */ |
1498 |
|
goto repeat; |
1499 |
|
} |
1500 |
|
|
1501 |
dec->p_bmv.x = dec->p_bmv.y = dec->p_fmv.y = dec->p_fmv.y = 0; /* init pred vector to 0 */ |
dec->p_bmv.x = dec->p_bmv.y = dec->p_fmv.y = dec->p_fmv.y = 0; /* init pred vector to 0 */ |
1502 |
|
|
1503 |
/* packed_mode: special-N_VOP treament */ |
/* packed_mode: special-N_VOP treament */ |