Mercurial > libavcodec.hg
comparison libpostproc/postprocess.h @ 106:389391a6d0bf libavcodec
rewrote the horizontal lowpass filter to fix a bug which caused a blocky look
added deinterlace filters (linear interpolate, linear blend, median)
minor cleanups (removed some outcommented stuff)
| author | michael |
|---|---|
| date | Mon, 15 Oct 2001 03:01:08 +0000 |
| parents | 9607b48e2c2d |
| children | bd163e13a0fb |
comparison
equal
deleted
inserted
replaced
| 105:a2f94bfb5793 | 106:389391a6d0bf |
|---|---|
| 20 #ifndef NEWPOSTPROCESS_H | 20 #ifndef NEWPOSTPROCESS_H |
| 21 #define NEWPOSTPROCESS_H | 21 #define NEWPOSTPROCESS_H |
| 22 | 22 |
| 23 #define BLOCK_SIZE 8 | 23 #define BLOCK_SIZE 8 |
| 24 #define TEMP_STRIDE 8 | 24 #define TEMP_STRIDE 8 |
| 25 //#define NUM_BLOCKS_AT_ONCE 16 //not used yet | |
| 25 | 26 |
| 26 #define V_DEBLOCK 0x01 | 27 #define V_DEBLOCK 0x01 |
| 27 #define H_DEBLOCK 0x02 | 28 #define H_DEBLOCK 0x02 |
| 28 #define DERING 0x04 | 29 #define DERING 0x04 |
| 29 #define LEVEL_FIX 0x08 /* Brightness & Contrast */ | 30 #define LEVEL_FIX 0x08 /* Brightness & Contrast */ |
| 30 | 31 |
| 31 #define LUM_V_DEBLOCK V_DEBLOCK // 1 | 32 #define LUM_V_DEBLOCK V_DEBLOCK // 1 |
| 32 #define LUM_H_DEBLOCK H_DEBLOCK // 2 | 33 #define LUM_H_DEBLOCK H_DEBLOCK // 2 |
| 33 #define CHROM_V_DEBLOCK (V_DEBLOCK<<4) // 16 | 34 #define CHROM_V_DEBLOCK (V_DEBLOCK<<4) // 16 |
| 34 #define CHROM_H_DEBLOCK (H_DEBLOCK<<4) // 32 | 35 #define CHROM_H_DEBLOCK (H_DEBLOCK<<4) // 32 |
| 35 #define LUM_DERING DERING // 4 | 36 #define LUM_DERING DERING // 4 (not implemented yet) |
| 36 #define CHROM_DERING (DERING<<4) // 64 | 37 #define CHROM_DERING (DERING<<4) // 64 (not implemented yet) |
| 37 #define LUM_LEVEL_FIX LEVEL_FIX // 8 | 38 #define LUM_LEVEL_FIX LEVEL_FIX // 8 |
| 38 //not supported currently | 39 #define CHROM_LEVEL_FIX (LEVEL_FIX<<4) // 128 (not implemented yet) |
| 39 #define CHROM_LEVEL_FIX (LEVEL_FIX<<4) // 128 | |
| 40 | 40 |
| 41 // Experimental vertical filters | 41 // Experimental vertical filters |
| 42 #define V_RK1_FILTER 0x0100 // 256 | 42 #define V_RK1_FILTER 0x0100 // 256 |
| 43 #define V_X1_FILTER 0x0200 // 512 | 43 #define V_X1_FILTER 0x0200 // 512 |
| 44 | 44 |
| 45 // Experimental horizontal filters | 45 // Experimental horizontal filters |
| 46 #define H_RK1_FILTER 0x1000 // 4096 | 46 #define H_RK1_FILTER 0x1000 // 4096 (not implemented yet) |
| 47 #define H_X1_FILTER 0x2000 // 8192 | 47 #define H_X1_FILTER 0x2000 // 8192 |
| 48 | |
| 49 //Deinterlacing Filters | |
| 50 #define DEINTERLACE_FILTER_MASK 0xF0000 | |
| 51 #define LINEAR_IPOL_DEINT_FILTER 0x10000 // 65536 | |
| 52 #define LINEAR_BLEND_DEINT_FILTER 0x20000 // 131072 | |
| 53 #define CUBIC_BLEND_DEINT_FILTER 0x30000 // 196608 (not implemented yet) | |
| 54 #define CUBIC_IPOL_DEINT_FILTER 0x40000 // 262144 (not implemented yet) | |
| 55 #define MEDIAN_DEINT_FILTER 0x80000 // 524288 | |
| 56 | |
| 48 | 57 |
| 49 #define GET_PP_QUALITY_MAX 6 | 58 #define GET_PP_QUALITY_MAX 6 |
| 50 | 59 |
| 51 //#define TIMEING | 60 //#define TIMEING |
| 52 //#define MORE_TIMEING | 61 //#define MORE_TIMEING |
| 53 | 62 |
| 54 #define QP_STORE_T int | 63 #define QP_STORE_T int |
| 55 | 64 |
| 56 //#ifdef __cplusplus | |
| 57 //#include <inttypes.h> | |
| 58 | |
| 59 //void postProcess(uint8_t src[], int srcStride, uint8_t dst[], int dstStride, int width, int height, | |
| 60 // QP_STORE_T QPs[], int QPStride, int isColor, int mode); | |
| 61 //#endif | |
| 62 | |
| 63 //#ifdef __cplusplus | |
| 64 //extern "C" | |
| 65 //{ | |
| 66 //#endif | |
| 67 | |
| 68 void postprocess(unsigned char * src[], int src_stride, | 65 void postprocess(unsigned char * src[], int src_stride, |
| 69 unsigned char * dst[], int dst_stride, | 66 unsigned char * dst[], int dst_stride, |
| 70 int horizontal_size, int vertical_size, | 67 int horizontal_size, int vertical_size, |
| 71 QP_STORE_T *QP_store, int QP_stride, int mode); | 68 QP_STORE_T *QP_store, int QP_stride, int mode); |
| 72 | 69 |
| 73 int getPpModeForQuality(int quality); | 70 int getPpModeForQuality(int quality); |
| 74 | 71 |
| 75 //#ifdef __cplusplus | |
| 76 //} | |
| 77 //#endif | |
| 78 | |
| 79 #endif | 72 #endif |
