sws_utils: remove unused helper

sws_getContextFromCmdLine_hq() was used by the screenshot code, which
now uses mp_image_swscale().

Also move the mp_sws_set_colorspace() declaration from sws_utils.h to
vf_scale.c.
This commit is contained in:
wm4 2012-11-24 21:27:34 +01:00
parent e6ed0b1d3c
commit 4c21ad1f55
3 changed files with 10 additions and 33 deletions

View File

@ -64,6 +64,9 @@ static struct vf_priv_s {
NULL
};
static int mp_sws_set_colorspace(struct SwsContext *sws,
struct mp_csp_details *csp);
//===========================================================================//
static const unsigned int outfmt_list[]={
@ -541,7 +544,8 @@ static const int mp_csp_to_swscale[MP_CSP_COUNT] = {
// do nothing or return an error.
// The csp argument is set to the supported values.
// Return 0 on success and -1 on error.
int mp_sws_set_colorspace(struct SwsContext *sws, struct mp_csp_details *csp)
static int mp_sws_set_colorspace(struct SwsContext *sws,
struct mp_csp_details *csp)
{
int *table, *inv_table;
int brightness, contrast, saturation, srcRange, dstRange;

View File

@ -93,10 +93,9 @@ void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam,
}
// will use sws_flags & src_filter (from cmd line)
static struct SwsContext *sws_getContextFromCmdLine2(int srcW, int srcH,
int srcFormat, int dstW,
int dstH, int dstFormat,
int extraflags)
struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH,
int srcFormat, int dstW,
int dstH, int dstFormat)
{
int flags;
SwsFilter *dstFilterParam, *srcFilterParam;
@ -108,29 +107,8 @@ static struct SwsContext *sws_getContextFromCmdLine2(int srcW, int srcH,
sfmt = PIX_FMT_PAL8;
sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags |
extraflags, srcFilterParam, dstFilterParam,
NULL);
}
struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat,
int dstW, int dstH,
int dstFormat)
{
return sws_getContextFromCmdLine2(srcW, srcH, srcFormat, dstW, dstH,
dstFormat,
0);
}
struct SwsContext *sws_getContextFromCmdLine_hq(int srcW, int srcH,
int srcFormat, int dstW,
int dstH,
int dstFormat)
{
return sws_getContextFromCmdLine2(
srcW, srcH, srcFormat, dstW, dstH, dstFormat,
SWS_FULL_CHR_H_INT | SWS_FULL_CHR_H_INP |
SWS_ACCURATE_RND | SWS_BITEXACT);
return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags,
srcFilterParam, dstFilterParam, NULL);
}
bool mp_sws_supported_format(int imgfmt)

View File

@ -17,11 +17,6 @@ void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam,
struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat,
int dstW, int dstH,
int dstFormat);
struct SwsContext *sws_getContextFromCmdLine_hq(int srcW, int srcH,
int srcFormat, int dstW,
int dstH,
int dstFormat);
int mp_sws_set_colorspace(struct SwsContext *sws, struct mp_csp_details *csp);
bool mp_sws_supported_format(int imgfmt);