Revision b6767d6d libavcodec/rv10.c

View differences:

libavcodec/rv10.c
230 230
}
231 231

  
232 232

  
233
#if CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER
233
#if CONFIG_RV10_ENCODER
234 234
/* write RV 1.0 compatible frame header */
235 235
void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
236 236
{
......
259 259

  
260 260
    put_bits(&s->pb, 3, 0);     /* ignored */
261 261
}
262

  
263
void rv20_encode_picture_header(MpegEncContext *s, int picture_number){
264
    put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ?
265
    put_bits(&s->pb, 1, 0);     /* unknown bit */
266
    put_bits(&s->pb, 5, s->qscale);
267

  
268
    put_sbits(&s->pb, 8, picture_number); //FIXME wrong, but correct is not known
269
    s->mb_x= s->mb_y= 0;
270
    ff_h263_encode_mba(s);
271

  
272
    put_bits(&s->pb, 1, s->no_rounding);
273

  
274
    assert(s->f_code == 1);
275
    assert(s->unrestricted_mv == 1);
276
    assert(s->alt_inter_vlc == 0);
277
    assert(s->umvplus == 0);
278
    assert(s->modified_quant==1);
279
    assert(s->loop_filter==1);
280

  
281
    s->h263_aic= s->pict_type == FF_I_TYPE;
282
    if(s->h263_aic){
283
        s->y_dc_scale_table=
284
        s->c_dc_scale_table= ff_aic_dc_scale_table;
285
    }else{
286
        s->y_dc_scale_table=
287
        s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
288
    }
289
}
290

  
291
#endif /* CONFIG_RV10_ENCODER || CONFIG_RV20_ENCODER */
262
#endif /* CONFIG_RV10_ENCODER */
292 263

  
293 264
/* read RV 1.0 compatible frame header */
294 265
static int rv10_decode_picture_header(MpegEncContext *s)
......
792 763
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
793 764
    .long_name= NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
794 765
};
795

  
796
AVCodec rv20_encoder = {
797
    "rv20",
798
    CODEC_TYPE_VIDEO,
799
    CODEC_ID_RV20,
800
    sizeof(MpegEncContext),
801
    MPV_encode_init,
802
    MPV_encode_picture,
803
    MPV_encode_end,
804
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
805
    .long_name= NULL_IF_CONFIG_SMALL("RealVideo 2.0"),
806
};

Also available in: Unified diff