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

libavcodec/roqvideo.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003 Mike Melanson
00003  * Copyright (C) 2003 Dr. Tim Ferguson
00004  *
00005  * This file is part of Libav.
00006  *
00007  * Libav is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * Libav is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with Libav; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 
00022 #ifndef AVCODEC_ROQVIDEO_H
00023 #define AVCODEC_ROQVIDEO_H
00024 
00025 #include "libavutil/lfg.h"
00026 #include "avcodec.h"
00027 #include "bytestream.h"
00028 #include "dsputil.h"
00029 
00030 typedef struct {
00031     unsigned char y[4];
00032     unsigned char u, v;
00033 } roq_cell;
00034 
00035 typedef struct {
00036     int idx[4];
00037 } roq_qcell;
00038 
00039 typedef struct {
00040     int d[2];
00041 } motion_vect;
00042 
00043 struct RoqTempData;
00044 
00045 typedef struct RoqContext {
00046 
00047     AVCodecContext *avctx;
00048     DSPContext dsp;
00049     AVFrame frames[2];
00050     AVFrame *last_frame;
00051     AVFrame *current_frame;
00052     int first_frame;
00053 
00054     roq_cell cb2x2[256];
00055     roq_qcell cb4x4[256];
00056 
00057     GetByteContext gb;
00058     int width, height;
00059 
00060     /* Encoder only data */
00061     AVLFG randctx;
00062     uint64_t lambda;
00063 
00064     motion_vect *this_motion4;
00065     motion_vect *last_motion4;
00066 
00067     motion_vect *this_motion8;
00068     motion_vect *last_motion8;
00069 
00070     unsigned int framesSinceKeyframe;
00071 
00072     AVFrame *frame_to_enc;
00073     uint8_t *out_buf;
00074     struct RoqTempData *tmpData;
00075 } RoqContext;
00076 
00077 #define RoQ_INFO              0x1001
00078 #define RoQ_QUAD_CODEBOOK     0x1002
00079 #define RoQ_QUAD_VQ           0x1011
00080 #define RoQ_SOUND_MONO        0x1020
00081 #define RoQ_SOUND_STEREO      0x1021
00082 
00083 #define RoQ_ID_MOT              0x00
00084 #define RoQ_ID_FCC              0x01
00085 #define RoQ_ID_SLD              0x02
00086 #define RoQ_ID_CCC              0x03
00087 
00088 void ff_apply_vector_2x2(RoqContext *ri, int x, int y, roq_cell *cell);
00089 void ff_apply_vector_4x4(RoqContext *ri, int x, int y, roq_cell *cell);
00090 
00091 void ff_apply_motion_4x4(RoqContext *ri, int x, int y, int deltax, int deltay);
00092 
00093 void ff_apply_motion_8x8(RoqContext *ri, int x, int y, int deltax, int deltay);
00094 
00095 #endif /* AVCODEC_ROQVIDEO_H */
Generated on Thu Jul 11 2013 15:38:21 for Libav by doxygen 1.7.1