summaryrefslogtreecommitdiff
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-21 12:12:50 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-09-21 12:23:24 +0200
commit61af6bebb457c8d9bb00baaccd65a39632437bcd (patch)
tree96c7c358a492ee2948d6690e217ae0e03cf33b41 /libswscale/utils.c
parent950ce21d4a7c1f4fbefbb258c852ba05bf6177de (diff)
swscale: Allow chroma samples to be above and to the left of luma samples
Found-by: Kierank Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
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