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 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 == 1);
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 == FF_I_TYPE;
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 AVCodec rv20_encoder = {
00061 "rv20",
00062 AVMEDIA_TYPE_VIDEO,
00063 CODEC_ID_RV20,
00064 sizeof(MpegEncContext),
00065 MPV_encode_init,
00066 MPV_encode_picture,
00067 MPV_encode_end,
00068 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
00069 .long_name= NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
00070 };