Hauptseite   Klassenhierarchie   Alphabetische Liste   Übersicht   Auflistung der Dateien   Elementübersicht  

VideoFrame.h

00001 /***************************************************************************
00002                           VideoFrame.h  -  description
00003                              -------------------
00004     begin                : Son Dez 15 2002
00005     copyright            : (C) 2002 by Christian Tusche
00006     email                : christian.tusche@stud.uni-goettingen.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef VIDEOFRAME_H
00019 #define VIDEOFRAME_H
00020 
00021 #include <inttypes.h>
00022 
00023 #include "FrameData.h"
00024 #include "Convert.h"
00025 #include "FrameRescaler.h"
00026 
00027 
00033 class VideoFrame {
00034 public:
00041     VideoFrame( int x, int y, uint8_t *memseg = NULL, size_t size = 0 );
00042 
00043     ~VideoFrame();
00044 
00045     
00051     void SetFrame( VideoFrame *bild );
00052 
00056     void SetFrame( uint8_t *bild );
00057 
00061     void SetFrame( uint8_t *y, uint8_t *u, uint8_t *v );
00062 
00066     int FramePointer( uint8_t *&bild );
00067 
00071     int FramePointer( uint8_t *&y, uint8_t *&u, uint8_t *&v );
00072 
00073 
00074     
00081     int GetFrame( uint8_t *&bild );
00082 
00086     int GetFrame( uint8_t *&y, uint8_t *&u, uint8_t *&v );
00087 
00088     
00089     
00097     void CropBox( int x1, int y1, int x2, int y2 );
00098 
00101     void SetOutSize( int x, int y );
00102 
00105     void OutSize( int &x, int &y );
00106 
00109     void Size( int &x, int &y );
00110 
00113     void OutColorModel( int cmodel );
00114 
00117     int ColorModel( void );
00118 
00121     void ColorModel( int cmodel );
00122 
00123 
00124 private:
00127     void ausgabe_erzeugen( void );
00128 
00131     void crop_frame( FrameData *in, FrameData *out );
00132 
00133 
00136     void setup_crop( void );
00137     void setup_scale( void );
00138     void setup_cmodel( void );
00139     
00140     // Daten des Bildes
00141     FrameData *bilddaten;
00142     
00143     // Daten nach Ausschneiden
00144     FrameData *crop_out;
00145     // Daten nach skalieren
00146     FrameData *scale_out;
00147     // Daten nach Farbraumkonvertierung
00148     FrameData *cmodel_out;
00149     
00150     // Zeiger auf Ausgabebild
00151     FrameData *ausgabebild;
00152 
00153     
00154     Convert *cmodel_converter;  // konvertiert Farbraum
00155     FrameRescaler *re_scaler;   // Skalierung des Bildes auf Ausgabegröße
00156   
00157     bool ausgabe_ok;                // wurde die Ausgabe schon verarbeitet?
00158 
00159     // Koordinaten des Bildausschnittes
00160     int box_x1, box_x2, box_y1, box_y2;
00161 
00162     // Größe der Bildausgabe
00163     int out_breite, out_hoehe;
00164 
00165     // Ausgabe-Farbraum
00166     int out_cmodel;
00167 };
00168 
00169 #endif

Erzeugt am Tue Dec 31 22:54:54 2002 für av_convert von doxygen1.2.9.1 geschrieben von Dimitri van Heesch, © 1997-2001