diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-21 17:47:04 -0500 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2016-01-25 12:09:48 -0500 |
commit | 4709f72115e4028a1cb43e916925678bfceef870 (patch) | |
tree | 3959683cdc265f20a167601ef7094fc2e0ded8b4 /libavfilter/vf_interlace.c | |
parent | e80307140f736f593ee643affa015333d7c5e27f (diff) | |
download | ffmpeg-streaming-4709f72115e4028a1cb43e916925678bfceef870.zip ffmpeg-streaming-4709f72115e4028a1cb43e916925678bfceef870.tar.gz |
lavfi: Use AV_CEIL_RSHIFT where needed
Diffstat (limited to 'libavfilter/vf_interlace.c')
-rw-r--r-- | libavfilter/vf_interlace.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/vf_interlace.c b/libavfilter/vf_interlace.c index 939fabc..ac435d7 100644 --- a/libavfilter/vf_interlace.c +++ b/libavfilter/vf_interlace.c @@ -138,8 +138,10 @@ static void copy_picture_field(InterlaceContext *s, int plane, j; for (plane = 0; plane < desc->nb_components; plane++) { - int cols = (plane == 1 || plane == 2) ? -(-inlink->w) >> hsub : inlink->w; - int lines = (plane == 1 || plane == 2) ? -(-inlink->h) >> vsub : inlink->h; + int cols = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->w, hsub) + : inlink->w; + int lines = (plane == 1 || plane == 2) ? AV_CEIL_RSHIFT(inlink->h, vsub) + : inlink->h; uint8_t *dstp = dst_frame->data[plane]; const uint8_t *srcp = src_frame->data[plane]; |