Coverage Report

Created: 2026-10-28 06:18

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/work/vvenc/source/Lib/EncoderLib/EncCfg.h
Line
Count
Source
1
/* -----------------------------------------------------------------------------
2
The copyright in this software is being made available under the Clear BSD
3
License, included below. No patent rights, trademark rights and/or 
4
other Intellectual Property Rights other than the copyrights concerning 
5
the Software are granted under this license.
6
7
The Clear BSD License
8
9
Copyright (c) 2019-2026, Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. & The VVenC Authors.
10
All rights reserved.
11
12
Redistribution and use in source and binary forms, with or without modification,
13
are permitted (subject to the limitations in the disclaimer below) provided that
14
the following conditions are met:
15
16
     * Redistributions of source code must retain the above copyright notice,
17
     this list of conditions and the following disclaimer.
18
19
     * Redistributions in binary form must reproduce the above copyright
20
     notice, this list of conditions and the following disclaimer in the
21
     documentation and/or other materials provided with the distribution.
22
23
     * Neither the name of the copyright holder nor the names of its
24
     contributors may be used to endorse or promote products derived from this
25
     software without specific prior written permission.
26
27
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
28
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
29
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
31
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
32
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
33
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
34
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
35
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
36
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
37
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38
POSSIBILITY OF SUCH DAMAGE.
39
40
41
------------------------------------------------------------------------------------------- */
42
/** \file     EncCfg.h
43
    \brief    encoder internal configuration class (header)
44
*/
45
46
#pragma once
47
48
#include "vvenc/vvencCfg.h"
49
50
0
#define VVENC_MAX_NUM_INTENSITIES             256
51
0
#define VVENC_MAX_NUM_MODEL_VALUES            6
52
53
namespace vvenc {
54
55
typedef struct vvencFG
56
{
57
  bool      m_fgcSEIEnabled;
58
  bool      m_fgcSEICancelFlag;
59
  bool      m_fgcSEIPersistenceFlag;
60
  uint8_t   m_fgcSEIModelID;
61
  bool      m_fgcSEISepColourDescPresentFlag;
62
  uint8_t   m_fgcSEIBlendingModeID;
63
  uint8_t   m_fgcSEILog2ScaleFactor;
64
  bool      m_fgcSEICompModelPresent[VVENC_MAX_NUM_COMP];
65
  bool      m_fgcSEIPerPictureSEI;
66
  uint8_t   m_fgcSEINumModelValuesMinus1[VVENC_MAX_NUM_COMP];
67
  uint8_t   m_fgcSEINumIntensityIntervalMinus1[VVENC_MAX_NUM_COMP];
68
  uint8_t   m_fgcSEIIntensityIntervalLowerBound[VVENC_MAX_NUM_COMP][VVENC_MAX_NUM_INTENSITIES];
69
  uint8_t   m_fgcSEIIntensityIntervalUpperBound[VVENC_MAX_NUM_COMP][VVENC_MAX_NUM_INTENSITIES];
70
  uint32_t  m_fgcSEICompModelValue[VVENC_MAX_NUM_COMP][VVENC_MAX_NUM_INTENSITIES][VVENC_MAX_NUM_MODEL_VALUES];
71
}vvencFG;
72
73
struct VVEncCfg : public vvenc_config
74
{
75
76
  VVEncCfg();
77
78
  VVEncCfg& operator= ( const vvenc_config& extern_cfg );
79
80
  // Both kinds of block importance mapping deliver per-CTU QP offsets through PicShared::m_ctuBimQpOffset and a
81
  // picture offset through m_picAuxQpOffset. BIM 2 takes both from MCTF; CU-tree (BIM 1) takes the picture offset from
82
  // MCTF and the CTU offsets from its own look-ahead.
83
176k
  bool hasBlockQpOffsets() const { return m_blockImportanceMapping > 0; }
84
4.47k
  bool useCuTree()         const { return m_blockImportanceMapping == 1; }
85
86
  bool      m_stageParallelProc;
87
  bool      m_salienceBasedOpt;
88
  bool      m_rateCap;
89
  int       m_log2GopSize;
90
  int       m_maxTLayer;
91
  int       m_bimCtuSize;
92
  unsigned  m_MaxQT[3];
93
  int       m_maxMergeRdCandNumTotal;
94
  int       m_mergeRdCandQuotaRegular;
95
  int       m_mergeRdCandQuotaRegularSmallBlk;
96
  int       m_mergeRdCandQuotaSubBlk;
97
  int       m_mergeRdCandQuotaCiip;
98
  int       m_mergeRdCandQuotaGpm;
99
  bool      m_reuseCuResults;
100
  int       m_splitCostThrParamId;
101
  vvencFG   m_fg;
102
  int       m_internalUsePerceptQPATempFiltISlice;
103
  bool      m_disableForce2ndOderFilter;
104
  double    m_cuTreeScale;      // scale of CU-tree's QP offsets, decoded from the 5-bit fixed point m_cuTreeStrength
105
  double    m_QPFraction;       // m_QPFraction in QP units (0 <= value < 1)
106
  double    m_fgaStrength;      // Film grain strength as the fraction of the analysed strength (0 <= value <  4)
107
108
109
private:
110
  void xInitCfgMembers();
111
};
112
113
}
114
115