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

📄 umc_avs_dec_context.h

📁 audio-video-codecs.rar语音编解码器
💻 H
字号:
/*
//
//              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) 2007 Intel Corporation. All Rights Reserved.
//
//
*/

#ifndef __UMC_AVS_DEC_CONTEXT_H
#define __UMC_AVS_DEC_CONTEXT_H

#include "ippdefs.h"
#include "umc_structures.h"
#include "umc_video_data.h"

namespace UMC
{

// all available start codes
enum
{
    LAST_SLICE_START_CODE       = 0x0af,
    VIDEO_SEQUENCE_START_CODE   = 0x0b0,
    VIDEO_SEQUENCE_END_CODE     = 0x0b1,
    USER_DATA_START_CODE        = 0x0b2,
    I_PICTURE_START_CODE        = 0x0b3,
    EXTENSION_START_CODE        = 0x0b5,
    BP_PICTURE_START_CODE       = 0x0b6,
    VIDEO_EDIT_CODE             = 0x0b7,
    FIRST_SYSTEM_START_CODE     = 0x0b9
};

#define AVS_CBP_UNKNOWN 0x07fffffff

// forward declaration of used classes
class AVSFrame;

//
// Structure to hold parameters for color conversion
//

struct AVS_COLOR_CONVERTING_CONTEXT
{
    VideoData m_picSrc;                                         // (VideoData) source picture's parameters
    VideoData *m_pPicDst;                                       // (VideoData *) destination picture's parameters
};

//
// Structure to hold base parameters,
// which are common in other contexts
//

// forward declaration of used types
class AVSSlice;
struct AVS_SEQUENCE_HEADER;
struct AVS_PICTURE_HEADER;
struct AVS_SLICE_HEADER;
struct AVS_MB_INFO;

struct AVS_BASE_CONTEXT
{
    AVSSlice *m_pSlice;                                         // (AVSSlice *) pointer to the owning slice

    AVS_SEQUENCE_HEADER *m_pSeqHeader;                          // (AVS_PICTURE_HEADER *) pointer to the sequence's header
    AVS_PICTURE_HEADER *m_pPicHeader;                           // (AVS_PICTURE_HEADER *) pointer to the picture's header
    AVS_SLICE_HEADER *m_pSlcHeader;                             // (AVS_SLICE_HEADER *) pointer to the slice's header

    AVS_MB_INFO *m_pMBInfo;                                     // (AVS_MB_INFO *) pointer to corresponding MB info structure

    Ipp32s isSecondField;                                       // (Ipp32s) ordinal number of a field
    Ipp32s iNumberOfBlocks;                                     // (Ipp32s) number of blocks per a macroblock

    Ipp32s MbFirst;                                             // (Ipp32s) number of the first macroblock in a slice
    Ipp32s MbLast;                                              // (Ipp32s) number of the last macroblock inf a slice

    Ipp32s MbIndex;                                             // (Ipp32s) number of current macroblock
    Ipp32s MbWidth;                                             // (Ipp32s) picture's width in macroblocks
    Ipp32s MbHeight;                                            // (Ipp32s) picture's height in macroblocks

    Status m_statusTask;                                        // (Status) status of the processed task
};

//
// Structure to hold parameters
// referencing current entropy decoding state
//

struct AVS_BIT_STREAM_CONTEXT
{
    Ipp32u *src;                                                // (Ipp32u *) pointer to bit stream data
    Ipp32s offset;                                              // (Ipp32s) current bit offset
};

struct AVS_DECODING_CONTEXT : public AVS_BASE_CONTEXT
{
    AVS_BIT_STREAM_CONTEXT m_stream;                            // (AVS_BIT_STREAM_CONTEXT) current bit stream position

    Ipp16s *m_pCoeffs;                                          // (Ipp16s *) pointer to coefficient buffer

    Ipp32u FixedQP;                                             // (Ipp32u) value of fixed QP if any
    Ipp32s PreviousQP;                                          // (Ipp32s) QP of the previous decoded macroblock

    Ipp32s SkipMbCount;                                         // (Ipp32s) number of macroblocks to skip

    Ipp32s ScanType;                                            // (Ipp32s) type of inverse scan
};

//
// Structure to hold parameters
// referencing current reconstructing state
//

struct AVS_RECONSTRUCTING_CONTEXT : public AVS_BASE_CONTEXT
{
    Ipp16s *m_pCoeffs;                                          // (Ipp16s *) pointer to coefficient buffer

    Ipp32s MbX;                                                 // (Ipp32s) current X position of macroblock
    Ipp32s MbY;                                                 // (Ipp32s) current Y position of macroblock

    union
    {
    Ipp8u *(m_pPlanes8u[3]);                                    // (Ipp8u *([])) array of pointers to the being reconstructed macroblock
    Ipp16u *(m_pPlanes16u[3]);                                  // (Ipp16u *([])) array of pointers to the being reconstructed macroblock
    };
    Ipp32s m_iPitch;                                            // (Ipp32s) pitch of planes

};

//
// Structure to hold parameters
// referencing current picture post processing state
//

struct AVS_DEBLOCKING_CONTEXT : public AVS_BASE_CONTEXT
{
    Ipp32u deblocking_disabled;                                 // (Ipp32u) deblocking process is not present in this stream

    Ipp32s MbX;                                                 // (Ipp32s) current X position of macroblock
    Ipp32s MbY;                                                 // (Ipp32s) current Y position of macroblock

    union
    {
    Ipp8u *(m_pPlanes8u[3]);                                    // (Ipp8u *([])) array of pointers to the being reconstructed macroblock
    Ipp16u *(m_pPlanes16u[3]);                                  // (Ipp16u *([])) array of pointers to the being reconstructed macroblock
    };
    Ipp32s m_iPitch;                                            // (Ipp32s) pitch of planes

};

} // namespace UMC

#endif // __UMC_AVS_DEC_CONTEXT_H

⌨️ 快捷键说明

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