⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 umc_vc1_dec_mc.cpp

📁 audio-video-codecs.rar语音编解码器
💻 CPP
📖 第 1 页 / 共 2 页
字号:

            ippiLUT_8u_C1IR(pY, YPitch, roiSize,pContext->LumaTable[0], vc1_dec_ic_level_tbl, 257);

            roiSize.height /= 2;
            roiSize.width /= 2;

            ippiLUT_8u_C1IR(pU, UPitch, roiSize, pContext->ChromaTable[0], vc1_dec_ic_level_tbl, 257);
            ippiLUT_8u_C1IR(pV, VPitch, roiSize, pContext->ChromaTable[0], vc1_dec_ic_level_tbl, 257);

            STATISTICS_END_TIME(m_timeStatistics->intensity_StartTime,
                m_timeStatistics->intensity_EndTime,
                m_timeStatistics->intensity_TotalTime);
        }

        if(VC1_IS_INT_BOTTOM_FIELD(picLayerHeader->INTCOMFIELD) )
        {
            roiSize.height = (pContext->m_seqLayerHeader->MAX_CODED_HEIGHT+1);
            roiSize.width = 2*(pContext->m_seqLayerHeader->MAX_CODED_WIDTH+1);
            YPitch = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_iYPitch;
            UPitch = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_iUPitch;
            VPitch = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_iVPitch;

            pY += YPitch;
            pU += UPitch;
            pV += VPitch;

            YPitch *= 2;
            UPitch *= 2;
            VPitch *= 2;

            is_bottom = 1;


            STATISTICS_START_TIME(m_timeStatistics->intensity_StartTime);

            ippiLUT_8u_C1IR(pY, YPitch, roiSize,pContext->LumaTable[1], vc1_dec_ic_level_tbl, 257);

            roiSize.height /= 2;
            roiSize.width /= 2;

            ippiLUT_8u_C1IR(pU, UPitch, roiSize, pContext->ChromaTable[1], vc1_dec_ic_level_tbl, 257);
            ippiLUT_8u_C1IR(pV, VPitch, roiSize, pContext->ChromaTable[1], vc1_dec_ic_level_tbl, 257);


            STATISTICS_END_TIME(m_timeStatistics->intensity_StartTime,
                m_timeStatistics->intensity_EndTime,
                m_timeStatistics->intensity_TotalTime);
        }

        pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_bIsExpanded = 0;

        if (is_top)
        {
            ExpandIntens_table[pContext->typeOfPreviousFrame](pContext, &pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex]);

        }
        pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_bIsExpanded = 0;

        if (is_bottom)
        {
            ExpandIntens_table[pContext->typeOfPreviousFrame](pContext, &pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex]);

        }

        if (SecFieldPicLayerHeader)
        {

            VC1PictureLayerHeader* picLayerHeader = SecFieldPicLayerHeader;

            // second field
            Ipp32s index_bottom = pContext->m_frmBuff.m_iPrevIndex;
            Ipp32s index_top    = pContext->m_frmBuff.m_iPrevIndex;
            is_bottom = 0;
            is_top    = 0;

            VC1_copy_field(pContext,!picLayerHeader->BottomField);

            if (picLayerHeader->BottomField)
                index_top = pContext->m_frmBuff.m_iCurrIndex;
            else
                index_bottom = pContext->m_frmBuff.m_iCurrIndex;

            IppiSize roiSize;

            roiSize.height = (pContext->m_seqLayerHeader->MAX_CODED_HEIGHT+1);
            roiSize.width = 2*(pContext->m_seqLayerHeader->MAX_CODED_WIDTH+1);



            if(VC1_IS_INT_TOP_FIELD(picLayerHeader->INTCOMFIELD))
            {
                Ipp32s YPitch = pContext->m_frmBuff.m_pFrames[index_top].m_iYPitch;
                Ipp32s UPitch = pContext->m_frmBuff.m_pFrames[index_top].m_iUPitch;
                Ipp32s VPitch = pContext->m_frmBuff.m_pFrames[index_top].m_iVPitch;

                Ipp8u* pY = pContext->m_frmBuff.m_pFrames[index_top].m_pY;
                Ipp8u* pU = pContext->m_frmBuff.m_pFrames[index_top].m_pU;
                Ipp8u* pV = pContext->m_frmBuff.m_pFrames[index_top].m_pV;


                YPitch *= 2;
                UPitch *= 2;
                VPitch *= 2;
                is_top    = 1;

                STATISTICS_START_TIME(m_timeStatistics->intensity_StartTime);

                ippiLUT_8u_C1IR(pY, YPitch, roiSize,pContext->LumaTable[2], vc1_dec_ic_level_tbl, 257);

                roiSize.height /= 2;
                roiSize.width /= 2;

                ippiLUT_8u_C1IR(pU, UPitch, roiSize, pContext->ChromaTable[2], vc1_dec_ic_level_tbl, 257);
                ippiLUT_8u_C1IR(pV, VPitch, roiSize, pContext->ChromaTable[2], vc1_dec_ic_level_tbl, 257);

                STATISTICS_END_TIME(m_timeStatistics->intensity_StartTime,
                    m_timeStatistics->intensity_EndTime,
                    m_timeStatistics->intensity_TotalTime);
            }

            roiSize.height = (pContext->m_seqLayerHeader->MAX_CODED_HEIGHT+1);
            roiSize.width = 2*(pContext->m_seqLayerHeader->MAX_CODED_WIDTH+1);

            if(VC1_IS_INT_BOTTOM_FIELD(picLayerHeader->INTCOMFIELD) )
            {
                Ipp32s YPitch = pContext->m_frmBuff.m_pFrames[index_bottom].m_iYPitch;
                Ipp32s UPitch = pContext->m_frmBuff.m_pFrames[index_bottom].m_iUPitch;
                Ipp32s VPitch = pContext->m_frmBuff.m_pFrames[index_bottom].m_iVPitch;

                Ipp8u* pY = pContext->m_frmBuff.m_pFrames[index_bottom].m_pY;
                Ipp8u* pU = pContext->m_frmBuff.m_pFrames[index_bottom].m_pU;
                Ipp8u* pV = pContext->m_frmBuff.m_pFrames[index_bottom].m_pV;

                pY += YPitch;
                pU += UPitch;
                pV += VPitch;
                YPitch *= 2;
                UPitch *= 2;
                VPitch *= 2;

                is_bottom = 1;


                STATISTICS_START_TIME(m_timeStatistics->intensity_StartTime);

                ippiLUT_8u_C1IR(pY, YPitch, roiSize,pContext->LumaTable[3], vc1_dec_ic_level_tbl, 257);

                roiSize.height /= 2;
                roiSize.width /= 2;

                ippiLUT_8u_C1IR(pU, UPitch, roiSize, pContext->ChromaTable[3], vc1_dec_ic_level_tbl, 257);
                ippiLUT_8u_C1IR(pV, VPitch, roiSize, pContext->ChromaTable[3], vc1_dec_ic_level_tbl, 257);


                STATISTICS_END_TIME(m_timeStatistics->intensity_StartTime,
                    m_timeStatistics->intensity_EndTime,
                    m_timeStatistics->intensity_TotalTime);
            }
            pContext->m_frmBuff.m_pFrames[index_top].m_bIsExpanded = 0;

            if (is_top)
            {
                if (index_top == pContext->m_frmBuff.m_iCurrIndex || pContext->typeOfPreviousFrame == VC1_FieldInterlace)
                    ExpandFrame_Field(pContext, &pContext->m_frmBuff.m_pFrames[index_top],0);
                else
                {
                    ExpandIntens_table[pContext->typeOfPreviousFrame](pContext, &pContext->m_frmBuff.m_pFrames[index_top]);
                }
            }
            pContext->m_frmBuff.m_pFrames[index_bottom].m_bIsExpanded = 0;

            if (is_bottom)
            {
                if (index_bottom == pContext->m_frmBuff.m_iCurrIndex || pContext->typeOfPreviousFrame == VC1_FieldInterlace)
                    ExpandFrame_Field(pContext, &pContext->m_frmBuff.m_pFrames[index_bottom],1);
                else
                {
                    ExpandIntens_table[pContext->typeOfPreviousFrame](pContext, &pContext->m_frmBuff.m_pFrames[index_bottom]);
                }
            }
             // !!!!!!! MAY_BE. ExpandFrame_Field is used 2
            pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iCurrIndex].m_bIsExpanded = 0;
            ExpandFrame_Field(pContext,
                              &pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iCurrIndex],
                              pContext->m_InitPicLayer->BottomField);
        }
    }

}
//Simple/Main Profile
void VC1CompensateFrame(VC1Context* pContext)
{
    Ipp32s YPitch = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_iYPitch;
    Ipp32s UPitch = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_iUPitch;
    Ipp32s VPitch = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_iVPitch;

    Ipp8u* pY = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_pY;
    Ipp8u* pU = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_pU;
    Ipp8u* pV = pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_pV;


    IppiSize roiSize;

    roiSize.width  = pContext->m_seqLayerHeader->widthMB * VC1_PIXEL_IN_LUMA;
    roiSize.height = pContext->m_seqLayerHeader->heightMB*VC1_PIXEL_IN_LUMA;


    ippiLUT_8u_C1IR(pY, YPitch, roiSize, pContext->LumaTable[0], vc1_dec_ic_level_tbl, 257);
    roiSize.height /= 2;
    roiSize.width /= 2;
    ippiLUT_8u_C1IR(pU, UPitch, roiSize, pContext->ChromaTable[0], vc1_dec_ic_level_tbl, 257);
    ippiLUT_8u_C1IR(pV, VPitch, roiSize, pContext->ChromaTable[0], vc1_dec_ic_level_tbl, 257);
    pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex].m_bIsExpanded = 0;

    roiSize.width  <<= 1;
    roiSize.height <<= 1;
    ExpandFrame(&pContext->m_frmBuff.m_pFrames[pContext->m_frmBuff.m_iPrevIndex], roiSize);

}
#endif //UMC_ENABLE_VC1_VIDEO_DECODER

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -