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>
(cherry picked from commit 61af6bebb4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-09-21 12:12:50 +02:00
parent 3b57d7769a
commit d389438296
2 changed files with 5 additions and 5 deletions

View File

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