26 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
27 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
28 |
* |
* |
29 |
* $Id: encoder.c,v 1.95.2.16 2003-03-27 17:09:48 edgomez Exp $ |
* $Id: encoder.c,v 1.95.2.17 2003-03-30 00:36:53 edgomez Exp $ |
30 |
* |
* |
31 |
****************************************************************************/ |
****************************************************************************/ |
32 |
|
|
1353 |
} |
} |
1354 |
emms(); |
emms(); |
1355 |
|
|
1356 |
|
/* XXX: Remove the two #if 0 blocks when we are sure we must always pad the stream */ |
1357 |
|
#if 0 |
1358 |
/* for divx5 compatibility, we must always pad between the packed p and b frames */ |
/* for divx5 compatibility, we must always pad between the packed p and b frames */ |
1359 |
if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) && pEnc->bframenum_tail > 0) |
if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) && pEnc->bframenum_tail > 0) |
1360 |
|
#endif |
1361 |
BitstreamPadAlways(bs); |
BitstreamPadAlways(bs); |
1362 |
|
#if 0 |
1363 |
else |
else |
1364 |
BitstreamPad(bs); |
BitstreamPad(bs); |
1365 |
|
#endif |
1366 |
pEnc->current->length = (BitstreamPos(bs) - bits) / 8; |
pEnc->current->length = (BitstreamPos(bs) - bits) / 8; |
1367 |
|
|
1368 |
pEnc->fMvPrevSigma = -1; |
pEnc->fMvPrevSigma = -1; |
1759 |
} |
} |
1760 |
*/ |
*/ |
1761 |
|
|
1762 |
|
/* XXX: Remove the two #if 0 blocks when we are sure we must always pad the stream */ |
1763 |
|
#if 0 |
1764 |
/* for divx5 compatibility, we must always pad between the packed p and b frames */ |
/* for divx5 compatibility, we must always pad between the packed p and b frames */ |
1765 |
if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) && pEnc->bframenum_tail > 0) |
if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) && pEnc->bframenum_tail > 0) |
1766 |
|
#endif |
1767 |
BitstreamPadAlways(bs); |
BitstreamPadAlways(bs); |
1768 |
|
#if 0 |
1769 |
else |
else |
1770 |
BitstreamPad(bs); |
BitstreamPad(bs); |
1771 |
|
#endif |
1772 |
|
|
1773 |
pEnc->current->length = (BitstreamPos(bs) - bits) / 8; |
pEnc->current->length = (BitstreamPos(bs) - bits) / 8; |
1774 |
|
|
1900 |
|
|
1901 |
/* TODO: dynamic fcode/bcode ??? */ |
/* TODO: dynamic fcode/bcode ??? */ |
1902 |
|
|
1903 |
BitstreamPad(bs); |
BitstreamPadAlways(bs); |
1904 |
frame->length = (BitstreamPos(bs) - bits) / 8; |
frame->length = (BitstreamPos(bs) - bits) / 8; |
1905 |
|
|
1906 |
#ifdef BFRAMES_DEC_DEBUG |
#ifdef BFRAMES_DEC_DEBUG |