/* * This file is copied from ffmpeg's libavcodec/colorspace.h * for the YUV_TO_RGB{1,2}_CCIR macros. * Original copyright header and contents follows: */ /* * Colorspace conversion defines * Copyright (c) 2001, 2002, 2003 Fabrice Bellard * * 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 */ /** * @file libavcodec/colorspace.h * Various defines for YUV<->RGB conversion */ #ifndef AVCODEC_COLORSPACE_H #define AVCODEC_COLORSPACE_H #define SCALEBITS 10 #define ONE_HALF (1 << (SCALEBITS - 1)) #define FIX(x) ((int) ((x) * (1<> SCALEBITS];\ g = cm[(y + g_add) >> SCALEBITS];\ b = cm[(y + b_add) >> SCALEBITS];\ } #endif /* AVCODEC_COLORSPACE_H */