mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-24 16:22:37 +00:00
67adb30322
And preserve the public SwsContext as separate name. The motivation here is that I want to turn SwsContext into a public struct, while keeping the internal implementation hidden. Additionally, I also want to be able to use multiple internal implementations, e.g. for GPU devices. This commit does not include any functional changes. For the most part, it is a simple rename. The only complications arise from the public facing API functions, which preserve their current type (and hence require an additional unwrapping step internally), and the checkasm test framework, which directly accesses SwsInternal. For consistency, the affected functions that need to maintain a distionction have generally been changed to refer to the SwsContext as *sws, and the SwsInternal as *c. In an upcoming commit, I will provide a backing definition for the public SwsContext, and update `sws_internal()` to dereference the internal struct instead of merely casting it. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas <git@haasn.dev>
52 lines
2.0 KiB
C
52 lines
2.0 KiB
C
/*
|
|
* AltiVec-enhanced yuv2yuvX
|
|
*
|
|
* Copyright (C) 2004 Romain Dolbeau <romain@dolbeau.org>
|
|
* based on the equivalent C code in swscale.c
|
|
*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* FFmpeg 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
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef SWSCALE_PPC_YUV2RGB_ALTIVEC_H
|
|
#define SWSCALE_PPC_YUV2RGB_ALTIVEC_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "libswscale/swscale_internal.h"
|
|
|
|
#define YUV2PACKEDX_HEADER(suffix) \
|
|
void ff_yuv2 ## suffix ## _X_altivec(SwsInternal *c, \
|
|
const int16_t *lumFilter, \
|
|
const int16_t **lumSrc, \
|
|
int lumFilterSize, \
|
|
const int16_t *chrFilter, \
|
|
const int16_t **chrUSrc, \
|
|
const int16_t **chrVSrc, \
|
|
int chrFilterSize, \
|
|
const int16_t **alpSrc, \
|
|
uint8_t *dest, \
|
|
int dstW, int dstY);
|
|
|
|
YUV2PACKEDX_HEADER(abgr);
|
|
YUV2PACKEDX_HEADER(bgra);
|
|
YUV2PACKEDX_HEADER(argb);
|
|
YUV2PACKEDX_HEADER(rgba);
|
|
YUV2PACKEDX_HEADER(rgb24);
|
|
YUV2PACKEDX_HEADER(bgr24);
|
|
|
|
#endif /* SWSCALE_PPC_YUV2RGB_ALTIVEC_H */
|