/src/openh264/codec/processing/src/scrolldetection/ScrollDetection.h
Line | Count | Source (jump to first uncovered line) |
1 | | /*! |
2 | | * \copy |
3 | | * Copyright (c) 2009-2013, Cisco Systems |
4 | | * All rights reserved. |
5 | | * |
6 | | * Redistribution and use in source and binary forms, with or without |
7 | | * modification, are permitted provided that the following conditions |
8 | | * are met: |
9 | | * |
10 | | * * Redistributions of source code must retain the above copyright |
11 | | * notice, this list of conditions and the following disclaimer. |
12 | | * |
13 | | * * Redistributions in binary form must reproduce the above copyright |
14 | | * notice, this list of conditions and the following disclaimer in |
15 | | * the documentation and/or other materials provided with the |
16 | | * distribution. |
17 | | * |
18 | | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
19 | | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
20 | | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
21 | | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
22 | | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
23 | | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
24 | | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
25 | | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
26 | | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
27 | | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN |
28 | | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | | * POSSIBILITY OF SUCH DAMAGE. |
30 | | * |
31 | | * \file : ScrollDectection.h |
32 | | * |
33 | | * \brief : scroll detection class of wels video processor class |
34 | | * |
35 | | * \date : 2011/04/26 |
36 | | * |
37 | | * \description : rewrite the package code of scroll detection class |
38 | | * |
39 | | ************************************************************************************* |
40 | | */ |
41 | | |
42 | | #include "util.h" |
43 | | #include "memory.h" |
44 | | #include "WelsFrameWork.h" |
45 | | #include "IWelsVP.h" |
46 | | |
47 | | WELSVP_NAMESPACE_BEGIN |
48 | | |
49 | | class CScrollDetection : public IStrategy { |
50 | | public: |
51 | 0 | CScrollDetection (int32_t iCpuFlag) { |
52 | 0 | m_eMethod = METHOD_SCROLL_DETECTION; |
53 | 0 | WelsMemset (&m_sScrollDetectionParam, 0, sizeof (m_sScrollDetectionParam)); |
54 | 0 | } |
55 | 0 | ~CScrollDetection() { |
56 | 0 | } |
57 | | EResult Process (int32_t iType, SPixMap* pSrcPixMap, SPixMap* pRefPixMap); |
58 | | EResult Set (int32_t iType, void* pParam); |
59 | | EResult Get (int32_t iType, void* pParam); |
60 | | |
61 | | private: |
62 | | void ScrollDetectionWithMask (SPixMap* pSrcPixMap, SPixMap* pRefPixMap); |
63 | | void ScrollDetectionWithoutMask (SPixMap* pSrcPixMap, SPixMap* pRefPixMap); |
64 | | private: |
65 | | SScrollDetectionParam m_sScrollDetectionParam; |
66 | | }; |
67 | | |
68 | | WELSVP_NAMESPACE_END |