comparison libmpcodecs/vf_remove_logo.c @ 37045:f63de2684d5a

vf_remove_logo: remove pointless multiplication, the value is always 1.
author reimar
date Sun, 06 Apr 2014 19:11:24 +0000
parents dccbfcc7c177
children ce9f83c64515
comparison
equal deleted inserted replaced
37044:50ba718698ea 37045:f63de2684d5a
551 load_pgm_skip(input); 551 load_pgm_skip(input);
552 if (fscanf(input, "%i", &maximum_greyscale_value) != 1) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove-logo: Invalid PGM/PPM header.\n"); 552 if (fscanf(input, "%i", &maximum_greyscale_value) != 1) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove-logo: Invalid PGM/PPM header.\n");
553 if (maximum_greyscale_value >= 256) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove_logo: Only 1 byte per pixel (pgm) or 1 byte per color value (ppm) are supported.\n"); 553 if (maximum_greyscale_value >= 256) REMOVE_LOGO_LOAD_PGM_ERROR_MESSAGE("[vf]remove_logo: Only 1 byte per pixel (pgm) or 1 byte per color value (ppm) are supported.\n");
554 load_pgm_skip(input); 554 load_pgm_skip(input);
555 555
556 new_pgm->pixel = safe_malloc (sizeof(unsigned char) * new_pgm->width * new_pgm->height); 556 new_pgm->pixel = safe_malloc (new_pgm->width * new_pgm->height);
557 557
558 /* Load the pixels. */ 558 /* Load the pixels. */
559 /* Note: I am aware that fgetc(input) isn't the fastest way of doing things, but it is quite compact and the code only runs once when the filter is initialized.*/ 559 /* Note: I am aware that fgetc(input) isn't the fastest way of doing things, but it is quite compact and the code only runs once when the filter is initialized.*/
560 image_size = new_pgm->width * new_pgm->height; 560 image_size = new_pgm->width * new_pgm->height;
561 end_position = new_pgm->pixel + image_size; 561 end_position = new_pgm->pixel + image_size;