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

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

?? h263init.c

?? 基于intel ipp的h263_decoder
?? C
字號:
/******************************************************************************
//               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:
//    Intel(R) Integrated Performance Primitives Sample Code H263 Decoder
//
//  Function List:
//    decoder_init_alloc_h263()
//
******************************************************************************/
#include "samph263.h"

#include <stdlib.h>
#include <string.h>

/******************************************************************************
// Function Name:   decoder_state_init_h263
//
// Description:     Initialize decoder state variables
//
// Parameter:
// Input:
//         state:   Pointer to h263_dec_state structure holding decode status
// Output:
//         state:   Pointer to h263_dec_state structure holding decode status
//
// Return:
// sample_status:   
//  [SAMPLE_STATUS_NOERR]:            Succeeds
//  [SAMPLE_STATUS_NOTSUPPORTED_ERR]: Stream syntax is not supported by 
//									  current sample decoder
//
// Notes:   None
******************************************************************************/
static sample_status decoder_state_init_h263(h263_dec_state *state)
{
	sample_picture *cur_pic = state->cur_picture;
	sample_picture *ref_pic = state->ref_picture;
	
    /* Source Format */
    switch (state->source_format) {
        case H263_SOURCE_SUBQCIF:
            cur_pic->pic_width  	=  128;
            cur_pic->pic_height 	=  96;
            state->mb_per_row       =  8;
            state->gob_per_picture  =  6;
            break;

        case H263_SOURCE_QCIF:
            cur_pic->pic_width  	=  176;
            cur_pic->pic_height 	=  144;
            state->mb_per_row       =  11;
            state->gob_per_picture  =  9;
            break;
            
        case H263_SOURCE_CIF:
            cur_pic->pic_width  	=  352;
            cur_pic->pic_height 	=  288;
            state->mb_per_row       =  22;
            state->gob_per_picture  =  18;
            break;

        default:
            cur_pic->pic_width  	=  -1;
            cur_pic->pic_height 	=  -1;
            state->mb_per_row       =  0;
            state->gob_per_picture  =  0;
            return SAMPLE_STATUS_NOTSUPPORTED_ERR;
    }

    /* Initialize current picture structure */
    cur_pic->pic_format        = SAMPLE_YCbCr411;
    cur_pic->pic_plane_num     = 3;
    cur_pic->pic_channel_num   = 3;
    cur_pic->pic_plane_step[0] = cur_pic->pic_width;
    cur_pic->pic_plane_step[1] = (cur_pic->pic_width >> 1);
    cur_pic->pic_plane_step[2] = (cur_pic->pic_width >> 1);

    /* Initialize reference picture structure */
    ref_pic->pic_format        = SAMPLE_YCbCr411;
    ref_pic->pic_plane_num     = 3;
    ref_pic->pic_channel_num   = 3;
    ref_pic->pic_plane_step[0] = cur_pic->pic_plane_step[0];
    ref_pic->pic_plane_step[1] = cur_pic->pic_plane_step[1];
    ref_pic->pic_plane_step[2] = cur_pic->pic_plane_step[2];
    ref_pic->pic_width         = cur_pic->pic_width ;
    ref_pic->pic_height        = cur_pic->pic_height ;
    
    /* Default Rounding is off */
    state->rounding_type = 0;

    /* Initialize picture index */
    state->picture_index   = 0;

    /* Initialize last frame indicator */
    state->is_last_picture = 0;

    return SAMPLE_STATUS_NOERR;
}

/******************************************************************************
// Function Name:   cal_bufsize_h263
//
// Description:     calculate work buffer size according to decoder state.
//                  Work buffer includes:
//                  1) Buffer for motion vectors
//                  2) Buffer for Y,Cb,Cr planes
//
// Parameter:
// Input:
//         state:   Pointer to h263_dec_state structure holding decode status
// Output:
//          size:   Pointer to an integer of caculated work buffer size
//
// Return:  None
//
// Notes:   None
******************************************************************************/
static void cal_bufsize_h263(h263_dec_state *state, int *size)
{
	sample_picture *cur_pic = state->cur_picture;
	sample_picture *ref_pic = state->ref_picture;

    /* MV Buffer */
    *size = MV_BUFSIZE(state->mb_per_row)+8;
    
    /* Current Picture Y, Cb, Cr Buffer */
    *size += YPLANE_BUFSIZE (cur_pic)+8;
    *size += CBPLANE_BUFSIZE(cur_pic)+8;
    *size += CRPLANE_BUFSIZE(cur_pic)+8;

    /* Reference Picture Y, Cb, Cr Buffer */
    *size += YPLANE_BUFSIZE (ref_pic)+8;
    *size += CBPLANE_BUFSIZE(ref_pic)+8;
    *size += CRPLANE_BUFSIZE(ref_pic)+8;

}

/******************************************************************************
// Function Name:   decoder_init_alloc_h263
//
// Description:     Initialize decoder state and allocate work buffer.
//                  This function does the following steps:
//                  1) Parse picture header and initialize state members.
//                  2) Caculate neccessary work buffer size and allocate buffer
//                  3) Seperate the whole work buffer into several parts and
//                     initialize the pointers.
//                  4) Zero the motion vectors on the border
//
// Parameter:
// Input:
//        stream:   Pointer to sample_bitstream structure holding input stream
//         state:   Pointer to h263_dec_state structure holding decode status
// Output:
//        stream:   Pointer to sample_bitstream structure holding input stream
//                  Stream position pointer is updated to next available byte
//         state:   Pointer to h263_dec_state structure holding decode status
//
// Return:
// sample_status:   
//  [SAMPLE_STATUS_NOERR]:            If succeed
//  [SAMPLE_STATUS_SYNCNOTFOUND_ERR]: If cannot find next sync code
//  [SAMPLE_STATUS_BITSTREAM_ERR]:    If stream parsing error occurs
//  [SAMPLE_STATUS_NOTSUPPORTED_ERR]: If stream syntax is not supported by 
//                                    current sample decoder
//  [SAMPLE_STATUS_ERR]:              Other error occurs during decoding
//
// Notes:   None
******************************************************************************/
sample_status decoder_init_alloc_h263(sample_bitstream  *stream,  
                                      h263_dec_state    *state)
{
    sample_status  ret;
    int            bufsize;
    Ipp8u          *work_buf;
	sample_picture *cur_pic = state->cur_picture;
	sample_picture *ref_pic = state->ref_picture;


    /******************************************************
    // Parse Picture Header
    ******************************************************/
    ret = parse_picture_header_h263(stream, state);
    if(SAMPLE_STATUS_NOERR != ret) {
        return ret;
    }

    /******************************************************
    // Init Decoder State Members
    ******************************************************/
    ret = decoder_state_init_h263(state);
    if(SAMPLE_STATUS_NOERR != ret) {
        return ret;
    }

    /******************************************************
    // Calculate Buffer Size
    ******************************************************/
    cal_bufsize_h263(state, &bufsize);

    /******************************************************
    // Allocate working buffer
    ******************************************************/
    state->work_buf = (Ipp8u*)malloc(bufsize);
    if(NULL == state->work_buf) {
        return SAMPLE_STATUS_NOMEM_ERR;
    }
    work_buf = state->work_buf;

    /******************************************************
    // Init buffer pointer and decoder state 
    ******************************************************/
    /* MV Buffer */
    state->mv_buffer = (IppMotionVector *)SAMPLE_ALIGN8(work_buf);
    work_buf += MV_BUFSIZE(state->mb_per_row);

    /* Current Picture Y, Cb, Cr Buffer */
    cur_pic->pic_plane[0] = (Ipp8u*)SAMPLE_ALIGN8(work_buf);
    //memset(cur_pic->pic_plane[0], 0,  YPLANE_BUFSIZE(cur_pic));
    work_buf += YPLANE_BUFSIZE(cur_pic);

    cur_pic->pic_plane[1] = (Ipp8u*)SAMPLE_ALIGN8(work_buf);
    //memset(cur_pic->pic_plane[1], 0,  CBPLANE_BUFSIZE(cur_pic));
    work_buf += CBPLANE_BUFSIZE(cur_pic);

    cur_pic->pic_plane[2] = (Ipp8u*)SAMPLE_ALIGN8(work_buf);
    //memset(cur_pic->pic_plane[2], 0,  CRPLANE_BUFSIZE(cur_pic));
    work_buf += CRPLANE_BUFSIZE(cur_pic);

    /* Reference Picture Y, Cb, Cr Buffer */
    ref_pic->pic_plane[0] = (Ipp8u*)SAMPLE_ALIGN8(work_buf);
    //memset(ref_pic->pic_plane[0], 0,  YPLANE_BUFSIZE(ref_pic));
    work_buf += YPLANE_BUFSIZE(ref_pic);

    ref_pic->pic_plane[1] = (Ipp8u*)SAMPLE_ALIGN8(work_buf);
    //memset(ref_pic->pic_plane[1], 0,  CBPLANE_BUFSIZE(ref_pic));
    work_buf += CBPLANE_BUFSIZE(ref_pic);

    ref_pic->pic_plane[2] = (Ipp8u*)SAMPLE_ALIGN8(work_buf);
    //memset(ref_pic->pic_plane[2], 0,  CRPLANE_BUFSIZE(ref_pic));
    work_buf += CRPLANE_BUFSIZE(ref_pic);

    /* Init MV */
    state->mv_buffer[0].dx = 0;
    state->mv_buffer[0].dy = 0;
    state->mv_buffer[state->mb_per_row+1].dx = 0;
    state->mv_buffer[state->mb_per_row+1].dy = 0;

    return SAMPLE_STATUS_NOERR;

}

/* EOF */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人乱码一区二区三区| 日韩欧美一级二级三级久久久| 亚洲va韩国va欧美va精品| 久久综合色鬼综合色| 色爱区综合激月婷婷| 久久99九九99精品| 亚洲国产一区视频| 国产精品全国免费观看高清| 欧美一区二区网站| 在线精品视频一区二区| 国产乱国产乱300精品| 香蕉久久夜色精品国产使用方法| 亚洲国产精品成人综合色在线婷婷 | 久久久久久电影| 欧美日本一道本| 一本到一区二区三区| 国产精品1区二区.| 久久精品国产99久久6| 亚洲国产精品自拍| 亚洲欧美一区二区不卡| 国产午夜精品福利| 欧美大黄免费观看| 7777精品伊人久久久大香线蕉 | 婷婷综合另类小说色区| 亚洲特黄一级片| 国产三级欧美三级日产三级99| 欧美久久高跟鞋激| 欧美日韩精品一区二区三区蜜桃| av在线综合网| 成人一区二区三区| 国产成人亚洲综合a∨婷婷图片| 免费观看成人av| 三级成人在线视频| 性久久久久久久| 亚洲福利国产精品| 夜夜精品视频一区二区| 亚洲欧美一区二区三区孕妇| 国产精品卡一卡二| 国产精品久久久久久户外露出| 国产视频一区二区在线| 国产三级三级三级精品8ⅰ区| 久久综合九色综合欧美就去吻| 日韩欧美一区在线| 日韩一级片在线播放| 日韩欧美在线1卡| 91精品综合久久久久久| 欧美一级电影网站| 精品999在线播放| 精品国产乱码久久久久久图片| 精品欧美一区二区在线观看| 精品久久久久久久久久久久包黑料 | 秋霞成人午夜伦在线观看| 日本不卡一区二区| 久久成人久久爱| 国产一区二区三区四| 色8久久精品久久久久久蜜| 99久久99久久精品免费看蜜桃| 99re6这里只有精品视频在线观看| av影院午夜一区| 91福利国产精品| 欧美日韩亚洲国产综合| 欧美日韩高清一区| 日韩一区二区中文字幕| 精品国产91洋老外米糕| 国产午夜亚洲精品羞羞网站| 国产精品久久久久久久久果冻传媒 | 日韩成人精品在线| 精品一区二区三区免费毛片爱| 国产在线播放一区| 99视频有精品| 欧美丰满美乳xxx高潮www| 日韩精品一区二区三区swag| 国产欧美日韩亚州综合 | 欧美日韩国产乱码电影| 精品久久久久久久人人人人传媒| 久久精品一区二区三区av| 国产精品免费视频观看| 亚洲线精品一区二区三区八戒| 免费三级欧美电影| 成人深夜福利app| 欧美日韩国产经典色站一区二区三区| 精品伦理精品一区| 色欧美日韩亚洲| 欧美精品1区2区3区| 国产日韩欧美综合在线| 亚洲一二三四在线| 国产精品一区二区不卡| 欧美性猛交xxxx黑人交| 久久蜜臀中文字幕| 亚洲最大成人综合| 国产精品综合视频| 欧美日韩免费观看一区二区三区| 久久色.com| 亚洲一区二区欧美日韩| 国产精品18久久久久久vr| 欧美综合亚洲图片综合区| 久久久久国色av免费看影院| 亚洲国产精品自拍| 99国产欧美久久久精品| 欧美不卡视频一区| 亚洲一区二区在线播放相泽 | 丝袜诱惑制服诱惑色一区在线观看| 国产一区二区三区香蕉| 在线不卡欧美精品一区二区三区| 中文字幕不卡在线| 狠狠色伊人亚洲综合成人| 欧美午夜理伦三级在线观看| 国产精品久久久久精k8 | 成人av免费在线观看| 欧美一卡二卡在线| 亚洲日韩欧美一区二区在线| 久久国产日韩欧美精品| 欧美午夜视频网站| 亚洲人成精品久久久久久| 国产一区二区91| 69成人精品免费视频| 亚洲精品欧美综合四区| 成年人网站91| 欧美激情一区二区三区| 狠狠色丁香九九婷婷综合五月| 欧美精品v日韩精品v韩国精品v| 亚洲欧美一区二区久久| 99久久综合99久久综合网站| 久久久青草青青国产亚洲免观| 美女脱光内衣内裤视频久久网站 | 色综合中文综合网| 日韩成人午夜精品| 欧美日韩亚州综合| 亚洲制服丝袜在线| 91官网在线观看| 亚洲色图19p| 91免费国产在线观看| **网站欧美大片在线观看| 不卡视频免费播放| 中文字幕精品综合| 成人99免费视频| 亚洲图片你懂的| 色综合久久精品| 樱花草国产18久久久久| 色网综合在线观看| 亚洲一区中文在线| 欧美久久久久久久久| 秋霞成人午夜伦在线观看| 日韩欧美视频在线| 国产一区二区三区香蕉| 国产人成一区二区三区影院| 岛国一区二区在线观看| 国产精品传媒入口麻豆| 色av一区二区| 性做久久久久久免费观看| 日韩一区二区免费视频| 精品一二三四在线| 亚洲国产精品ⅴa在线观看| 不卡的av在线| 亚洲综合免费观看高清完整版在线| 欧美性大战xxxxx久久久| 午夜一区二区三区视频| 日韩欧美亚洲一区二区| 国产福利一区二区| 亚洲婷婷综合色高清在线| 精品视频1区2区| 麻豆精品蜜桃视频网站| 国产视频一区二区在线观看| 99精品久久只有精品| 午夜免费久久看| 精品少妇一区二区三区视频免付费| 国产伦精一区二区三区| 亚洲欧美中日韩| 欧美精品一二三四| 国产伦精品一区二区三区免费| 国产精品福利一区二区| 欧美日韩亚洲另类| 国产尤物一区二区| 最新不卡av在线| 日韩欧美国产小视频| 懂色av中文字幕一区二区三区 | 2022国产精品视频| 91亚洲午夜精品久久久久久| 日韩精品五月天| 日本一二三四高清不卡| 精品国产乱码久久久久久免费| 成人一区二区三区中文字幕| 亚洲成av人片一区二区三区| 久久色.com| 欧美日韩高清不卡| 床上的激情91.| 日韩成人一级片| 亚洲欧洲综合另类| 久久―日本道色综合久久| 日本电影亚洲天堂一区| 国产在线看一区| 亚洲h动漫在线| 国产精品国产自产拍高清av王其 | 麻豆精品一区二区| 亚洲色大成网站www久久九九| 欧美变态口味重另类| 欧美最猛性xxxxx直播| 成人蜜臀av电影| 免费人成网站在线观看欧美高清| 综合在线观看色|