| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
#ifndef __ENCODE_HEVC_DSS_H__ |
| 28 |
#define __ENCODE_HEVC_DSS_H__ |
| 29 |
|
| 30 |
#include "media_feature.h" |
| 31 |
#include "encode_allocator.h" |
| 32 |
#include "codec_hw_next.h" |
| 33 |
#include "encode_basic_feature.h" |
| 34 |
#include "encode_pipeline.h" |
| 35 |
#include "encode_status_report.h" |
| 36 |
|
| 37 |
#define ENCODE_HEVC_MIN_DSS_PIC_WIDTH 480 |
| 38 |
#define ENCODE_HEVC_MIN_DSS_PIC_HEIGHT 320 |
| 39 |
|
| 40 |
namespace encode |
| 41 |
{ |
| 42 |
class HevcEncodeDss : public MediaFeature |
| 43 |
{ |
| 44 |
public: |
| 45 |
HevcEncodeDss(MediaFeatureManager *featureManager, EncodeAllocator *allocator, CodechalHwInterfaceNext *hwInterface, void *constSettings); |
| 46 |
|
| 47 |
~HevcEncodeDss() {} |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
MOS_STATUS Init(void *settings); |
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
MOS_STATUS Update(void *params); |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
MOS_STATUS ReadHcpStatus( |
| 81 |
MHW_VDBOX_NODE_IND vdboxIndex, |
| 82 |
MOS_COMMAND_BUFFER &cmdBuffer); |
| 83 |
|
| 84 |
MOS_STATUS ReadSliceSizeForSinglePipe(EncodePipeline *pipeline, MOS_COMMAND_BUFFER &cmdBuffer); |
| 85 |
|
| 86 |
MOS_STATUS ReadSliceSize(EncodePipeline *pipeline, MOS_COMMAND_BUFFER &cmdBuffer); |
| 87 |
|
| 88 |
MOS_STATUS CopyDataBlock( |
| 89 |
PMOS_RESOURCE sourceSurface, |
| 90 |
uint32_t sourceOffset, |
| 91 |
PMOS_RESOURCE destSurface, |
| 92 |
uint32_t destOffset, |
| 93 |
uint32_t copySize, |
| 94 |
MOS_COMMAND_BUFFER &cmdBuffer); |
| 95 |
|
| 96 |
MOS_STATUS GetDssBuffer(PMOS_RESOURCE &resSliceCountBuffer, PMOS_RESOURCE &resVDEncModeTimerBuffer); |
| 97 |
|
| 98 |
protected: |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
virtual MOS_STATUS AllocateResources(); |
| 104 |
|
| 105 |
|
| 106 |
const CODEC_HEVC_ENCODE_PICTURE_PARAMS * m_hevcPicParams = nullptr; |
| 107 |
const CODEC_HEVC_ENCODE_SEQUENCE_PARAMS *m_hevcSeqParams = nullptr; |
| 108 |
const CODEC_HEVC_ENCODE_SLICE_PARAMS * m_hevcSliceParams = nullptr; |
| 109 |
EncodeAllocator * m_allocator = nullptr; |
| 110 |
CodechalHwInterfaceNext * m_hwInterface = nullptr; |
| 111 |
EncodeBasicFeature * m_basicFeature = nullptr; |
| 112 |
MOS_RESOURCE m_resSliceReport[CODECHAL_ENCODE_STATUS_NUM] = {}; |
| 113 |
PMOS_RESOURCE m_resSliceCountBuffer = nullptr; |
| 114 |
PMOS_RESOURCE m_resVDEncModeTimerBuffer = nullptr; |
| 115 |
HEVC_TILE_STATS_INFO m_hevcTileStatsOffset = {}; |
| 116 |
|
| 117 |
std::shared_ptr<mhw::vdbox::hcp::Itf> m_hcpItf = nullptr; |
| 118 |
std::shared_ptr<mhw::mi::Itf> m_miItf = nullptr; |
| 119 |
std::shared_ptr<mhw::vdbox::vdenc::Itf> m_vdencItf = nullptr; |
| 120 |
|
| 121 |
MEDIA_CLASS_DEFINE_END(encode__HevcEncodeDss) |
| 122 |
}; |
| 123 |
|
| 124 |
} |
| 125 |
#endif |