[FFmpeg-devel] [PATCH] ffplay: replace rint by lrint
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Fri Dec 25 22:15:42 CET 2015
On Fri, Dec 25, 2015 at 12:51 PM, Ronald S. Bultje <rsbultje at gmail.com> wrote:
> Hi,
>
> On Fri, Dec 25, 2015 at 2:29 PM, Ganesh Ajjanagadde <gajjanagadde at gmail.com>
> wrote:
>>
>> avoids the float to integer cast, and is slightly superior in terms of
>> rounding ("Dutch/Gauss rounding").
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>> ffplay.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/ffplay.c b/ffplay.c
>> index 2f8a0bf..9256392 100644
>> --- a/ffplay.c
>> +++ b/ffplay.c
>> @@ -927,10 +927,10 @@ static void calculate_display_rect(SDL_Rect *rect,
>>
>> /* XXX: we suppose the screen has a 1.0 pixel ratio */
>> height = scr_height;
>> - width = ((int)rint(height * aspect_ratio)) & ~1;
>> + width = (lrint(height * aspect_ratio)) & ~1;
>> if (width > scr_width) {
>> width = scr_width;
>> - height = ((int)rint(width / aspect_ratio)) & ~1;
>> + height = (lrint(width / aspect_ratio)) & ~1;
>> }
>
>
> You can actually remove one more set of brackets. Patch itself probably OK.
yes, pushed. Thanks.
I feel the number of strong acks has gone down, with people more
hesitant to place such strong faith in patches. I have not helped here
with failures like exp10 and other more serious instances - it
definitely makes me very hesitant while looking at patches. Maybe it
is also due to the fact that the review process has become a little
more chaotic. Anyway, I try to make do with what I get and give what I
can, and in the absence of review or concrete acks exercise my own
discretion. Just an observation, don't know if something needs to
change here.
>
> Ronald
More information about the ffmpeg-devel
mailing list