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

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

?? mc.c

?? 絕對好的源碼
?? 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 "common.h"#include "clip1.h"#ifdef HAVE_MMXEXT#include "i386/mc.h"#endif#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 );    }    else    {        mc_copy( src1, i_src_stride, dst, i_dst_stride, i_width, i_height );    }}static uint8_t *get_ref( uint8_t *src[4], int i_src_stride,                         uint8_t *dst,    int * i_dst_stride,

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产乱码久久久久久夜甘婷婷| 一本色道久久综合亚洲91| 日韩av不卡在线观看| 免费视频一区二区| 国产一区不卡视频| 欧美色偷偷大香| 日韩欧美你懂的| 亚洲天堂a在线| 激情偷乱视频一区二区三区| 成人av网站在线观看免费| 欧美日韩不卡在线| 国产精品无人区| 蜜桃精品在线观看| 日本韩国精品在线| 久久久精品综合| 日韩国产欧美在线播放| 国产aⅴ精品一区二区三区色成熟| 成人国产在线观看| 日韩免费成人网| 麻豆精品一二三| av午夜一区麻豆| 欧美精品一区二区三区高清aⅴ| 亚洲激情六月丁香| 99久久综合99久久综合网站| 久久综合色8888| 男女性色大片免费观看一区二区 | 精品日韩一区二区三区免费视频| 一区二区三区在线高清| 国产成人福利片| 久久婷婷国产综合国色天香| 免费久久精品视频| 欧美一区二区三区人| 日韩福利电影在线观看| 欧美日韩国产123区| 亚洲一区二区三区四区五区黄| 97久久超碰国产精品电影| 日韩理论片中文av| www.久久久久久久久| 亚洲色图欧美激情| 一本色道久久综合亚洲精品按摩| 一区二区三区四区五区视频在线观看| 成人h动漫精品| 亚洲午夜在线视频| 欧美一区二区精品| 国产一区二区三区四| 国产精品久久久久一区| 91福利社在线观看| 老司机一区二区| 国产亚洲人成网站| 91久久精品午夜一区二区| 蜜臀久久99精品久久久久久9| 欧美tk—视频vk| 在线视频欧美精品| 狠狠色丁香久久婷婷综合丁香| 中文字幕日韩av资源站| 精品国产人成亚洲区| 国产真实乱偷精品视频免| 亚洲私人黄色宅男| 精品久久久久久综合日本欧美| 色婷婷综合久久| 国产精品一卡二卡在线观看| 亚洲午夜国产一区99re久久| 久久久一区二区三区捆绑**| 欧美日韩高清影院| 91免费版在线| 成人av免费观看| 国产精品亚洲成人| 蜜臀av国产精品久久久久| 亚洲精品欧美专区| 国产精品污污网站在线观看| 欧美一卡二卡在线观看| 欧美视频在线观看一区| 91福利视频网站| 欧美日韩精品系列| 欧美日韩精品一区二区| 在线这里只有精品| 欧美在线观看一区二区| 欧美性受极品xxxx喷水| 色欧美乱欧美15图片| 91黄色激情网站| 欧美一区二区三区视频免费播放| 欧美日韩在线播放三区四区| 欧美狂野另类xxxxoooo| 欧美一区二区三区系列电影| 欧美精品v国产精品v日韩精品 | 欧美激情一区二区三区蜜桃视频 | 国内精品伊人久久久久av影院| 美腿丝袜亚洲综合| 国产精品亚洲人在线观看| 国产精品亚洲午夜一区二区三区| 国产精品综合视频| 成人免费毛片app| 一本色道a无线码一区v| 欧美日韩高清在线| 国产欧美日韩精品一区| 日韩理论片网站| 蜜臀av一区二区在线免费观看| 国产精品主播直播| 欧美日本在线观看| 久久嫩草精品久久久精品| 综合久久久久久久| 久久国产精品第一页| 成人免费视频播放| 欧美精品日日鲁夜夜添| 国产精品午夜久久| 美国av一区二区| 色婷婷综合久久| 国产精品人成在线观看免费| 亚洲成人免费看| 粉嫩在线一区二区三区视频| 91麻豆福利精品推荐| 国产亚洲欧洲997久久综合 | 欧洲精品视频在线观看| 国产人伦精品一区二区| 裸体一区二区三区| 欧美在线观看禁18| 亚洲综合偷拍欧美一区色| 菠萝蜜视频在线观看一区| 日韩欧美一区在线| 亚洲电影你懂得| 欧美视频日韩视频在线观看| 国产精品美女久久久久久久久| 久久精品久久久精品美女| 欧美另类久久久品| 亚洲不卡av一区二区三区| 色国产综合视频| 亚洲一卡二卡三卡四卡五卡| 91国产成人在线| 日韩成人精品在线| 日韩欧美成人午夜| 男男视频亚洲欧美| 欧美一个色资源| 久久久久久久综合狠狠综合| 另类欧美日韩国产在线| 精品捆绑美女sm三区| 蜜臀av性久久久久蜜臀av麻豆| 日韩片之四级片| 欧美成人高清电影在线| 国产美女精品人人做人人爽 | 亚洲国产精品成人久久综合一区| 国产精品影音先锋| 国产精品初高中害羞小美女文| 色婷婷av一区二区三区之一色屋| 欧美激情综合在线| 免费一区二区视频| 国产欧美一区二区三区网站| 91麻豆精品在线观看| 午夜视频一区二区| 亚洲国产成人在线| 欧美精品久久久久久久多人混战 | 成人一区二区三区中文字幕| 亚洲丝袜美腿综合| 国产激情精品久久久第一区二区 | 精品一区二区三区免费毛片爱| 国产精品久久夜| 2021久久国产精品不只是精品| 97精品视频在线观看自产线路二| 蜜桃免费网站一区二区三区| 日本成人在线网站| 国产日韩欧美一区二区三区综合| 欧美精品日韩一区| 欧美无砖专区一中文字| 在线视频一区二区三区| av在线播放一区二区三区| 国产成人精品网址| 成人在线综合网| 成人手机在线视频| 欧美日韩一区二区三区在线看| 亚洲成在人线在线播放| 亚洲成人精品一区| 日韩国产一二三区| 久久精品国产澳门| 久久嫩草精品久久久久| 国产调教视频一区| 国产精品每日更新| 亚洲精品中文字幕在线观看| 亚洲三级视频在线观看| 亚洲动漫第一页| 久久国产日韩欧美精品| 久久99国内精品| 国产精品一区二区在线播放 | 亚洲免费色视频| 免费欧美在线视频| 国产精品88av| 99vv1com这只有精品| 欧美日韩国产一二三| 久久先锋资源网| 亚洲最色的网站| 精品影院一区二区久久久| 成人精品视频一区二区三区| 日本乱人伦一区| 久久久久久久av麻豆果冻| 亚洲美女区一区| 久久国产乱子精品免费女| 日韩在线观看一区二区| 国产精品99久久久久久宅男| 欧美高清视频在线高清观看mv色露露十八| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 天天亚洲美女在线视频| 成人小视频在线|