123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- #if !defined(_tools_image_tools_H)
- # define _tools_image_tools_H (0)
- #include <stdio.h>
- #include "od_defs.h"
- #include "image.h"
- #include "stats_tools.h"
- extern od_rgba16_pixel COLORS[OD_INTRA_NMODES];
- void image_draw_block(od_rgba16_image *_image,int _x,int _y,
- const unsigned char *_block,int _stride);
- int image_write_png(od_rgba16_image *_image,const char *_name);
- typedef struct image_files image_files;
- struct image_files{
- od_rgba16_image raw;
- od_rgba16_image map;
- od_rgba16_image pred;
- od_rgba16_image res;
- };
- void image_files_init(image_files *_this,int _nxblocks,int _nyblocks);
- void image_files_clear(image_files *_this);
- void image_files_write(image_files *_this,const char *_name,const char *_suf);
- typedef struct image_data image_data;
- struct image_data{
- const char *name;
- int nxblocks;
- int nyblocks;
- int b_sz_log;
- unsigned char *mask;
- unsigned char *mode;
- double *weight;
- od_coeff *pre;
- int pre_stride;
- od_coeff *fdct;
- int fdct_stride;
- #if TF_BLOCKS
- od_coeff *tf;
- #endif
- double *pred;
- int pred_stride;
- od_coeff *idct;
- int idct_stride;
- od_coeff *post;
- int post_stride;
- };
- void image_data_init(image_data *_this,const char *_name,int _b_sz_log,
- int _nxblocks,int _nyblocks);
- void image_data_clear(image_data *_this);
- void image_data_mask(image_data *_this,const unsigned char *_data,int _stride);
- void image_data_pre_block(image_data *_this,const unsigned char *_data,
- int _stride,int _bi,int _bj);
- void image_data_fdct_block(image_data *_this,int _bi,int _bj);
- #if TF_BLOCKS
- void image_data_tf_block(image_data *_this,int _bi,int _bj);
- #endif
- void image_data_print_block(image_data *_this,int _bi,int _bj,FILE *_fp);
- void image_data_load_block(image_data *_this,int _bi,int _bj,
- od_coeff _coeffs[5*B_SZ*B_SZ]);
- void image_data_pred_block(image_data *_this,int _bi,int _bj);
- void image_data_stats_block(image_data *_this,const unsigned char *_data,
- int _stride,int _bi,int _bj,intra_stats *_stats);
- void image_data_idct_block(image_data *_this,int _bi,int _bj);
- void image_data_post_block(image_data *_this,int _bi,int _bj);
- void image_data_files_block(image_data *_this,const unsigned char *_data,
- int _stride,int _bi,int _bj,image_files *_files);
- int image_data_save_map(image_data *_this);
- int image_data_load_map(image_data *_this);
- #endif
|