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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? motion_comp_mmx.c

?? linux下實(shí)現(xiàn)視頻播放的播放器
?? C
?? 第 1 頁 / 共 2 頁
字號(hào):
/* * motion_comp_mmx.c * Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org> * Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca> * * This file is part of mpeg2dec, a free MPEG-2 video stream decoder. * See http://libmpeg2.sourceforge.net/ for updates. * * mpeg2dec 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. * * mpeg2dec 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-1307  USA */#include <stddef.h>#include <inttypes.h>#include "config.h"#ifdef ARCH_X86#pragma warning(disable: 4305 4309 4799 4127 4701)#include "mpeg2.h"#include "attributes.h"#include "mpeg2_internal.h"#include "mmx.h"#ifdef __cplusplususing namespace csimd;#endif#define CPU_MMXEXT 0#define CPU_3DNOW 1/* MMX code - needs a rewrite *//* * Motion Compensation frequently needs to average values using the * formula (x+y+1)>>1. Both MMXEXT and 3Dnow include one instruction * to compute this, but it's been left out of classic MMX. * * We need to be careful of overflows when doing this computation. * Rather than unpacking data to 16-bits, which reduces parallelism, * we use the following formulas: * * (x+y)>>1 == (x&y)+((x^y)>>1) * (x+y+1)>>1 == (x|y)-((x^y)>>1) *//* some rounding constants *//* * This code should probably be compiled with loop unrolling * (ie, -funroll-loops in gcc)becuase some of the loops * use a small static number of iterations. This was written * with the assumption the compiler knows best about when * unrolling will help */static __forceinline void mmx_zero_reg (__m64 &mm0){    /* load 0 into mm0 */    pxor_r2r (mm0, mm0);}static inline void mmx_average_2_U8 (uint8_t * dest, const uint8_t * src1,				     const uint8_t * src2){    /* *dest = (*src1 + *src2 + 1)/ 2; */    __m64 mm1,mm2,mm3,mm4;    __m64 mask1 = _mm_set1_pi8(0xfe);    movq_m2r (*src1, mm1);	/* load 8 src1 bytes */    movq_r2r (mm1, mm2);	/* copy 8 src1 bytes */    movq_m2r (*src2, mm3);	/* load 8 src2 bytes */    movq_r2r (mm3, mm4);	/* copy 8 src2 bytes */    pxor_r2r (mm1, mm3);	/* xor src1 and src2 */    pand_m2r (mask1, mm3);	/* mask lower bits */    psrlq_i2r (1, mm3);		/* /2 */    por_r2r (mm2, mm4);		/* or src1 and src2 */    psubb_r2r (mm3, mm4);	/* subtract subresults */    movq_r2m (mm4, *dest);	/* store result in dest */}static inline void mmx_interp_average_2_U8 (uint8_t * dest,					    const uint8_t * src1,					    const uint8_t * src2){    /* *dest = (*dest + (*src1 + *src2 + 1)/ 2 + 1)/ 2; */    __m64 mm1,mm2,mm3,mm4,mm5,mm6;    __m64 mask1 = _mm_set1_pi8(0xfe);    movq_m2r (*dest, mm1);	/* load 8 dest bytes */    movq_r2r (mm1, mm2);	/* copy 8 dest bytes */    movq_m2r (*src1, mm3);	/* load 8 src1 bytes */    movq_r2r (mm3, mm4);	/* copy 8 src1 bytes */    movq_m2r (*src2, mm5);	/* load 8 src2 bytes */    movq_r2r (mm5, mm6);	/* copy 8 src2 bytes */    pxor_r2r (mm3, mm5);	/* xor src1 and src2 */    pand_m2r (mask1, mm5);	/* mask lower bits */    psrlq_i2r (1, mm5);		/* /2 */    por_r2r (mm4, mm6);		/* or src1 and src2 */    psubb_r2r (mm5, mm6);	/* subtract subresults */    movq_r2r (mm6, mm5);	/* copy subresult */    pxor_r2r (mm1, mm5);	/* xor srcavg and dest */    pand_m2r (mask1, mm5);	/* mask lower bits */    psrlq_i2r (1, mm5);		/* /2 */    por_r2r (mm2, mm6);		/* or srcavg and dest */    psubb_r2r (mm5, mm6);	/* subtract subresults */    movq_r2m (mm6, *dest);	/* store result in dest */}static inline void mmx_average_4_U8 (uint8_t * dest, const uint8_t * src1,				     const uint8_t * src2,				     const uint8_t * src3,				     const uint8_t * src4){    /* *dest = (*src1 + *src2 + *src3 + *src4 + 2)/ 4; */    __m64 mm0=_mm_setzero_si64(),mm1,mm2,mm3,mm4,mm5,mm6;    __m64 round4 = _mm_set1_pi16(0x0002);    movq_m2r (*src1, mm1);	/* load 8 src1 bytes */    movq_r2r (mm1, mm2);	/* copy 8 src1 bytes */    punpcklbw_r2r (mm0, mm1);	/* unpack low src1 bytes */    punpckhbw_r2r (mm0, mm2);	/* unpack high src1 bytes */    movq_m2r (*src2, mm3);	/* load 8 src2 bytes */    movq_r2r (mm3, mm4);	/* copy 8 src2 bytes */    punpcklbw_r2r (mm0, mm3);	/* unpack low src2 bytes */    punpckhbw_r2r (mm0, mm4);	/* unpack high src2 bytes */    paddw_r2r (mm3, mm1);	/* add lows */    paddw_r2r (mm4, mm2);	/* add highs */    /* now have partials in mm1 and mm2 */    movq_m2r (*src3, mm3);	/* load 8 src3 bytes */    movq_r2r (mm3, mm4);	/* copy 8 src3 bytes */    punpcklbw_r2r (mm0, mm3);	/* unpack low src3 bytes */    punpckhbw_r2r (mm0, mm4);	/* unpack high src3 bytes */    paddw_r2r (mm3, mm1);	/* add lows */    paddw_r2r (mm4, mm2);	/* add highs */    movq_m2r (*src4, mm5);	/* load 8 src4 bytes */    movq_r2r (mm5, mm6);	/* copy 8 src4 bytes */    punpcklbw_r2r (mm0, mm5);	/* unpack low src4 bytes */    punpckhbw_r2r (mm0, mm6);	/* unpack high src4 bytes */    paddw_r2r (mm5, mm1);	/* add lows */    paddw_r2r (mm6, mm2);	/* add highs */    /* now have subtotal in mm1 and mm2 */    paddw_m2r (round4, mm1);    psraw_i2r (2, mm1);		/* /4 */    paddw_m2r (round4, mm2);    psraw_i2r (2, mm2);		/* /4 */    packuswb_r2r (mm2, mm1);	/* pack (w/ saturation) */    movq_r2m (mm1, *dest);	/* store result in dest */}static inline void mmx_interp_average_4_U8 (uint8_t * dest,					    const uint8_t * src1,					    const uint8_t * src2,					    const uint8_t * src3,					    const uint8_t * src4){    /* *dest = (*dest + (*src1 + *src2 + *src3 + *src4 + 2)/ 4 + 1)/ 2; */    __m64 mm0=_mm_setzero_si64(),mm1,mm2,mm3,mm4,mm5,mm6;    __m64 round4 = _mm_set1_pi16(0x0002);    __m64 mask1 = _mm_set1_pi8(0xfe);    movq_m2r (*src1, mm1);	/* load 8 src1 bytes */    movq_r2r (mm1, mm2);	/* copy 8 src1 bytes */    punpcklbw_r2r (mm0, mm1);	/* unpack low src1 bytes */    punpckhbw_r2r (mm0, mm2);	/* unpack high src1 bytes */    movq_m2r (*src2, mm3);	/* load 8 src2 bytes */    movq_r2r (mm3, mm4);	/* copy 8 src2 bytes */    punpcklbw_r2r (mm0, mm3);	/* unpack low src2 bytes */    punpckhbw_r2r (mm0, mm4);	/* unpack high src2 bytes */    paddw_r2r (mm3, mm1);	/* add lows */    paddw_r2r (mm4, mm2);	/* add highs */    /* now have partials in mm1 and mm2 */    movq_m2r (*src3, mm3);	/* load 8 src3 bytes */    movq_r2r (mm3, mm4);	/* copy 8 src3 bytes */    punpcklbw_r2r (mm0, mm3);	/* unpack low src3 bytes */    punpckhbw_r2r (mm0, mm4);	/* unpack high src3 bytes */    paddw_r2r (mm3, mm1);	/* add lows */    paddw_r2r (mm4, mm2);	/* add highs */    movq_m2r (*src4, mm5);	/* load 8 src4 bytes */    movq_r2r (mm5, mm6);	/* copy 8 src4 bytes */    punpcklbw_r2r (mm0, mm5);	/* unpack low src4 bytes */    punpckhbw_r2r (mm0, mm6);	/* unpack high src4 bytes */    paddw_r2r (mm5, mm1);	/* add lows */    paddw_r2r (mm6, mm2);	/* add highs */    paddw_m2r (round4, mm1);    psraw_i2r (2, mm1);		/* /4 */    paddw_m2r (round4, mm2);    psraw_i2r (2, mm2);		/* /4 */    /* now have subtotal/4 in mm1 and mm2 */    movq_m2r (*dest, mm3);	/* load 8 dest bytes */    movq_r2r (mm3, mm4);	/* copy 8 dest bytes */    packuswb_r2r (mm2, mm1);	/* pack (w/ saturation) */    movq_r2r (mm1,mm2);		/* copy subresult */    pxor_r2r (mm1, mm3);	/* xor srcavg and dest */    pand_m2r (mask1, mm3);	/* mask lower bits */    psrlq_i2r (1, mm3);		/* /2 */    por_r2r (mm2, mm4);		/* or srcavg and dest */    psubb_r2r (mm3, mm4);	/* subtract subresults */    movq_r2m (mm4, *dest);	/* store result in dest */}/*-----------------------------------------------------------------------*/static inline void MC_avg_mmx (const int width, int height, uint8_t * dest,			       const uint8_t * ref, const int stride){    do {	mmx_average_2_U8 (dest, dest, ref);	if (width == 16)	    mmx_average_2_U8 (dest+8, dest+8, ref+8);	dest += stride;	ref += stride;    } while (--height);}static void MC_avg_o_16_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_avg_mmx (16, height, dest, ref, stride);}static void MC_avg_o_8_mmx (uint8_t * dest, const uint8_t * ref,			    int stride, int height){    MC_avg_mmx (8, height, dest, ref, stride);}/*-----------------------------------------------------------------------*/static inline void MC_put_mmx (const int width, int height, uint8_t * dest,			       const uint8_t * ref, const int stride){    __m64 mm0,mm1;    mmx_zero_reg (mm0);    do {	movq_m2r (* ref, mm1);	/* load 8 ref bytes */	movq_r2m (mm1,* dest);	/* store 8 bytes at curr */	if (width == 16)	    {		movq_m2r (* (ref+8), mm1);	/* load 8 ref bytes */		movq_r2m (mm1,* (dest+8));	/* store 8 bytes at curr */	    }	dest += stride;	ref += stride;    } while (--height);}static void MC_put_o_16_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_put_mmx (16, height, dest, ref, stride);}static void MC_put_o_8_mmx (uint8_t * dest, const uint8_t * ref,			    int stride, int height){    MC_put_mmx (8, height, dest, ref, stride);}/*-----------------------------------------------------------------------*//* Half pixel interpolation in the x direction */static inline void MC_avg_x_mmx (const int width, int height, uint8_t * dest,				 const uint8_t * ref, const int stride){    do {	mmx_interp_average_2_U8 (dest, ref, ref+1);	if (width == 16)	    mmx_interp_average_2_U8 (dest+8, ref+8, ref+9);	dest += stride;	ref += stride;    } while (--height);}static void MC_avg_x_16_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_avg_x_mmx (16, height, dest, ref, stride);}static void MC_avg_x_8_mmx (uint8_t * dest, const uint8_t * ref,			    int stride, int height){    MC_avg_x_mmx (8, height, dest, ref, stride);}/*-----------------------------------------------------------------------*/static inline void MC_put_x_mmx (const int width, int height, uint8_t * dest,				 const uint8_t * ref, const int stride){    do {	mmx_average_2_U8 (dest, ref, ref+1);	if (width == 16)	    mmx_average_2_U8 (dest+8, ref+8, ref+9);	dest += stride;	ref += stride;    } while (--height);}static void MC_put_x_16_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_put_x_mmx (16, height, dest, ref, stride);}static void MC_put_x_8_mmx (uint8_t * dest, const uint8_t * ref,			    int stride, int height){    MC_put_x_mmx (8, height, dest, ref, stride);}/*-----------------------------------------------------------------------*/static inline void MC_avg_xy_mmx (const int width, int height, uint8_t * dest,				  const uint8_t * ref, const int stride){    const uint8_t * ref_next = ref + stride;    do {	mmx_interp_average_4_U8 (dest, ref, ref+1, ref_next, ref_next+1);	if (width == 16)	    mmx_interp_average_4_U8 (dest+8, ref+8, ref+9,				     ref_next+8, ref_next+9);	dest += stride;	ref += stride;	ref_next += stride;    } while (--height);}static void MC_avg_xy_16_mmx (uint8_t * dest, const uint8_t * ref,			      int stride, int height){    MC_avg_xy_mmx (16, height, dest, ref, stride);}static void MC_avg_xy_8_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_avg_xy_mmx (8, height, dest, ref, stride);}/*-----------------------------------------------------------------------*/static inline void MC_put_xy_mmx (const int width, int height, uint8_t * dest,				  const uint8_t * ref, const int stride){    const uint8_t * ref_next = ref + stride;    do {	mmx_average_4_U8 (dest, ref, ref+1, ref_next, ref_next+1);	if (width == 16)	    mmx_average_4_U8 (dest+8, ref+8, ref+9, ref_next+8, ref_next+9);	dest += stride;	ref += stride;	ref_next += stride;    } while (--height);}static void MC_put_xy_16_mmx (uint8_t * dest, const uint8_t * ref,			      int stride, int height){    MC_put_xy_mmx (16, height, dest, ref, stride);}static void MC_put_xy_8_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_put_xy_mmx (8, height, dest, ref, stride);}/*-----------------------------------------------------------------------*/static inline void MC_avg_y_mmx (const int width, int height, uint8_t * dest,				 const uint8_t * ref, const int stride){    const uint8_t * ref_next = ref + stride;    do {	mmx_interp_average_2_U8 (dest, ref, ref_next);	if (width == 16)	    mmx_interp_average_2_U8 (dest+8, ref+8, ref_next+8);	dest += stride;	ref += stride;	ref_next += stride;    } while (--height);}static void MC_avg_y_16_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_avg_y_mmx (16, height, dest, ref, stride);}static void MC_avg_y_8_mmx (uint8_t * dest, const uint8_t * ref,			    int stride, int height){    MC_avg_y_mmx (8, height, dest, ref, stride);}/*-----------------------------------------------------------------------*/static inline void MC_put_y_mmx (const int width, int height, uint8_t * dest,				 const uint8_t * ref, const int stride){    const uint8_t * ref_next = ref + stride;    do {	mmx_average_2_U8 (dest, ref, ref_next);	if (width == 16)	    mmx_average_2_U8 (dest+8, ref+8, ref_next+8);	dest += stride;	ref += stride;	ref_next += stride;    } while (--height);}static void MC_put_y_16_mmx (uint8_t * dest, const uint8_t * ref,			     int stride, int height){    MC_put_y_mmx (16, height, dest, ref, stride);}static void MC_put_y_8_mmx (uint8_t * dest, const uint8_t * ref,			    int stride, int height){    MC_put_y_mmx (8, height, dest, ref, stride);}MPEG2_MC_EXTERN (mmx)/* CPU_MMXEXT/CPU_3DNOW adaptation layer */#define pavg_r2r(src,dest)		\do {					\    if (cpu == CPU_MMXEXT)		\	pavgb_r2r (src, dest);		\/*    else				\

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91成人免费电影| 91精品免费观看| 精品一区二区在线播放| 婷婷综合在线观看| 亚洲手机成人高清视频| 26uuu久久综合| 欧美一区二区三区在| 91碰在线视频| bt7086福利一区国产| 风间由美中文字幕在线看视频国产欧美| 亚洲v精品v日韩v欧美v专区| 国产精品灌醉下药二区| 国产精品久久午夜夜伦鲁鲁| 国产欧美日韩三区| 国产精品久久久久久久裸模| 国产精品传媒在线| 久久一区二区三区国产精品| 日韩久久免费av| 精品日韩欧美一区二区| 欧美大片一区二区| 26uuu另类欧美| 国产精品乱码一区二三区小蝌蚪| 综合久久给合久久狠狠狠97色 | 日韩一区欧美小说| 一个色在线综合| 全部av―极品视觉盛宴亚洲| 久久99久久精品| 99久久久精品免费观看国产蜜| 色www精品视频在线观看| 欧美日韩久久久久久| 久久亚洲捆绑美女| 一区二区三区在线视频免费观看| 亚洲影视资源网| 久久99精品国产麻豆不卡| 成人涩涩免费视频| 在线观看国产91| 久久亚洲欧美国产精品乐播| √…a在线天堂一区| 天天爽夜夜爽夜夜爽精品视频| 国产尤物一区二区在线 | 色欲综合视频天天天| 日韩欧美电影一区| 亚洲高清视频中文字幕| 国产不卡免费视频| 欧美日韩精品三区| 国产精品亲子伦对白| 六月丁香综合在线视频| 在线视频国内一区二区| 国产欧美日产一区| 美日韩一区二区三区| 色诱视频网站一区| 国产精品理论在线观看| 国内不卡的二区三区中文字幕| 欧美色综合网站| 日本一区二区视频在线| 国产一区二区三区四区五区美女 | 亚洲精品一区二区三区影院| 日本三级亚洲精品| 91麻豆精品国产自产在线观看一区 | 99久久精品免费看国产| 中文字幕欧美激情| 成人一区在线观看| 中文字幕久久午夜不卡| 成人福利视频在线看| 国产亚洲欧洲997久久综合| 久久99精品久久久久| 欧美成人精品二区三区99精品| 视频在线在亚洲| 欧美精品久久99| 久久精品二区亚洲w码| 日韩午夜激情视频| 免费久久99精品国产| wwwwww.欧美系列| 成人午夜伦理影院| 亚洲欧洲精品天堂一级 | 福利视频网站一区二区三区| 国产精品久久福利| 在线观看亚洲精品| 日韩国产高清影视| 国产农村妇女毛片精品久久麻豆| 成人污污视频在线观看| 亚洲人成7777| 欧美大片在线观看| 91丝袜呻吟高潮美腿白嫩在线观看| 亚洲欧美另类小说| 日韩欧美一区二区视频| 成人午夜视频网站| 午夜精品久久一牛影视| 久久久久国产成人精品亚洲午夜| 99视频一区二区| 韩国v欧美v日本v亚洲v| 亚洲精品成人少妇| 精品少妇一区二区三区免费观看| av毛片久久久久**hd| 日韩经典中文字幕一区| 国产精品进线69影院| 日韩女优毛片在线| 欧美日韩一卡二卡三卡| caoporen国产精品视频| 精品一区二区国语对白| 水蜜桃久久夜色精品一区的特点| 亚洲国产成人午夜在线一区| 精品少妇一区二区三区免费观看| 欧美亚洲国产一区在线观看网站| 国产成人精品免费网站| 美女高潮久久久| 午夜精品成人在线视频| 一区二区三区成人| 日韩一区欧美小说| 国产精品久久久久aaaa樱花| 中文字幕免费不卡| 亚洲欧洲国产日本综合| 国产精品久久久久久久久晋中| 国产亚洲精品精华液| 欧美激情一区二区三区全黄| 国产日韩欧美不卡在线| 久久综合精品国产一区二区三区| 欧美变态tickle挠乳网站| 欧美大度的电影原声| 日韩欧美你懂的| 久久综合久久综合久久| 国产精品久久久久三级| 亚洲精品成人a在线观看| 一区二区三区日韩在线观看| 亚洲国产wwwccc36天堂| 欧美aaaaaa午夜精品| 国产suv精品一区二区三区| 成人av在线影院| 欧美日高清视频| 精品国产三级a在线观看| 久久先锋影音av| 亚洲欧美视频在线观看视频| 五月婷婷久久丁香| 国产精品69毛片高清亚洲| 91久久免费观看| 日韩欧美国产综合一区 | 欧美精品一区二区三区久久久| 中文字幕精品在线不卡| 一区二区三区色| 国产在线视频精品一区| 91美女在线视频| 日韩欧美国产综合在线一区二区三区 | 日产国产欧美视频一区精品 | 成人福利视频网站| 欧美一区二区三区四区视频| 亚洲国产精品99久久久久久久久 | 亚洲第一成人在线| 国产精品白丝av| 欧美精品第1页| 亚洲欧洲日韩av| 国产精品亚洲成人| 91精品国产aⅴ一区二区| 亚洲日本va午夜在线电影| 国产一区二区电影| 欧美mv日韩mv| 日本成人中文字幕在线视频| 色综合久久综合网| 国产精品免费看片| 国产乱色国产精品免费视频| 日韩一区二区在线观看视频| 亚洲va欧美va人人爽午夜| 99久久精品免费精品国产| 国产女同性恋一区二区| 国产 欧美在线| 久久精品视频网| 国产美女视频91| 久久综合狠狠综合久久综合88| 日韩不卡一区二区三区| 精品视频在线免费| 丝袜美腿高跟呻吟高潮一区| 欧美影视一区在线| 日韩国产精品久久久| 日韩一区二区三区三四区视频在线观看 | 欧美挠脚心视频网站| 天涯成人国产亚洲精品一区av| 在线一区二区三区做爰视频网站| 亚洲国产精品一区二区尤物区| 欧美性感一区二区三区| 亚洲国产精品久久艾草纯爱| 欧美一区二区三区日韩| 久久国产精品区| 国产精品美女久久久久久久久| 99re视频这里只有精品| 亚洲小少妇裸体bbw| 日韩午夜电影av| 国产aⅴ精品一区二区三区色成熟| 欧美高清在线一区二区| 91在线云播放| 热久久免费视频| 日韩美女精品在线| 日韩一区二区在线看| 成人av资源站| 毛片不卡一区二区| 国产精品久久久久久久久久免费看| 欧美午夜精品电影| 成人三级伦理片| 麻豆免费看一区二区三区| 亚洲国产乱码最新视频| 精品国产百合女同互慰| 欧美日韩色一区|