1 |
#ifndef _IMAGE_H_ |
#ifndef _IMAGE_H_ |
2 |
#define _IMAGE_H_ |
#define _IMAGE_H_ |
3 |
|
|
4 |
|
#include <stdlib.h> |
5 |
|
|
6 |
#include "../portab.h" |
#include "../portab.h" |
7 |
|
#include "../global.h" |
8 |
#include "colorspace.h" |
#include "colorspace.h" |
9 |
|
#include "../xvid.h" |
10 |
|
|
11 |
#define EDGE_SIZE 32 |
#define EDGE_SIZE 64 |
12 |
|
|
13 |
|
void init_image(uint32_t cpu_flags); |
14 |
|
|
|
typedef struct |
|
|
{ |
|
|
uint8_t * y; |
|
|
uint8_t * u; |
|
|
uint8_t * v; |
|
|
} IMAGE; |
|
15 |
|
|
16 |
void init_image(uint32_t cpu_flags); |
static void __inline |
17 |
|
image_null(IMAGE * image) |
18 |
|
{ |
19 |
|
image->y = image->u = image->v = NULL; |
20 |
|
} |
21 |
|
|
22 |
int32_t image_create(IMAGE * image, uint32_t edged_width, uint32_t edged_height); |
int32_t image_create(IMAGE * image, |
23 |
void image_destroy(IMAGE * image, uint32_t edged_width, uint32_t edged_height); |
uint32_t edged_width, |
24 |
|
uint32_t edged_height); |
25 |
|
void image_destroy(IMAGE * image, |
26 |
|
uint32_t edged_width, |
27 |
|
uint32_t edged_height); |
28 |
|
|
29 |
|
void image_swap(IMAGE * image1, |
30 |
|
IMAGE * image2); |
31 |
|
|
32 |
|
void image_copy(IMAGE * image1, |
33 |
|
IMAGE * image2, |
34 |
|
uint32_t edged_width, |
35 |
|
uint32_t height); |
36 |
|
|
37 |
|
void image_setedges(IMAGE * image, |
38 |
|
uint32_t edged_width, |
39 |
|
uint32_t edged_height, |
40 |
|
uint32_t width, |
41 |
|
uint32_t height); |
42 |
|
|
|
void image_swap(IMAGE * image1, IMAGE * image2); |
|
|
void image_copy(IMAGE *image1, IMAGE * image2, uint32_t edged_width, uint32_t height); |
|
|
void image_setedges(IMAGE * image, uint32_t edged_width, uint32_t edged_height, uint32_t width, uint32_t height); |
|
43 |
void image_interpolate(const IMAGE * refn, |
void image_interpolate(const IMAGE * refn, |
44 |
IMAGE * refh, IMAGE * refv, IMAGE * refhv, |
IMAGE * refh, |
45 |
uint32_t edged_width, uint32_t edged_height, uint32_t rounding); |
IMAGE * refv, |
46 |
|
IMAGE * refhv, |
47 |
int image_input(IMAGE * image, uint32_t width, int height, uint32_t edged_width, |
uint32_t edged_width, |
48 |
uint8_t * src, int csp); |
uint32_t edged_height, |
49 |
|
uint32_t quarterpel, |
50 |
|
uint32_t rounding); |
51 |
|
|
52 |
|
float image_psnr(IMAGE * orig_image, |
53 |
|
IMAGE * recon_image, |
54 |
|
uint16_t stride, |
55 |
|
uint16_t width, |
56 |
|
uint16_t height); |
57 |
|
|
58 |
|
long plane_sse(uint8_t * orig, |
59 |
|
uint8_t * recon, |
60 |
|
uint16_t stride, |
61 |
|
uint16_t width, |
62 |
|
uint16_t height); |
63 |
|
|
64 |
|
void |
65 |
|
image_chroma_optimize(IMAGE * img, int width, int height, int edged_width); |
66 |
|
|
67 |
|
|
68 |
|
int image_input(IMAGE * image, |
69 |
|
uint32_t width, |
70 |
|
int height, |
71 |
|
uint32_t edged_width, |
72 |
|
uint8_t * src, |
73 |
|
int src_stride, |
74 |
|
int csp, |
75 |
|
int interlaced); |
76 |
|
|
77 |
|
int image_output(IMAGE * image, |
78 |
|
uint32_t width, |
79 |
|
int height, |
80 |
|
uint32_t edged_width, |
81 |
|
uint8_t * dst, |
82 |
|
uint32_t dst_stride, |
83 |
|
int csp, |
84 |
|
int interlaced); |
85 |
|
|
86 |
|
|
87 |
|
|
88 |
|
int image_dump_yuvpgm(const IMAGE * image, |
89 |
|
const uint32_t edged_width, |
90 |
|
const uint32_t width, |
91 |
|
const uint32_t height, |
92 |
|
char *filename); |
93 |
|
|
94 |
|
float image_mad(const IMAGE * img1, |
95 |
|
const IMAGE * img2, |
96 |
|
uint32_t stride, |
97 |
|
uint32_t width, |
98 |
|
uint32_t height); |
99 |
|
|
100 |
|
void |
101 |
|
output_slice(IMAGE * cur, int edged_width, int width, XVID_DEC_PICTURE* out_frm, int mbx, int mby,int mbl); |
102 |
|
|
103 |
|
|
104 |
|
void |
105 |
|
image_clear(IMAGE * img, int width, int height, int edged_width, |
106 |
|
int y, int u, int v); |
107 |
|
|
108 |
|
|
109 |
|
void |
110 |
|
image_deblock_rrv(IMAGE * img, int edgeg_width, |
111 |
|
const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride, |
112 |
|
int block, int flags); |
113 |
|
|
|
int image_output(IMAGE * image, uint32_t width, int height, uint32_t edged_width, |
|
|
uint8_t * dst, uint32_t dst_stride, int csp); |
|
114 |
|
|
115 |
#endif /* _IMAGE_H_ */ |
#endif /* _IMAGE_H_ */ |