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
This commit is contained in:
Stefano Sabatini
2010-01-31 16:33:29 +00:00
parent 971c55f186
commit b4b6645655
4 changed files with 12 additions and 8 deletions
+4 -2
View File
@@ -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]) {