diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-04-28 21:01:27 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-04-28 22:49:09 +0200 |
commit | 29fd44adf128c6bf9c780b3460a64ceaed44f515 (patch) | |
tree | 4d76ca4e78205a1f108a0804f8dfa14d864d6ba4 | |
parent | 96d7cbedbefdfa385803212f2a1fb078336df073 (diff) | |
download | ffmpeg-29fd44adf128c6bf9c780b3460a64ceaed44f515.tar.gz |
avfilter/vf_fieldmatch: use correct subsamplings for y0a, y1a and startx
Signed-off-by: Paul B Mahol <onemda@gmail.com>
-rw-r--r-- | libavfilter/vf_fieldmatch.c | 6 | ||||
-rw-r--r-- | tests/ref/fate/filter-pixfmts-fieldmatch | 2 |
2 files changed, 4 insertions, 4 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; diff --git a/tests/ref/fate/filter-pixfmts-fieldmatch b/tests/ref/fate/filter-pixfmts-fieldmatch index 99946c8d1d..c3165b872d 100644 --- a/tests/ref/fate/filter-pixfmts-fieldmatch +++ b/tests/ref/fate/filter-pixfmts-fieldmatch @@ -2,4 +2,4 @@ yuv410p a6c9b4065e8253d8120772f69be0bf04 yuv411p b913e634ad37ce046240252bed8681fb yuv420p a9286560141eb14595e427dbe5829b00 yuv422p 11ad22ce00c5e8a30d0472f29fb15434 -yuv444p 9350a3f23cd7d95ec441a49f63f55953 +yuv444p 6c5b0c1343d625d0656b6755906fd874 |