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

📄 impeg2venc.h

📁 这是个mpeg2编码解码程序
💻 H
字号:
/* ======================================================================== */
/*                                                                          */
/*  TEXAS INSTRUMENTS, INC.                                                 */
/*                                                                          */
/*  NAME                                                                    */
/*      impeg2venc.h - IMPEG2VENC Interface Header                          */
/*                                                                          */
/*                                                                          */
/*   Copyright (c) 2003 Texas Instruments Inc.  All rights reserved.        */
/*   Exclusive property of the Video & Imaging Products, Emerging End       */
/*   Equipment group of Texas Instruments India Limited. Any handling,      */
/*   use, disclosure, reproduction, duplication, transmission, or storage   */
/*   of any part of this work by any means is subject to restrictions and   */
/*   prior written permission set forth in TI's program license agreements  */
/*   and associated software documentation.                                 */
/*                                                                          */
/*   This copyright notice, restricted rights legend, or other proprietary  */
/*   markings must be reproduced without modification in any authorized     */
/*   copies of any part of this work.  Removal or modification of any part  */
/*   of this notice is prohibited.                                          */
/*                                                                          */
/* ------------------------------------------------------------------------ */
/*            Copyright (c) 2003 Texas Instruments, Incorporated.           */
/*                           All Rights Reserved.                           */
/* ======================================================================== */ 
#ifndef IMPEG2VENC_
#define IMPEG2VENC_

#include <std.h>
#include <ialg.h>


/*
 *  ======== IMPEG2VENC_Handle ========
 *  This handle is used to reference all MPEG2VENC instance objects
 */
typedef struct IMPEG2VENC_Obj *IMPEG2VENC_Handle;

/*
 *  ======== IMPEG2VENC_Obj ========
 *  This structure must be the first field of all MPEG2VENC instance objects
 */
typedef struct IMPEG2VENC_Obj {
    struct IMPEG2VENC_Fxns *fxns;
} IMPEG2VENC_Obj;

/*
 *  ======== IMPEG2VENC_Status ========
 *  Status structure defines the parameters that can be changed or read
 *  during real-time operation of the alogrithm.
 */
typedef struct IMPEG2VENC_Status {
    int            size;      /* must be first field of all status structures */
    int            width;     /* width of decoded  frame                      */
    int            height;    /* height of decoded frame                      */
    int            inputtype; /* source format of encoded sequence            */
    int            pict_type; /* encoded picture type                         */
    unsigned char *y;         /* pointer to Y                                 */
    unsigned char *u;         /* pointer to U/Cb                              */
    unsigned char *v;         /* pointer to V/Cr                              */
    unsigned int  dispflag;      /* Flag to indicate whether above frames are    */
                              /*  to be displayed                             */  
    int            nBits;     /* number of bits consumed by current frame     */
    int            nWords;
    int            nFrames;   /* number of frames decoded                     */
    int            avgCPF;
    int            maxCPF;
    int            minCPF;    
} IMPEG2VENC_Status;
/*
 *  ======== IMPEG2VENC_Cmd ========
 *  The Cmd enumeration defines the control commands for the MPEG2VENC
 *  control method.
 */
typedef enum IMPEG2VENC_Cmd {
    IMPEG2VENC_GETSTATUS,
    IMPEG2VENC_SETSTATUS,  
    IMPEG2VENC_CLRSTATUS
} IMPEG2VENC_Cmd;


/*
 *  ======== IMPEG2VENC_Params ========
 *  This structure defines the creation parameters for all MPEG2VENC objects
 */
typedef struct IMPEG2VENC_Params {
    int size;    /* must be first field of all params structures */

    char h_id_string[256];
    char h_tplorg[256];
    char h_tplref[256];
    char h_iqname[256];
    char h_niqname[256];
    char h_statname[256];    
    int  h_inputtype;
    int  h_nframes;
    int  h_frame0;
    int  h_h;
    int  h_m;
    int  h_s;
    int  h_f1;
    int  h_N; 
    int  h_M; 
    int  h_mpeg1;
    int  h_fieldpic;
    int  h_horizontal_size; 
    int  h_vertical_size;
    int  h_aspectratio;    
    int  h_frame_rate_code;
    int  h_bit_rate;
    int  h_vbv_buffer_size;
    int  h_low_delay;
    int  h_constrparms;
    int  h_profile;
    int  h_level;
    int  h_prog_seq;
    int  h_chroma_format;    
    int  h_video_format; /* component, PAL, NTSC, SECAM or MAC */
  
    int  h_color_primaries; /* source primary chromaticity coordinates */
    int  h_transfer_characteristics; /* opto-electronic transfer char. (gamma) */
    int  h_matrix_coefficients; /* Eg,Eb,Er / Y,Cb,Cr matrix coefficients */
    int  h_display_horizontal_size; 
    int  h_display_vertical_size; /* display size */
  
    int  h_dc_prec; /* DC coefficient precision for intra coded blocks */
    int  h_topfirst; /* display top field first */
    int  h_frame_pred_dct_tab[3];
    int  h_conceal_tab[3]; /* use concealment motion vectors (I,P,B) */
    int  h_qscale_tab[3]; /* linear/non-linear quantizaton table */
    int  h_intravlc_tab[3]; /* intra vlc format (I,P,B,current) */
    int  h_altscan_tab[3]; /* alternate scan (I,P,B,current) */
    int  h_repeatfirst;
    int  h_prog_frame;
    int  h_P; /* intra slice refresh interval */
    
    int h_r;
    int h_avg_act;    
    int h_Xi;
    int h_Xb;
    int h_Xp;
    int h_d0i;
    int h_d0p;
    int h_d0b;

    int h_recon_all;    
    /* This structure doesn't have access to the inner encoder data */
    /* structure so the motion picdata info is readed in simple 1-d */
    /* array any change in the lib about motion_picdata strucutre   */
    /* should reflect here M_MAX is 3 , 8 element in each           */
    int h_motion_picdata[3*8];
    
       unsigned short          h_intra_q[64], h_inter_q[64];
    unsigned int *outstream; /* stream buffer pointer required in init */

} IMPEG2VENC_Params;

/*
 *  ======== IMPEG2VENC_PARAMS ========
 *  Default parameter values for MPEG2VENC instance objects
 */
extern IMPEG2VENC_Params IMPEG2VENC_PARAMS;

/*
 *  ======== IMPEG2VENC_Fxns ========
 *  This structure defines all of the operations on MPEG2VENC objects
 */
typedef struct IMPEG2VENC_Fxns {
    IALG_Fxns    ialg;    /* IMPEG2VENC extends IALG */
    Void (*encodeFrame)(IMPEG2VENC_Handle handle, 
                   unsigned char *inBuf[3], 
                   unsigned int  *outBuf,
                   unsigned int i);
    Void (*control)(IMPEG2VENC_Handle handle, 
                    IMPEG2VENC_Cmd    cmd,
                    IMPEG2VENC_Status *status);
} IMPEG2VENC_Fxns;

#endif    /* IMPEG2VENC_ */

/* ======================================================================== */ 
/* End of file : impeg2venc.h                                               */
/* ------------------------------------------------------------------------ */
/*            Copyright (c) 2003 Texas Instruments, Incorporated.           */
/*                           All Rights Reserved.                           */
/* ======================================================================== */ 

⌨️ 快捷键说明

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