mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-23 19:49:56 +00:00
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 Originally committed as revision 9420 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
606975ab01
commit
03e3e76544
@ -87,6 +87,7 @@ version <next>
|
||||
- extern C declarations for C++ removed from headers
|
||||
- sws_flags command line option
|
||||
- codebook generator
|
||||
- RoQ video encoder
|
||||
|
||||
version 0.4.9-pre1:
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ following image formats are supported:
|
||||
@item Cirrus Logic AccuPak @tab @tab X @tab fourcc: CLJR
|
||||
@item 4X Video @tab @tab X @tab Used in certain computer games.
|
||||
@item Sony Playstation MDEC @tab @tab X
|
||||
@item Id RoQ @tab @tab X @tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||
@item Id RoQ @tab X @tab X @tab Used in Quake III, Jedi Knight 2, other computer games.
|
||||
@item Xan/WC3 @tab @tab X @tab Used in Wing Commander III .MVE files.
|
||||
@item Interplay Video @tab @tab X @tab Used in Interplay .MVE files.
|
||||
@item Apple Animation @tab @tab X @tab fourcc: 'rle '
|
||||
|
@ -135,6 +135,7 @@ OBJS-$(CONFIG_QTRLE_DECODER) += qtrle.o
|
||||
OBJS-$(CONFIG_RA_144_DECODER) += ra144.o
|
||||
OBJS-$(CONFIG_RA_288_DECODER) += ra288.o
|
||||
OBJS-$(CONFIG_ROQ_DECODER) += roqvideodec.o roqvideo.o
|
||||
OBJS-$(CONFIG_ROQ_ENCODER) += roqvideoenc.o roqvideo.o elbg.o
|
||||
OBJS-$(CONFIG_ROQ_DPCM_DECODER) += dpcm.o
|
||||
OBJS-$(CONFIG_ROQ_DPCM_ENCODER) += roqaudioenc.o
|
||||
OBJS-$(CONFIG_RPZA_DECODER) += rpza.o
|
||||
|
@ -124,7 +124,7 @@ void avcodec_register_all(void)
|
||||
REGISTER_DECODER(QPEG, qpeg);
|
||||
REGISTER_DECODER(QTRLE, qtrle);
|
||||
REGISTER_ENCDEC (RAWVIDEO, rawvideo);
|
||||
REGISTER_DECODER(ROQ, roq);
|
||||
REGISTER_ENCDEC (ROQ, roq);
|
||||
REGISTER_DECODER(RPZA, rpza);
|
||||
REGISTER_ENCDEC (RV10, rv10);
|
||||
REGISTER_ENCDEC (RV20, rv20);
|
||||
|
@ -57,6 +57,7 @@ extern AVCodec pgmyuv_encoder;
|
||||
extern AVCodec png_encoder;
|
||||
extern AVCodec ppm_encoder;
|
||||
extern AVCodec roq_dpcm_encoder;
|
||||
extern AVCodec roq_encoder;
|
||||
extern AVCodec rv10_encoder;
|
||||
extern AVCodec rv20_encoder;
|
||||
extern AVCodec sgi_encoder;
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "dsputil.h"
|
||||
#include "random.h"
|
||||
|
||||
typedef struct {
|
||||
unsigned char y[4];
|
||||
@ -34,6 +35,10 @@ typedef struct {
|
||||
int idx[4];
|
||||
} roq_qcell;
|
||||
|
||||
typedef struct {
|
||||
int d[2];
|
||||
} motion_vect;
|
||||
|
||||
typedef struct RoqContext {
|
||||
|
||||
AVCodecContext *avctx;
|
||||
@ -41,6 +46,7 @@ typedef struct RoqContext {
|
||||
AVFrame frames[2];
|
||||
AVFrame *last_frame;
|
||||
AVFrame *current_frame;
|
||||
int first_frame;
|
||||
int y_stride;
|
||||
int c_stride;
|
||||
|
||||
@ -49,7 +55,22 @@ typedef struct RoqContext {
|
||||
|
||||
unsigned char *buf;
|
||||
int size;
|
||||
int width, height;
|
||||
|
||||
/* Encoder only data */
|
||||
AVRandomState randctx;
|
||||
uint64_t lambda;
|
||||
|
||||
motion_vect *this_motion4;
|
||||
motion_vect *last_motion4;
|
||||
|
||||
motion_vect *this_motion8;
|
||||
motion_vect *last_motion8;
|
||||
|
||||
unsigned int framesSinceKeyframe;
|
||||
|
||||
AVFrame *frame_to_enc;
|
||||
uint8_t *out_buf;
|
||||
} RoqContext;
|
||||
|
||||
#define RoQ_INFO 0x1001
|
||||
|
1061
libavcodec/roqvideoenc.c
Normal file
1061
libavcodec/roqvideoenc.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user