Merge "vp8_rd_pick_best_mbsegmentation code restructure"
[libvpx.git] / vp8 / common / vpxblit.h
bloba95d90574553679c99840c36871ff09d74b44fc3
1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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 */
12 #ifndef VPXBLIT_H_INCL
13 #define VPXBLIT_H_INCL
14 /*==============================================================================
15 Includes
16 ==============================================================================*/
18 /*==============================================================================
19 Defines
20 ==============================================================================*/
23 #ifdef VPX_BIG_ENDIAN
24 #define BYTE_ZERO(X) ((X & 0xFF000000) >> (24 - 2) )
25 #define BYTE_ONE(X) ((X & 0x00FF0000) >> (16 - 2) )
26 #define BYTE_TWO(X) ((X & 0x0000FF00) >> (8 - 2) )
27 #define BYTE_THREE(X) ((X & 0x000000FF) << (0 + 2) )
29 #define BYTE_ZERO_UV(X) ((X & 0x0000FF00) >> (8 - 2) )
30 #define BYTE_ONE_UV(X) ((X & 0x000000FF) << (0 + 2) )
32 #define REREFERENCE(X) (*((int *) &(X)))
34 #else
36 #define BYTE_THREE(X) ((X & 0xFF000000) >> (24 - 2) )
37 #define BYTE_TWO(X) ((X & 0x00FF0000) >> (16 - 2) )
38 #define BYTE_ONE(X) ((X & 0x0000FF00) >> (8 - 2) )
39 #define BYTE_ZERO(X) ((X & 0x000000FF) << (0 + 2) )
41 #define BYTE_ONE_UV(X) ((X & 0x0000FF00) >> (8 - 2) )
42 #define BYTE_ZERO_UV(X) ((X & 0x000000FF) << (0 + 2) )
44 #define REREFERENCE(X) (*((int *) &(X)))
46 #endif
49 /*==============================================================================
50 Type Definitions
51 ==============================================================================*/
52 typedef struct // YUV buffer configuration structure
54 int y_width;
55 int y_height;
56 int y_stride;
58 int uv_width;
59 int uv_height;
60 int uv_stride;
62 char *y_buffer;
63 char *u_buffer;
64 char *v_buffer;
66 char *uv_start;
67 int uv_dst_area;
68 int uv_used_area;
70 } VPX_BLIT_CONFIG;
72 typedef struct tx86_params
74 unsigned int pushed_registers[6];
75 unsigned int return_address;
76 unsigned int dst;
77 unsigned int scrn_pitch;
78 VPX_BLIT_CONFIG *buff_config;
79 } x86_params;
81 /*=============================================================================
82 Enums
83 ==============================================================================*/
86 /*==============================================================================
87 Structures
88 ==============================================================================*/
90 /*==============================================================================
91 Constants
92 ==============================================================================*/
95 /*==============================================================================
96 Variables
97 ==============================================================================*/
102 /*==============================================================================
103 Function Protoypes/MICROS
104 ==============================================================================*/
105 int vpx_get_size_of_pixel(unsigned int bd);
106 void *vpx_get_blitter(unsigned int bd);
107 void vpx_set_blit(void);
108 void vpx_destroy_blit(void);
112 #endif //VPXBLIT_H_INCL