1384 |
coding_type = BitstreamReadHeaders(&bs, dec, &rounding, |
coding_type = BitstreamReadHeaders(&bs, dec, &rounding, |
1385 |
&quant, &fcode_forward, &fcode_backward, &intra_dc_threshold, &gmc_warp); |
&quant, &fcode_forward, &fcode_backward, &intra_dc_threshold, &gmc_warp); |
1386 |
|
|
1387 |
DPRINTF(XVID_DEBUG_HEADER, "coding_type=%i, packed=%i, time=%lli, time_pp=%i, time_bp=%i\n", |
DPRINTF(XVID_DEBUG_HEADER, "coding_type=%i, packed=%i, time=%" |
1388 |
|
#if defined(_MSC_VER) |
1389 |
|
"I64" |
1390 |
|
#else |
1391 |
|
"ll" |
1392 |
|
#endif |
1393 |
|
"i, time_pp=%i, time_bp=%i\n", |
1394 |
coding_type, dec->packed_mode, dec->time, dec->time_pp, dec->time_bp); |
coding_type, dec->packed_mode, dec->time, dec->time_pp, dec->time_bp); |
1395 |
|
|
1396 |
if (coding_type == -1) { /* nothing */ |
if (coding_type == -1) { /* nothing */ |
1517 |
|
|
1518 |
done : |
done : |
1519 |
|
|
1520 |
/* low_delay_default mode: if we've gotten here without outputting anything, |
/* if we reach here without outputing anything _and_ |
1521 |
then output the recently decoded frame, or print an error message */ |
the calling application has specified low_delay_default, |
1522 |
|
we *must* output something. |
1523 |
|
this always occurs on the first call to decode() call |
1524 |
|
when bframes are present in the bitstream. it may also |
1525 |
|
occur if no vops were seen in the bitstream |
1526 |
|
|
1527 |
|
if packed_mode is enabled, then we output the recently |
1528 |
|
decoded frame (the very first ivop). otherwise we have |
1529 |
|
nothing to display, and therefore output a black screen. |
1530 |
|
*/ |
1531 |
if (dec->low_delay_default && output == 0) { |
if (dec->low_delay_default && output == 0) { |
1532 |
if (dec->packed_mode && seen_something) { |
if (dec->packed_mode && seen_something) { |
|
/* output the recently decoded frame */ |
|
1533 |
decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, stats, dec->last_coding_type, quant); |
decoder_output(dec, &dec->refn[0], dec->last_mbs, frame, stats, dec->last_coding_type, quant); |
1534 |
} else { |
} else { |
1535 |
image_clear(&dec->cur, dec->width, dec->height, dec->edged_width, 0, 128, 128); |
image_clear(&dec->cur, dec->width, dec->height, dec->edged_width, 0, 128, 128); |
|
image_printf(&dec->cur, dec->edged_width, dec->height, 16, 16, |
|
|
"warning: nothing to output"); |
|
|
image_printf(&dec->cur, dec->edged_width, dec->height, 16, 64, |
|
|
"bframe decoder lag"); |
|
|
|
|
1536 |
decoder_output(dec, &dec->cur, NULL, frame, stats, P_VOP, quant); |
decoder_output(dec, &dec->cur, NULL, frame, stats, P_VOP, quant); |
1537 |
if (stats) stats->type = XVID_TYPE_NOTHING; |
if (stats) stats->type = XVID_TYPE_NOTHING; |
1538 |
} |
} |