[Ffmpeg-devel] [PATCH] add skipbytes to tiny_psnr
John Dalgliesh
johnd
Tue Jul 18 12:35:14 CEST 2006
On Tue, 18 Jul 2006, Michael Niedermayer wrote:
> On Tue, Jul 18, 2006 at 11:44:30AM +0200, Benjamin Larsson wrote:
>> Index: tiny_psnr.c
>> ===================================================================
>> --- tiny_psnr.c (revision 5778)
>> +++ tiny_psnr.c (working copy)
>> @@ -106,9 +106,12 @@
>> int len= argc<4 ? 1 : atoi(argv[3]);
>> int64_t max= (1<<(8*len))-1;
>> int shift= argc<5 ? 0 : atoi(argv[4]);
>> + int skip_bytes = argc<6 ? 0 : atoi(argv[5]);
>>
>> if(argc<3){
>> - printf("tiny_psnr <file1> <file2> [<elem size> [<shift>]]\n");
>> + printf("tiny_psnr <file1> <file2> [<elem size> [<shift>] [<skip bytes>]]\n");
>
> this is still incorrect [x] means that x is optional, so [num1] [num2] is
> ambigous for the case of a single number does it mean [num1 [num2]] or [[num1] num2]
> IMHO at least
Your opinion is of course correct, it is ambiguous unless the value itself
distinguishes the fields, e.g. [letter] [number]. Anyway in this case the
code clearly implements the former, i.e. the line should be:
printf("tiny_psnr <file1> <file2> [<elem size> [<shift> [<skip bytes>]]]\n");
{P^/
More information about the ffmpeg-devel
mailing list