Debian Codegraph @

media_driver/agnostic/common/codec/hal/codechal_decode_nv12top010.h

raw
1 /*
2 * Copyright (c) 2017, Intel Corporation
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included
12 * in all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22
23 //!
24 //! \file codechal_decode_nv12top010.h
25 //! \brief Defines the interface for conversion from NV12 to P010 format.
26 //! \details This file is for the base interface which is shared by all platforms.
27 //!
28
29 #ifndef __CODECHAL_DECODE_NV12TOP010_H__
30 #define __CODECHAL_DECODE_NV12TOP010_H__
31
32 #include "cm_rt_umd.h"
33 //!
34 //! \class CodechalDecodeNV12ToP010
35 //! \brief This class converts NV12 to P010 format.
36 //!
37 class CodechalDecodeNV12ToP010
38 {
39 public:
40 //!
41 //! \brief Constructor
42 //!
43 CodechalDecodeNV12ToP010() {};
44
45 //!
46 //! \brief Destructor
47 //!
48 virtual ~CodechalDecodeNV12ToP010();
49
50 //!
51 //! \brief The entry to convert NV12 surface to P010 surface
52 //! \param [in] srcResource
53 //! The NV12 surface
54 //! \param [out] dstResource
55 //! The P010 surface
56 //! \return MOS_STATUS
57 //! MOS_STATUS_SUCCESS if success, else fail reason
58 //!
59 MOS_STATUS Execute(
60 PMOS_RESOURCE srcResource,
61 PMOS_RESOURCE dstResource);
62
63 protected:
64 //!
65 //! \brief Initialize the context for converting NV12 surface to P010 surface
66 //! \param [in] osInterface
67 //! The OS interface
68 //! \return MOS_STATUS
69 //! MOS_STATUS_SUCCESS if success, else fail reason
70 //!
71 MOS_STATUS Init(PMOS_INTERFACE osInterface);
72
73 protected:
74 //! \brief Pointer to kernel binary
75 const unsigned int *m_nv12ToP010KernelBinary = nullptr;
76 //! \brief Size of kernel binary
77 unsigned int m_nv12ToP010KernelSize = 0;
78
79 private:
80 //! \brief Pointer to CM device
81 CmDevice *m_cmDevice = nullptr;
82 //! \brief Pointer to CM queue
83 CmQueue *m_cmQueue = nullptr;
84 //! \brief Pointer to CM kernel
85 CmKernel *m_cmKernel = nullptr;
86 //! \brief Pointer to CM task
87 CmTask *m_cmTask = nullptr;
88 //! \brief Pointer to CM thread space
89 CmThreadSpace *m_cmThreadSpace = nullptr;
90 //! \brief Pointer to os interface
91 PMOS_INTERFACE m_osInterface = nullptr;
92 };
93
94 #endif
95