• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

libavcodec/rv20enc.c

Go to the documentation of this file.
00001 /*
00002  * RV20 encoder
00003  * Copyright (c) 2000,2001 Fabrice Bellard
00004  * Copyright (c) 2002-2004 Michael Niedermayer
00005  *
00006  * This file is part of FFmpeg.
00007  *
00008  * FFmpeg is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation; either
00011  * version 2.1 of the License, or (at your option) any later version.
00012  *
00013  * FFmpeg is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016  * Lesser General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public
00019  * License along with FFmpeg; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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); //I 0 vs. 1 ?
00034     put_bits(&s->pb, 1, 0);     /* unknown bit */
00035     put_bits(&s->pb, 5, s->qscale);
00036 
00037     put_sbits(&s->pb, 8, picture_number); //FIXME wrong, but correct is not known
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 };

Generated on Fri Sep 16 2011 17:17:42 for FFmpeg by  doxygen 1.7.1