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. Originally committed as revision 24851 to svn://svn.ffmpeg.org/ffmpeg/trunk
Unified · Split
| @@ -27,7 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | #include <libavutil/avutil.h> |
| 28 | 28 | |
| 29 | 29 | #define LIBAVCORE_VERSION_MAJOR 0 |
| 30 | −#define LIBAVCORE_VERSION_MINOR 5 | |
| 30 | +#define LIBAVCORE_VERSION_MINOR 6 | |
| 31 | 31 | #define LIBAVCORE_VERSION_MICRO 0 |
| 32 | 32 | |
| 33 | 33 | #define LIBAVCORE_VERSION_INT AV_VERSION_INT(LIBAVCORE_VERSION_MAJOR, \ |
| @@ -34,7 +34,7 @@ int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane) · 33 unmodified lines | ||
| 34 | 34 | if (desc->flags & PIX_FMT_BITSTREAM) |
| 35 | 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 | 38 | s = (max_step_comp[plane] == 1 || max_step_comp[plane] == 2) ? desc->log2_chroma_w : 0; |
| 39 | 39 | return max_step[plane] * (((width + (1 << s) - 1)) >> s); |
| 40 | 40 | } |
| @@ -56,7 +56,7 @@ int av_fill_image_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt · 15 unmodified lines | ||
| 56 | 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 | 60 | for (i = 0; i < 4; i++) { |
| 61 | 61 | int s = (max_step_comp[i] == 1 || max_step_comp[i] == 2) ? desc->log2_chroma_w : 0; |
| 62 | 62 | linesizes[i] = max_step[i] * (((width + (1 << s) - 1)) >> s); |
| @@ -36,27 +36,27 @@ · 35 unmodified lines | ||
| 36 | 36 | * byte of the successive group in the same plane for the same |
| 37 | 37 | * component. |
| 38 | 38 | * |
| 39 | − * @param max_pixstep an array which is filled with the max pixel step | |
| 39 | + * @param max_pixsteps an array which is filled with the max pixel step | |
| 40 | 40 | * for each plane. Since a plane may contain different pixel |
| 41 | − * components, the computed max_pixstep[plane] is relative to the | |
| 41 | + * components, the computed max_pixsteps[plane] is relative to the | |
| 42 | 42 | * component in the plane with the max pixel step. |
| 43 | − * @param max_pixstep_comp an array which is filled with the component | |
| 43 | + * @param max_pixstep_comps an array which is filled with the component | |
| 44 | 44 | * for each plane which has the max pixel step. May be NULL. |
| 45 | 45 | */ |
| 46 | −static inline void av_fill_image_max_pixstep(int max_pixstep[4], int max_pixstep_comp[4], | |
| 47 | − const AVPixFmtDescriptor *pixdesc) | |
| 46 | +static inline void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], | |
| 47 | + const AVPixFmtDescriptor *pixdesc) | |
| 48 | 48 | { |
| 49 | 49 | int i; |
| 50 | − memset(max_pixstep, 0, 4*sizeof(max_pixstep[0])); | |
| 51 | − if (max_pixstep_comp) | |
| 52 | − memset(max_pixstep_comp, 0, 4*sizeof(max_pixstep_comp[0])); | |
| 50 | + memset(max_pixsteps, 0, 4*sizeof(max_pixsteps[0])); | |
| 51 | + if (max_pixstep_comps) | |
| 52 | + memset(max_pixstep_comps, 0, 4*sizeof(max_pixstep_comps[0])); | |
| 53 | 53 | |
| 54 | 54 | for (i = 0; i < 4; i++) { |
| 55 | 55 | const AVComponentDescriptor *comp = &(pixdesc->comp[i]); |
| 56 | − if ((comp->step_minus1+1) > max_pixstep[comp->plane]) { | |
| 57 | − max_pixstep[comp->plane] = comp->step_minus1+1; | |
| 58 | − if (max_pixstep_comp) | |
| 59 | − max_pixstep_comp[comp->plane] = i; | |
| 56 | + if ((comp->step_minus1+1) > max_pixsteps[comp->plane]) { | |
| 57 | + max_pixsteps[comp->plane] = comp->step_minus1+1; | |
| 58 | + if (max_pixstep_comps) | |
| 59 | + max_pixstep_comps[comp->plane] = i; | |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | } |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | #define LIBAVFILTER_VERSION_MAJOR 1 |
| 28 | 28 | #define LIBAVFILTER_VERSION_MINOR 36 |
| 29 | −#define LIBAVFILTER_VERSION_MICRO 0 | |
| 29 | +#define LIBAVFILTER_VERSION_MICRO 1 | |
| 30 | 30 | |
| 31 | 31 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| 32 | 32 | LIBAVFILTER_VERSION_MINOR, \ |
| @@ -84,7 +84,7 @@ static int config_input(AVFilterLink *link) · 83 unmodified lines | ||
| 84 | 84 | CropContext *crop = ctx->priv; |
| 85 | 85 | const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[link->format]; |
| 86 | 86 | |
| 87 | − av_fill_image_max_pixstep(crop->max_step, NULL, pix_desc); | |
| 87 | + av_fill_image_max_pixsteps(crop->max_step, NULL, pix_desc); | |
| 88 | 88 | crop->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w; |
| 89 | 89 | crop->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; |
| 90 | 90 | |
| @@ -70,7 +70,7 @@ static int config_props(AVFilterLink *inlink) · 69 unmodified lines | ||
| 70 | 70 | FlipContext *flip = inlink->dst->priv; |
| 71 | 71 | const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; |
| 72 | 72 | |
| 73 | − av_fill_image_max_pixstep(flip->max_step, NULL, pix_desc); | |
| 73 | + av_fill_image_max_pixsteps(flip->max_step, NULL, pix_desc); | |
| 74 | 74 | flip->hsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_w; |
| 75 | 75 | flip->vsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_h; |
| 76 | 76 | |