• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 
12 #ifndef __VPX_SCALE_ARBITRARY_H__
13 #define __VPX_SCALE_ARBITRARY_H__
14 
15 #include "vpx_scale/yv12config.h"
16 
17 typedef struct {
18   int in_width;
19   int in_height;
20 
21   int out_width;
22   int out_height;
23   int max_usable_out_width;
24 
25   // numerator for the width and height
26   int nw;
27   int nh;
28   int nh_uv;
29 
30   // output to input correspondance array
31   short *l_w;
32   short *l_h;
33   short *l_h_uv;
34 
35   // polyphase coefficients
36   short *c_w;
37   short *c_h;
38   short *c_h_uv;
39 
40   // buffer for horizontal filtering.
41   unsigned char *hbuf;
42   unsigned char *hbuf_uv;
43 } BICUBIC_SCALER_STRUCT;
44 
45 int bicubic_coefficient_setup(int in_width, int in_height, int out_width, int out_height);
46 int bicubic_scale(int in_width, int in_height, int in_stride,
47                   int out_width, int out_height, int out_stride,
48                   unsigned char *input_image, unsigned char *output_image);
49 void bicubic_scale_frame_reset();
50 void bicubic_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst,
51                          int new_width, int new_height);
52 void bicubic_coefficient_init();
53 void bicubic_coefficient_destroy();
54 
55 #endif /* __VPX_SCALE_ARBITRARY_H__ */
56