* Fixed#7753: Step calculation in YUV decoder
* Fixed rectangle_is_empty
* Added rectangle intersection check in YUV decoder
* Skip intersecting rectangles in YUV decoder
* Refactored YUV work object handling
* Allocate / free in yuv_context_new and yuv_context_free
* WINPR_ASSERT all function arguments
* Pass yuv_context_reset result from h264_context_reset
* Reset PTP_WORK buffer to NULL after use
- fixed invalid, missing or additional arguments
- removed all type casts from arguments
- added missing (void*) typecasts for %p arguments
- use inttypes defines where appropriate
When region_union_rect() was called with a rect that was above the region without
intersecting it, the first band was created too large. This patch fixes this and
add a unitary test.
All credits go to @nfedera that:
* found the bug;
* find a dataset to reproduce;
* code the unitary test;
* spotted a suspicious line that was the faulty one.
See Issue #2443.
When there's more than 2 rectangles in the region structure, region16_intersect_rect would calculate extents by all 'intersected' sub rectangles.
But it always extend the extents to (0,0) because it initialize the new extents as (0,0,0,0) and union later rectangles with this empty point by simple MIN/MAX calculation.
Also fixed rectangle_is_empty although it has not been used yet. The function does not work as its name.
Reuse norbert case. That case is enough for the intersect fix, but the expected result is not correct. The test case is also fixed.
Added test case to check empty rectangle.
Fix a bug in the extents of an intersection.
Add some checks and assert that helps when using the remoteFx encoder.
A speedup for intersection when bands are above the target rect.