From 61af6bebb457c8d9bb00baaccd65a39632437bcd Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 21 Sep 2014 12:12:50 +0200 Subject: swscale: Allow chroma samples to be above and to the left of luma samples Found-by: Kierank Signed-off-by: Michael Niedermayer --- libswscale/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libswscale/utils.c') diff --git a/libswscale/utils.c b/libswscale/utils.c index 06fd358d94..56157001f0 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -266,7 +266,7 @@ static double getSplineCoeff(double a, double b, double c, double d, static av_cold int get_local_pos(SwsContext *s, int chr_subsample, int pos, int dir) { - if (pos < 0) { + if (pos == -1 || pos <= -513) { pos = (128 << chr_subsample) - 128; } pos += 128; // relative to ideal left edge -- cgit v1.2.3