Handle resolution mismatches between the source video frames and the destination matrix. Previously, our code included a strict requirement that the resolution of the destination matrix (mat) had to exactly match the resolution of the incoming video frames. This approach, while straightforward, lacks the flexibility to handle cases where the resolution metadata is incorrect.
This change ensures that even if the video resolution doesn't align with the resolution indicated by the codec parameters (typically derived from the MP4 container header), we can still perform scaling operations effectively.
This change was tested using clips with resolution discrepancies, supplied by @rcombs
Handle resolution mismatches between the source video frames and the destination matrix. Previously, our code included a strict requirement that the resolution of the destination matrix (
mat
) had to exactly match the resolution of the incoming video frames. This approach, while straightforward, lacks the flexibility to handle cases where the resolution metadata is incorrect.This change ensures that even if the video resolution doesn't align with the resolution indicated by the codec parameters (typically derived from the MP4 container header), we can still perform scaling operations effectively.
This change was tested using clips with resolution discrepancies, supplied by @rcombs