Main Page
Related Pages
Modules
Data Structures
Files
Examples
File List
Globals
libavcodec
utvideo.h
Go to the documentation of this file.
1
/*
2
* Common Ut Video header
3
* Copyright (c) 2011 Konstantin Shishkov
4
*
5
* This file is part of Libav.
6
*
7
* Libav 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
* Libav 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 Libav; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
*/
21
22
#ifndef AVCODEC_UTVIDEO_H
23
#define AVCODEC_UTVIDEO_H
24
30
#include "
libavutil/common.h
"
31
#include "
avcodec.h
"
32
#include "
dsputil.h
"
33
34
enum
{
35
PRED_NONE
= 0,
36
PRED_LEFT
,
37
PRED_GRADIENT
,
38
PRED_MEDIAN
,
39
};
40
41
enum
{
42
COMP_NONE
= 0,
43
COMP_HUFF
,
44
};
45
46
/*
47
* "Original format" markers.
48
* Based on values gotten from the official VFW encoder.
49
* They are not used during decoding, but they do have
50
* an informative role on seeing what was input
51
* to the encoder.
52
*/
53
enum
{
54
UTVIDEO_RGB
=
MKTAG
(0x00, 0x00, 0x01, 0x18),
55
UTVIDEO_RGBA
=
MKTAG
(0x00, 0x00, 0x02, 0x18),
56
UTVIDEO_420
=
MKTAG
(
'Y'
,
'V'
,
'1'
,
'2'
),
57
UTVIDEO_422
=
MKTAG
(
'Y'
,
'U'
,
'Y'
,
'2'
),
58
};
59
60
/* Mapping of libavcodec prediction modes to Ut Video's */
61
extern
const
int
ff_ut_pred_order
[5];
62
63
/* Order of RGB(A) planes in Ut Video */
64
extern
const
int
ff_ut_rgb_order
[4];
65
66
typedef
struct
UtvideoContext
{
67
AVCodecContext
*
avctx
;
68
AVFrame
pic
;
69
DSPContext
dsp
;
70
71
uint32_t
frame_info_size
,
flags
,
frame_info
;
72
int
planes
;
73
int
slices
;
74
int
compression
;
75
int
interlaced
;
76
int
frame_pred
;
77
78
int
slice_stride
;
79
uint8_t
*
slice_bits
, *
slice_buffer
[4];
80
int
slice_bits_size
;
81
}
UtvideoContext
;
82
83
typedef
struct
HuffEntry
{
84
uint8_t
sym
;
85
uint8_t
len
;
86
uint32_t
code
;
87
}
HuffEntry
;
88
89
/* Compare huffman tree nodes */
90
int
ff_ut_huff_cmp_len
(
const
void
*
a
,
const
void
*
b
);
91
92
#endif
/* AVCODEC_UTVIDEO_H */
UtvideoContext::slice_stride
int slice_stride
Definition:
utvideo.h:78
AVFrame
This structure describes decoded (raw) audio or video data.
Definition:
avcodec.h:989
PRED_NONE
Definition:
utvideo.h:35
UTVIDEO_422
Definition:
utvideo.h:57
UtvideoContext::flags
uint32_t flags
Definition:
utvideo.h:71
UtvideoContext::slices
int slices
Definition:
utvideo.h:73
UtvideoContext::slice_bits_size
int slice_bits_size
Definition:
utvideo.h:80
UTVIDEO_420
Definition:
utvideo.h:56
PRED_MEDIAN
Definition:
utvideo.h:38
UtvideoContext::interlaced
int interlaced
Definition:
utvideo.h:75
uint8_t
uint8_t
Definition:
audio_convert.c:194
b
#define b
Definition:
input.c:52
UtvideoContext::frame_info
uint32_t frame_info
Definition:
utvideo.h:71
MKTAG
#define MKTAG(a, b, c, d)
COMP_NONE
Definition:
utvideo.h:42
HuffEntry::code
uint32_t code
Definition:
utvideo.h:86
UTVIDEO_RGBA
Definition:
utvideo.h:55
PRED_GRADIENT
Definition:
utvideo.h:37
slice_buffer_s
Used to minimize the amount of memory used in order to optimize cache performance.
Definition:
dwt.h:39
HuffEntry::sym
uint8_t sym
Definition:
utvideo.h:84
UtvideoContext::avctx
AVCodecContext * avctx
Definition:
utvideo.h:67
UtvideoContext::frame_info_size
uint32_t frame_info_size
Definition:
utvideo.h:71
UtvideoContext::planes
int planes
Definition:
utvideo.h:72
ff_ut_rgb_order
const int ff_ut_rgb_order[4]
Definition:
utvideo.c:33
UtvideoContext::compression
int compression
Definition:
utvideo.h:74
UtvideoContext::dsp
DSPContext dsp
Definition:
utvideo.h:69
UtvideoContext::pic
AVFrame pic
Definition:
utvideo.h:68
UTVIDEO_RGB
Definition:
utvideo.h:54
UtvideoContext
Definition:
utvideo.h:66
UtvideoContext::frame_pred
int frame_pred
Definition:
utvideo.h:76
HuffEntry::len
uint8_t len
Definition:
utvideo.h:85
ff_ut_huff_cmp_len
int ff_ut_huff_cmp_len(const void *a, const void *b)
Definition:
utvideo.c:35
avcodec.h
external API header
AVCodecContext
main external API structure.
Definition:
avcodec.h:1339
ff_ut_pred_order
const int ff_ut_pred_order[5]
Definition:
utvideo.c:29
UtvideoContext::slice_bits
uint8_t * slice_bits
Definition:
utvideo.h:79
common.h
common internal and external API header
UtvideoContext
struct UtvideoContext UtvideoContext
dsputil.h
DSP utils.
HuffEntry
struct HuffEntry HuffEntry
COMP_HUFF
Definition:
utvideo.h:43
HuffEntry
Definition:
utvideo.h:83
PRED_LEFT
Definition:
utvideo.h:36
DSPContext
DSPContext.
Definition:
dsputil.h:194
a
a
Definition:
h264pred_template.c:466