discarddeinterlacer.cpp

来自「linux下实现视频播放的播放器」· C++ 代码 · 共 47 行

CPP
47
字号
/* *  Copyright (C) 2005-2008  gulikoza, mtrooper * *  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-1307, USA. *//* $Id$ */#include "DiscardDeinterlacer.h"void DiscardDeinterlacer::Render(unsigned char * ptr[], unsigned char * src[], deint * d){    /* Copy image and skip lines */    src[2] += d->flags * d->src_pitch[2];    src[1] += d->flags * d->src_pitch[1];    src[0] += d->flags * d->src_pitch[0];    register int j = d->height>>1;    register unsigned int k = 0;    while(j--) {	// Y	SDL_memcpy(ptr[2], src[2], d->width);	src[2] += d->src_pitch[2]<<1;	ptr[2] += d->dst_pitch[2];	// U & V	SDL_memcpy(ptr[k], src[k], d->width>>1);	src[k] += d->src_pitch[k]<<1;	ptr[k] += d->dst_pitch[k];	k = (k+1)&1;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?