summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-17 23:26:53 +0200
committerwm4 <wm4@nowhere>2014-06-17 23:26:53 +0200
commitefa6b09b65f8c87a18745352777225adef7dbfc0 (patch)
tree3dda68b348c67ac66bf2cdf98245290a86213381
parent2827ff1eabbe87f7f91ae174ba321cab06f5cbe0 (diff)
downloadmpv-efa6b09b65f8c87a18745352777225adef7dbfc0.tar.bz2
mpv-efa6b09b65f8c87a18745352777225adef7dbfc0.tar.xz
video: remove redundant function
mp_image_params_from_image() is now trivial and can be removed.
-rw-r--r--video/mp_image.c6
-rw-r--r--video/mp_image.h3
-rw-r--r--video/sws_utils.c4
3 files changed, 2 insertions, 11 deletions
diff --git a/video/mp_image.c b/video/mp_image.c
index d778b7dcaa..76d6c1ab97 100644
--- a/video/mp_image.c
+++ b/video/mp_image.c
@@ -490,12 +490,6 @@ bool mp_image_params_equals(const struct mp_image_params *p1,
p1->rotate == p2->rotate;
}
-void mp_image_params_from_image(struct mp_image_params *params,
- const struct mp_image *image)
-{
- *params = image->params;
-}
-
// Set most image parameters, but not image format or size.
// Display size is used to set the PAR.
void mp_image_set_attributes(struct mp_image *image,
diff --git a/video/mp_image.h b/video/mp_image.h
index 8282c06df9..8419da8e3c 100644
--- a/video/mp_image.h
+++ b/video/mp_image.h
@@ -143,9 +143,6 @@ bool mp_image_params_valid(const struct mp_image_params *p);
bool mp_image_params_equals(const struct mp_image_params *p1,
const struct mp_image_params *p2);
-void mp_image_params_from_image(struct mp_image_params *params,
- const struct mp_image *image);
-
void mp_image_set_params(struct mp_image *image,
const struct mp_image_params *params);
diff --git a/video/sws_utils.c b/video/sws_utils.c
index cd69802342..46571c018d 100644
--- a/video/sws_utils.c
+++ b/video/sws_utils.c
@@ -254,8 +254,8 @@ int mp_sws_reinit(struct mp_sws_context *ctx)
int mp_sws_scale(struct mp_sws_context *ctx, struct mp_image *dst,
struct mp_image *src)
{
- mp_image_params_from_image(&ctx->src, src);
- mp_image_params_from_image(&ctx->dst, dst);
+ ctx->src = src->params;
+ ctx->dst = dst->params;
int r = mp_sws_reinit(ctx);
if (r < 0) {