Implement sws_printVec2() and deprecate sws_printVec().
Originally committed as revision 28566 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
@@ -3068,7 +3068,7 @@ SwsVector *sws_cloneVec(SwsVector *a){
|
|||||||
return vec;
|
return vec;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sws_printVec(SwsVector *a){
|
void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level){
|
||||||
int i;
|
int i;
|
||||||
double max=0;
|
double max=0;
|
||||||
double min=0;
|
double min=0;
|
||||||
@@ -3085,12 +3085,18 @@ void sws_printVec(SwsVector *a){
|
|||||||
for (i=0; i<a->length; i++)
|
for (i=0; i<a->length; i++)
|
||||||
{
|
{
|
||||||
int x= (int)((a->coeff[i]-min)*60.0/range +0.5);
|
int x= (int)((a->coeff[i]-min)*60.0/range +0.5);
|
||||||
av_log(NULL, AV_LOG_DEBUG, "%1.3f ", a->coeff[i]);
|
av_log(log_ctx, log_level, "%1.3f ", a->coeff[i]);
|
||||||
for (;x>0; x--) av_log(NULL, AV_LOG_DEBUG, " ");
|
for (;x>0; x--) av_log(log_ctx, log_level, " ");
|
||||||
av_log(NULL, AV_LOG_DEBUG, "|\n");
|
av_log(log_ctx, log_level, "|\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LIBSWSCALE_VERSION_MAJOR < 1
|
||||||
|
void sws_printVec(SwsVector *a){
|
||||||
|
sws_printVec2(a, NULL, AV_LOG_DEBUG);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void sws_freeVec(SwsVector *a){
|
void sws_freeVec(SwsVector *a){
|
||||||
if (!a) return;
|
if (!a) return;
|
||||||
av_freep(&a->coeff);
|
av_freep(&a->coeff);
|
||||||
|
@@ -30,8 +30,8 @@
|
|||||||
#include "libavutil/avutil.h"
|
#include "libavutil/avutil.h"
|
||||||
|
|
||||||
#define LIBSWSCALE_VERSION_MAJOR 0
|
#define LIBSWSCALE_VERSION_MAJOR 0
|
||||||
#define LIBSWSCALE_VERSION_MINOR 6
|
#define LIBSWSCALE_VERSION_MINOR 7
|
||||||
#define LIBSWSCALE_VERSION_MICRO 2
|
#define LIBSWSCALE_VERSION_MICRO 0
|
||||||
|
|
||||||
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
||||||
LIBSWSCALE_VERSION_MINOR, \
|
LIBSWSCALE_VERSION_MINOR, \
|
||||||
@@ -182,7 +182,19 @@ void sws_shiftVec(SwsVector *a, int shift);
|
|||||||
*/
|
*/
|
||||||
SwsVector *sws_cloneVec(SwsVector *a);
|
SwsVector *sws_cloneVec(SwsVector *a);
|
||||||
|
|
||||||
void sws_printVec(SwsVector *a);
|
#if LIBSWSCALE_VERSION_MAJOR < 1
|
||||||
|
/**
|
||||||
|
* @deprecated Use sws_printVec2() instead.
|
||||||
|
*/
|
||||||
|
attribute_deprecated void sws_printVec(SwsVector *a);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints with av_log() a textual representation of the vector \p a
|
||||||
|
* if \p log_level <= av_log_level.
|
||||||
|
*/
|
||||||
|
void sws_printVec2(SwsVector *a, AVClass *log_ctx, int log_level);
|
||||||
|
|
||||||
void sws_freeVec(SwsVector *a);
|
void sws_freeVec(SwsVector *a);
|
||||||
|
|
||||||
SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
|
SwsFilter *sws_getDefaultFilter(float lumaGBlur, float chromaGBlur,
|
||||||
|
Reference in New Issue
Block a user