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.12 2003-03-23 04:01:48 suxen_drol Exp $ |
* $Id: encoder.c,v 1.95.2.14 2003-03-26 11:01:03 suxen_drol Exp $ |
30 |
* |
* |
31 |
****************************************************************************/ |
****************************************************************************/ |
32 |
|
|
116 |
|
|
117 |
|
|
118 |
int |
int |
119 |
enc_create(xvid_enc_create_t * create, xvid_enc_rc_t * rc) |
enc_create(xvid_enc_create_t * create) |
120 |
{ |
{ |
121 |
Encoder *pEnc; |
Encoder *pEnc; |
122 |
int n; |
int n; |
123 |
|
|
124 |
if (XVID_MAJOR(create->version) != 1 || (rc && XVID_MAJOR(rc->version) != 1)) /* v1.x.x */ |
if (XVID_MAJOR(create->version) != 1) /* v1.x.x */ |
125 |
return XVID_ERR_VERSION; |
return XVID_ERR_VERSION; |
126 |
|
|
127 |
if (create->width%2 || create->height%2) |
if (create->width%2 || create->height%2) |
1006 |
* init pEnc->current fields |
* init pEnc->current fields |
1007 |
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ |
* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */ |
1008 |
|
|
|
inc_frame_num(pEnc); |
|
|
|
|
1009 |
pEnc->current->fincr = pEnc->mbParam.fincr>0 ? pEnc->mbParam.fincr : frame->fincr; |
pEnc->current->fincr = pEnc->mbParam.fincr>0 ? pEnc->mbParam.fincr : frame->fincr; |
1010 |
|
inc_frame_num(pEnc); |
1011 |
pEnc->current->vol_flags = pEnc->mbParam.vol_flags; |
pEnc->current->vol_flags = pEnc->mbParam.vol_flags; |
1012 |
pEnc->current->vop_flags = frame->vop_flags; |
pEnc->current->vop_flags = frame->vop_flags; |
1013 |
pEnc->current->motion_flags = frame->motion; |
pEnc->current->motion_flags = frame->motion; |