Commit 0f146263 authored by Stefano Sabatini's avatar Stefano Sabatini

Make av_fill_image_max_pixsteps() non static non inline.

Originally committed as revision 25053 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 3d487db1
...@@ -24,6 +24,24 @@ ...@@ -24,6 +24,24 @@
#include "imgutils.h" #include "imgutils.h"
#include "libavutil/pixdesc.h" #include "libavutil/pixdesc.h"
void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
const AVPixFmtDescriptor *pixdesc)
{
int i;
memset(max_pixsteps, 0, 4*sizeof(max_pixsteps[0]));
if (max_pixstep_comps)
memset(max_pixstep_comps, 0, 4*sizeof(max_pixstep_comps[0]));
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 (max_pixstep_comps)
max_pixstep_comps[comp->plane] = i;
}
}
}
int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane) int av_get_image_linesize(enum PixelFormat pix_fmt, int width, int plane)
{ {
const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt];
......
...@@ -43,23 +43,8 @@ ...@@ -43,23 +43,8 @@
* @param max_pixstep_comps an array which is filled with the component * @param max_pixstep_comps an array which is filled with the component
* for each plane which has the max pixel step. May be NULL. * for each plane which has the max pixel step. May be NULL.
*/ */
static inline void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], void av_fill_image_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4],
const AVPixFmtDescriptor *pixdesc) const AVPixFmtDescriptor *pixdesc);
{
int i;
memset(max_pixsteps, 0, 4*sizeof(max_pixsteps[0]));
if (max_pixstep_comps)
memset(max_pixstep_comps, 0, 4*sizeof(max_pixstep_comps[0]));
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 (max_pixstep_comps)
max_pixstep_comps[comp->plane] = i;
}
}
}
/** /**
* Compute the size of an image line with format pix_fmt and width * Compute the size of an image line with format pix_fmt and width
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment