📄 umc_vc1_dec_ppic.cpp
字号:
/* /////////////////////////////////////////////////////////////////////////////
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright(c) 2004-2007 Intel Corporation. All Rights Reserved.
//
//
// VC-1 decoder, P picture layer for simple\main profiles
//
*/
#include "umc_defs.h"
#if defined (UMC_ENABLE_VC1_VIDEO_DECODER)
#include "umc_vc1_dec_seq.h"
#include "umc_vc1_dec_debug.h"
#include "umc_vc1_dec_time_statistics.h"
static const Ipp32u bc_lut_1[] = {2,0,1,3};
static const Ipp32u bc_lut_2[] = {0,1,2,3};
static const Ipp32u bc_lut_3[] = {2,0,1,3};
static const Ipp32u bc_lut_4[] = {0,1,2,3};
VC1Status DecodePictureLayer_ProgressivePpicture(VC1Context* pContext)
{
VC1Status vc1Res = VC1_OK;
VC1PictureLayerHeader* picLayerHeader = pContext->m_picLayerHeader;
VC1SequenceLayerHeader* seqLayerHeader = pContext->m_seqLayerHeader;
Ipp32u tempValue;
Ipp32u LUMSCALE;
Ipp32u LUMSHIFT;
seqLayerHeader->RNDCTRL = 1 - seqLayerHeader->RNDCTRL;
picLayerHeader->RNDCTRL = seqLayerHeader->RNDCTRL;
pContext->interp_params_luma.roundControl = pContext->m_picLayerHeader->RNDCTRL;
pContext->interp_params_chroma.roundControl = pContext->m_picLayerHeader->RNDCTRL;
memset(pContext->savedMV,0X7F,sizeof(Ipp16s)*pContext->m_seqLayerHeader->heightMB*pContext->m_seqLayerHeader->widthMB*4*2);
//PQINDEX is a 5-bit field that signals the quantizer scale index
//for the entire frame. It is present in all picture types. If the
//implicit quantizer is used (signaled by sequence field
//QUANTIZER = 00, see section 3.1.19) then PQINDEX specifies both
//the picture quantizer scale (PQUANT) and the quantizer
//(3QP or 5QP deadzone) used for the frame. Table 5 shows how
//PQINDEX is translated to PQUANT and the quantizer for implicit mode.
//If the quantizer is signaled explicitly at the sequence or frame
//level (signaled by sequence field QUANTIZER = 01, 10 or 11 see
//section 3.1.19) then PQINDEX is translated to the picture quantizer
//stepsize PQUANT as indicated by Table 6.
VC1_GET_BITS(5, picLayerHeader->PQINDEX);
CalculatePQuant(pContext);
ChooseTTMB_TTBLK_SBP(pContext);
if(picLayerHeader->PQINDEX <= 8)
{
//3.2.1.8
//HALFQP is a 1bit field present in all frame types if QPINDEX
//is less than or equal to 8. The HALFQP field allows the picture
//quantizer to be expressed in half step increments over the low
//PQUANT range. If HALFQP = 1 then the picture quantizer stepsize
//is PQUANT + ?. If HALFQP = 0 then the picture quantizer
//stepize is PQUANT. Therefore, if the 3QP deadzone quantizer
//is used then half stepsizes are possible up to PQUANT = 9
//(i.e., PQUANT = 1, 1.5, 2, 2.5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -