FFmpeg
huffyuv.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2014 Michael Niedermayer <michaelni@gmx.at>
3  *
4  * see https://multimedia.cx/huffyuv.txt for a description of
5  * the algorithm used
6  *
7  * This file is part of FFmpeg.
8  *
9  * FFmpeg is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * FFmpeg is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with FFmpeg; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 /**
25  * @file
26  * huffyuv codec for libavcodec.
27  */
28 
29 #ifndef AVCODEC_HUFFYUV_H
30 #define AVCODEC_HUFFYUV_H
31 
32 #include <stdint.h>
33 
34 #include "config.h"
35 
36 #if HAVE_BIGENDIAN
37 #define B 3
38 #define G 2
39 #define R 1
40 #define A 0
41 #else
42 #define B 0
43 #define G 1
44 #define R 2
45 #define A 3
46 #endif
47 
48 #define MAX_BITS 16
49 #define MAX_N (1<<MAX_BITS)
50 #define MAX_VLC_N 16384
51 
52 typedef enum Predictor {
53  LEFT = 0,
56 } Predictor;
57 
58 int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table, int n);
59 
60 #endif /* AVCODEC_HUFFYUV_H */
Predictor
Predictor
Definition: huffyuv.h:52
ff_huffyuv_generate_bits_table
int ff_huffyuv_generate_bits_table(uint32_t *dst, const uint8_t *len_table, int n)
Definition: huffyuv.c:40
MEDIAN
@ MEDIAN
Definition: huffyuv.h:55
LEFT
@ LEFT
Definition: huffyuv.h:53
dst
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
Definition: dsp.h:83
Predictor
Definition: ratecontrol.h:33
PLANE
@ PLANE
Definition: huffyuv.h:54