diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-07-30 08:42:12 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-07-30 08:42:12 +0000 |
commit | 7860b436514cf04eccf7f85e11a11323b17d88e7 (patch) | |
tree | d6add5b605dd9966414701f1a2b44f3270f12184 /libavcore | |
parent | fc2db52e2f429432226d4c2d0a675fc6b4f0639d (diff) | |
download | ffmpeg-7860b436514cf04eccf7f85e11a11323b17d88e7.tar.gz |
Rename av_fill_image_linesizes() internal variables max_plane_step and
max_plane_step_comp by removing the "plane_" word, and add a comment
for explaining what they represent.
Increase readability.
Originally committed as revision 24588 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcore')
-rw-r--r-- | libavcore/imgutils.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcore/imgutils.c b/libavcore/imgutils.c index e7e016cd5a..28e063eb86 100644 --- a/libavcore/imgutils.c +++ b/libavcore/imgutils.c @@ -28,8 +28,8 @@ int av_fill_image_linesizes(int linesize[4], enum PixelFormat pix_fmt, int width { int i; const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; - int max_plane_step [4]; - int max_plane_step_comp[4]; + int max_step [4]; /* max pixel step for each plane */ + int max_step_comp[4]; /* the component for each plane which has the max pixel step */ memset(linesize, 0, 4*sizeof(linesize[0])); @@ -41,19 +41,19 @@ int av_fill_image_linesizes(int linesize[4], enum PixelFormat pix_fmt, int width return 0; } - memset(max_plane_step , 0, sizeof(max_plane_step )); - memset(max_plane_step_comp, 0, sizeof(max_plane_step_comp)); + memset(max_step , 0, sizeof(max_step )); + memset(max_step_comp, 0, sizeof(max_step_comp)); for (i = 0; i < 4; i++) { const AVComponentDescriptor *comp = &(desc->comp[i]); - if ((comp->step_minus1+1) > max_plane_step[comp->plane]) { - max_plane_step [comp->plane] = comp->step_minus1+1; - max_plane_step_comp[comp->plane] = i; + if ((comp->step_minus1+1) > max_step[comp->plane]) { + max_step [comp->plane] = comp->step_minus1+1; + max_step_comp[comp->plane] = i; } } for (i = 0; i < 4; i++) { - int s = (max_plane_step_comp[i] == 1 || max_plane_step_comp[i] == 2) ? desc->log2_chroma_w : 0; - linesize[i] = max_plane_step[i] * (((width + (1 << s) - 1)) >> s); + int s = (max_step_comp[i] == 1 || max_step_comp[i] == 2) ? desc->log2_chroma_w : 0; + linesize[i] = max_step[i] * (((width + (1 << s) - 1)) >> s); } return 0; |