1 |
#ifndef _IMAGE_H_ |
#ifndef _IMAGE_H_ |
2 |
#define _IMAGE_H_ |
#define _IMAGE_H_ |
3 |
|
|
|
#include <stdlib.h> |
|
|
|
|
4 |
#include "../portab.h" |
#include "../portab.h" |
|
#include "../global.h" |
|
5 |
#include "colorspace.h" |
#include "colorspace.h" |
6 |
#include "../xvid.h" |
#include "../xvid.h" |
7 |
|
|
8 |
#define EDGE_SIZE 64 |
#define EDGE_SIZE 32 |
|
|
|
|
void init_image(uint32_t cpu_flags); |
|
9 |
|
|
10 |
|
|
11 |
static void __inline |
typedef struct |
|
image_null(IMAGE * image) |
|
12 |
{ |
{ |
13 |
image->y = image->u = image->v = NULL; |
uint8_t *y; |
14 |
|
uint8_t *u; |
15 |
|
uint8_t *v; |
16 |
} |
} |
17 |
|
IMAGE; |
18 |
|
|
19 |
|
void init_image(uint32_t cpu_flags); |
20 |
|
|
21 |
int32_t image_create(IMAGE * image, |
int32_t image_create(IMAGE * image, |
22 |
uint32_t edged_width, |
uint32_t edged_width, |
27 |
|
|
28 |
void image_swap(IMAGE * image1, |
void image_swap(IMAGE * image1, |
29 |
IMAGE * image2); |
IMAGE * image2); |
|
|
|
30 |
void image_copy(IMAGE * image1, |
void image_copy(IMAGE * image1, |
31 |
IMAGE * image2, |
IMAGE * image2, |
32 |
uint32_t edged_width, |
uint32_t edged_width, |
33 |
uint32_t height); |
uint32_t height); |
|
|
|
34 |
void image_setedges(IMAGE * image, |
void image_setedges(IMAGE * image, |
35 |
uint32_t edged_width, |
uint32_t edged_width, |
36 |
uint32_t edged_height, |
uint32_t edged_height, |
37 |
uint32_t width, |
uint32_t width, |
38 |
uint32_t height); |
uint32_t height); |
|
|
|
39 |
void image_interpolate(const IMAGE * refn, |
void image_interpolate(const IMAGE * refn, |
40 |
IMAGE * refh, |
IMAGE * refh, |
41 |
IMAGE * refv, |
IMAGE * refv, |
42 |
IMAGE * refhv, |
IMAGE * refhv, |
43 |
uint32_t edged_width, |
uint32_t edged_width, |
44 |
uint32_t edged_height, |
uint32_t edged_height, |
|
uint32_t quarterpel, |
|
45 |
uint32_t rounding); |
uint32_t rounding); |
46 |
|
|
47 |
float image_psnr(IMAGE * orig_image, |
float image_psnr(IMAGE * orig_image, |
51 |
uint16_t height); |
uint16_t height); |
52 |
|
|
53 |
|
|
|
float sse_to_PSNR(long sse, int pixels); |
|
|
|
|
|
long plane_sse(uint8_t * orig, |
|
|
uint8_t * recon, |
|
|
uint16_t stride, |
|
|
uint16_t width, |
|
|
uint16_t height); |
|
|
|
|
|
void |
|
|
image_chroma_optimize(IMAGE * img, int width, int height, int edged_width); |
|
|
|
|
|
|
|
54 |
int image_input(IMAGE * image, |
int image_input(IMAGE * image, |
55 |
uint32_t width, |
uint32_t width, |
56 |
int height, |
int height, |
57 |
uint32_t edged_width, |
uint32_t edged_width, |
58 |
uint8_t * src, |
uint8_t * src, |
59 |
int src_stride, |
int csp); |
|
int csp, |
|
|
int interlaced); |
|
60 |
|
|
61 |
int image_output(IMAGE * image, |
int image_output(IMAGE * image, |
62 |
uint32_t width, |
uint32_t width, |
64 |
uint32_t edged_width, |
uint32_t edged_width, |
65 |
uint8_t * dst, |
uint8_t * dst, |
66 |
uint32_t dst_stride, |
uint32_t dst_stride, |
67 |
int csp, |
int csp); |
|
int interlaced); |
|
68 |
|
|
69 |
|
|
70 |
|
|
83 |
void |
void |
84 |
output_slice(IMAGE * cur, int edged_width, int width, XVID_DEC_PICTURE* out_frm, int mbx, int mby,int mbl); |
output_slice(IMAGE * cur, int edged_width, int width, XVID_DEC_PICTURE* out_frm, int mbx, int mby,int mbl); |
85 |
|
|
|
|
|
|
void |
|
|
image_clear(IMAGE * img, int width, int height, int edged_width, |
|
|
int y, int u, int v); |
|
|
|
|
|
|
|
|
void |
|
|
image_deblock_rrv(IMAGE * img, int edgeg_width, |
|
|
const MACROBLOCK * mbs, int mb_width, int mb_height, int mb_stride, |
|
|
int block, int flags); |
|
|
|
|
|
|
|
86 |
#endif /* _IMAGE_H_ */ |
#endif /* _IMAGE_H_ */ |