1 /*
2 * Copyright (c) 2020, 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_hevc_vdenc_preenc.h
24 //! \brief    Defines the interface for encode hevc preenc feature
25 //!
26 #ifndef __ENCODE_HEVC_VDENC_PREENC_H__
27 #define __ENCODE_HEVC_VDENC_PREENC_H__
28 
29 #include "mhw_vdbox_vdenc_itf.h"
30 #include "encode_mem_compression.h"
31 #include "encode_hevc_basic_feature.h"
32 #include "encode_preenc_basic_feature.h"
33 
34 namespace encode
35 {
36 class HevcVdencPreEnc : public PreEncBasicFeature
37 {
38 public:
39     HevcVdencPreEnc(MediaFeatureManager *featureManager,
40         EncodeAllocator *                allocator,
41         CodechalHwInterfaceNext *            hwInterface,
42         TrackedBuffer *                  trackedBuf,
43         RecycleResource *                recycleBuf,
44         void *                           constSettings = nullptr);
45 
46     virtual ~HevcVdencPreEnc();
47 
48 protected:
49     virtual MOS_STATUS PreparePreEncConfig(void *params) override;
50 
51     EncodeAllocator *m_allocator = nullptr;
52 
53     HevcBasicFeature *m_basicFeature = nullptr;  //!< EncodeBasicFeature
54 
55     PCODEC_HEVC_ENCODE_SEQUENCE_PARAMS m_hevcSeqParams   = nullptr;  //!< Pointer to sequence parameter
56     PCODEC_HEVC_ENCODE_PICTURE_PARAMS  m_hevcPicParams   = nullptr;  //!< Pointer to picture parameter
57     PCODEC_HEVC_ENCODE_SLICE_PARAMS    m_hevcSliceParams = nullptr;  //!< Pointer to slice parameter
58 
59 MEDIA_CLASS_DEFINE_END(encode__HevcVdencPreEnc)
60 };
61 
62 }  // namespace encode
63 
64 #endif  // !__ENCODE_HEVC_VDENC_PREENC_H__
65