aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mpegvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-12-07 13:14:37 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-12-07 13:14:37 +0000
commitd0271e8a3aa6eff7640e5fb59ad56671d50142a5 (patch)
treeac5dcfd1581ed13051c0dc329296dac2c83be497 /libavcodec/mpegvideo.c
parent37e85dacd06cee7ae27cc500942022e820a50593 (diff)
downloadffmpeg-d0271e8a3aa6eff7640e5fb59ad56671d50142a5.tar.gz
rv20 encoding
Originally committed as revision 3739 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r--libavcodec/mpegvideo.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 9eeaee812d..c733d80dbb 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1120,6 +1120,16 @@ int MPV_encode_init(AVCodecContext *avctx)
avctx->delay=0;
s->low_delay=1;
break;
+ case CODEC_ID_RV20:
+ s->out_format = FMT_H263;
+ avctx->delay=0;
+ s->low_delay=1;
+ s->modified_quant=1;
+ s->h263_aic=1;
+ s->h263_plus=1;
+ s->loop_filter=1;
+ s->unrestricted_mv= s->obmc || s->loop_filter || s->umvplus;
+ break;
case CODEC_ID_MPEG4:
s->out_format = FMT_H263;
s->h263_pred = 1;
@@ -4150,6 +4160,7 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
case CODEC_ID_H263P:
case CODEC_ID_FLV1:
case CODEC_ID_RV10:
+ case CODEC_ID_RV20:
h263_encode_mb(s, s->block, motion_x, motion_y); break;
#endif
case CODEC_ID_MJPEG:
@@ -4175,6 +4186,8 @@ void ff_mpeg_flush(AVCodecContext *avctx){
}
s->current_picture_ptr = s->last_picture_ptr = s->next_picture_ptr = NULL;
+ s->mb_x= s->mb_y= 0;
+
s->parse_context.state= -1;
s->parse_context.frame_start_found= 0;
s->parse_context.overread= 0;
@@ -5255,6 +5268,8 @@ static void encode_picture(MpegEncContext *s, int picture_number)
mpeg4_encode_picture_header(s, picture_number);
else if (s->codec_id == CODEC_ID_RV10)
rv10_encode_picture_header(s, picture_number);
+ else if (s->codec_id == CODEC_ID_RV20)
+ rv20_encode_picture_header(s, picture_number);
else if (s->codec_id == CODEC_ID_FLV1)
ff_flv_encode_picture_header(s, picture_number);
else
@@ -6379,6 +6394,16 @@ AVCodec rv10_encoder = {
MPV_encode_end,
};
+AVCodec rv20_encoder = {
+ "rv20",
+ CODEC_TYPE_VIDEO,
+ CODEC_ID_RV20,
+ sizeof(MpegEncContext),
+ MPV_encode_init,
+ MPV_encode_picture,
+ MPV_encode_end,
+};
+
AVCodec mpeg4_encoder = {
"mpeg4",
CODEC_TYPE_VIDEO,