mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tests: add test for JPEG decoding.
This commit is contained in:
parent
1139908487
commit
776d120b7f
4 changed files with 2117 additions and 1 deletions
|
@ -41,7 +41,7 @@ if USE_GLX
|
|||
TEST_MIX_LIBS += $(TEST_GLX_LIBS)
|
||||
endif
|
||||
|
||||
test_codecs_source_c = test-mpeg2.c test-h264.c test-vc1.c
|
||||
test_codecs_source_c = test-mpeg2.c test-h264.c test-vc1.c test-jpeg.c
|
||||
test_codecs_source_h = $(test_codecs_source_c:%.c=%.h)
|
||||
|
||||
test_decode_SOURCES = test-decode.c $(test_codecs_source_c)
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <gst/vaapi/gstvaapiwindow_x11.h>
|
||||
#include <gst/vaapi/gstvaapidecoder.h>
|
||||
#include <gst/vaapi/gstvaapisurface.h>
|
||||
#include "test-jpeg.h"
|
||||
#include "test-mpeg2.h"
|
||||
#include "test-h264.h"
|
||||
#include "test-vc1.h"
|
||||
|
@ -35,6 +36,7 @@
|
|||
#endif
|
||||
#if USE_CODEC_PARSERS
|
||||
# include <gst/vaapi/gstvaapidecoder_h264.h>
|
||||
# include <gst/vaapi/gstvaapidecoder_jpeg.h>
|
||||
# include <gst/vaapi/gstvaapidecoder_mpeg2.h>
|
||||
# include <gst/vaapi/gstvaapidecoder_vc1.h>
|
||||
#endif
|
||||
|
@ -52,6 +54,7 @@ struct _CodecDefs {
|
|||
|
||||
static const CodecDefs g_codec_defs[] = {
|
||||
#define INIT_FUNCS(CODEC) { #CODEC, CODEC##_get_video_info }
|
||||
INIT_FUNCS(jpeg),
|
||||
INIT_FUNCS(mpeg2),
|
||||
INIT_FUNCS(h264),
|
||||
INIT_FUNCS(vc1),
|
||||
|
@ -169,6 +172,9 @@ main(int argc, char *argv[])
|
|||
case GST_VAAPI_CODEC_H264:
|
||||
decoder = gst_vaapi_decoder_h264_new(display, decoder_caps);
|
||||
break;
|
||||
case GST_VAAPI_CODEC_JPEG:
|
||||
decoder = gst_vaapi_decoder_jpeg_new(display, decoder_caps);
|
||||
break;
|
||||
case GST_VAAPI_CODEC_MPEG2:
|
||||
decoder = gst_vaapi_decoder_mpeg2_new(display, decoder_caps);
|
||||
break;
|
||||
|
|
2080
tests/test-jpeg.c
Normal file
2080
tests/test-jpeg.c
Normal file
File diff suppressed because it is too large
Load diff
30
tests/test-jpeg.h
Normal file
30
tests/test-jpeg.h
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* test-jpeg.h - JPEG test data
|
||||
*
|
||||
* Copyright (C) 2012 Intel Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public License
|
||||
* as published by the Free Software Foundation; either version 2.1
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef TEST_JPEG_H
|
||||
#define TEST_JPEG_H
|
||||
|
||||
#include <glib.h>
|
||||
#include "test-decode.h"
|
||||
|
||||
void jpeg_get_video_info(VideoDecodeInfo *info);
|
||||
|
||||
#endif /* TEST_JPEG_H */
|
Loading…
Reference in a new issue