Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2018-04-28 22:01:27 +0300
committerPaul B Mahol <onemda@gmail.com>2018-04-28 23:49:09 +0300
commit29fd44adf128c6bf9c780b3460a64ceaed44f515 (patch)
tree4d76ca4e78205a1f108a0804f8dfa14d864d6ba4 /libavfilter/vf_fieldmatch.c
parent96d7cbedbefdfa385803212f2a1fb078336df073 (diff)
avfilter/vf_fieldmatch: use correct subsamplings for y0a, y1a and startx
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_fieldmatch.c')
-rw-r--r--libavfilter/vf_fieldmatch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 3694f26d33..4f10ed7ccd 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -503,9 +503,9 @@ static int compare_fields(FieldMatchContext *fm, int match1, int match2, int fie
int prvf_linesize, nxtf_linesize;
const int width = get_width (fm, src, plane);
const int height = get_height(fm, src, plane);
- const int y0a = fm->y0 >> (plane != 0);
- const int y1a = fm->y1 >> (plane != 0);
- const int startx = (plane == 0 ? 8 : 4);
+ const int y0a = fm->y0 >> (plane ? fm->vsub : 0);
+ const int y1a = fm->y1 >> (plane ? fm->vsub : 0);
+ const int startx = (plane == 0 ? 8 : 8 >> fm->hsub);
const int stopx = width - startx;
const uint8_t *srcpf, *srcf, *srcnf;
const uint8_t *prvpf, *prvnf, *nxtpf, *nxtnf;