diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-31 16:33:29 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-01-31 16:33:29 +0000 |
commit | b4b664565573e0c54474c7bfb6adc19cb7b28a55 (patch) | |
tree | a544693925d18b353e8b4ee8c28ba07c6e97686f /libavfilter/vf_scale.c | |
parent | 971c55f18680020908eeae3972bd20b36921b7e1 (diff) |
Avoid usage of avcodec_get_pix_fmt_name() and
avcodec_get_chroma_sub_sample(), directly access
av_pix_fmt_descriptors instead.
Remove some of the dependancies of lavfi on lavc.
Originally committed as revision 21575 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r-- | libavfilter/vf_scale.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 6ccdde26c0..e0f37685fb 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -24,6 +24,7 @@ */ #include "avfilter.h" +#include "libavutil/pixdesc.h" #include "libswscale/swscale.h" typedef struct { @@ -126,7 +127,7 @@ static int config_props(AVFilterLink *outlink) SWS_BILINEAR, NULL, NULL, NULL); av_log(ctx, AV_LOG_INFO, "w:%d h:%d fmt:%s\n", - outlink->w, outlink->h, avcodec_get_pix_fmt_name(outlink->format)); + outlink->w, outlink->h, av_pix_fmt_descriptors[outlink->format].name); scale->input_is_pal = inlink->format == PIX_FMT_PAL8 || inlink->format == PIX_FMT_BGR4_BYTE || @@ -143,7 +144,8 @@ static void start_frame(AVFilterLink *link, AVFilterPicRef *picref) AVFilterLink *outlink = link->dst->outputs[0]; AVFilterPicRef *outpicref; - avcodec_get_chroma_sub_sample(link->format, &scale->hsub, &scale->vsub); + scale->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w; + scale->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; outpicref = avfilter_get_video_buffer(outlink, AV_PERM_WRITE, outlink->w, outlink->h); outpicref->pts = picref->pts; |