Ocean
testlibyuv/TestFrameShrinker.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_TESTLIBYUV_TEST_FRAME_SHRINKER_H
9 #define META_OCEAN_TEST_TESTCV_TESTLIBYUV_TEST_FRAME_SHRINKER_H
10 
12 
13 namespace Ocean
14 {
15 
16 namespace Test
17 {
18 
19 namespace TestCV
20 {
21 
22 namespace TestLibyuv
23 {
24 
25 /**
26  * This class tests/benchmarks the performance of frame shrinking.
27  * @ingroup testcvlibyuv
28  */
29 class OCEAN_TEST_CV_LIBYUV_EXPORT TestFrameShrinker
30 {
31  public:
32 
33  /**
34  * Benchmarks the performance of libyuv agains Ocean for frame shrinking functions.
35  * @param testDuration Number of seconds for each test, with range (0, infinity)
36  */
37  static void test(const double testDuration);
38 
39  private:
40 
41  /**
42  * Benchmarks the shrinking of frames by a factor of two.
43  * @param testDuration Number of seconds for each test, with range (0, infinity)
44  */
45  static void testDivideByTwo(const double testDuration);
46 
47  /**
48  * Benchmarks the shrinking of a specific source frame by a factor of two
49  * @param sourceWidth The width of the source frame in pixel, with range [1, infinity)
50  * @param sourceHeight The height of the source frame in pixel, with range [1, infinity)
51  * @param channels The number of channels both frames have, with range [1, infinity)
52  * @param testDuration Number of seconds for each test, with range (0, infinity)
53  */
54  static void testDivideByTwo(const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int channels, const double testDuration);
55 };
56 
57 }
58 
59 }
60 
61 }
62 
63 }
64 
65 #endif // META_OCEAN_TEST_TESTCV_TESTLIBYUV_TEST_FRAME_SHRINKER_H
This class tests/benchmarks the performance of frame shrinking.
Definition: testlibyuv/TestFrameShrinker.h:30
static void testDivideByTwo(const double testDuration)
Benchmarks the shrinking of frames by a factor of two.
static void testDivideByTwo(const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int channels, const double testDuration)
Benchmarks the shrinking of a specific source frame by a factor of two.
static void test(const double testDuration)
Benchmarks the performance of libyuv agains Ocean for frame shrinking functions.
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15