1 /*****************************************************************
2  * gavl - a general purpose audio/video processing library
3  *
4  * Copyright (c) 2001 - 2011 Members of the Gmerlin project
5  * gmerlin-general@lists.sourceforge.net
6  * http://gmerlin.sourceforge.net
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20  * *****************************************************************/
21 
22 static void (FUNC_NAME)(gavl_video_scale_context_t * ctx, int scanline, uint8_t * dest_start)
23   {
24   int i;
25 
26   uint8_t * src;
27 
28   TYPE * src_1, *src_2, *dst;
29 #ifdef INIT
30   INIT
31 #endif
32 
33   src = ctx->src + scanline * ctx->src_stride;
34   for(i = 0; i < ctx->dst_size; i++)
35     {
36     dst = (TYPE*)(dest_start);
37     src_1 = (TYPE*)(src + ctx->offset->src_advance * ctx->table_h.pixels[i].index);
38     src_2 = (TYPE*)((uint8_t*)(src_1) + ctx->offset->src_advance);
39 
40     SCALE
41 
42     dest_start += ctx->offset->dst_advance;
43     }
44   }
45 
46 #ifdef INIT
47 #undef INIT
48 #endif
49 
50 #undef FUNC_NAME
51 #undef TYPE
52 #undef SCALE
53