comparison imgutils.c @ 18:ebe3b7ce4cca libavcore

Rename av_fill_image_max_pixstep() to av_fill_image_max_pixsteps(). The plural form is preferred as it is more consistent with the other functions: av_fill_image_linesizes() av_fill_image_pointers() and looks semantically more correct as it fills an array of elements.
author stefano
date Fri, 20 Aug 2010 16:52:38 +0000
parents 1a1faa090ff1
children cee2ee2eff81
comparison
equal deleted inserted replaced
17:046c1e516605 18:ebe3b7ce4cca
32 int s; 32 int s;
33 33
34 if (desc->flags & PIX_FMT_BITSTREAM) 34 if (desc->flags & PIX_FMT_BITSTREAM)
35 return (width * (desc->comp[0].step_minus1+1) + 7) >> 3; 35 return (width * (desc->comp[0].step_minus1+1) + 7) >> 3;
36 36
37 av_fill_image_max_pixstep(max_step, max_step_comp, desc); 37 av_fill_image_max_pixsteps(max_step, max_step_comp, desc);
38 s = (max_step_comp[plane] == 1 || max_step_comp[plane] == 2) ? desc->log2_chroma_w : 0; 38 s = (max_step_comp[plane] == 1 || max_step_comp[plane] == 2) ? desc->log2_chroma_w : 0;
39 return max_step[plane] * (((width + (1 << s) - 1)) >> s); 39 return max_step[plane] * (((width + (1 << s) - 1)) >> s);
40 } 40 }
41 41
42 int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width) 42 int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width)
54 if (desc->flags & PIX_FMT_BITSTREAM) { 54 if (desc->flags & PIX_FMT_BITSTREAM) {
55 linesizes[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3; 55 linesizes[0] = (width * (desc->comp[0].step_minus1+1) + 7) >> 3;
56 return 0; 56 return 0;
57 } 57 }
58 58
59 av_fill_image_max_pixstep(max_step, max_step_comp, desc); 59 av_fill_image_max_pixsteps(max_step, max_step_comp, desc);
60 for (i = 0; i < 4; i++) { 60 for (i = 0; i < 4; i++) {
61 int s = (max_step_comp[i] == 1 || max_step_comp[i] == 2) ? desc->log2_chroma_w : 0; 61 int s = (max_step_comp[i] == 1 || max_step_comp[i] == 2) ? desc->log2_chroma_w : 0;
62 linesizes[i] = max_step[i] * (((width + (1 << s) - 1)) >> s); 62 linesizes[i] = max_step[i] * (((width + (1 << s) - 1)) >> s);
63 } 63 }
64 64