0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 03:52:22 +02:00

video: remove redundant function

mp_image_params_from_image() is now trivial and can be removed.
This commit is contained in:
wm4 2014-06-17 23:26:53 +02:00
parent 2827ff1eab
commit efa6b09b65
3 changed files with 2 additions and 11 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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) {