亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sampmp4.h

?? Linux下的基于intel的ipp庫的MPEG4編碼程序
?? H
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************
//               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) 2003 Intel Corporation. All Rights Reserved.
//
//  Description:
//    Definitions of MPEG-4 video encoder and decoder sample code for Intel(R)
//    Integrated Performance Primitives
//
******************************************************************************/

#ifndef _MP4DECODER_H_
#define _MP4DECODER_H_

#include <stdio.h>

#include "ippdefs.h"
#include "ippVC.h"
#include "sampdefs.h"
#include "sampvc.h"

#ifdef __cplusplus
extern "C" {
#endif

/* ========================== Constant Definition ========================== */

#define MPEG4_NUMBITS_VOP_WIDTH     13
#define MPEG4_NUMBITS_VOP_HEIGHT    13

#define MPEG4_NUMBITS_QMATRIX       8

#define MPEG4_SC_LEN                3           /* in bytes */
#define MPEG4_SUFFIX_VOPSC          0xB6        /* 1 byte */
#define MPEG4_SUFFIX_GOVSC          0xB3        /* 1 byte */
#define MPEG4_SUFFIX_UDSC           0xB2        /* 1 byte */
#define MPEG4_PREFIX_SC             0x000001    /* 3 bytes */
#define MPEG4_VOSC                  0x00000100  /* 4 bytes */
#define MPEG4_VOLSC                 0x00000120  /* 4 bytes */
#define MPEG4_H263_PSC              0x000020    /* 22 bits */

#define MPEG4_MB_STUFF              12

#define MPEG4_PRED_DISABLE	                -10000
#define MPEG4_ENCODE_THRESHOLD_Q_H263       20
#define MPEG4_ENCODE_THRESHOLD_Q_MPEG       16


/* ====================== Functional Macro Definition ===================== */

#define ASSERT_MARKER_BIT(pBitStream)           \
{                                               \
    if (get_bits_mpeg4(pBitStream, 1) == 0) {   \
        return SAMPLE_STATUS_ERR;               \
    }                                           \
}

#define INSERT_MARKER_BIT(pBitStream)           \
{                                               \
    put_bits_mpeg4(pBitStream, 1, 1);           \
}

#define CLIP_VIDEO_I(valResult, lowThresh, highThresh)      \
{                                                           \
    if ((valResult) < (lowThresh)) {                        \
        (valResult) = (lowThresh);                          \
    } else if ((valResult) > (highThresh)) {                \
        (valResult) = (highThresh);                         \
    }                                                       \
}

#define  ABS_MP4(x) ((x) < 0 ? -(x) : (x))

/* clip value to [0..255] */
#define CLIP_MP4_8U(x) (Ipp8u)(((x)>255) ? 255 : (((x) < 0) ? 0 : (x)))

/* ========================== Structures Definitions ======================= */

/* structures shared by decoder and encoder */
typedef IppStatus (__STDCALL *copy_block_func_ptr)
 (const Ipp8u *, int, Ipp8u  *, int, int);

typedef IppStatus (__STDCALL *recon_block_func_ptr)
 (const Ipp8u *, int, Ipp16s *, Ipp8u *, int, int);

typedef enum _mp4_vop_type{
    IVOP,PVOP,BVOP,SVOP        /* BVOP and SVOP are not supported */
} mp4_vop_type;

typedef enum _mp4_shape_type {
    RECTANGULAR     = 0,
    BINARY          = 1,
    BINARYONLY      = 2,
    GRAYSCALE       = 3
} mp4_shape_type;

typedef enum _mp4_quant_mode {
    Q_H263      =   0,
    Q_MPEG4     =   1
} mp4_quant_mode;

typedef struct _mp4_tree_node
{   Ipp8u c0_end;
    Ipp8u c1_end;
    Ipp8s next0_node_symbol;
    Ipp8s next1_node_symbol;
} mp4_tree_node;

typedef struct _mp4_table_node
{   unsigned char   value;
    signed   char   numbit;
} mp4_table_node;

/* decoder related structures */
typedef struct _mp4_dec_vop_infor {
    /* vop level */
    int     vop_time_inc;
    int     fcode_fwd;

    /* MB level */
    int     mb_indx;
    Ipp8u   cur_qp;
    int     mb_not_coded;
    int     mb_type;
    int     intra_dc_vlc;
    int     ac_pred_flag;
    int     cbpy;
    int     cbpc;
    sample_spacial_ptrset   cur_mb;
    sample_spacial_ptrset   fwd_ref_mb;

    /* Block level */
    sample_spacial_ptrset   cur_bk;
    sample_spacial_ptrset   fwd_ref_bk;

    /* Buffers */   
    /* dc and ac prediction row buffer */
    sample_spectral_ptrset  coef_buf_row;
    /* dc and ac prediction colume buffer */
    sample_spectral_ptrset  coef_buf_col;
    /* motion vector buffer */
    IppMotionVector *mv_buf;
    /* transparent infor buffer */
    Ipp8u   *tranp_buf;
    /* quantiser buffer */
    Ipp8u   *qp_buf;

    /* function pointer for motion compensation and reconstruction */
    recon_block_func_ptr recon_block_func_ptr;
    copy_block_func_ptr  copy_block_func_ptr;
} mp4_dec_vop_infor;


typedef struct _mp4_dec_state {
    int vol_verid;          /* video object layer version identification */
    int vol_prior;          /* video object layer priority */   
    int short_head;         /* MPEG-4 short header stream or not */ 
    int vop_indx;           /* Index of VOP */  
    int vol_typeid;         /* video object type identification */  
    int vol_shape_type;     /* video object layer shape type */ 
    int vop_coding_type;    /* VOP coding type, eg. I-VOP,P-VOP,B-VOP */ 
    int vol_control_para;   /* VOL control parameters included or not */    
    int chroma_fmt;         /* chrominance format */    
    int low_delay;          /* Low Delay chosen or not */   
    int bit_rate;           /* Bit Rate */  
    int vbv_buf_size;       /* VBV Buffer Size */   
    int vbv_occupancy;      /* VBV Occupancy */ 
    int fix_vop_rate;       /* Fixed VOP rate */    
    int interlaced;         /* Interlaced mode chosen */    
    int obmc_disabled;      /* Overlapped Block Motion Compensation disabled or
                            // not */
    int scalable;           /* Scalable or not */   
    int sprite_type;        /* Sprite Type */   
    int sadct_disabled;     /* shape adaptive DCT disable or not */ 
    int resync_disabled;    /* Error resillience Resync mode disable or not */  
    int data_patitioned;    /* Error resillience Data Partition mode enable or
                            // not */
    int new_pred;           /* NEWPRED mode enable or not */    
    int reduced_resolution; /* Reduced resolution VOP tool enable or not */ 
    int complex_est_disable;/* Complexity estimation header disable or not */   
    int clock_rate;         /* VOP time increment resolution */ 
    int numbits_time_incr;  /* VOP time increment */    
    int quater_sample;      /* Quarter sample mode selected or not */   
    int quant_type;         /* Quantisation mode */ 
    Ipp8u* qmatrix_intra;   /* Pointer to Luminance/Chrominance Intra
                            // Quantisation Matrix */
    Ipp8u* qmatrix_inter;   /* Pointer to Luminance/Chrominance Inter
                            // Quantisation Matrix */    
    Ipp8u  qmatrix_intra_tbl[64]; /* Matrix contain Luminance/Chrominance
                            // Intra Quantisation from stream */  
    Ipp8u  qmatrix_inter_tbl[64]; /* Matrix contain Luminance/Chrominance
                            // Inter Quantisation from stream */  
    int vop_coded;          /* VOP coded or not */  
    int vol_display_width;  /* Display width */ 
    int vol_display_height; /* Display height */    
    int mb_per_row;         /* Number of MacroBlock per Row in current VOP */   
    int mb_per_col;         /* Number of MacroBlock per Col in current VOP */
    sample_step_set       frame_step_set;
    sample_dimension      frame_dimension;    
    sample_spacial_ptrset cur_frame;     /* Pointer set of current frame */
    sample_spacial_ptrset fwd_ref_frame; /* Pointer set of forward reference
                                         // frame */                            
    int cur_frame_no;       /* Current referrence frame number,
                            // used in B-VOP */    
    int modulo_base_disp;   /* Current displayed frame number */    
    int modulo_base_decd;   /* Current decoded frame number */  
    int hour;               /* Time code Hour in Group of VOP header */ 
    int minute;             /* Time code Minute in Group of VOP header */   
    int second;             /* Time code Second in Group of VOP header */   
    int closed_gov;         /* Nature of prediction in B-VOP when GOV 
                            // supported */  
    int broken_link;        /* Broken Link */   
    sample_spectral_ptrset coef_buf_row;/* Row Buffer for Coefficients */   
    sample_spectral_ptrset coef_buf_col;/* Column Buffer for Coefficients */    
    IppMotionVector *mv_buf;/* Pointer to forward motion vector buffer */   
    Ipp8u *tranp_buf;       /* Pointer to transparent buffer */ 
    Ipp8u *qp_buf;          /* Pointer to Luminance/Chrominance quantisation
                            // parameter buffer */    
    sample_picture *info_pic; /* Pointer to picture display information */
    int intra_dc_thr;       /* Intra DC VLC threshold */    
    int rounding;           /* rounding 0 or 1 */   
    Ipp8u vop_quant;        /* VOP Luminance/Chrominance quantisation
                            // parameter */  
} mp4_dec_state;

/* encoder related structures */
typedef struct _mp4_enc_vop_infor {
    /* vop level */
    int     vop_time_inc;
    int     fcode_fwd;
    int     cr_disabled;

    /* MB level */
    int     mb_indx;
    Ipp8u   cur_qp;
    Ipp8u   delta_qp;
    int     mb_not_coded;
    int     mb_type;
    int     intra_dc_vlc;
    int     ac_pred_flag;
    int     cbpy;
    int     cbpc;

    sample_spacial_ptrset   cur_mb;
    sample_spacial_ptrset   fwd_ref_mb;     /* reconstructed macroblock*/
    sample_spacial_ptrset   rec_mb;
    sample_spacial_ptrset   fwd_ref_rec_mb; /* ref-reconstructed macroblock */
	
    /* block level */
    sample_spacial_ptrset   cur_bk;
    sample_spacial_ptrset   fwd_ref_bk;
    sample_spacial_ptrset   rec_bk;         /* reconstructed block */
    sample_spacial_ptrset   fwd_ref_rec_bk; /* ref-reconstructed block*/

    /* buffers */   
    /* dc and ac prediction row buffer */
    sample_spectral_ptrset  coef_buf_row;
    /* dc and ac prediction colume buffer */
    sample_spectral_ptrset  coef_buf_col;
    /* motion vector buffer */
    IppMotionVector *mv_buf;
    /* transparent infor buffer */
    Ipp8u   *tranp_buf;
    /* quantiser buffer */
    Ipp8u   *qp_buf;
    /* prediction direction of each block in one MB */
    Ipp8u   pred_dir_buf[6];
    /* pattern information of each block in one MB */
    Ipp8u   pattern_buf[6];

    /* function pointer for motion compensation */
    copy_block_func_ptr  copy_block_func_ptr;

	/* point Information used in Motion Estimation */
	IppCoordinate cur_point;
	IppCoordinate ref_point;	

	int		num_non_trans_blk;
} mp4_enc_vop_infor;

typedef struct _mp4_enc_state {
	int vol_verid;		 /* video object layer version identification */
	int vol_prior;       /* video object layer priority */
	int short_head;		 /* MPEG-4 short header stream or not */
	int vop_indx;		 /* Index of VOP */
	int vol_typeid;		 /* video object type identification */
	int vol_shape_type;	 /* video object layer shape type */
	int vop_coding_type; /* VOP coding type, eg. I-VOP,P-VOP,B-VOP */
	int vol_control_para;/* VOL control parameters included or not */
	int chroma_fmt;	     /* chrominance format */
	int low_delay;		 /* Low Delay chosen or not */
	int bit_rate;		 /* Bit Rate */
	int vbv_buf_size;    /* VBV Buffer Size */
	int vbv_occupancy;	 /* VBV Occupancy */
	int fix_vop_rate;	 /* Fixed VOP rate */
	int interlaced;	     /* Interlaced mode chosen */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
秋霞影院一区二区| 久88久久88久久久| 国产精品电影一区二区| 久久久噜噜噜久久中文字幕色伊伊| 欧美电视剧免费观看| 欧美成人精品1314www| 亚洲精品在线观看网站| 国产蜜臀av在线一区二区三区| 中文字幕av不卡| 亚洲视频一区二区免费在线观看| 综合网在线视频| 国产一区在线不卡| 成人国产精品免费观看视频| 91免费观看在线| 欧美视频在线不卡| 欧美电视剧在线看免费| 午夜国产精品影院在线观看| 国产精品中文字幕欧美| 91美女片黄在线观看| 国产欧美日韩在线| 国产成人免费xxxxxxxx| 欧美日韩在线免费视频| 精品国产91久久久久久久妲己| 视频精品一区二区| 国产精品香蕉一区二区三区| 日韩网站在线看片你懂的| 国产精品免费人成网站| 午夜精品视频在线观看| 欧美在线免费播放| 国产精品久久久久影院老司 | 99久久伊人精品| 欧美怡红院视频| 亚洲最大成人网4388xx| 国产麻豆一精品一av一免费| 日韩三级精品电影久久久| 男人的天堂久久精品| 26uuu国产电影一区二区| 亚洲人成影院在线观看| 激情五月婷婷综合网| 色婷婷精品久久二区二区蜜臀av| 精品国产亚洲一区二区三区在线观看| 青青草精品视频| 精品国产91九色蝌蚪| 国产成人一级电影| 国产精品成人免费精品自在线观看 | 一区二区三区国产豹纹内裤在线| 91视频在线观看| 一二三区精品视频| 91精品福利在线一区二区三区| 国产欧美一区二区三区鸳鸯浴 | 亚洲国产美女搞黄色| 国产成人在线看| 国产精品国产三级国产有无不卡| av高清不卡在线| 久久精品在这里| 秋霞影院一区二区| 国产亚洲欧美激情| 色94色欧美sute亚洲线路一久| 国产精品你懂的| 欧美午夜片在线看| 紧缚捆绑精品一区二区| 亚洲视频每日更新| 欧美老年两性高潮| 日韩av一区二区在线影视| 欧美乱妇15p| 成人午夜在线视频| 国产精品网站在线播放| 欧美日韩国产片| 亚洲v中文字幕| 欧美三日本三级三级在线播放| 免费观看在线色综合| 国产三级久久久| 欧美人妖巨大在线| 国产高清精品在线| 天天色综合天天| 中文天堂在线一区| 欧美电视剧在线观看完整版| 波多野结衣视频一区| 人禽交欧美网站| 亚洲人吸女人奶水| 国产无遮挡一区二区三区毛片日本| 色婷婷精品大在线视频 | 三级影片在线观看欧美日韩一区二区| 久久亚洲综合色一区二区三区| 91网站黄www| 粉嫩欧美一区二区三区高清影视| 国产视频视频一区| 777a∨成人精品桃花网| 久久国产精品区| 国产人成亚洲第一网站在线播放| 欧美日韩亚洲不卡| 成人动漫视频在线| 国产精品自拍网站| 日韩国产在线一| 一区av在线播放| 国产精品高清亚洲| 国产亚洲女人久久久久毛片| 日韩欧美一区二区三区在线| 欧美午夜电影网| 91一区二区在线| heyzo一本久久综合| 国产福利一区在线| 国产成人免费在线视频| 狠狠色狠狠色综合系列| 另类人妖一区二区av| 丝袜诱惑制服诱惑色一区在线观看 | 日韩一区二区三区av| 日本高清不卡在线观看| www.日韩大片| 波多野结衣一区二区三区| 不卡一区在线观看| 夫妻av一区二区| 99re这里都是精品| 97久久人人超碰| a4yy欧美一区二区三区| av中文一区二区三区| 成人毛片老司机大片| 成人午夜看片网址| 91亚洲大成网污www| 菠萝蜜视频在线观看一区| 91丨porny丨在线| 91污片在线观看| 欧美日韩视频在线第一区 | 欧美剧在线免费观看网站| 欧美视频一区在线| 欧美一级艳片视频免费观看| 欧美美女激情18p| 日韩视频在线一区二区| 久久精品亚洲麻豆av一区二区| 精品国产第一区二区三区观看体验| 欧美mv日韩mv国产网站| 久久老女人爱爱| 中文成人综合网| 尤物在线观看一区| 中文字幕免费一区| 1024成人网| 国产精品麻豆久久久| 中文字幕一区二区三区乱码在线| 一区二区三区四区精品在线视频| 亚洲第一久久影院| 国产在线视频不卡二| 成人免费毛片app| 欧美日韩精品专区| 26uuu精品一区二区在线观看| 国产精品女同互慰在线看| 亚洲综合区在线| 亚洲裸体xxx| 免费观看在线色综合| av在线综合网| 欧美一区午夜视频在线观看| 久久综合久久99| 一区二区三区四区av| 国产麻豆精品久久一二三| 成人app网站| 精品日本一线二线三线不卡| 国产精品大尺度| 免费在线观看不卡| 99国产一区二区三精品乱码| 日韩一本二本av| 亚洲欧美自拍偷拍| 国产在线麻豆精品观看| 在线日韩av片| 国产精品无人区| 日本不卡123| 日本道精品一区二区三区| 日韩午夜激情免费电影| 亚洲亚洲人成综合网络| 激情图区综合网| 欧美男女性生活在线直播观看| 国产精品青草久久| 黄色成人免费在线| 91成人免费在线| 国产精品萝li| 色欧美片视频在线观看| 久久青草欧美一区二区三区| 亚洲精品视频在线观看免费| 另类中文字幕网| 欧美丝袜丝交足nylons| 亚洲欧洲一区二区在线播放| 精品一区二区三区在线视频| 欧美午夜一区二区三区| 日韩理论电影院| 丁香六月久久综合狠狠色| 精品伦理精品一区| 日本成人在线看| 欧美日韩激情在线| 亚洲美女一区二区三区| av电影在线观看一区| 久久精品人人做人人综合| 国产尤物一区二区在线| 日韩欧美一二区| 蜜臀久久久99精品久久久久久| 麻豆91精品91久久久的内涵| 欧美精品丝袜久久久中文字幕| 亚洲激情图片小说视频| 色哟哟亚洲精品| 亚洲乱码中文字幕| 色婷婷综合久久久中文字幕| 国产精品国产三级国产a| 99久久精品国产麻豆演员表|