1 /*
2 * Copyright (c) 2019, 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 //! \file     vphal_render_vebox_memdecomp_g12.h
24 //! \brief    Defines data structures and interfaces for media memory decompression.
25 //! \details
26 //!
27 #ifndef __VPHAL_RENDER_VEBOX_MEMDECOMP_G12_H__
28 #define __VPHAL_RENDER_VEBOX_MEMDECOMP_G12_H__
29 
30 #include "vphal_render_vebox_memdecomp.h"
31 
32 class MediaVeboxDecompStateG12 : public MediaVeboxDecompState
33 {
34 public:
35     //!
36     //! \brief    Constructor, initiallize
37     //!
38     MediaVeboxDecompStateG12();
39 
40     //!
41     //! \brief    Deconstructor
42     //!
~MediaVeboxDecompStateG12()43     virtual ~MediaVeboxDecompStateG12()
44     {
45 
46     }
47 
48     //!
49     //! \brief    Creat platform specific MMD (media memory decompression) HW interface
50     //! \param    [in] surface
51     //!           Pointers to surface
52     //! \return   MOS_STATUS_SUCCESS if succeeded, else error code.
53     //!
54     virtual MOS_STATUS RenderDecompCMD(
55         PMOS_SURFACE surface);
56 
57     //!
58     //! \brief    Media memory decompression Enabled or not
59     //! \details  Media memory decompression Enabled or not
60     //!
61     //! \return   true if MMC decompression enabled, else false.
62     //!
63     virtual MOS_STATUS IsVeboxDecompressionEnabled();
64 
65     //!
66     //! \brief    Media memory double buffer decompression render
67     //! \details  Entry point to decompress media memory
68     //! \param    [in] surface
69     //!           Input surface to be copyed and decompressed
70     //! \param    [out] surface
71     //!           Output surface for clear data
72     //!
73     //! \return   MOS_STATUS_SUCCESS if succeeded, else error code.
74     //!
75     virtual MOS_STATUS RenderDoubleBufferDecompCMD(
76         PMOS_SURFACE inputSurface,
77         PMOS_SURFACE outputSurface);
78 
79     //!
80     //! Vebox Send Vebox_Tile_Convert command
81     //! \param    [in,out] cmdBuffer
82     //!           Pointer to PMOS_COMMAND_BUFFER command parameters
83     //! \param    [in]     surface
84     //!           Pointer to Input Surface parameters
85     //! \param    [in]     surface
86     //!           Pointer to Output Surface parameters
87     //! \param    [in]    streamID
88     //!            Stream ID for current surface
89     //! \return   MOS_STATUS_SUCCESS if succeeded, else error code.
90     //!
91     virtual MOS_STATUS VeboxSendVeboxTileConvertCMD(
92         PMOS_COMMAND_BUFFER cmdBuffer,
93         PMOS_SURFACE        inputSurface,
94         PMOS_SURFACE        outputSurface,
95         uint32_t            streamID);
96 };
97 #endif //__VPHAL_RENDER_VEBOX_MEMDECOMP_G12_H__
98