Mercurial > libavcodec.hg
comparison roqvideo.h @ 5184:f3873cd7f473 libavcodec
RoQ video encoder
patch by Vitor: \vitor1001 gmail com/
original thread: [FFmpeg-devel] RoQ video encoder (take 3)
date: 06/08/2007 10:34 PM
author | benoit |
---|---|
date | Mon, 25 Jun 2007 12:09:23 +0000 |
parents | 3fd46e281bd8 |
children | ab669ac706dc |
comparison
equal
deleted
inserted
replaced
5183:3adfa650c7ad | 5184:f3873cd7f473 |
---|---|
22 #ifndef AVCODEC_ROQVIDEO_H | 22 #ifndef AVCODEC_ROQVIDEO_H |
23 #define AVCODEC_ROQVIDEO_H | 23 #define AVCODEC_ROQVIDEO_H |
24 | 24 |
25 #include "avcodec.h" | 25 #include "avcodec.h" |
26 #include "dsputil.h" | 26 #include "dsputil.h" |
27 #include "random.h" | |
27 | 28 |
28 typedef struct { | 29 typedef struct { |
29 unsigned char y[4]; | 30 unsigned char y[4]; |
30 unsigned char u, v; | 31 unsigned char u, v; |
31 } roq_cell; | 32 } roq_cell; |
32 | 33 |
33 typedef struct { | 34 typedef struct { |
34 int idx[4]; | 35 int idx[4]; |
35 } roq_qcell; | 36 } roq_qcell; |
36 | 37 |
38 typedef struct { | |
39 int d[2]; | |
40 } motion_vect; | |
41 | |
37 typedef struct RoqContext { | 42 typedef struct RoqContext { |
38 | 43 |
39 AVCodecContext *avctx; | 44 AVCodecContext *avctx; |
40 DSPContext dsp; | 45 DSPContext dsp; |
41 AVFrame frames[2]; | 46 AVFrame frames[2]; |
42 AVFrame *last_frame; | 47 AVFrame *last_frame; |
43 AVFrame *current_frame; | 48 AVFrame *current_frame; |
49 int first_frame; | |
44 int y_stride; | 50 int y_stride; |
45 int c_stride; | 51 int c_stride; |
46 | 52 |
47 roq_cell cb2x2[256]; | 53 roq_cell cb2x2[256]; |
48 roq_qcell cb4x4[256]; | 54 roq_qcell cb4x4[256]; |
49 | 55 |
50 unsigned char *buf; | 56 unsigned char *buf; |
51 int size; | 57 int size; |
58 int width, height; | |
52 | 59 |
60 /* Encoder only data */ | |
61 AVRandomState randctx; | |
62 uint64_t lambda; | |
63 | |
64 motion_vect *this_motion4; | |
65 motion_vect *last_motion4; | |
66 | |
67 motion_vect *this_motion8; | |
68 motion_vect *last_motion8; | |
69 | |
70 unsigned int framesSinceKeyframe; | |
71 | |
72 AVFrame *frame_to_enc; | |
73 uint8_t *out_buf; | |
53 } RoqContext; | 74 } RoqContext; |
54 | 75 |
55 #define RoQ_INFO 0x1001 | 76 #define RoQ_INFO 0x1001 |
56 #define RoQ_QUAD_CODEBOOK 0x1002 | 77 #define RoQ_QUAD_CODEBOOK 0x1002 |
57 #define RoQ_QUAD_VQ 0x1011 | 78 #define RoQ_QUAD_VQ 0x1011 |