1 /*
2 * Copyright (c) 2020-2021, 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     encode_avc_vdenc_weighted_prediction.h
24 //! \brief    Defines for avc weighted prediction feature
25 //!
26 #ifndef __ENCODE_AVC_VDENC_WEIGHTED_PREDICTION_H__
27 #define __ENCODE_AVC_VDENC_WEIGHTED_PREDICTION_H__
28 
29 #include "media_feature.h"
30 #include "encode_allocator.h"
31 #include "codec_hw_next.h"
32 #include "encode_avc_basic_feature.h"
33 #include "mhw_vdbox_vdenc_itf.h"
34 #include "mhw_vdbox_mfx_itf.h"
35 
36 namespace encode
37 {
38 
39 class AvcVdencWeightedPred : public MediaFeature, public mhw::vdbox::vdenc::Itf::ParSetting, public mhw::vdbox::mfx::Itf::ParSetting
40 {
41 public:
42     AvcVdencWeightedPred(
43         MediaFeatureManager *featureManager,
44         EncodeAllocator *allocator,
45         CodechalHwInterfaceNext *hwInterface,
46         void *constSettings);
47 
~AvcVdencWeightedPred()48     virtual ~AvcVdencWeightedPred() {}
49 
50     MHW_SETPAR_DECL_HDR(VDENC_WEIGHTSOFFSETS_STATE);
51 
52     MHW_SETPAR_DECL_HDR(VDENC_AVC_IMG_STATE);
53 
54     MHW_SETPAR_DECL_HDR(MFX_AVC_WEIGHTOFFSET_STATE);
55 
56 protected:
57     AvcBasicFeature *m_basicFeature = nullptr;  //!< EncodeBasicFeature
58 
59 MEDIA_CLASS_DEFINE_END(encode__AvcVdencWeightedPred)
60 };
61 
62 }  // namespace encode
63 
64 #endif  // !__ENCODE_AVC_VDENC_WEIGHTED_PREDICTION_H__
65