FFmpeg
Loading...
Searching...
No Matches
qoi.h
Go to the documentation of this file.
1/*
2 * QOI image format
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef AVCODEC_QOI_H
22#define AVCODEC_QOI_H
23
24#define QOI_OP_INDEX 0x00 /* 00xxxxxx */
25#define QOI_OP_DIFF 0x40 /* 01xxxxxx */
26#define QOI_OP_LUMA 0x80 /* 10xxxxxx */
27#define QOI_OP_RUN 0xc0 /* 11xxxxxx */
28#define QOI_OP_RGB 0xfe /* 11111110 */
29#define QOI_OP_RGBA 0xff /* 11111111 */
30
31#define QOI_MASK_2 0xc0 /* 11000000 */
32
33#define QOI_COLOR_HASH(px) (px[0]*3 + px[1]*5 + px[2]*7 + px[3]*11)
34
35#endif /* AVCODEC_QOI_H */