- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By default, SetSequenceParameters() uses flat scaling lists. I tried replacing them with customized scaling lists, but the decoded frame got quality degradation.
Does Intel support user-defined scaling lists? If yes, how can I use them? thank you!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
use_default_scaling_matrix is set to 1.
I believe this is a bug.
Please check the code in the end.
I changed the memcpy statements using DefaultScalingList4x4 and DefaultScalingList8x8.
I encoded a 1920*1080 image by setting use_default_scaling_matrix to true.
The output of Intel H264 decoder got mosaic distortion, but the JM decoder was fine.
It looks to me that Intel h264 codec only supports flat scaling.
if
( m_info.use_default_scaling_matrix){ Ipp32s i; //setup matrices that will be used m_SeqParamSet.seq_scaling_matrix_present_flag = true; // 4x4 matrices for( i=0; i<6; i++ ) m_SeqParamSet.seq_scaling_list_present_flag[i] = true; //Copy default memcpy(m_SeqParamSet.seq_scaling_list_4x4[0], UMC_H264_ENCODER::FlatScalingList4x4, 16*sizeof(Ipp8u)); memcpy(m_SeqParamSet.seq_scaling_list_4x4[1], UMC_H264_ENCODER::FlatScalingList4x4, 16*sizeof(Ipp8u)); memcpy(m_SeqParamSet.seq_scaling_list_4x4[2], UMC_H264_ENCODER::FlatScalingList4x4, 16*sizeof(Ipp8u)); memcpy(m_SeqParamSet.seq_scaling_list_4x4[3], UMC_H264_ENCODER::FlatScalingList4x4, 16*sizeof(Ipp8u)); memcpy(m_SeqParamSet.seq_scaling_list_4x4[4], UMC_H264_ENCODER::FlatScalingList4x4, 16*sizeof(Ipp8u)); memcpy(m_SeqParamSet.seq_scaling_list_4x4[5], UMC_H264_ENCODER::FlatScalingList4x4, 16*sizeof(Ipp8u)); // 8x8 matrices m_SeqParamSet.seq_scaling_list_present_flag[6] = true; m_SeqParamSet.seq_scaling_list_present_flag[7] = true; //Copy default scaling matrices memcpy(m_SeqParamSet.seq_scaling_list_8x8[0], UMC_H264_ENCODER::DefaultScalingList8x8[1], 64*sizeof(Ipp8u)); memcpy(m_SeqParamSet.seq_scaling_list_8x8[1], UMC_H264_ENCODER::DefaultScalingList8x8[1], 64*sizeof(Ipp8u));}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think in the encoder (for 4x4 transform)custom scaling list support is not added.
From the code:
inline IppStatus ippiTransformQuantResidual_H264(Ipp16s* pSrcDst,
Ipp16s* pDst,
Ipp32s Qp,
Ipp32s* pNumLevels,
Ipp32s Intra,
Ipp16s* pScanMatrix,
Ipp32s* pLastCoeff,
Ipp16s* pScaleLevels = NULL)
{
return ippiTransformQuantFwd4x4_H264_16s_C1(pSrcDst,pDst, Qp, pNumLevels, (Ipp8u)Intra, pScanMatrix,pLastCoeff, pScaleLevels);
}
and function call
ippiTransformQuantResidual_H264
(pDiffBuf,pTransformResult, uMBQP,&iNumCoeffs, (slice_type == INTRASLICE), enc_single_scan[is_cur_mb_field],&iLastCoeff)By default ;pScaleLevels = NULL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
our H.264 expert commented:
At the moment customized scaling lists are not supported.
You can use default scaling lists for 8x8 transform only. Support for customized scaling list in 4x4 transform will be added later.
Regards,
Vladimir
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page