Re: [FFmpeg-devel] [PATCH 1/2] vaapi_encode_h264: Reduce SAR to valid range

2018-10-31 Thread Mark Thompson
On 28/10/18 17:13, Mark Thompson wrote: > The SAR of the input could have a numerator or denominator greater than > 2^16 which would then be truncated to a 16-bit integer when written to > the VUI parameters, giving a random result. Instead, reduce the SAR to > the nearest representable fraction.

[FFmpeg-devel] [PATCH 1/2] vaapi_encode_h264: Reduce SAR to valid range

2018-10-28 Thread Mark Thompson
The SAR of the input could have a numerator or denominator greater than 2^16 which would then be truncated to a 16-bit integer when written to the VUI parameters, giving a random result. Instead, reduce the SAR to the nearest representable fraction. --- libavcodec/vaapi_encode_h264.c | 12 +++