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/avfilter.c | |
parent | 971c55f18680020908eeae3972bd20b36921b7e1 (diff) | |
download | ffmpeg-b4b664565573e0c54474c7bfb6adc19cb7b28a55.tar.gz |
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/avfilter.c')
-rw-r--r-- | libavfilter/avfilter.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 959a2414c7..e28f1c7390 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -22,6 +22,7 @@ /* #define DEBUG */ #include "libavcodec/imgconvert.h" +#include "libavutil/pixdesc.h" #include "avfilter.h" unsigned avfilter_version(void) { @@ -183,7 +184,7 @@ static void dprintf_link(void *ctx, AVFilterLink *link, int end) dprintf(ctx, "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s", link, link->w, link->h, - avcodec_get_pix_fmt_name(link->format), + av_pix_fmt_descriptors[link->format].name, link->src ? link->src->filter->name : "", link->dst ? link->dst->filter->name : "", end ? "\n" : ""); @@ -298,7 +299,8 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) /* copy the slice if needed for permission reasons */ if(link->srcpic) { - avcodec_get_chroma_sub_sample(link->format, &hsub, &vsub); + hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w; + vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h; for(i = 0; i < 4; i ++) { if(link->srcpic->data[i]) { |