本文整理汇总了C++中PicturePtr::editIqMatrix方法的典型用法代码示例。如果您正苦于以下问题:C++ PicturePtr::editIqMatrix方法的具体用法?C++ PicturePtr::editIqMatrix怎么用?C++ PicturePtr::editIqMatrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PicturePtr
的用法示例。
在下文中一共展示了PicturePtr::editIqMatrix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
bool VaapiDecoderH265::fillIqMatrix(const PicturePtr& picture, const H265SliceHdr* const slice)
{
H265PPS* pps = slice->pps;
H265SPS* sps = pps->sps;
H265ScalingList* scalingList;
if (pps->scaling_list_data_present_flag) {
scalingList = &pps->scaling_list;
} else if(sps->scaling_list_enabled_flag) {
if(sps->scaling_list_data_present_flag) {
scalingList = &sps->scaling_list;
} else {
scalingList = &pps->scaling_list;
}
} else {
//default scaling list
return true;
}
VAIQMatrixBufferHEVC* iqMatrix;
if (!picture->editIqMatrix(iqMatrix))
return false;
fillScalingList4x4(iqMatrix, scalingList);
fillScalingList8x8(iqMatrix, scalingList);
fillScalingList16x16(iqMatrix, scalingList);
fillScalingList32x32(iqMatrix, scalingList);
fillScalingListDc16x16(iqMatrix, scalingList);
fillScalingListDc32x32(iqMatrix, scalingList);
return true;
}
示例2:
/* fill quant parameter buffers functions*/
bool VaapiDecoderVP8::ensureQuantMatrix(const PicturePtr& pic)
{
Vp8Segmentation *seg = &m_parser.segmentation;
VAIQMatrixBufferVP8 *iqMatrix;
int32_t baseQI, i;
if (!pic->editIqMatrix(iqMatrix))
return false;
for (i = 0; i < 4; i++) {
int32_t tempIndex;
const int32_t MAX_QI_INDEX = 127;
if (seg->segmentation_enabled) {
baseQI = seg->quantizer_update_value[i];
if (!seg->segment_feature_mode) // 0 means delta update
baseQI += m_frameHdr.quant_indices.y_ac_qi;;
} else
baseQI = m_frameHdr.quant_indices.y_ac_qi;
// the first component is y_ac_qi
tempIndex =
baseQI < 0 ? 0 : (baseQI >
MAX_QI_INDEX ? MAX_QI_INDEX : baseQI);
iqMatrix->quantization_index[i][0] = tempIndex;
tempIndex = baseQI + m_frameHdr.quant_indices.y_dc_delta;
tempIndex =
tempIndex < 0 ? 0 : (tempIndex >
MAX_QI_INDEX ? MAX_QI_INDEX : tempIndex);
iqMatrix->quantization_index[i][1] = tempIndex;
tempIndex = baseQI + m_frameHdr.quant_indices.y2_dc_delta;
tempIndex =
tempIndex < 0 ? 0 : (tempIndex >
MAX_QI_INDEX ? MAX_QI_INDEX : tempIndex);
iqMatrix->quantization_index[i][2] = tempIndex;
tempIndex = baseQI + m_frameHdr.quant_indices.y2_ac_delta;
tempIndex =
tempIndex < 0 ? 0 : (tempIndex >
MAX_QI_INDEX ? MAX_QI_INDEX : tempIndex);
iqMatrix->quantization_index[i][3] = tempIndex;
tempIndex = baseQI + m_frameHdr.quant_indices.uv_dc_delta;
tempIndex =
tempIndex < 0 ? 0 : (tempIndex >
MAX_QI_INDEX ? MAX_QI_INDEX : tempIndex);
iqMatrix->quantization_index[i][4] = tempIndex;
tempIndex = baseQI + m_frameHdr.quant_indices.uv_ac_delta;
tempIndex =
tempIndex < 0 ? 0 : (tempIndex >
MAX_QI_INDEX ? MAX_QI_INDEX : tempIndex);
iqMatrix->quantization_index[i][5] = tempIndex;
}
return true;
}