[FFmpeg-devel] [PATCH 01/10] avformat/mov: use hypot()

Ganesh Ajjanagadde gajjanag at mit.edu
Sun Nov 22 22:20:51 CET 2015


On Sun, Nov 22, 2015 at 3:28 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Sun, Nov 22, 2015 at 12:05:41PM -0500, Ganesh Ajjanagadde wrote:
>> This simplifies the code.
>>
>> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> ---
>>  libavformat/mov.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/libavformat/mov.c b/libavformat/mov.c
>> index 8493de9..5fc48cb 100644
>> --- a/libavformat/mov.c
>> +++ b/libavformat/mov.c
>> @@ -3421,9 +3421,8 @@ static int mov_read_tkhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
>>      if (width && height && sc->display_matrix) {
>>          double disp_transform[2];
>>
>> -#define SQR(a) ((a)*(double)(a))
>>          for (i = 0; i < 2; i++)
>> -            disp_transform[i] = sqrt(SQR(display_matrix[i][0]) + SQR(display_matrix[i][1]));
>> +            disp_transform[i] = hypot(display_matrix[i][0], display_matrix[i][1]);
>
> LGTM
>
> thx

pushed, thanks

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> The educated differ from the uneducated as much as the living from the
> dead. -- Aristotle
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list