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

libavcodec/rv10enc.c

Go to the documentation of this file.
00001 /*
00002  * RV10 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 "put_bits.h"
00030 
00031 void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
00032 {
00033     int full_frame= 0;
00034 
00035     align_put_bits(&s->pb);
00036 
00037     put_bits(&s->pb, 1, 1);     /* marker */
00038 
00039     put_bits(&s->pb, 1, (s->pict_type == FF_P_TYPE));
00040 
00041     put_bits(&s->pb, 1, 0);     /* not PB frame */
00042 
00043     put_bits(&s->pb, 5, s->qscale);
00044 
00045     if (s->pict_type == FF_I_TYPE) {
00046         /* specific MPEG like DC coding not used */
00047     }
00048     /* if multiple packets per frame are sent, the position at which
00049        to display the macroblocks is coded here */
00050     if(!full_frame){
00051         put_bits(&s->pb, 6, 0); /* mb_x */
00052         put_bits(&s->pb, 6, 0); /* mb_y */
00053         put_bits(&s->pb, 12, s->mb_width * s->mb_height);
00054     }
00055 
00056     put_bits(&s->pb, 3, 0);     /* ignored */
00057 }
00058 
00059 AVCodec rv10_encoder = {
00060     "rv10",
00061     AVMEDIA_TYPE_VIDEO,
00062     CODEC_ID_RV10,
00063     sizeof(MpegEncContext),
00064     MPV_encode_init,
00065     MPV_encode_picture,
00066     MPV_encode_end,
00067     .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
00068     .long_name= NULL_IF_CONFIG_SMALL("RealVideo 1.0"),
00069 };

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