summaryrefslogtreecommitdiffstats
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <[email protected]>2014-09-21 12:12:50 +0200
committerMichael Niedermayer <[email protected]>2014-09-21 23:37:09 +0200
commitd38943829649f50e11c4c1e2b0e0bf749c17013c (patch)
tree698ec19a12a3ca5baf67d428a40746d368fd7cac /libswscale/utils.c
parent3b57d7769a76a243ddfbb8190bf8d2c93ceba4fd (diff)
swscale: Allow chroma samples to be above and to the left of luma samples
Found-by: Kierank Signed-off-by: Michael Niedermayer <[email protected]> (cherry picked from commit 61af6bebb457c8d9bb00baaccd65a39632437bcd) Signed-off-by: Michael Niedermayer <[email protected]>
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