Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

motion_comp_mlib.c

Go to the documentation of this file.
00001 /*
00002  * motion_comp_mlib.c
00003  * Copyright (C) 2000-2002 Håkan Hjort <d95hjort@dtek.chalmers.se>
00004  *
00005  * This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
00006  * See http://libmpeg2.sourceforge.net/ for updates.
00007  *
00008  * mpeg2dec 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  * mpeg2dec 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, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  */
00022 
00023 #include "config.h"
00024 
00025 #ifdef LIBMPEG2_MLIB
00026 
00027 #include <mlib_types.h>
00028 #include <mlib_status.h>
00029 #include <mlib_sys.h>
00030 #include <mlib_video.h>
00031 #include <inttypes.h>
00032 
00033 #include "mpeg2.h"
00034 #include "mpeg2_internal.h"
00035 
00036 static void MC_put_o_16_mlib (uint8_t * dest, const uint8_t * ref,
00037                               int stride, int height)
00038 {
00039     if (height == 16)
00040         mlib_VideoCopyRef_U8_U8_16x16 (dest, (uint8_t *) ref, stride);
00041     else
00042         mlib_VideoCopyRef_U8_U8_16x8 (dest, (uint8_t *) ref, stride);
00043 }
00044 
00045 static void MC_put_x_16_mlib (uint8_t * dest, const uint8_t * ref,
00046                               int stride, int height)
00047 {
00048     if (height == 16)
00049         mlib_VideoInterpX_U8_U8_16x16 (dest, (uint8_t *) ref, stride, stride);
00050     else
00051         mlib_VideoInterpX_U8_U8_16x8 (dest, (uint8_t *) ref, stride, stride);
00052 }
00053 
00054 static void MC_put_y_16_mlib (uint8_t * dest, const uint8_t * ref,
00055                               int stride, int height)
00056 {
00057     if (height == 16)
00058         mlib_VideoInterpY_U8_U8_16x16 (dest, (uint8_t *) ref, stride, stride);
00059     else
00060         mlib_VideoInterpY_U8_U8_16x8 (dest, (uint8_t *) ref, stride, stride);
00061 }
00062 
00063 static void MC_put_xy_16_mlib (uint8_t * dest, const uint8_t * ref,
00064                                int stride, int height)
00065 {
00066     if (height == 16)
00067         mlib_VideoInterpXY_U8_U8_16x16 (dest, (uint8_t *) ref, stride, stride);
00068     else
00069         mlib_VideoInterpXY_U8_U8_16x8 (dest, (uint8_t *) ref, stride, stride);
00070 }
00071 
00072 static void MC_put_o_8_mlib (uint8_t * dest, const uint8_t * ref,
00073                              int stride, int height)
00074 {
00075     if (height == 8)
00076         mlib_VideoCopyRef_U8_U8_8x8 (dest, (uint8_t *) ref, stride);
00077     else
00078         mlib_VideoCopyRef_U8_U8_8x4 (dest, (uint8_t *) ref, stride);
00079 }
00080 
00081 static void MC_put_x_8_mlib (uint8_t * dest, const uint8_t * ref,
00082                              int stride, int height)
00083 {
00084     if (height == 8)
00085         mlib_VideoInterpX_U8_U8_8x8 (dest, (uint8_t *) ref, stride, stride);
00086     else
00087         mlib_VideoInterpX_U8_U8_8x4 (dest, (uint8_t *) ref, stride, stride);
00088 }
00089 
00090 static void MC_put_y_8_mlib (uint8_t * dest, const uint8_t * ref,
00091                              int stride, int height)
00092 {
00093     if (height == 8)
00094         mlib_VideoInterpY_U8_U8_8x8 (dest, (uint8_t *) ref, stride, stride);
00095     else
00096         mlib_VideoInterpY_U8_U8_8x4 (dest, (uint8_t *) ref, stride, stride);
00097 }
00098 
00099 static void MC_put_xy_8_mlib (uint8_t * dest, const uint8_t * ref,
00100                               int stride, int height)
00101 {
00102     if (height == 8)
00103         mlib_VideoInterpXY_U8_U8_8x8 (dest, (uint8_t *) ref, stride, stride);
00104     else
00105         mlib_VideoInterpXY_U8_U8_8x4 (dest, (uint8_t *) ref, stride, stride);
00106 }
00107 
00108 static void MC_avg_o_16_mlib (uint8_t * dest, const uint8_t * ref,
00109                               int stride, int height)
00110 {
00111     if (height == 16)
00112         mlib_VideoCopyRefAve_U8_U8_16x16 (dest, (uint8_t *) ref, stride);
00113     else
00114         mlib_VideoCopyRefAve_U8_U8_16x8 (dest, (uint8_t *) ref, stride);
00115 }
00116 
00117 static void MC_avg_x_16_mlib (uint8_t * dest, const uint8_t * ref,
00118                               int stride, int height)
00119 {
00120     if (height == 16)
00121         mlib_VideoInterpAveX_U8_U8_16x16 (dest, (uint8_t *) ref,
00122                                           stride, stride);
00123     else
00124         mlib_VideoInterpAveX_U8_U8_16x8 (dest, (uint8_t *) ref,
00125                                          stride, stride);
00126 }
00127 
00128 static void MC_avg_y_16_mlib (uint8_t * dest, const uint8_t * ref,
00129                               int stride, int height)
00130 {
00131     if (height == 16)
00132         mlib_VideoInterpAveY_U8_U8_16x16 (dest, (uint8_t *) ref,
00133                                           stride, stride);
00134     else
00135         mlib_VideoInterpAveY_U8_U8_16x8 (dest, (uint8_t *) ref,
00136                                          stride, stride);
00137 }
00138 
00139 static void MC_avg_xy_16_mlib (uint8_t * dest, const uint8_t * ref,
00140                                int stride, int height)
00141 {
00142     if (height == 16)
00143         mlib_VideoInterpAveXY_U8_U8_16x16 (dest, (uint8_t *) ref,
00144                                            stride, stride);
00145     else
00146         mlib_VideoInterpAveXY_U8_U8_16x8 (dest, (uint8_t *) ref,
00147                                           stride, stride);
00148 }
00149 
00150 static void MC_avg_o_8_mlib (uint8_t * dest, const uint8_t * ref,
00151                              int stride, int height)
00152 {
00153     if (height == 8)
00154         mlib_VideoCopyRefAve_U8_U8_8x8 (dest, (uint8_t *) ref, stride);
00155     else
00156         mlib_VideoCopyRefAve_U8_U8_8x4 (dest, (uint8_t *) ref, stride);
00157 }
00158 
00159 static void MC_avg_x_8_mlib (uint8_t * dest, const uint8_t * ref,
00160                              int stride, int height)
00161 {
00162     if (height == 8)
00163         mlib_VideoInterpAveX_U8_U8_8x8 (dest, (uint8_t *) ref, stride, stride);
00164     else
00165         mlib_VideoInterpAveX_U8_U8_8x4 (dest, (uint8_t *) ref, stride, stride);
00166 }
00167 
00168 static void MC_avg_y_8_mlib (uint8_t * dest, const uint8_t * ref,
00169                              int stride, int height)
00170 {
00171     if (height == 8)
00172         mlib_VideoInterpAveY_U8_U8_8x8 (dest, (uint8_t *) ref, stride, stride);
00173     else
00174         mlib_VideoInterpAveY_U8_U8_8x4 (dest, (uint8_t *) ref, stride, stride);
00175 }
00176 
00177 static void MC_avg_xy_8_mlib (uint8_t * dest, const uint8_t * ref,
00178                               int stride, int height)
00179 {
00180     if (height == 8)
00181         mlib_VideoInterpAveXY_U8_U8_8x8 (dest, (uint8_t *) ref,
00182                                          stride, stride);
00183     else
00184         mlib_VideoInterpAveXY_U8_U8_8x4 (dest, (uint8_t *) ref,
00185                                          stride, stride);
00186 }
00187 
00188 MPEG2_MC_EXTERN (mlib)
00189 
00190 #endif
 

Powered by Plone

This site conforms to the following standards: