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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? mp4eblck.c

?? Linux下的基于intel的ipp庫(kù)的MPEG4編碼程序
?? C
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/******************************************************************************
//               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:    Block encoding functions of MPEG-4 video encoder sample
//                  code for Intel(R) Integrated Performance Primitives.
//  Functions List:
//		encode_block_intra_mpeg4()
//		encode_block_inter_mpeg4()
//		acdc_prediction_intra_mb_mpeg4()
******************************************************************************/

#include <memory.h>
#include "sampmp4.h"

/******************************************************************************
//
// Name:            encode_block_intra_mpeg4
//
// Description:     Quantize the DCT coefficients of the intra block and store
//                  them into buffer. Meanwhile, the texture data are
//                  reconstructed.
//
// Input Arguments:	
//		src_block	- Pointer to the pixels of current intra block.
//		blk_indx	- Block index indicating the component type and position as
//					  defined in subclause 6.1.3.8, Figure 6-5 of ISO/IEC
//                    14496-2.
//		cur_qp		- Quantization parameter of the macroblock which the
//					  current block belongs to.
//		step		- Width of the source and reconstructed plane.
//		q_matrix	- If the second inverse quantization method is used,  it is
//                    NULL; If the first inverse quantization method is used,
//                    it points to the quantization weighting coefficients
//                    buffer (for intra MB), whose first 64 elements are the
//                    quantization weighting matrix in Q0, the second 64
//                    elements are their reciprocals in Q21.
//
// Output Arguments:	
//      dst_coeff	- Pointer to the quantized DCT coefficients buffer.
//      rec_block	- Pointer to the reconstructed texture.
//
// Returns:
//      SAMPLE_STATUS_NOERR		- If succeeds.
//      SAMPLE_STATUS_ERR       - If encoding fails.
//	
*********************************************************************************/
sample_status encode_block_intra_mpeg4(Ipp8u     *src_block,
                                       Ipp8u     *rec_block,
                                       Ipp16s    *dst_coeff,                                       
                                       int       blk_indx,
                                       Ipp8u     cur_qp,
                                       int       step,                                       
                                       const int *q_matrix)
{
    Ipp8u   q_matrix_8u[SAMPLE_VIDEO_BLOCK_SQUARE_SIZE];
    Ipp16s  dct_coef_buf[SAMPLE_VIDEO_BLOCK_SQUARE_SIZE + 8];
    Ipp16s* dct_coef = (Ipp16s*)SAMPLE_ALIGN8(dct_coef_buf);
    int     i;
    IppVideoComponent video_comp;
    sample_status     ret_code;

    /* 1. DCT transform */
    /* src_block, dct_coef must be 8 bytes aligned */
    ret_code = ippiDCT8x8Fwd_Video_8u16s_C1R(src_block, step, dct_coef);
    if (ippStsNoErr != ret_code) {
        return SAMPLE_STATUS_ERR;
    }

    /* 2. Quantisation */
    ret_code = ippiQuantIntra_MPEG4_16s_I(dct_coef, cur_qp, blk_indx, q_matrix);
    if (ippStsNoErr != ret_code) {
        return SAMPLE_STATUS_ERR;
    } else {
        memcpy((void*)dst_coeff, (void*)dct_coef, sizeof(Ipp16s) * 64);
    }

    /* 3. Inverse Quantisation */
    video_comp = (Y_BLOCK4 >= blk_indx) ? IPP_VIDEO_LUMINANCE
        : IPP_VIDEO_CHROMINANCE;
    if (q_matrix) {
        for (i = 0; i < SAMPLE_VIDEO_BLOCK_SQUARE_SIZE; i++) {
            q_matrix_8u[i] = (Ipp8u)q_matrix[i];
        }
        ret_code = ippiQuantInvIntra_MPEG4_16s_I(dct_coef, cur_qp, q_matrix_8u,
            video_comp);
    } else {
        ret_code = ippiQuantInvIntra_MPEG4_16s_I(dct_coef, cur_qp, NULL,
            video_comp);
    }
    
    if (ippStsNoErr != ret_code) {
        return SAMPLE_STATUS_ERR;
    }

    /* 4. IDCT */
    /* dct_coef, rec_block must be 8 bytes aligned */
    ret_code = ippiDCT8x8Inv_Video_16s8u_C1R(dct_coef, rec_block, step);
    if (ippStsNoErr != ret_code) {
        return SAMPLE_STATUS_ERR;
    }
    
    return SAMPLE_STATUS_NOERR;
}

/******************************************************************************
//
// Name:            acdc_prediction_intra_mb_mpeg4
//
// Description:     Implement the AC/DC coefficients prediction of the intra
//					macroblock 
//
// Input Arguments:	
//		src_dst_coeff	- Pointer to the macroblock quantized DCT coefficient
//                        buffer before AC/DC prediction.
//      coef_bufrow_y   - Pointer to the y coefficient row buffer
//      coef_bufcol_y   - Pointer to the y coefficient column buffer
//      coef_bufrow_cb  - Pointer to the cb coefficient row buffer
//      coef_bufcol_cb  - Pointer to the cb coefficient column buffer
//      coef_bufrow_cr  - Pointer to the cr coefficient row buffer
//      coef_bufcol_cr  - Pointer to the cr coefficient column buffer
//		cur_qp		    - Quantization parameter of the current macroblock.
//      qp_buf          - Pointer to the quantization parameter buffer which
//                        contains the quantization parameter of neighbouring
//                        macroblocks.
// Output Arguments:
//      src_dst_coeff   - Pointer to the macroblock coefficient buffer after
//                        AC/DC prediction.	
//      ac_pred_flag	- Pointer to the ac_pred_flag of the intra macroblock
//      pred_dir_buf	- Pointer to the predict direction buffer for all six
//                        blocks in the macroblock
//      coef_bufrow_y   - Pointer to the updated y coefficient row buffer
//      coef_bufcol_y   - Pointer to the updated y coefficient column buffer
//      coef_bufrow_cb  - Pointer to the updated cb coefficient row buffer
//      coef_bufcol_cb  - Pointer to the updated cb coefficient column buffer
//      coef_bufrow_cr  - Pointer to the updated cr coefficient row buffer
//      coef_bufcol_cr  - Pointer to the updated cr coefficient column buffer
//
// Returns:
//      SAMPLE_STATUS_NOERR		- If succeeds.
//	
*********************************************************************************/
sample_status acdc_prediction_intra_mb_mpeg4(Ipp16s *src_dst_coeff,
                                             Ipp16s *coef_bufrow_y,
                                             Ipp16s *coef_bufcol_y,
                                             Ipp16s *coef_bufrow_cb,
                                             Ipp16s *coef_bufcol_cb,
                                             Ipp16s *coef_bufrow_cr,
                                             Ipp16s *coef_bufcol_cr,
                                             Ipp8u  cur_qp,
                                             Ipp8u  *qp_buf,                                             
                                             int    *ac_pred_flag,
                                             Ipp8u  *pred_dir_buf)
{
    Ipp8u   pred_qp;
    Ipp16s  tmp_coef, dc_coef, *coef, *coef_bufrow = NULL, *coef_bufcol = NULL;
    Ipp16s  pred_buf[SAMPLE_VIDEO_BLOCK_SIZE * 6];
    int     dc_left, dc_top, dc_left_top;
    int     dc_scaler_lum, dc_scaler_chr, dc_scaler = 0;
    int     i, j, pred_dir, blk_indx, sum_err, level;

    /* Calculate dc_scaler */
    /* Please refer to Table 7-1 ISC/IEC 14496-2:2001(E) */
    if (5 > cur_qp) {
        dc_scaler_lum = 8;
        dc_scaler_chr = 8;
    } else if (9 > cur_qp) {
        dc_scaler_lum = cur_qp * 2;
        dc_scaler_chr = (cur_qp + 13) / 2;
    } else if (25 > cur_qp) {
        dc_scaler_lum = cur_qp + 8;
        dc_scaler_chr = (cur_qp + 13) / 2;
    } else {
        dc_scaler_lum = 2 * cur_qp - 16;
        dc_scaler_chr = cur_qp - 6;
    }

    sum_err  = 0;
    for (blk_indx = Y_BLOCK1; blk_indx <= V_BLOCK; blk_indx ++) {
        switch (blk_indx) {
        case Y_BLOCK1:
            coef_bufrow = coef_bufrow_y;
            coef_bufcol = coef_bufcol_y;
            dc_scaler   = dc_scaler_lum;
            break;
        case Y_BLOCK2:
            coef_bufrow = coef_bufrow_y + SAMPLE_VIDEO_BLOCK_SIZE;
            coef_bufcol = coef_bufcol_y;
            dc_scaler   = dc_scaler_lum;
            break;
        case Y_BLOCK3:
            coef_bufrow = coef_bufrow_y;
            coef_bufcol = coef_bufcol_y + SAMPLE_VIDEO_BLOCK_SIZE;
            dc_scaler   = dc_scaler_lum;
            break;
        case Y_BLOCK4:
            coef_bufrow = coef_bufrow_y + SAMPLE_VIDEO_BLOCK_SIZE;
            coef_bufcol = coef_bufcol_y + SAMPLE_VIDEO_BLOCK_SIZE;
            dc_scaler   = dc_scaler_lum;
            break;
        case U_BLOCK:
            coef_bufrow = coef_bufrow_cb;
            coef_bufcol = coef_bufcol_cb;
            dc_scaler   = dc_scaler_chr;
            break;
        case V_BLOCK:
            coef_bufrow = coef_bufrow_cr;
            coef_bufcol = coef_bufcol_cr;
            dc_scaler   = dc_scaler_chr;
            break;
        }
        coef = src_dst_coeff + blk_indx * 64;

        /* 1. AC/DC precition direction */
        dc_top      = (0 > coef_bufrow[0])  ? 1024 : coef_bufrow[0];
        dc_left     = (0 > coef_bufrow[-8]) ? 1024 : coef_bufrow[-8];
        dc_left_top = (0 > coef_bufcol[0])  ? 1024 : coef_bufcol[0];

        pred_qp = cur_qp;

        if (ABS_MP4(dc_left_top - dc_left) < ABS_MP4(dc_left_top - dc_top)) {
            
            pred_dir = IPP_VIDEO_VERTICAL;
            if ((0 <= coef_bufrow[0]) && (Y_BLOCK3 != blk_indx)
                && (Y_BLOCK4 != blk_indx)) {
                /* the reference block is from the top macro block */
                pred_qp = qp_buf[1];
            }
        } else {
            
            pred_dir = IPP_VIDEO_HORIZONTAL;
            if ((0 <= coef_bufrow[-8]) && (Y_BLOCK2 != blk_indx)
                && (Y_BLOCK4 != blk_indx)) {
                /* the reference block is from the left macro block */
                pred_qp = qp_buf[0];
            }
        }

        /* 2. AC prediction precalculation */
        if (IPP_VIDEO_VERTICAL == pred_dir && MPEG4_PRED_DISABLE != sum_err) {
            
            if (0 > coef_bufrow[0]) {
                pred_buf[blk_indx * 8] = 2;
            } else {
                pred_buf[blk_indx * 8] = 3;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二区三区免费在线看| 精品乱人伦小说| 91在线免费播放| 成人一区二区三区视频在线观看 | 国产精品一二三| 九九精品视频在线看| 久久国产麻豆精品| 麻豆精品国产传媒mv男同| 日韩—二三区免费观看av| 日韩av一二三| 另类小说视频一区二区| 麻豆国产精品官网| 激情综合网最新| 国产伦精品一区二区三区在线观看| 毛片av一区二区三区| 另类欧美日韩国产在线| 国产一区二区三区av电影| 国产美女精品一区二区三区| 国产一区二区三区精品欧美日韩一区二区三区 | 久久99精品久久久| 国内精品久久久久影院一蜜桃| 国产一区二区三区最好精华液| 国产精品一区在线| 成人av在线资源| 91网站黄www| 欧美日韩亚洲丝袜制服| 91精品国产aⅴ一区二区| 欧美成人video| 欧美经典一区二区三区| 亚洲婷婷在线视频| 亚洲福利视频导航| 麻豆一区二区三| 高清在线观看日韩| 色婷婷久久99综合精品jk白丝| 欧美艳星brazzers| 欧美一二三四区在线| 欧美一区二区三区在线看| www久久久久| 亚洲人成精品久久久久久| 午夜av电影一区| 国内久久精品视频| 在线观看免费亚洲| 欧美xxxx在线观看| 一区二区中文视频| 蜜桃视频一区二区| av成人动漫在线观看| 欧美日韩日日骚| 久久在线免费观看| 亚洲激情中文1区| 久久99精品视频| 在线视频欧美精品| 精品国产一区二区亚洲人成毛片| 欧美激情一区三区| 日韩**一区毛片| 成人国产在线观看| 91麻豆精品国产综合久久久久久| 国产欧美一区二区精品性色超碰| 亚洲精品ww久久久久久p站| 精品一二三四区| 欧美亚洲国产怡红院影院| 欧美精品一区二区三区蜜桃视频 | 中文字幕一区免费在线观看 | 欧美亚洲动漫精品| 国产日韩欧美精品一区| 午夜视频久久久久久| 国产成人av网站| 欧美一级国产精品| 亚洲欧美日韩一区二区三区在线观看| 美国十次综合导航| 欧美在线观看你懂的| 国产丝袜在线精品| 青青草国产精品97视觉盛宴| 92精品国产成人观看免费 | 亚洲精品久久久蜜桃| 国产在线播放一区三区四| 欧美日韩一区二区三区在线| 日韩一区日韩二区| 国产成人在线网站| 欧美一级在线免费| 玉足女爽爽91| 99久久夜色精品国产网站| www成人在线观看| 舔着乳尖日韩一区| 欧美性受xxxx| 亚洲美女精品一区| 成人精品一区二区三区中文字幕 | 日本不卡在线视频| 欧美在线观看18| 一区二区三区在线视频播放| 成人h版在线观看| 26uuu亚洲综合色| 国产一区二区三区在线观看免费| 欧美一区二区性放荡片| 午夜精品一区二区三区免费视频| 色94色欧美sute亚洲线路二 | 91蜜桃免费观看视频| 欧美高清一级片在线观看| 国产激情精品久久久第一区二区| 欧美一级久久久| 免费看精品久久片| 91精品欧美福利在线观看| 亚洲成人精品影院| 欧美在线短视频| 午夜视频一区二区| 欧美精品99久久久**| 亚洲成a人片综合在线| 欧美在线看片a免费观看| 亚洲午夜久久久久| 欧美日韩免费一区二区三区视频| 亚洲一区二区五区| 精品视频1区2区| 天天av天天翘天天综合网| 欧美日本免费一区二区三区| 丝袜亚洲另类欧美| 欧美色视频在线| 日韩av成人高清| 日韩你懂的电影在线观看| 另类小说欧美激情| 国产亚洲欧洲997久久综合| 国产麻豆精品95视频| 日本一区二区三区国色天香 | 日韩一区二区免费在线观看| 日本免费在线视频不卡一不卡二| 在线综合亚洲欧美在线视频| 美国av一区二区| 久久精品日韩一区二区三区| 丁香天五香天堂综合| 日本一区二区不卡视频| 一本一道久久a久久精品| 亚洲国产美女搞黄色| 欧美一区二区三区婷婷月色| 久久国产欧美日韩精品| 国产三级精品视频| 91免费精品国自产拍在线不卡| 亚洲欧美另类久久久精品2019| 欧美在线看片a免费观看| 午夜欧美一区二区三区在线播放| 欧美一二三区精品| 国产福利91精品一区二区三区| 亚洲青青青在线视频| 欧美日本一区二区在线观看| 狠狠色综合播放一区二区| 中文字幕成人网| 欧美日韩精品系列| 九一久久久久久| 亚洲欧美偷拍三级| 欧美一激情一区二区三区| 成人在线综合网| 日韩影院免费视频| 国产亚洲欧美色| 欧美日韩一区不卡| 国产91高潮流白浆在线麻豆 | 热久久一区二区| 国产精品久久久99| 制服.丝袜.亚洲.中文.综合| 丁香啪啪综合成人亚洲小说| 亚洲一区二区三区在线播放| 精品国产免费一区二区三区四区| 91丨九色丨蝌蚪丨老版| 免费看精品久久片| 亚洲精品视频在线| 久久久一区二区三区| 欧美在线观看一区二区| 国产寡妇亲子伦一区二区| 亚洲成人先锋电影| 国产精品三级视频| 日韩色在线观看| 在线影视一区二区三区| 国产精品一区二区在线看| 亚洲风情在线资源站| 国产成人精品影院| 日本伊人午夜精品| 亚洲欧美日本在线| 欧美精品一区二| 欧美一区二区三区婷婷月色| 色综合久久天天| 国产成人精品免费看| 久久不见久久见中文字幕免费| 亚洲国产精品人人做人人爽| 久久精品在线免费观看| 欧美群妇大交群中文字幕| 91浏览器入口在线观看| 粉嫩一区二区三区性色av| 捆绑变态av一区二区三区| 亚洲精品视频在线观看免费| 日本一区二区高清| 久久男人中文字幕资源站| 5858s免费视频成人| 欧美综合视频在线观看| 99久久精品国产精品久久| 国产在线播放一区| 狂野欧美性猛交blacked| 日韩中文字幕麻豆| 亚洲综合无码一区二区| 亚洲精品中文在线影院| 一区在线观看视频| 国产精品家庭影院| 国产精品久久毛片av大全日韩| 久久久国产一区二区三区四区小说| 欧美一区二区三区在线|