diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-09-03 13:44:14 +0200 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-09-07 12:37:47 +0200 |
commit | 2268db2cd052674fde55c7d48b7a5098ce89b4ba (patch) | |
tree | b8bedf84f2777a5a46ab1c73668ff76da22ba54b /libavutil/imgutils.c | |
parent | 6b3ef7f080293956b2e5212b83135c6b051212e9 (diff) | |
download | ffmpeg-2268db2cd052674fde55c7d48b7a5098ce89b4ba.tar.gz |
lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields
The new fields can be accessed directly and are more intelligible.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavutil/imgutils.c')
-rw-r--r-- | libavutil/imgutils.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index 948a6f784a..4fb7a9b0aa 100644 --- a/libavutil/imgutils.c +++ b/libavutil/imgutils.c @@ -40,8 +40,8 @@ void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], for (i = 0; i < 4; i++) { const AVComponentDescriptor *comp = &(pixdesc->comp[i]); - if ((comp->step_minus1+1) > max_pixsteps[comp->plane]) { - max_pixsteps[comp->plane] = comp->step_minus1+1; + if (comp->step > max_pixsteps[comp->plane]) { + max_pixsteps[comp->plane] = comp->step; if (max_pixstep_comps) max_pixstep_comps[comp->plane] = i; } @@ -59,7 +59,7 @@ int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane) return AVERROR(EINVAL); if (desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) - return (width * (desc->comp[0].step_minus1+1) + 7) >> 3; + return (width * desc->comp[0].step + 7) >> 3; av_image_fill_max_pixsteps(max_step, max_step_comp, desc); s = (max_step_comp[plane] == 1 || max_step_comp[plane] == 2) ? desc->log2_chroma_w : 0; @@ -79,9 +79,9 @@ int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int wi return AVERROR(EINVAL); if (desc->flags & AV_PIX_FMT_FLAG_BITSTREAM) { - if (width > (INT_MAX -7) / (desc->comp[0].step_minus1+1)) + if (width > (INT_MAX - 7) / desc->comp[0].step) return AVERROR(EINVAL); - linesizes[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3; + linesizes[0] = (width * desc->comp[0].step + 7) >> 3; return 0; } |