[FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c
Michael Niedermayer
michael at niedermayer.cc
Tue Mar 22 15:21:19 CET 2016
On Tue, Mar 22, 2016 at 12:05:53PM +0000, Petru Rares Sincraian wrote:
> Hi,
> In this patch I made the following changes:
>
> - Added the missing file /tests/ref/fate/display
> - Now the program prints integers to avoid different results on different platforms.
>
>
> Thanks for your patience and especially to Michael,
> Petru Rares.
>
> ________________________________________
> From: Michael Niedermayer <michael at niedermayer.cc>
> Sent: Sunday, March 20, 2016 11:32 PM
> To: FFmpeg development discussions and patches
> Cc: Petru Rares Sincraian
> Subject: Re: [FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c
>
> On Sun, Mar 20, 2016 at 09:29:04AM +0000, Petru Rares Sincraian wrote:
> >
> > - Check if av_display_rotation_get() gets the correct degrees
> > - Check if av_display_rotation_set() sets the correct matrix
> > - Check if av_display_matrix_flip() changes correct the matrix
> > ---
> > libavutil/Makefile | 1 +
> > libavutil/display.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> > libavutil/display.h | 1 +
> > tests/fate/libavutil.mak | 4 ++++
> > 4 files changed, 53 insertions(+)
>
> Missing reference file
> make fate-display
> ...
> TEST display
> reference file './tests/ref/fate/display' not found
> ./tests/fate-run.sh: 307: ./tests/fate-run.sh: cannot open tests/data/fate/display.diff: No such file
> Test display failed. Look at tests/data/fate/display.err for details.
> make: *** [fate-display] Error 1
>
> also, if you arent subscribed to ffmpeg-devel, its highly recommanded
> to subscribe as developers generally forget to CC people who are not
> subscribed
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Into a blind darkness they enter who follow after the Ignorance,
> they as if into a greater darkness enter who devote themselves
> to the Knowledge alone. -- Isha Upanishad
> libavutil/Makefile | 1 +
> libavutil/display.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> libavutil/display.h | 1 +
> tests/fate/libavutil.mak | 4 ++++
> tests/ref/fate/display | 16 ++++++++++++++++
> 5 files changed, 69 insertions(+)
> 7c96ae727ecda72a68bfccd84cc80ed47572548d 0001-Added-a-selftest-to-libavutil-display.c.patch
> From f2fec6cd08bc91058d5f8d012dfa900a722036ce Mon Sep 17 00:00:00 2001
> From: Petru Rares Sincraian <psincraian at outlook.com>
> Date: Tue, 22 Mar 2016 12:55:24 +0100
> Subject: [PATCH] Added a selftest to libavutil/display.c
>
> - Check if av_display_rotation_get() gets the correct degrees
> - Check if av_display_rotation_set() sets the correct matrix
> - Check if av_display_matrix_flip() changes correct the matrix
> ---
> libavutil/Makefile | 1 +
> libavutil/display.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
> libavutil/display.h | 1 +
> tests/fate/libavutil.mak | 4 ++++
> tests/ref/fate/display | 16 ++++++++++++++++
> 5 files changed, 69 insertions(+)
> create mode 100644 tests/ref/fate/display
>
> diff --git a/libavutil/Makefile b/libavutil/Makefile
> index 58df75a..43fcf75 100644
> --- a/libavutil/Makefile
> +++ b/libavutil/Makefile
> @@ -198,6 +198,7 @@ TESTPROGS = adler32 \
> parseutils \
> pixdesc \
> pixelutils \
> + display \
> random_seed \
> rational \
> ripemd \
the list is alphabetically ordered, please insert the new entry
so that it stays ordered
> diff --git a/libavutil/display.c b/libavutil/display.c
> index a0076e0..51ee992 100644
> --- a/libavutil/display.c
> +++ b/libavutil/display.c
> @@ -71,3 +71,50 @@ void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip)
> for (i = 0; i < 9; i++)
> matrix[i] *= flip[i % 3];
> }
> +
> +#ifdef TEST
> +
> +// Convert 2.30 fixed-point to double
> +#define CONV_FP30(x) ((double) (x)) / (1 << 30)
unused
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
It is what and why we do it that matters, not just one of them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160322/39e90f6c/attachment.sig>
More information about the ffmpeg-devel
mailing list