gavldsp.h

00001 /*****************************************************************
00002  * gavl - a general purpose audio/video processing library
00003  *
00004  * Copyright (c) 2001 - 2008 Members of the Gmerlin project
00005  * gmerlin-general@lists.sourceforge.net
00006  * http://gmerlin.sourceforge.net
00007  *
00008  * This program is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program 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
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020  * *****************************************************************/
00021 
00040 typedef struct gavl_dsp_context_s gavl_dsp_context_t;
00041 
00048 typedef struct
00049   {
00063   int (*sad_rgb15)(uint8_t * src_1, uint8_t * src_2, 
00064                    int stride_1, int stride_2, 
00065                    int w, int h);
00066 
00080   int (*sad_rgb16)(uint8_t * src_1, uint8_t * src_2, 
00081                    int stride_1, int stride_2, 
00082                    int w, int h);
00083 
00094   int (*sad_8)(uint8_t * src_1, uint8_t * src_2, 
00095                int stride_1, int stride_2, 
00096                int w, int h);
00097 
00108   int (*sad_16)(uint8_t * src_1, uint8_t * src_2, 
00109                int stride_1, int stride_2, 
00110                int w, int h);
00111 
00121   float (*sad_f)(uint8_t * src_1, uint8_t * src_2, 
00122                  int stride_1, int stride_2, 
00123                  int w, int h);
00124 
00132   void (*average_rgb15)(uint8_t * src_1, uint8_t * src_2, 
00133                         uint8_t * dst, int num);
00134 
00141   void (*average_rgb16)(uint8_t * src_1, uint8_t * src_2, 
00142                         uint8_t * dst, int num);
00143 
00150   void (*average_8)(uint8_t * src_1, uint8_t * src_2, 
00151                     uint8_t * dst, int num);
00152 
00159   void (*average_16)(uint8_t * src_1, uint8_t * src_2, 
00160                      uint8_t * dst, int num);
00161 
00169   void (*average_f)(uint8_t * src_1, uint8_t * src_2, 
00170                     uint8_t * dst, int num);
00171 
00172 
00183   void (*interpolate_rgb15)(uint8_t * src_1, uint8_t * src_2, 
00184                             uint8_t * dst, int num, float);
00185 
00195   void (*interpolate_rgb16)(uint8_t * src_1, uint8_t * src_2, 
00196                             uint8_t * dst, int num, float fac);
00197 
00207   void (*interpolate_8)(uint8_t * src_1, uint8_t * src_2, 
00208                         uint8_t * dst, int num, float fac);
00209 
00219   void (*interpolate_16)(uint8_t * src_1, uint8_t * src_2, 
00220                          uint8_t * dst, int num, float fac);
00221 
00232   void (*interpolate_f)(uint8_t * src_1, uint8_t * src_2, 
00233                         uint8_t * dst, int num, float fac);
00234   
00235   } gavl_dsp_funcs_t;
00236 
00244 gavl_dsp_context_t * gavl_dsp_context_create();
00245 
00253 void gavl_dsp_context_set_quality(gavl_dsp_context_t * ctx,
00254                                   int q);
00255 
00265 gavl_dsp_funcs_t * 
00266 gavl_dsp_context_get_funcs(gavl_dsp_context_t * ctx);
00267 
00272 void gavl_dsp_context_destroy(gavl_dsp_context_t * ctx);
00273 
00300 void gavl_dsp_interpolate_video_frame(gavl_dsp_context_t * ctx,
00301                                       gavl_video_format_t * format,
00302                                       gavl_video_frame_t * src_1,
00303                                       gavl_video_frame_t * src_2,
00304                                       gavl_video_frame_t * dst,
00305                                       float factor);

Generated on Wed Jan 9 19:32:28 2008 for gavl by  doxygen 1.5.3