Mercurial > libavcodec.hg
annotate roqvideo.h @ 5511:7617e066481e libavcodec
use get_unary from bitstream.h
author | alex |
---|---|
date | Wed, 08 Aug 2007 22:54:47 +0000 |
parents | fa85149193e2 |
children | 1d83e9c34641 |
rev | line source |
---|---|
5080 | 1 /* |
5189 | 2 * Copyright (C) 2003 Mike Melanson |
3 * Copyright (C) 2003 Dr. Tim Ferguson | |
5080 | 4 * |
5 * This file is part of FFmpeg. | |
6 * | |
7 * FFmpeg 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 * FFmpeg 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 FFmpeg; if not, write to the Free Software | |
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
20 */ | |
21 | |
5163 | 22 #ifndef AVCODEC_ROQVIDEO_H |
23 #define AVCODEC_ROQVIDEO_H | |
24 | |
5080 | 25 #include "avcodec.h" |
26 #include "dsputil.h" | |
5184 | 27 #include "random.h" |
5080 | 28 |
29 typedef struct { | |
5190 | 30 unsigned char y[4]; |
31 unsigned char u, v; | |
5080 | 32 } roq_cell; |
33 | |
34 typedef struct { | |
5190 | 35 int idx[4]; |
5080 | 36 } roq_qcell; |
37 | |
5184 | 38 typedef struct { |
39 int d[2]; | |
40 } motion_vect; | |
41 | |
5080 | 42 typedef struct RoqContext { |
43 | |
44 AVCodecContext *avctx; | |
45 DSPContext dsp; | |
46 AVFrame frames[2]; | |
47 AVFrame *last_frame; | |
48 AVFrame *current_frame; | |
5184 | 49 int first_frame; |
5080 | 50 |
5104 | 51 roq_cell cb2x2[256]; |
52 roq_qcell cb4x4[256]; | |
5080 | 53 |
54 unsigned char *buf; | |
55 int size; | |
5184 | 56 int width, height; |
5080 | 57 |
5184 | 58 /* Encoder only data */ |
59 AVRandomState randctx; | |
60 uint64_t lambda; | |
61 | |
62 motion_vect *this_motion4; | |
63 motion_vect *last_motion4; | |
64 | |
65 motion_vect *this_motion8; | |
66 motion_vect *last_motion8; | |
67 | |
68 unsigned int framesSinceKeyframe; | |
69 | |
70 AVFrame *frame_to_enc; | |
71 uint8_t *out_buf; | |
5080 | 72 } RoqContext; |
73 | |
74 #define RoQ_INFO 0x1001 | |
75 #define RoQ_QUAD_CODEBOOK 0x1002 | |
76 #define RoQ_QUAD_VQ 0x1011 | |
77 #define RoQ_SOUND_MONO 0x1020 | |
78 #define RoQ_SOUND_STEREO 0x1021 | |
79 | |
80 #define RoQ_ID_MOT 0x00 | |
81 #define RoQ_ID_FCC 0x01 | |
82 #define RoQ_ID_SLD 0x02 | |
83 #define RoQ_ID_CCC 0x03 | |
84 | |
85 void ff_apply_vector_2x2(RoqContext *ri, int x, int y, roq_cell *cell); | |
86 void ff_apply_vector_4x4(RoqContext *ri, int x, int y, roq_cell *cell); | |
87 | |
88 void ff_apply_motion_4x4(RoqContext *ri, int x, int y, int deltax, int deltay); | |
89 | |
90 void ff_apply_motion_8x8(RoqContext *ri, int x, int y, int deltax, int deltay); | |
5163 | 91 |
5169
3fd46e281bd8
add a comment to indicate which #endif belong to which #define
gpoirier
parents:
5163
diff
changeset
|
92 #endif // AVCODEC_ROQVIDEO_H |