21 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
* |
* |
24 |
* $Id: encoder.c,v 1.137 2010-12-29 22:39:35 Isibaar Exp $ |
* $Id: encoder.c,v 1.139 2011-02-03 15:11:57 Isibaar Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
1609 |
memcpy((void *)((ptr_t)bs->start + pos), |
memcpy((void *)((ptr_t)bs->start + pos), |
1610 |
(void *)((ptr_t)pEnc->smpData[k].bs->start), len); |
(void *)((ptr_t)pEnc->smpData[k].bs->start), len); |
1611 |
|
|
1612 |
current->length = pos += len; |
current->length += len; |
1613 |
|
pos += len; |
1614 |
|
|
1615 |
/* collect stats */ |
/* collect stats */ |
1616 |
current->sStat.iTextBits += pEnc->smpData[k].sStat->iTextBits; |
current->sStat.iTextBits += pEnc->smpData[k].sStat->iTextBits; |
2130 |
|
|
2131 |
if (current->sStat.kblks + current->sStat.mblks < |
if (current->sStat.kblks + current->sStat.mblks < |
2132 |
(pParam->frame_drop_ratio * mb_width * mb_height) / 100 && |
(pParam->frame_drop_ratio * mb_width * mb_height) / 100 && |
2133 |
( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) ) |
( (pEnc->bframenum_head >= pEnc->bframenum_tail) || !(pEnc->mbParam.global_flags & XVID_GLOBAL_CLOSED_GOP)) && |
2134 |
|
(current->coding_type == P_VOP) ) |
2135 |
{ |
{ |
2136 |
current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits = 0; |
current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits = 0; |
2137 |
current->sStat.ublks = mb_width * mb_height; |
current->sStat.ublks = mb_width * mb_height; |