--- xvid_encraw.c 2010/12/18 16:02:08 1.46 +++ xvid_encraw.c 2011/02/03 15:01:06 1.46.2.3 @@ -22,7 +22,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: xvid_encraw.c,v 1.46 2010/12/18 16:02:08 Isibaar Exp $ + * $Id: xvid_encraw.c,v 1.46.2.3 2011/02/03 15:01:06 Isibaar Exp $ * ****************************************************************************/ @@ -200,7 +200,7 @@ static char *ARG_PASS2 = 0; //static int ARG_QUALITY = ME_ELEMENTS - 1; static int ARG_QUALITY = 6; -static float ARG_FRAMERATE = 25.00f; +static float ARG_FRAMERATE = 0.f; static int ARG_DWRATE = 25; static int ARG_DWSCALE = 1; static int ARG_MAXFRAMENR = ABS_MAXFRAMENR; @@ -353,7 +353,7 @@ /* Is there a dumb Xvid coder ? */ if(ME_ELEMENTS != VOP_ELEMENTS) { - fprintf(stderr, "Presets' arrays should have the same number of elements -- Please fill a bug to xvid-devel@xvid.org\n"); + fprintf(stderr, "Presets' arrays should have the same number of elements -- Please file a bug to xvid-devel@xvid.org\n"); return(-1); } @@ -485,7 +485,7 @@ memset(&ZONES[NUM_ZONES], 0, sizeof(zone_t)); ZONES[NUM_ZONES].frame = startframe; - ZONES[NUM_ZONES].modifier = atof(options)*100; + ZONES[NUM_ZONES].modifier = (int)(atof(options)*100); if (toupper(c)=='Q') ZONES[NUM_ZONES].mode = XVID_ZONE_QUANT; else if (toupper(c)=='W') @@ -498,7 +498,7 @@ if ((frameoptions=strchr(options, ','))!=NULL) { int readchar=0, count; frameoptions++; - while (readchar= (unsigned int)(stop_num-1) && ARG_MAXBFRAMES) { + if ((unsigned int)(input_num+start_num) >= (unsigned int)(stop_num-1) && ARG_MAXBFRAMES) { stats_type = XVID_TYPE_PVOP; } else @@ -1839,7 +1838,7 @@ fprintf(stderr, " -bquant_offset integer: bframe quantizer offset (100)\n"); fprintf(stderr, "\n"); fprintf(stderr, "Rate control options:\n"); - fprintf(stderr, " -framerate float : target framerate (25.0)\n"); + fprintf(stderr, " -framerate float : target framerate (auto)\n"); fprintf(stderr, " -bitrate [integer] : target bitrate in kbps (700)\n"); fprintf(stderr, " -size integer : target size in kilobytes\n"); fprintf(stderr, " -single : single pass mode (default)\n"); @@ -1931,7 +1930,7 @@ int bytes, xsize, ysize, depth; char dummy[2]; - bytes = fread(dummy, 1, 2, handle); + bytes = (int) fread(dummy, 1, 2, handle); if ((bytes < 2) || (dummy[0] != 'P') || (dummy[1] != '5')) return (1); @@ -2591,7 +2590,7 @@ ZONES[NUM_ZONES].frame = 0; ZONES[NUM_ZONES].mode = XVID_ZONE_QUANT; - ZONES[NUM_ZONES].modifier = ARG_CQ; + ZONES[NUM_ZONES].modifier = (int) ARG_CQ; ZONES[NUM_ZONES].type = XVID_TYPE_AUTO; ZONES[NUM_ZONES].greyscale = 0; ZONES[NUM_ZONES].chroma_opt = 0; @@ -2607,7 +2606,7 @@ for(i = 0; i < NUM_ZONES; i++) if (ZONES[i].mode == XVID_ZONE_WEIGHT) { ZONES[i].mode = XVID_ZONE_QUANT; - ZONES[i].modifier = (100*ARG_CQ) / ZONES[i].modifier; + ZONES[i].modifier = (int) ((100*ARG_CQ) / ZONES[i].modifier); } } @@ -2676,7 +2675,7 @@ int i; char* userdata; - for (i=0; i <= (bufsize-sizeof(userdata_start_code)); i++) { + for (i=0; i <= (int)(bufsize-sizeof(userdata_start_code)); i++) { if (memcmp((void*)userdata_start_code, (void*)(buf+i), strlen(userdata_start_code))==0) { if ((userdata = strstr(buf+i+4, "DivX"))!=NULL) { userdata[strlen(userdata)-1] = '\0';