else if(!strcmp(name, "d")) {
scale = atoi(val)/100.0;
if(scale>1.0 || scale<=0) {
else if(!strcmp(name, "d")) {
scale = atoi(val)/100.0;
if(scale>1.0 || scale<=0) {
printf("\t-n , --num frames\t Number of frames to encode\n");
printf("\t-s , --start frame\t First frame to encode\n");
printf("\t-d , --scale factor\t Scale to factor percent\n");
printf("\t-n , --num frames\t Number of frames to encode\n");
printf("\t-s , --start frame\t First frame to encode\n");
printf("\t-d , --scale factor\t Scale to factor percent\n");
-#ifdef VERSION6
- U8*mydata = img->At(oldheight-(int)((yy*yblocksize+y)*reziscale));
-#else
- U8*mydata = img->At((int)((yy*yblocksize+y)*reziscale));
-#endif
+ /* some avifile versions flip the image some don't. Maybe this is
+ even movie dependent. We just let the user decide which side's up. */
+ U8*mydata;
+ if(flip)
+ mydata = img->At(oldheight-(int)((yy*yblocksize+y)*reziscale));
+ else
+ mydata = img->At((int)((yy*yblocksize+y)*reziscale));
+
for(x=0;x<xblocksize;x++) {
blockbuffer[(y*xblocksize+x)*3+2] = mydata[((int)(((xx*xblocksize+x)*reziscale)))*3+0];
blockbuffer[(y*xblocksize+x)*3+1] = mydata[((int)(((xx*xblocksize+x)*reziscale)))*3+1];
for(x=0;x<xblocksize;x++) {
blockbuffer[(y*xblocksize+x)*3+2] = mydata[((int)(((xx*xblocksize+x)*reziscale)))*3+0];
blockbuffer[(y*xblocksize+x)*3+1] = mydata[((int)(((xx*xblocksize+x)*reziscale)))*3+1];