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

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

?? motion_comp_mmx.c

?? linux下實現視頻播放的播放器
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * 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				\

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲在线成人精品| 国产原创一区二区三区| 亚洲女同一区二区| 国产精品久久久久影院亚瑟| 2021国产精品久久精品| 欧美成人一区二区三区在线观看 | 一本大道久久a久久精二百| 国产成人av福利| 国产精品亚洲а∨天堂免在线| 国产精品乡下勾搭老头1| 国产成人亚洲综合a∨婷婷| 国产成人av一区| 99re视频这里只有精品| 一本大道综合伊人精品热热| 欧美性猛片xxxx免费看久爱| 欧美日韩国产一级片| 日韩一级二级三级精品视频| 久久久影视传媒| 亚洲欧洲制服丝袜| 香蕉加勒比综合久久| 麻豆国产一区二区| 国产精品一区2区| 99亚偷拍自图区亚洲| 欧美亚洲另类激情小说| 欧美福利电影网| 欧美精品一区二区不卡| 欧美激情中文字幕| 一区二区三区.www| 青青草国产成人99久久| 国产福利一区二区三区| 97精品国产97久久久久久久久久久久 | 日韩av一级电影| 韩国v欧美v日本v亚洲v| 丁香六月久久综合狠狠色| 色琪琪一区二区三区亚洲区| 91精品国产欧美一区二区成人| 欧美不卡123| 亚洲色大成网站www久久九九| 亚洲一区二区三区在线播放| 狂野欧美性猛交blacked| 成人午夜碰碰视频| 欧美日韩精品欧美日韩精品一| 欧美一区二区三区四区高清| 亚洲伊人色欲综合网| 日本不卡视频一二三区| 成人在线一区二区三区| 在线精品亚洲一区二区不卡| 日韩免费成人网| 亚洲欧洲性图库| 看电视剧不卡顿的网站| 91亚洲永久精品| 日韩欧美高清在线| 中文字幕日本不卡| 捆绑紧缚一区二区三区视频| 99久久久精品| 欧美一级高清片| 亚洲精品乱码久久久久久| 久久99精品一区二区三区| 91丨porny丨国产入口| 日韩三级视频在线看| 亚洲精品视频在线观看网站| 精品一区二区在线播放| 欧美性视频一区二区三区| 国产午夜精品一区二区| 日韩中文字幕1| 色综合天天在线| 久久精品一二三| 日韩av二区在线播放| 在线观看亚洲一区| 国产精品久久久久久久久动漫| 日韩精品电影在线观看| 91国偷自产一区二区三区观看 | 亚洲午夜三级在线| 粉嫩高潮美女一区二区三区| 日韩三级电影网址| 视频一区免费在线观看| 色播五月激情综合网| 欧美国产精品久久| 久久99精品国产麻豆婷婷| 欧美三级午夜理伦三级中视频| 国产精品久线观看视频| 国产一区二区三区四区五区入口 | 亚洲视频精选在线| 懂色一区二区三区免费观看| 欧美不卡在线视频| 奇米色777欧美一区二区| 欧美在线999| 亚洲免费观看高清完整| 成人美女视频在线看| 久久免费视频色| 激情五月播播久久久精品| 91精品国产欧美一区二区成人 | 成人小视频在线| www国产精品av| 九九久久精品视频| 日韩欧美中文字幕一区| 蜜桃91丨九色丨蝌蚪91桃色| 7777精品伊人久久久大香线蕉经典版下载 | 免费高清视频精品| 欧美精品一二三| 亚洲成av人影院| 欧美日韩精品一区二区在线播放 | 欧美在线不卡视频| 一区二区三区在线免费播放| 色综合久久88色综合天天6| 成人欧美一区二区三区视频网页| 成人美女视频在线观看18| 国产精品久久久久久久久果冻传媒 | 国产欧美日韩精品a在线观看| 国产综合色产在线精品| 久久久久久久久久久99999| 国产毛片一区二区| 久久九九久久九九| 成人精品gif动图一区| 国产精品久久久久久久蜜臀| 99久久精品国产麻豆演员表| 亚洲日本成人在线观看| 色哟哟在线观看一区二区三区| 亚洲美女少妇撒尿| 欧美日韩国产综合一区二区| 日本在线不卡一区| 精品国产乱码久久久久久牛牛| 国产一区二区三区美女| 国产精品入口麻豆原神| 色婷婷精品大在线视频| 日本一区中文字幕| 久久久精品中文字幕麻豆发布| 成人污污视频在线观看| 一区二区在线看| 欧美日本在线观看| 国产综合久久久久久久久久久久| 国产精品区一区二区三| 欧美日韩一区二区欧美激情| 美女视频一区二区| 国产精品视频yy9299一区| 欧美艳星brazzers| 久久99精品国产91久久来源| 国产精品久久久久影院老司| 欧美日韩国产综合一区二区| 国产麻豆9l精品三级站| 亚洲欧洲美洲综合色网| 欧美一区欧美二区| 成人免费视频一区| 视频一区欧美日韩| 国产精品三级视频| 91精品国产综合久久久久久漫画| 国产不卡视频一区二区三区| 亚洲一区二区三区激情| 久久免费电影网| 欧美综合在线视频| 国产91在线观看丝袜| 亚洲成年人网站在线观看| 亚洲你懂的在线视频| 欧美老肥妇做.爰bbww| 国产xxx精品视频大全| 午夜精品福利一区二区三区av | 国产一级精品在线| 亚洲图片欧美色图| 国产日产精品1区| 欧美日本一道本| 不卡的av中国片| 麻豆国产欧美一区二区三区| 亚洲靠逼com| 久久精品视频一区二区| 欧美精品免费视频| www.成人网.com| 国产综合色产在线精品| 午夜精品影院在线观看| 成人免费在线播放视频| 精品国产乱码久久久久久闺蜜| 91国产福利在线| 成人动漫在线一区| 精品一区二区三区在线播放视频 | 在线观看网站黄不卡| 国产乱一区二区| 天堂精品中文字幕在线| 中文字幕亚洲成人| 久久久久久久久久久99999| 欧美一区二区三区喷汁尤物| 在线免费观看一区| voyeur盗摄精品| 高清国产一区二区| 国产精品中文欧美| 久久精品国产99久久6| 午夜视频在线观看一区二区三区| 亚洲精品中文在线| 国产精品传媒视频| 久久久99精品免费观看| 日韩欧美国产小视频| 精品污污网站免费看| 在线观看免费成人| 91丨九色丨黑人外教| 不卡的av电影在线观看| 国产福利91精品一区二区三区| 美女视频一区二区三区| 日本aⅴ亚洲精品中文乱码| 午夜电影网亚洲视频| 亚洲福利一区二区| 亚洲v中文字幕| 亚洲一区二区在线观看视频|