Mercurial > mplayer.hg
comparison postproc/swscale.h @ 9494:543ab3909b78
sws_ prefix, more seperation between internal & external swscaler API
sws_scale() returns the number of outputed lines
author | michael |
---|---|
date | Sun, 23 Feb 2003 22:05:55 +0000 |
parents | eff727517e6b |
children | 5025150738eb |
comparison
equal
deleted
inserted
replaced
9493:d1f82707ad78 | 9494:543ab3909b78 |
---|---|
17 */ | 17 */ |
18 | 18 |
19 #ifndef SWSCALE_H | 19 #ifndef SWSCALE_H |
20 #define SWSCALE_H | 20 #define SWSCALE_H |
21 | 21 |
22 #include "swscale_internal.h" //FIXME HACK REMOVE | 22 /** |
23 * @file swscale.h | |
24 * @brief | |
25 * external api for the swscale stuff | |
26 */ | |
27 | |
28 #ifdef __cplusplus | |
29 extern "C" { | |
30 #endif | |
23 | 31 |
24 /* values for the flags, the stuff on the command line is different */ | 32 /* values for the flags, the stuff on the command line is different */ |
25 #define SWS_FAST_BILINEAR 1 | 33 #define SWS_FAST_BILINEAR 1 |
26 #define SWS_BILINEAR 2 | 34 #define SWS_BILINEAR 2 |
27 #define SWS_BICUBIC 4 | 35 #define SWS_BICUBIC 4 |
74 SwsVector *lumV; | 82 SwsVector *lumV; |
75 SwsVector *chrH; | 83 SwsVector *chrH; |
76 SwsVector *chrV; | 84 SwsVector *chrV; |
77 } SwsFilter; | 85 } SwsFilter; |
78 | 86 |
87 struct SwsContext; | |
79 | 88 |
89 //typedef struct SwsContext; | |
80 // *** bilinear scaling and yuv->rgb & yuv->yuv conversion of yv12 slices: | 90 // *** bilinear scaling and yuv->rgb & yuv->yuv conversion of yv12 slices: |
81 // *** Note: it's called multiple times while decoding a frame, first time y==0 | 91 // *** Note: it's called multiple times while decoding a frame, first time y==0 |
82 // dstbpp == 12 -> yv12 output | 92 // dstbpp == 12 -> yv12 output |
83 // will use sws_flags | 93 // will use sws_flags |
94 // deprecated, will be removed | |
84 void SwScale_YV12slice(unsigned char* src[],int srcStride[], int srcSliceY, | 95 void SwScale_YV12slice(unsigned char* src[],int srcStride[], int srcSliceY, |
85 int srcSliceH, uint8_t* dst[], int dstStride, int dstbpp, | 96 int srcSliceH, uint8_t* dst[], int dstStride, int dstbpp, |
86 int srcW, int srcH, int dstW, int dstH); | 97 int srcW, int srcH, int dstW, int dstH); |
87 | 98 |
88 // Obsolete, will be removed soon | |
89 void SwScale_Init(); | |
90 | 99 |
100 void sws_freeContext(struct SwsContext *swsContext); | |
91 | 101 |
102 struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat); | |
103 struct SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, | |
104 SwsFilter *srcFilter, SwsFilter *dstFilter); | |
105 int sws_scale(struct SwsContext *context, uint8_t* src[], int srcStride[], int srcSliceY, | |
106 int srcSliceH, uint8_t* dst[], int dstStride[]); | |
92 | 107 |
93 void freeSwsContext(SwsContext *swsContext); | 108 void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam); //FIXME try to seperate this |
94 | 109 |
95 SwsContext *getSwsContextFromCmdLine(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat); | 110 int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation); |
96 SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, | 111 int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation); |
97 SwsFilter *srcFilter, SwsFilter *dstFilter); | 112 SwsVector *sws_getGaussianVec(double variance, double quality); |
98 void swsGetFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam); | 113 SwsVector *sws_getConstVec(double c, int length); |
114 SwsVector *sws_getIdentityVec(void); | |
115 void sws_scaleVec(SwsVector *a, double scalar); | |
116 void sws_normalizeVec(SwsVector *a, double height); | |
117 void sws_convVec(SwsVector *a, SwsVector *b); | |
118 void sws_addVec(SwsVector *a, SwsVector *b); | |
119 void sws_subVec(SwsVector *a, SwsVector *b); | |
120 void sws_shiftVec(SwsVector *a, int shift); | |
121 SwsVector *sws_cloneVec(SwsVector *a); | |
99 | 122 |
100 int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation); | 123 void sws_printVec(SwsVector *a); |
101 int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation); | 124 void sws_freeVec(SwsVector *a); |
102 | 125 |
103 SwsVector *getGaussianVec(double variance, double quality); | 126 #ifdef __cplusplus |
104 SwsVector *getConstVec(double c, int length); | 127 } |
105 SwsVector *getIdentityVec(void); | 128 #endif |
106 void scaleVec(SwsVector *a, double scalar); | |
107 void normalizeVec(SwsVector *a, double height); | |
108 void convVec(SwsVector *a, SwsVector *b); | |
109 void addVec(SwsVector *a, SwsVector *b); | |
110 void subVec(SwsVector *a, SwsVector *b); | |
111 void shiftVec(SwsVector *a, int shift); | |
112 SwsVector *cloneVec(SwsVector *a); | |
113 | |
114 void printVec(SwsVector *a); | |
115 void freeVec(SwsVector *a); | |
116 | 129 |
117 #endif | 130 #endif |