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

FrameRescaler.h

00001 /***************************************************************************
00002                           Scale.h  -  Skalierung von Bildern
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 _FRAME_RESCALER_H_
00019 #define _FRAME_RESCALER_H_
00020  
00021 #include <inttypes.h>
00022 #include "cmodels.h"
00023 #include "Convert.h"
00024  
00025 #define __align8
00026 //#define __align8 __attribute__ ((aligned (8)))
00027 
00028 #define NB_COMPONENTS 3
00029 
00030 #define PHASE_BITS 4
00031 #define NB_PHASES  (1 << PHASE_BITS)
00032 #define NB_TAPS    4
00033 #define FCENTER    1  /* index of the center of the filter */
00034 
00035 
00036 class FrameRescaler {
00037 public:
00038     FrameRescaler( int cmodel, int iwidth, int iheight, int owidth, int oheight );
00039     ~FrameRescaler();
00040     
00041     void Scale( uint8_t *output, uint8_t *input);
00042     int ColorModel( void ) { return c_model; }
00043 
00044 private:
00045     void build_filter(int16_t *filter, float factor);
00046     int16_t get_phase( int pos );
00047 
00048     void h_resample_fast(int16_t *dst, int dst_width, uint8_t *src, int src_width,
00049                          int src_start, int src_incr, int16_t *filters, int inc );
00050 #if NB_TAPS == 4
00051     void h_resample_fast4_inc1(int16_t *dst, int dst_width, uint8_t *src, int src_width,
00052                          int src_start, int src_incr, int16_t *filters );
00053 #endif
00054     void v_resample(uint8_t *dst, int dst_width, int16_t *src, int wrap, int16_t *filter, int inc );
00055 
00056     void h_resample_slow(int16_t *dst, int dst_width, uint8_t *src, int src_width,
00057                             int src_start, int src_incr, int16_t *filters, int inc );
00058 
00059     void h_resample(int16_t *dst, int dst_width, uint8_t *src, int src_width,
00060                        int src_start, int src_incr, int16_t *filters, int inc );
00061 
00062     void component_resample( uint8_t *output, int owrap, int owidth, int oheight,
00063                              uint8_t *input, int iwrap, int iwidth, int iheight, int inc);
00064 
00065 
00066 
00067     void scale_yuv420( uint8_t *input, uint8_t *output );
00068     void scale_yuv422( uint8_t *input, uint8_t *output );
00069     void scale_rgb24( uint8_t *input, uint8_t *output );
00070     void scale_grey8( uint8_t *input, uint8_t *output );
00071 
00072     //int mm_flags;
00073     int i_width, i_height, o_width, o_height;
00074     int h_incr, v_incr;
00075     int16_t h_filters[NB_PHASES * NB_TAPS] __align8; /* horizontal filters */
00076     int16_t v_filters[NB_PHASES * NB_TAPS] __align8; /* vertical filters */
00077     uint8_t *temp_buf;
00078     int16_t *line_buf;
00079     int c_model;
00080     Convert *cmodel_converter;
00081 };
00082 
00083 #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