summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-11-24 21:27:34 +0100
committerwm4 <wm4@nowhere>2012-11-24 21:27:34 +0100
commit4c21ad1f55c31596c32eb006b4d91fe0d036f466 (patch)
tree1798988ce5847876823820e352c5decc056255d5 /video
parente6ed0b1d3c21c2fc39d0c602829014590d6d99de (diff)
downloadmpv-4c21ad1f55c31596c32eb006b4d91fe0d036f466.tar.bz2
mpv-4c21ad1f55c31596c32eb006b4d91fe0d036f466.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/filter/vf_scale.c6
-rw-r--r--video/sws_utils.c32
-rw-r--r--video/sws_utils.h5
3 files changed, 10 insertions, 33 deletions
diff --git a/video/filter/vf_scale.c b/video/filter/vf_scale.c
index 2ff9d82e8b..58664b8ae1 100644
--- a/video/filter/vf_scale.c
+++ b/video/filter/vf_scale.c
@@ -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;
diff --git a/video/sws_utils.c b/video/sws_utils.c
index 7d1845f431..663a0e282a 100644
--- a/video/sws_utils.c
+++ b/video/sws_utils.c
@@ -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)
diff --git a/video/sws_utils.h b/video/sws_utils.h
index a0cc47d850..d9e22d763b 100644
--- a/video/sws_utils.h
+++ b/video/sws_utils.h
@@ -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);