cosmetics

Change-Id: I39c3bc671ab427dcb3e23aedee7fe8d81f4cb860
This commit is contained in:
Pascal Massimino 2011-05-04 22:59:51 -07:00
parent 8dfc4c6f17
commit 38369c03e0
2 changed files with 14 additions and 7 deletions

View File

@ -603,6 +603,8 @@ static void HelpLong(void) {
printf("\n"); printf("\n");
printf(" -m <int> ............... compression method (0=fast, 6=slowest)\n"); printf(" -m <int> ............... compression method (0=fast, 6=slowest)\n");
printf(" -segments <int> ........ number of segments to use (1..4)\n"); printf(" -segments <int> ........ number of segments to use (1..4)\n");
printf(" -size <int> ............ Target size (in bytes)\n");
printf(" -psnr <float> .......... Target PSNR (in dB. typically: 42)\n");
printf("\n"); printf("\n");
printf(" -s <int> <int> ......... Input size (width x height) for YUV\n"); printf(" -s <int> <int> ......... Input size (width x height) for YUV\n");
printf(" -sns <int> ............. Spatial Noise Shaping (0:off, 100:max)\n"); printf(" -sns <int> ............. Spatial Noise Shaping (0:off, 100:max)\n");
@ -630,8 +632,6 @@ static void HelpLong(void) {
"times\n"); "times\n");
printf("\n"); printf("\n");
printf("Experimental Options:\n"); printf("Experimental Options:\n");
printf(" -size <int> ............ Target size (in bytes)\n");
printf(" -psnr <float> .......... Target PSNR (in dB. typically: 42)\n");
printf(" -af .................... auto-adjust filter strength.\n"); printf(" -af .................... auto-adjust filter strength.\n");
printf(" -pre <int> ............. pre-processing filter\n"); printf(" -pre <int> ............. pre-processing filter\n");
printf("\n"); printf("\n");
@ -780,8 +780,9 @@ int main(int argc, const char *argv[]) {
} }
// Read the input // Read the input
if (verbose) if (verbose) {
StopwatchReadAndReset(&stop_watch); StopwatchReadAndReset(&stop_watch);
}
if (!ReadPicture(in_file, &picture, keep_alpha)) { if (!ReadPicture(in_file, &picture, keep_alpha)) {
fprintf(stderr, "Error! Cannot read input picture\n"); fprintf(stderr, "Error! Cannot read input picture\n");
goto Error; goto Error;
@ -814,8 +815,9 @@ int main(int argc, const char *argv[]) {
picture.stats = &stats; picture.stats = &stats;
// Compress // Compress
if (verbose) if (verbose) {
StopwatchReadAndReset(&stop_watch); StopwatchReadAndReset(&stop_watch);
}
if (crop != 0 && !WebPPictureCrop(&picture, crop_x, crop_y, crop_w, crop_h)) { if (crop != 0 && !WebPPictureCrop(&picture, crop_x, crop_y, crop_w, crop_h)) {
fprintf(stderr, "Error! Cannot crop picture\n"); fprintf(stderr, "Error! Cannot crop picture\n");
goto Error; goto Error;
@ -839,8 +841,12 @@ int main(int argc, const char *argv[]) {
} }
// Write info // Write info
if (dump_file) DumpPicture(&picture, dump_file); if (dump_file) {
if (!quiet) PrintExtraInfo(&picture, short_output); DumpPicture(&picture, dump_file);
}
if (!quiet) {
PrintExtraInfo(&picture, short_output);
}
Error: Error:
free(picture.extra_info); free(picture.extra_info);

View File

@ -28,7 +28,8 @@ int WebPPictureAlloc(WebPPicture* const picture) {
const int width = picture->width; const int width = picture->width;
const int height = picture->height; const int height = picture->height;
const int y_stride = width; const int y_stride = width;
const int uv_width = (width + 1) / 2, uv_height = (height + 1) / 2; const int uv_width = (width + 1) / 2;
const int uv_height = (height + 1) / 2;
const int uv_stride = uv_width; const int uv_stride = uv_width;
int uv0_stride = 0; int uv0_stride = 0;
int a_width, a_stride; int a_width, a_stride;