diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-02-27 15:42:33 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-01 06:04:46 +0100 |
commit | 1a4a5fb640dda45bd88097c2f9142cc19af29da9 (patch) | |
tree | 19743ef85017c24d9155c8c5cbe6f8e6bb6cdc82 /libavcodec/roqvideo.h | |
parent | 4cb989e83631c801718723ad95367fdd561e0ae0 (diff) | |
download | ffmpeg-1a4a5fb640dda45bd88097c2f9142cc19af29da9.tar.gz |
avcodec/roqvideo: Use dedicated context for encoder
Up until now, the RoQ video decoder and encoder used the same context;
and said context contained several fields that are only used by the
encoder. This commit changes this and uses a dedicated context for the
encoder; it contains the common context as first element in order to use
functions common to the de- and encoder.
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/roqvideo.h')
-rw-r--r-- | libavcodec/roqvideo.h | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/libavcodec/roqvideo.h b/libavcodec/roqvideo.h index f47b2c8e6f..8318b6e5a0 100644 --- a/libavcodec/roqvideo.h +++ b/libavcodec/roqvideo.h @@ -22,9 +22,7 @@ #ifndef AVCODEC_ROQVIDEO_H #define AVCODEC_ROQVIDEO_H -#include "libavutil/lfg.h" #include "avcodec.h" -#include "bytestream.h" typedef struct roq_cell { unsigned char y[4]; @@ -39,39 +37,15 @@ typedef struct motion_vect { int d[2]; } motion_vect; -struct RoqTempData; - typedef struct RoqContext { - const AVClass *class; AVCodecContext *avctx; AVFrame *last_frame; AVFrame *current_frame; - int first_frame; + int width, height; roq_cell cb2x2[256]; roq_qcell cb4x4[256]; - - int width, height; - - /* Encoder only data */ - AVLFG randctx; - uint64_t lambda; - - motion_vect *this_motion4; - motion_vect *last_motion4; - - motion_vect *this_motion8; - motion_vect *last_motion8; - - unsigned int framesSinceKeyframe; - - const AVFrame *frame_to_enc; - uint8_t *out_buf; - struct RoqTempData *tmpData; - - int quake3_compat; // Quake 3 compatibility option - } RoqContext; #define RoQ_INFO 0x1001 |