1 /*
2 * Copyright (c) 2018, 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_roi_forceqp.h
24 //! \brief    Defines of the force QP ROI by software
25 //!
26 
27 #ifndef __CODECHAL_HEVC_VDENC_ROI_FORCE_QP_H__
28 #define __CODECHAL_HEVC_VDENC_ROI_FORCE_QP_H__
29 
30 #include "encode_hevc_vdenc_roi_strategy.h"
31 
32 namespace encode
33 {
34 
35 class ForceQPROI : public RoiStrategy
36 {
37 public:
ForceQPROI(EncodeAllocator * allocator,MediaFeatureManager * featureManager,PMOS_INTERFACE osInterface)38     ForceQPROI(EncodeAllocator *allocator,
39         MediaFeatureManager *featureManager,
40         PMOS_INTERFACE osInterface) :
41         RoiStrategy(allocator, featureManager, osInterface)
42     {
43 
44     }
45 
~ForceQPROI()46     virtual ~ForceQPROI() {}
47 
48 protected:
49     //!
50     //! \brief    Set the ROI ctrol mode(Native/ForceQP)
51     //!
52     //! \param    [in] roiCtrl
53     //!           ROI control
54     //! \param    [in] forceQp
55     //!           force QP value
56     //! \param    [out] streaminDataParams
57     //!           Streamin data parameters
58     //!
59     //! \return   void
60     //!
61     virtual void SetRoiCtrlMode(
62         uint32_t lcuIndex,
63         uint32_t regionIndex,
64         StreamInParams &streaminParams) override;
65 
66     //!
67     //! \brief    Set ROI Control/Force QP Data per LCU
68     //!
69     //! \param    [in] streaminDataParams
70     //!           Streamin data parameters
71     //! \param    [out] data
72     //!           Streamin data
73     //!
74     //! \return   void
75     //!
76     virtual void SetQpRoiCtrlPerLcu(
77         StreamInParams *streaminParams,
78         HevcVdencStreamInState *data) override;
79 
80 private:
81 
82 
83 MEDIA_CLASS_DEFINE_END(encode__ForceQPROI)
84 };
85 
86 }  // namespace encode
87 #endif  //<! __CODECHAL_HEVC_VDENC_ROI_FORCE_QP_H__