00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00028 #include "mpegvideo.h"
00029 #include "h263.h"
00030 #include "put_bits.h"
00031
00032 void ff_rv20_encode_picture_header(MpegEncContext *s, int picture_number){
00033 put_bits(&s->pb, 2, s->pict_type);
00034 put_bits(&s->pb, 1, 0);
00035 put_bits(&s->pb, 5, s->qscale);
00036
00037 put_sbits(&s->pb, 8, picture_number);
00038 s->mb_x= s->mb_y= 0;
00039 ff_h263_encode_mba(s);
00040
00041 put_bits(&s->pb, 1, s->no_rounding);
00042
00043 assert(s->f_code == 1);
00044 assert(s->unrestricted_mv == 0);
00045 assert(s->alt_inter_vlc == 0);
00046 assert(s->umvplus == 0);
00047 assert(s->modified_quant==1);
00048 assert(s->loop_filter==1);
00049
00050 s->h263_aic= s->pict_type == AV_PICTURE_TYPE_I;
00051 if(s->h263_aic){
00052 s->y_dc_scale_table=
00053 s->c_dc_scale_table= ff_aic_dc_scale_table;
00054 }else{
00055 s->y_dc_scale_table=
00056 s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
00057 }
00058 }
00059
00060 FF_MPV_GENERIC_CLASS(rv20)
00061
00062 AVCodec ff_rv20_encoder = {
00063 .name = "rv20",
00064 .type = AVMEDIA_TYPE_VIDEO,
00065 .id = CODEC_ID_RV20,
00066 .priv_data_size = sizeof(MpegEncContext),
00067 .init = ff_MPV_encode_init,
00068 .encode2 = ff_MPV_encode_picture,
00069 .close = ff_MPV_encode_end,
00070 .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE },
00071 .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
00072 .priv_class = &rv20_class,
00073 };