roqvideo.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003 Mike Melanson
3  * Copyright (C) 2003 Dr. Tim Ferguson
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_ROQVIDEO_H
23 #define AVCODEC_ROQVIDEO_H
24 
25 #include "libavutil/lfg.h"
26 #include "avcodec.h"
27 #include "bytestream.h"
28 #include "dsputil.h"
29 
30 typedef struct roq_cell {
31  unsigned char y[4];
32  unsigned char u, v;
33 } roq_cell;
34 
35 typedef struct roq_qcell {
36  int idx[4];
37 } roq_qcell;
38 
39 typedef struct motion_vect {
40  int d[2];
41 } motion_vect;
42 
43 struct RoqTempData;
44 
45 typedef struct RoqContext {
46 
52 
55 
57  int width, height;
58 
59  /* Encoder only data */
61  uint64_t lambda;
62 
65 
68 
69  unsigned int framesSinceKeyframe;
70 
74 } RoqContext;
75 
76 #define RoQ_INFO 0x1001
77 #define RoQ_QUAD_CODEBOOK 0x1002
78 #define RoQ_QUAD_VQ 0x1011
79 #define RoQ_SOUND_MONO 0x1020
80 #define RoQ_SOUND_STEREO 0x1021
81 
82 #define RoQ_ID_MOT 0x00
83 #define RoQ_ID_FCC 0x01
84 #define RoQ_ID_SLD 0x02
85 #define RoQ_ID_CCC 0x03
86 
87 void ff_apply_vector_2x2(RoqContext *ri, int x, int y, roq_cell *cell);
88 void ff_apply_vector_4x4(RoqContext *ri, int x, int y, roq_cell *cell);
89 
90 void ff_apply_motion_4x4(RoqContext *ri, int x, int y, int deltax, int deltay);
91 
92 void ff_apply_motion_8x8(RoqContext *ri, int x, int y, int deltax, int deltay);
93 
94 #endif /* AVCODEC_ROQVIDEO_H */
Definition: lfg.h:25
int d[2]
Definition: roqvideo.h:40
This structure describes decoded (raw) audio or video data.
Definition: avcodec.h:989
motion_vect * this_motion4
Definition: roqvideo.h:63
const AVFrame * frame_to_enc
Definition: roqvideo.h:71
struct motion_vect motion_vect
struct roq_qcell roq_qcell
void ff_apply_vector_2x2(RoqContext *ri, int x, int y, roq_cell *cell)
Definition: roqvideo.c:41
motion_vect * this_motion8
Definition: roqvideo.h:66
AVFrame * current_frame
Definition: roqvideo.h:50
motion_vect * last_motion4
Definition: roqvideo.h:64
int width
Definition: roqvideo.h:57
AVLFG randctx
Definition: roqvideo.h:60
uint8_t
unsigned int framesSinceKeyframe
Definition: roqvideo.h:69
AVFrame frames[2]
Definition: roqvideo.h:48
void ff_apply_vector_4x4(RoqContext *ri, int x, int y, roq_cell *cell)
Definition: roqvideo.c:71
roq_qcell cb4x4[256]
Definition: roqvideo.h:54
struct RoqContext RoqContext
unsigned char u
Definition: roqvideo.h:32
void ff_apply_motion_4x4(RoqContext *ri, int x, int y, int deltax, int deltay)
Definition: roqvideo.c:133
struct RoqTempData * tmpData
Definition: roqvideo.h:73
int idx[4]
Definition: roqvideo.h:36
int first_frame
Definition: roqvideo.h:51
external API header
main external API structure.
Definition: avcodec.h:1339
GetByteContext gb
Definition: roqvideo.h:56
unsigned char y[4]
Definition: roqvideo.h:31
uint64_t lambda
Definition: roqvideo.h:61
AVCodecContext * avctx
Definition: roqvideo.h:47
uint8_t * out_buf
Definition: roqvideo.h:72
Temporary vars.
Definition: roqvideoenc.c:223
void ff_apply_motion_8x8(RoqContext *ri, int x, int y, int deltax, int deltay)
Definition: roqvideo.c:139
motion_vect * last_motion8
Definition: roqvideo.h:67
DSP utils.
roq_cell cb2x2[256]
Definition: roqvideo.h:53
AVFrame * last_frame
Definition: roqvideo.h:49
In the ELBG jargon, a cell is the set of points that are closest to a codebook entry.
Definition: elbg.c:38
unsigned char v
Definition: roqvideo.h:32
int height
Definition: roqvideo.h:57
struct roq_cell roq_cell