diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2012-10-20 06:43:48 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-20 18:00:13 +0200 |
commit | 79393a8363d6bb9920754247df00f1b5259e6efd (patch) | |
tree | a8991d78db0652fc3b004ade2f3c3a0365f9fda3 /libavfilter | |
parent | 2c5b92fe90463402be6bf611ef40195f86f434fd (diff) | |
download | ffmpeg-79393a8363d6bb9920754247df00f1b5259e6efd.tar.gz |
Replace usage of the deprecated av_pix_fmt_descriptors array with av_pix_fmt_desc_get
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/avfiltergraph.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_colormatrix.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_decimate.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_deshake.c | 4 | ||||
-rw-r--r-- | libavfilter/vf_hflip.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_hue.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_idet.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_overlay.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_smartblur.c | 2 | ||||
-rw-r--r-- | libavfilter/vf_tinterlace.c | 4 | ||||
-rw-r--r-- | libavfilter/video.c | 2 | ||||
-rw-r--r-- | libavfilter/vsrc_mptestsrc.c | 2 |
12 files changed, 14 insertions, 14 deletions
diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index ab37faeaf7..980cdf2877 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -424,7 +424,7 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref) if (link->type == AVMEDIA_TYPE_VIDEO) { if(ref && ref->type == AVMEDIA_TYPE_VIDEO){ - int has_alpha= av_pix_fmt_descriptors[ref->format].nb_components % 2 == 0; + int has_alpha= av_pix_fmt_desc_get(ref->format)->nb_components % 2 == 0; enum AVPixelFormat best= AV_PIX_FMT_NONE; int i; for (i=0; i<link->in_formats->format_count; i++) { diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index f331204482..7200e1dcaa 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -308,7 +308,7 @@ static int config_input(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; ColorMatrixContext *color = ctx->priv; - const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; + const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format); color->hsub = pix_desc->log2_chroma_w; color->vsub = pix_desc->log2_chroma_h; diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index b4abfa3ddb..8d54d39011 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -180,7 +180,7 @@ static int config_input(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; DecimateContext *decimate = ctx->priv; - const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; + const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format); decimate->hsub = pix_desc->log2_chroma_w; decimate->vsub = pix_desc->log2_chroma_h; diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index e86d5bc61e..0444de09de 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -59,8 +59,8 @@ #include "transform.h" -#define CHROMA_WIDTH(link) -((-link->w) >> av_pix_fmt_descriptors[link->format].log2_chroma_w) -#define CHROMA_HEIGHT(link) -((-link->h) >> av_pix_fmt_descriptors[link->format].log2_chroma_h) +#define CHROMA_WIDTH(link) -((-link->w) >> av_pix_fmt_desc_get(link->format)->log2_chroma_w) +#define CHROMA_HEIGHT(link) -((-link->h) >> av_pix_fmt_desc_get(link->format)->log2_chroma_h) enum SearchMethod { EXHAUSTIVE, ///< Search all possible positions diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index 70bf5c939b..41b4d5400d 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -95,7 +95,7 @@ static int start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) avfilter_copy_buffer_ref_props(outlink->out_buf, picref); /* copy palette if required */ - if (av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL) + if (av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_PAL) memcpy(inlink->dst->outputs[0]->out_buf->data[1], picref->data[1], AVPALETTE_SIZE); return ff_start_frame(outlink, avfilter_ref_buffer(outlink->out_buf, ~0)); diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index 71d5cc88ad..7e421bd4f7 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -252,7 +252,7 @@ static int query_formats(AVFilterContext *ctx) static int config_props(AVFilterLink *inlink) { HueContext *hue = inlink->dst->priv; - const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[inlink->format]; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); hue->hsub = desc->log2_chroma_w; hue->vsub = desc->log2_chroma_h; diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index d64c48c85c..d7c65444e0 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -195,7 +195,7 @@ static int end_frame(AVFilterLink *link) return 0; if (!idet->csp) - idet->csp = &av_pix_fmt_descriptors[link->format]; + idet->csp = av_pix_fmt_desc_get(link->format); if (idet->csp->comp[0].depth_minus1 / 8 == 1) idet->filter_line = (void*)filter_line_c_16bit; diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index 4f2f423a35..f060684baf 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -217,7 +217,7 @@ static int config_input_overlay(AVFilterLink *inlink) char *expr; double var_values[VAR_VARS_NB], res; int ret; - const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; + const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(inlink->format); av_image_fill_max_pixsteps(over->overlay_pix_step, NULL, pix_desc); diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c index e1f27ec21b..0402d1a99f 100644 --- a/libavfilter/vf_smartblur.c +++ b/libavfilter/vf_smartblur.c @@ -169,7 +169,7 @@ static int alloc_sws_context(FilterParam *f, int width, int height, unsigned int static int config_props(AVFilterLink *inlink) { SmartblurContext *sblur = inlink->dst->priv; - const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[inlink->format]; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); sblur->hsub = desc->log2_chroma_w; sblur->vsub = desc->log2_chroma_h; diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c index 0bfccfb267..99e3222090 100644 --- a/libavfilter/vf_tinterlace.c +++ b/libavfilter/vf_tinterlace.c @@ -130,7 +130,7 @@ static int config_out_props(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; AVFilterLink *inlink = outlink->src->inputs[0]; - const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[outlink->format]; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(outlink->format); TInterlaceContext *tinterlace = ctx->priv; tinterlace->vsub = desc->log2_chroma_h; @@ -179,7 +179,7 @@ void copy_picture_field(uint8_t *dst[4], int dst_linesize[4], enum AVPixelFormat format, int w, int src_h, int src_field, int interleave, int dst_field) { - const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[format]; + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(format); int plane, vsub = desc->log2_chroma_h; int k = src_field == FIELD_UPPER_AND_LOWER ? 1 : 2; diff --git a/libavfilter/video.c b/libavfilter/video.c index 7a0cce9814..4d8804ba10 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -286,7 +286,7 @@ int ff_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) avfilter_copy_buffer_ref_props(link->cur_buf, link->src_buf); /* copy palette if required */ - if (av_pix_fmt_descriptors[link->format].flags & PIX_FMT_PAL) + if (av_pix_fmt_desc_get(link->format)->flags & PIX_FMT_PAL) memcpy(link->cur_buf->data[1], link->src_buf-> data[1], AVPALETTE_SIZE); } else diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c index 9589b519ad..2b416376b1 100644 --- a/libavfilter/vsrc_mptestsrc.c +++ b/libavfilter/vsrc_mptestsrc.c @@ -298,7 +298,7 @@ static int config_props(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; MPTestContext *test = ctx->priv; - const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[outlink->format]; + const AVPixFmtDescriptor *pix_desc = av_pix_fmt_desc_get(outlink->format); test->hsub = pix_desc->log2_chroma_w; test->vsub = pix_desc->log2_chroma_h; |