Ocean
Loading...
Searching...
No Matches
TestFrameConverterY32.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTCV_TEST_FRAME_CONVERTER_Y_32_H
9#define META_OCEAN_TEST_TESTCV_TEST_FRAME_CONVERTER_Y_32_H
10
13
14#include "ocean/base/Worker.h"
15
17
19
20namespace Ocean
21{
22
23namespace Test
24{
25
26namespace TestCV
27{
28
29/**
30 * This class implements a Y32 frame converter test.
31 * @ingroup testcv
32 */
33class OCEAN_TEST_CV_EXPORT TestFrameConverterY32
34{
35 public:
36
37 /**
38 * Tests all Y32 bit frame conversion functions.
39 * @param width The width of the test frame in pixel, with range [1, infinity)
40 * @param height The height of the test frame in pixel, with range [1, infinity)
41 * @param testDuration Number of seconds for each test, with range (0, infinity)
42 * @param worker The worker object
43 * @param selector The test selector to control which tests to run
44 * @return True, if succeeded
45 */
46 static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker& worker, const TestSelector& selector = TestSelector());
47
48 /**
49 * Tests the Y32 to Y8 conversion.
50 * @param width The width of the original frame in pixel, with range [1, infinity)
51 * @param height The height of the original frame in pixel, with range [1, infinity)
52 * @param flag The conversion flag that has been applied during conversion
53 * @param testDuration Number of seconds for each test, with range (0, infinity)
54 * @param worker The worker object
55 * @return True, if succeeded
56 */
57 static bool testY32ToY8(const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker& worker);
58
59 /**
60 * Tests the Y32 to Y16 conversion.
61 * @param width The width of the original frame in pixel, with range [1, infinity)
62 * @param height The height of the original frame in pixel, with range [1, infinity)
63 * @param flag The conversion flag that has been applied during conversion
64 * @param testDuration Number of seconds for each test, with range (0, infinity)
65 * @param worker The worker object
66 * @return True, if succeeded
67 */
68 static bool testY32ToY16(const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker& worker);
69};
70
71}
72
73}
74
75}
76
77#endif // META_OCEAN_TEST_TESTCV_TEST_FRAME_CONVERTER_Y_32_H
ConversionFlag
Definition of individual conversion flags.
Definition FrameConverter.h:39
This class implements a Y32 frame converter test.
Definition TestFrameConverterY32.h:34
static bool testY32ToY8(const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker &worker)
Tests the Y32 to Y8 conversion.
static bool testY32ToY16(const unsigned int width, const unsigned int height, const CV::FrameConverter::ConversionFlag flag, const double testDuration, Worker &worker)
Tests the Y32 to Y16 conversion.
static bool test(const unsigned int width, const unsigned int height, const double testDuration, Worker &worker, const TestSelector &selector=TestSelector())
Tests all Y32 bit frame conversion functions.
This class implements a test selector that parses test function strings and determines which tests sh...
Definition TestSelector.h:51
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
The namespace covering the entire Ocean framework.
Definition Accessor.h:15