| 1 | /* |
|---|
| 2 | * ColorConversions.h |
|---|
| 3 | * Created by Alexander Strange on 1/10/07. |
|---|
| 4 | * |
|---|
| 5 | * This file is part of Perian. |
|---|
| 6 | * |
|---|
| 7 | * This library is free software; you can redistribute it and/or |
|---|
| 8 | * modify it under the terms of the GNU Lesser General Public |
|---|
| 9 | * License as published by the Free Software Foundation; either |
|---|
| 10 | * version 2.1 of the License, or (at your option) any later version. |
|---|
| 11 | * |
|---|
| 12 | * This library is distributed in the hope that it will be useful, |
|---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 15 | * Lesser General Public License for more details. |
|---|
| 16 | * |
|---|
| 17 | * You should have received a copy of the GNU Lesser General Public |
|---|
| 18 | * License along with FFmpeg; if not, write to the Free Software |
|---|
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 20 | */ |
|---|
| 21 | |
|---|
| 22 | |
|---|
| 23 | #include <Carbon/Carbon.h> |
|---|
| 24 | #include "libavcodec/avcodec.h" |
|---|
| 25 | |
|---|
| 26 | #if defined(__i386__) && !defined(__llvm__) |
|---|
| 27 | #define FASTCALL __attribute__((fastcall)) |
|---|
| 28 | #else |
|---|
| 29 | #define FASTCALL |
|---|
| 30 | #endif |
|---|
| 31 | |
|---|
| 32 | typedef void ColorConversionFunc(AVFrame *inPicture, UInt8 *outBaseAddr, int outRowBytes, unsigned outWidth, unsigned outHeight) FASTCALL; |
|---|
| 33 | typedef ColorConversionFunc *ColorConversionFuncPtr; |
|---|
| 34 | typedef void ColorClearFunc(UInt8 *outBaseAddr, int outRowBytes, unsigned outWidth, unsigned outHeight) FASTCALL; |
|---|
| 35 | typedef ColorClearFunc *ColorClearFuncPtr; |
|---|
| 36 | |
|---|
| 37 | typedef struct ColorConversionFuncs { |
|---|
| 38 | ColorConversionFuncPtr convert; |
|---|
| 39 | ColorClearFuncPtr clear; |
|---|
| 40 | } ColorConversionFuncs; |
|---|
| 41 | |
|---|
| 42 | extern OSType ColorConversionDstForPixFmt(enum PixelFormat ffPixFmt); |
|---|
| 43 | extern int ColorConversionFindFor(ColorConversionFuncs *funcs, enum PixelFormat ffPixFmt, AVFrame *ffPicture, OSType qtPixFmt); |
|---|