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

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

?? mc.c

?? 法國人的264代碼 大家看看啊,里面有很多可以借鑒的東西啊
?? C
?? 第 1 頁 / 共 2 頁
字號:
/***************************************************************************** * mc.c: h264 encoder library (Motion Compensation) ***************************************************************************** * Copyright (C) 2003 Laurent Aimar * $Id: mc.c,v 1.1 2004/06/03 19:27:07 fenrir Exp $ * * Authors: Laurent Aimar <fenrir@via.ecp.fr> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. *****************************************************************************/#include <stdio.h>#include <string.h>#include "include\common.h"#include "include\clip1.h"
#ifdef ARCH_PPC#include "ppc/mc.h"#endifstatic inline int x264_tapfilter( uint8_t *pix, int i_pix_next ){    return pix[-2*i_pix_next] - 5*pix[-1*i_pix_next] + 20*(pix[0] + pix[1*i_pix_next]) - 5*pix[ 2*i_pix_next] + pix[ 3*i_pix_next];}static inline int x264_tapfilter1( uint8_t *pix ){    return pix[-2] - 5*pix[-1] + 20*(pix[0] + pix[1]) - 5*pix[ 2] + pix[ 3];}static inline void pixel_avg( uint8_t *dst,  int i_dst_stride,                              uint8_t *src1, int i_src1_stride,                              uint8_t *src2, int i_src2_stride,                              int i_width, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < i_width; x++ )        {            dst[x] = ( src1[x] + src2[x] + 1 ) >> 1;        }        dst  += i_dst_stride;        src1 += i_src1_stride;        src2 += i_src2_stride;    }}static inline void pixel_avg_wxh( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int width, int height ){    int x, y;    for( y = 0; y < height; y++ )    {        for( x = 0; x < width; x++ )        {            dst[x] = ( dst[x] + src[x] + 1 ) >> 1;        }        dst += i_dst;        src += i_src;    }}#define PIXEL_AVG_C( name, width, height ) \static void name( uint8_t *pix1, int i_stride_pix1, \                  uint8_t *pix2, int i_stride_pix2 ) \{ \    pixel_avg_wxh( pix1, i_stride_pix1, pix2, i_stride_pix2, width, height ); \}PIXEL_AVG_C( pixel_avg_16x16, 16, 16 )PIXEL_AVG_C( pixel_avg_16x8,  16, 8 )PIXEL_AVG_C( pixel_avg_8x16,  8, 16 )PIXEL_AVG_C( pixel_avg_8x8,   8, 8 )PIXEL_AVG_C( pixel_avg_8x4,   8, 4 )PIXEL_AVG_C( pixel_avg_4x8,   4, 8 )PIXEL_AVG_C( pixel_avg_4x4,   4, 4 )PIXEL_AVG_C( pixel_avg_4x2,   4, 2 )PIXEL_AVG_C( pixel_avg_2x4,   2, 4 )PIXEL_AVG_C( pixel_avg_2x2,   2, 2 )/* Implicit weighted bipred only: * assumes log2_denom = 5, offset = 0, weight1 + weight2 = 64 */#define op_scale2(x) dst[x] = x264_clip_uint8( (dst[x]*i_weight1 + src[x]*i_weight2 + (1<<5)) >> 6 )static inline void pixel_avg_weight_wxh( uint8_t *dst, int i_dst, uint8_t *src, int i_src, int width, int height, int i_weight1 ){    int y;    const int i_weight2 = 64 - i_weight1;    for(y=0; y<height; y++, dst += i_dst, src += i_src){        op_scale2(0);        op_scale2(1);        if(width==2) continue;        op_scale2(2);        op_scale2(3);        if(width==4) continue;        op_scale2(4);        op_scale2(5);        op_scale2(6);        op_scale2(7);        if(width==8) continue;        op_scale2(8);        op_scale2(9);        op_scale2(10);        op_scale2(11);        op_scale2(12);        op_scale2(13);        op_scale2(14);        op_scale2(15);    }}#define PIXEL_AVG_WEIGHT_C( width, height ) \static void pixel_avg_weight_##width##x##height( \                uint8_t *pix1, int i_stride_pix1, \                uint8_t *pix2, int i_stride_pix2, int i_weight1 ) \{ \    pixel_avg_weight_wxh( pix1, i_stride_pix1, pix2, i_stride_pix2, width, height, i_weight1 ); \}PIXEL_AVG_WEIGHT_C(16,16)PIXEL_AVG_WEIGHT_C(16,8)PIXEL_AVG_WEIGHT_C(8,16)PIXEL_AVG_WEIGHT_C(8,8)PIXEL_AVG_WEIGHT_C(8,4)PIXEL_AVG_WEIGHT_C(4,8)PIXEL_AVG_WEIGHT_C(4,4)PIXEL_AVG_WEIGHT_C(4,2)PIXEL_AVG_WEIGHT_C(2,4)PIXEL_AVG_WEIGHT_C(2,2)#undef op_scale2#undef PIXEL_AVG_WEIGHT_Ctypedef void (*pf_mc_t)(uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height );static void mc_copy( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    int y;    for( y = 0; y < i_height; y++ )    {        memcpy( dst, src, i_width );        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hh( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < i_width; x++ )        {            dst[x] = x264_mc_clip1( ( x264_tapfilter1( &src[x] ) + 16 ) >> 5 );        }        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hv( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    int x, y;    for( y = 0; y < i_height; y++ )    {        for( x = 0; x < i_width; x++ )        {            dst[x] = x264_mc_clip1( ( x264_tapfilter( &src[x], i_src_stride ) + 16 ) >> 5 );        }        src += i_src_stride;        dst += i_dst_stride;    }}static inline void mc_hc( uint8_t *src, int i_src_stride, uint8_t *dst, int i_dst_stride, int i_width, int i_height ){    uint8_t *out;    uint8_t *pix;    int x, y;    for( x = 0; x < i_width; x++ )    {        int tap[6];        pix = &src[x];        out = &dst[x];        tap[0] = x264_tapfilter1( &pix[-2*i_src_stride] );        tap[1] = x264_tapfilter1( &pix[-1*i_src_stride] );        tap[2] = x264_tapfilter1( &pix[ 0*i_src_stride] );        tap[3] = x264_tapfilter1( &pix[ 1*i_src_stride] );        tap[4] = x264_tapfilter1( &pix[ 2*i_src_stride] );        for( y = 0; y < i_height; y++ )        {            tap[5] = x264_tapfilter1( &pix[ 3*i_src_stride] );            *out = x264_mc_clip1( ( tap[0] - 5*tap[1] + 20 * tap[2] + 20 * tap[3] -5*tap[4] + tap[5] + 512 ) >> 10 );            /* Next line */            pix += i_src_stride;            out += i_dst_stride;            tap[0] = tap[1];            tap[1] = tap[2];            tap[2] = tap[3];            tap[3] = tap[4];            tap[4] = tap[5];        }    }}static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};static void mc_luma( uint8_t *src[4], int i_src_stride,                     uint8_t *dst,    int i_dst_stride,                     int mvx,int mvy,                     int i_width, int i_height ){    int qpel_idx = ((mvy&3)<<2) + (mvx&3);    int offset = (mvy>>2)*i_src_stride + (mvx>>2);    uint8_t *src1 = src[hpel_ref0[qpel_idx]] + offset + ((mvy&3) == 3) * i_src_stride;    if( qpel_idx & 5 ) /* qpel interpolation needed */    {        uint8_t *src2 = src[hpel_ref1[qpel_idx]] + offset + ((mvx&3) == 3);        pixel_avg( dst, i_dst_stride, src1, i_src_stride,                   src2, i_src_stride, i_width, i_height );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品处破学生在线二十三| 亚洲第一福利一区| 亚洲午夜久久久久久久久电影网| 日本午夜精品视频在线观看| av不卡一区二区三区| 欧美岛国在线观看| 视频一区欧美精品| 91色porny在线视频| 精品福利在线导航| 日韩二区在线观看| 在线观看视频一区二区欧美日韩| 亚洲国产成人一区二区三区| 蜜臀久久99精品久久久久久9| 欧美性色黄大片| 中文字幕一区二区三区不卡在线| 国产一区中文字幕| 日韩欧美亚洲国产精品字幕久久久| 一区二区三区日本| 91美女片黄在线| 国产精品视频一二三区| 极品少妇xxxx偷拍精品少妇| 这里只有精品免费| 午夜成人免费视频| 欧美日韩精品福利| 亚洲最色的网站| 91精彩视频在线观看| 成人欧美一区二区三区白人| zzijzzij亚洲日本少妇熟睡| 国产日韩影视精品| 国产a区久久久| 久久久久国产精品麻豆| 国产成人综合亚洲网站| 久久精品视频免费观看| 狠狠v欧美v日韩v亚洲ⅴ| 日韩欧美视频在线| 精品一二三四区| 久久精品一区蜜桃臀影院| 黑人巨大精品欧美一区| 久久精品亚洲国产奇米99| 国产精品一区二区无线| 国产精品视频在线看| av高清不卡在线| 亚洲精品日韩一| 在线区一区二视频| 亚洲成a人片在线观看中文| 欧美日韩国产a| 麻豆传媒一区二区三区| 久久精品欧美一区二区三区麻豆| 国产精品原创巨作av| 欧美激情一区二区三区不卡 | 欧美性生交片4| 亚洲777理论| 精品久久免费看| 成人午夜电影久久影院| 亚洲精品久久嫩草网站秘色| 欧美人牲a欧美精品| 另类中文字幕网| 国产精品美女久久久久久| 欧美日韩亚洲综合在线 | 日韩亚洲欧美中文三级| 狠狠色丁香久久婷婷综| 综合电影一区二区三区| 欧美一区午夜精品| 国产成人综合自拍| 亚洲成人精品在线观看| 精品日韩av一区二区| 91在线视频在线| 久久成人免费电影| 一区二区三区四区蜜桃| 久久影院视频免费| 欧美三级在线视频| 国产美女久久久久| 午夜电影一区二区| 国产精品久久久久久久久果冻传媒| 欧美三日本三级三级在线播放| 国产乱子伦视频一区二区三区| 亚洲一卡二卡三卡四卡五卡| 久久久久久一二三区| 欧美日韩一区不卡| www.欧美亚洲| 国内不卡的二区三区中文字幕| 亚洲欧美另类在线| 国产午夜精品久久久久久久| 欧美理论在线播放| av一区二区三区四区| 精品一区二区在线视频| 亚洲国产综合91精品麻豆| 中文字幕久久午夜不卡| 欧美xxxx在线观看| 欧美美女激情18p| 一本色道a无线码一区v| 国产精品456| 蜜臀国产一区二区三区在线播放 | 国产婷婷一区二区| 这里只有精品电影| 欧美色综合天天久久综合精品| 盗摄精品av一区二区三区| 裸体健美xxxx欧美裸体表演| 亚洲一区二区偷拍精品| 亚洲欧美国产毛片在线| 国产精品伦理在线| 日本一区二区免费在线观看视频| 日韩欧美的一区二区| 欧美日本一区二区三区四区| 91国在线观看| 色综合亚洲欧洲| 91小视频在线| 91农村精品一区二区在线| 99这里只有精品| 成人精品一区二区三区中文字幕 | 国产日韩欧美激情| 国产午夜一区二区三区| 欧美激情综合五月色丁香| 久久久午夜电影| 亚洲精品一区在线观看| xnxx国产精品| 国产人久久人人人人爽| 亚洲国产精品成人久久综合一区| 国产日韩欧美在线一区| 欧美激情一区二区三区全黄| 国产精品区一区二区三区| 国产精品私房写真福利视频| 国产精品不卡一区二区三区| 国产精品久久网站| 亚洲三级小视频| 亚洲国产va精品久久久不卡综合| 亚洲va欧美va天堂v国产综合| 日韩av一区二区三区四区| 麻豆精品视频在线观看| 国产福利精品一区| av激情亚洲男人天堂| 欧美色图激情小说| 精品国产免费人成电影在线观看四季 | 日韩精品一二区| 国模无码大尺度一区二区三区| 国产91精品一区二区麻豆网站| 成人精品免费网站| 精品视频123区在线观看| 日韩免费成人网| 亚洲国产精品二十页| 亚洲高清免费在线| 国产一区二区网址| 91在线视频网址| 日韩一区二区中文字幕| 中文字幕av一区二区三区免费看| 一区二区三区四区在线播放 | 99久久99久久久精品齐齐| 色国产综合视频| 欧美不卡在线视频| 亚洲另类在线制服丝袜| 蜜臀91精品一区二区三区| 成人免费视频视频| 91精品国产欧美一区二区18| 国产网站一区二区| 丝袜国产日韩另类美女| 国产成人av影院| 欧美日韩大陆在线| 欧美国产国产综合| 天堂va蜜桃一区二区三区漫画版| 国产伦精品一区二区三区在线观看| 91在线一区二区| 久久亚洲一区二区三区明星换脸 | 欧美性一二三区| 欧美国产禁国产网站cc| 日韩高清欧美激情| 91网上在线视频| 久久精品男人的天堂| 图片区小说区国产精品视频| a美女胸又www黄视频久久| 在线不卡欧美精品一区二区三区| 中文字幕的久久| 久久99精品久久久久久动态图| 在线精品视频免费观看| 国产精品午夜电影| 国产原创一区二区三区| 欧美群妇大交群的观看方式| 成人免费一区二区三区视频 | 国产精品久久网站| 久久99深爱久久99精品| 欧美系列在线观看| 一区视频在线播放| 国产99精品在线观看| 久久综合中文字幕| 另类小说综合欧美亚洲| 欧美一区二区三区电影| 亚洲国产精品影院| 色美美综合视频| 国产精品国产三级国产专播品爱网| 国产一区二区在线免费观看| 91精品国产综合久久精品app| 亚洲精品乱码久久久久久| bt欧美亚洲午夜电影天堂| 国产欧美一区二区三区鸳鸯浴| 国产一区二区不卡在线| 精品少妇一区二区三区视频免付费| 天天操天天干天天综合网| 精品婷婷伊人一区三区三| 亚洲一区av在线| 欧美另类变人与禽xxxxx| 婷婷丁香激情综合|