| 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 | //! \file cm_sampler8x8_state_rt.h |
| 24 | //! \brief Contains CmSampler8x8State_RT declarations. |
| 25 | //! |
| 26 | |
| 27 | #ifndef MEDIARIVER_AGNOSTIC_COMMON_CM_CMSAMPLER8X8STATERT_H_ |
| 28 | #define MEDIARIVER_AGNOSTIC_COMMON_CM_CMSAMPLER8X8STATERT_H_ |
| 29 | |
| 30 | #include "cm_sampler8x8.h" |
| 31 | |
| 32 | namespace CMRT_UMD |
| 33 | { |
| 34 | class SamplerIndex; |
| 35 | |
| 36 | //*----------------------------------------------------------------------------- |
| 37 | //! CM Sampler8x8State |
| 38 | //*----------------------------------------------------------------------------- |
| 39 | class CmSampler8x8State_RT: public CmSampler8x8 |
| 40 | { |
| 41 | public: |
| 42 | CM_RT_API int32_t GetIndex(SamplerIndex* &index); |
| 43 | |
| 44 | static int32_t Create(const CM_SAMPLER_8X8_DESCR &sampleState, |
| 45 | unsigned int index, |
| 46 | CmSampler8x8State_RT* &sampler); |
| 47 | |
| 48 | static int32_t Destroy(CmSampler8x8State_RT* &sampler); |
| 49 | |
| 50 | //NOT depend on RTTI::dynamic_cast |
| 51 | CM_ENUM_CLASS_TYPE Type() const |
| 52 | { return CM_ENUM_CLASS_TYPE_CMSAMPLER8X8STATE_RT; } |
| 53 | |
| 54 | CM_SAMPLER_STATE_TYPE GetStateType() { return m_stateType; } |
| 55 | |
| 56 | private: |
| 57 | CmSampler8x8State_RT(const CM_SAMPLER_8X8_DESCR &sampleState); |
| 58 | |
| 59 | ~CmSampler8x8State_RT(); |
| 60 | |
| 61 | CmSampler8x8State_RT& operator= (const CmSampler8x8State_RT &other); |
| 62 | |
| 63 | int32_t Initialize(unsigned int index); |
| 64 | |
| 65 | SamplerIndex *m_index; |
| 66 | |
| 67 | CM_AVS_STATE_MSG m_avsState; |
| 68 | CM_CONVOLVE_STATE_MSG m_convolveState; |
| 69 | CM_MISC_STATE_MSG m_miscState; |
| 70 | |
| 71 | CM_SAMPLER_STATE_TYPE m_stateType; |
| 72 | }; |
| 73 | }; //namespace |
| 74 | |
| 75 | #endif // #ifndef #ifndef MEDIARIVER_AGNOSTIC_COMMON_CM_CMSAMPLER8X8STATERT_H_ |