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.21 2003-05-12 12:27:32 suxen_drol Exp $ |
* $Id: encoder.c,v 1.95.2.22 2003-05-15 12:58:26 suxen_drol Exp $ |
30 |
* |
* |
31 |
****************************************************************************/ |
****************************************************************************/ |
32 |
|
|
1079 |
type = MEanalysis(&pEnc->reference->image, pEnc->current, |
type = MEanalysis(&pEnc->reference->image, pEnc->current, |
1080 |
&pEnc->mbParam, pEnc->mbParam.iMaxKeyInterval, |
&pEnc->mbParam, pEnc->mbParam.iMaxKeyInterval, |
1081 |
pEnc->iFrameNum, pEnc->bframenum_tail, xFrame->bframe_threshold); |
pEnc->iFrameNum, pEnc->bframenum_tail, xFrame->bframe_threshold); |
|
|
|
|
if (type == B_VOP && !(pEnc->current->vop_flags & XVID_VOP_DYNAMIC_BFRAMES)) { |
|
|
type = P_VOP; /* disable dynamic bframes */ |
|
|
} |
|
1082 |
} |
} |
1083 |
} |
} |
1084 |
|
|
1085 |
/* bframes buffer overflow check */ |
/* bframes buffer overflow check */ |
1086 |
if (type != I_VOP) { |
if (type == B_VOP && pEnc->bframenum_tail >= pEnc->mbParam.max_bframes) { |
|
if (pEnc->bframenum_tail >= pEnc->mbParam.max_bframes) { |
|
1087 |
type = P_VOP; |
type = P_VOP; |
|
}else{ |
|
|
type = B_VOP; |
|
|
} |
|
1088 |
} |
} |
1089 |
|
|
1090 |
pEnc->iFrameNum++; |
pEnc->iFrameNum++; |