/** * @file alg_interpolate_rgb_scalar.h * @brief RGB pixel interpolation (scalar code) * @author Patrick Roth - roth@stettbacher.ch * @copyright Stettbacher Signal Processing AG * * @remarks * *
* This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ** */ /* * This code inplements an RGB pixel interpolator and is independent of the pixel-bit-depth. Including this code at the * C-Source file will define the pixel-bit-depth (see camera_calib.c). */ // static void interpolate_rgb8_scalar(uint8_t *img_out, const int x, const int y, const int height, const int width, // const uint8_t *img_in, const int coord_x, const int coord_y, const int scale_fact) // static void interpolate_rgb16_scalar(uint16_t *img_out, const int x, const int y, const int height, const int width, // const uint16_t *img_in, const int coord_x, const int coord_y, const int scale_fact) { int x_start, y_start, x_end, y_end, index_start, index_end; int wheight_x, wheight_y, a11, a12, a21, a22; int red, green, blue; int index; const int max_val = (1<