22 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
23 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 |
* |
* |
25 |
* $Id: plugin_2pass1.c,v 1.1.2.7 2003-10-01 23:23:01 edgomez Exp $ |
* $Id: plugin_2pass1.c,v 1.1.2.8 2003-11-09 20:49:21 edgomez Exp $ |
26 |
* |
* |
27 |
*****************************************************************************/ |
*****************************************************************************/ |
28 |
|
|
60 |
rc->stat_file = NULL; |
rc->stat_file = NULL; |
61 |
|
|
62 |
/* Open the 1st pass file */ |
/* Open the 1st pass file */ |
63 |
if((rc->stat_file = fopen(param->filename, "w+")) == NULL) |
if((rc->stat_file = fopen(param->filename, "w+b")) == NULL) |
64 |
return(XVID_ERR_FAIL); |
return(XVID_ERR_FAIL); |
65 |
|
|
66 |
/* |
/* |
67 |
* The File Header |
* The File Header |
68 |
*/ |
*/ |
69 |
#if 0 |
fprintf(rc->stat_file, "# XviD 2pass stat file (core version %d.%d.%d)\n", |
70 |
fprintf(rc->stat_file, "# XviD 2pass stat file\n"); |
XVID_VERSION_MAJOR(XVID_VERSION), |
71 |
fprintf(rc->stat_file, "version %i.%i.%i\n",XVID_MAJOR(XVID_VERSION), XVID_MINOR(XVID_VERSION), XVID_PATCH(XVID_VERSION)); |
XVID_VERSION_MINOR(XVID_VERSION), |
72 |
fprintf(rc->stat_file, "start\n"); |
XVID_VERSION_PATCH(XVID_VERSION)); |
73 |
fprintf(rc->stat_file, "type quantizer length kblocks mblocks ublocks\n"); |
fprintf(rc->stat_file, "# Please do not modify this file\n\n"); |
|
#endif |
|
74 |
|
|
75 |
rc->fq_error = 0; |
rc->fq_error = 0; |
76 |
|
|
82 |
static int rc_2pass1_destroy(rc_2pass1_t * rc, xvid_plg_destroy_t * destroy) |
static int rc_2pass1_destroy(rc_2pass1_t * rc, xvid_plg_destroy_t * destroy) |
83 |
{ |
{ |
84 |
fclose(rc->stat_file); |
fclose(rc->stat_file); |
|
|
|
85 |
free(rc); |
free(rc); |
86 |
return(0); |
return(0); |
87 |
} |
} |