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.123 2006-01-19 22:25:18 Isibaar Exp $ |
* $Id: encoder.c,v 1.125 2006-02-23 07:22:43 syskin Exp $ |
25 |
* |
* |
26 |
****************************************************************************/ |
****************************************************************************/ |
27 |
|
|
722 |
if ((pEnc->mbParam.plugin_flags & XVID_REQDQUANTS)) { |
if ((pEnc->mbParam.plugin_flags & XVID_REQDQUANTS)) { |
723 |
data.dquant = pEnc->temp_dquants; |
data.dquant = pEnc->temp_dquants; |
724 |
data.dquant_stride = pEnc->mbParam.mb_width; |
data.dquant_stride = pEnc->mbParam.mb_width; |
725 |
memset(data.dquant, 0, data.mb_width*data.mb_height); |
memset(data.dquant, 0, data.mb_width*data.mb_height*sizeof(int)); |
726 |
} |
} |
727 |
|
|
728 |
if(pEnc->mbParam.plugin_flags & XVID_REQLAMBDA) { |
if(pEnc->mbParam.plugin_flags & XVID_REQLAMBDA) { |
1384 |
|
|
1385 |
if ( FrameCodeP(pEnc, &bs) == 0 ) { |
if ( FrameCodeP(pEnc, &bs) == 0 ) { |
1386 |
/* N-VOP, we mustn't code b-frames yet */ |
/* N-VOP, we mustn't code b-frames yet */ |
1387 |
|
if ((pEnc->mbParam.global_flags & XVID_GLOBAL_PACKED) || |
1388 |
|
pEnc->mbParam.max_bframes == 0) |
1389 |
call_plugins(pEnc, pEnc->current, &pEnc->sOriginal, XVID_PLG_AFTER, NULL, NULL, stats); |
call_plugins(pEnc, pEnc->current, &pEnc->sOriginal, XVID_PLG_AFTER, NULL, NULL, stats); |
1390 |
goto done; |
goto done; |
1391 |
} |
} |
1799 |
(pParam->frame_drop_ratio * mb_width * mb_height) / 100 && |
(pParam->frame_drop_ratio * mb_width * mb_height) / 100 && |
1800 |
( (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)) ) |
1801 |
{ |
{ |
1802 |
current->sStat.kblks = current->sStat.mblks = 0; |
current->sStat.kblks = current->sStat.mblks = current->sStat.iTextBits = 0; |
1803 |
current->sStat.ublks = mb_width * mb_height; |
current->sStat.ublks = mb_width * mb_height; |
1804 |
|
|
1805 |
BitstreamReset(bs); |
BitstreamReset(bs); |