Add control for seperate start and end for source file in FFVSHIP
For projects like av1an and its derivative that only encode a partial part of the video at a time it would be very valuable to be able to only compare a section of the source at a time.
I added --source-offset option that automatically set the source-end depending on the offset to match size with --start
example: if --source-offset 1 is used alone (on a video with 5 frames) source will use 1, 2, 3, 4 encoded will use 0, 1, 2, 3
if --source-offset -1 is used alone (on a video with 5 frames) source will use 0, 1, 2, 3 encoded will use 1, 2, 3, 4
what do you think about it? The only issue I got with this implementation is that it disable the check for having both videos of the same size, now it will automatically change --end by default to match both
so if you have --encoded representing frames 10 to 20 of a --source with 40 frames you can do
--start 0 --end 10 --source-offset -10
and it will match them correctly. Basically, --start --end is for encoded, and you move the window negatively with source-offset
I think that having --encoded-offset would be better honestly, since in most cases, encoded is smaller than source and not the opposite, that we would have source-offset negative all the time
I changed this to --encoded-offset now, it will do the same as - --source-offset