History

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

Stefano Sabatini committed 16 years ago

Commit b4b66451 parent 971c55f4 files · +12 −8Browse files

Showing the changes to libavfilter/avfilter.c (1 of 4 files). Show all

Unified · Split

libavfilter/avfilter.c+4−2
@@ -22,6 +22,7 @@ · 21 unmodified lines
2222 /* #define DEBUG */
2323
2424 #include "libavcodec/imgconvert.h"
25+#include "libavutil/pixdesc.h"
2526 #include "avfilter.h"
2627
2728 unsigned avfilter_version(void) {
@@ -183,7 +184,7 @@ static void dprintf_link(void *ctx, AVFilterLink *link, int end) · 155 unmodified lines
183184 dprintf(ctx,
184185 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
185186 link, link->w, link->h,
186− avcodec_get_pix_fmt_name(link->format),
187+ av_pix_fmt_descriptors[link->format].name,
187188 link->src ? link->src->filter->name : "",
188189 link->dst ? link->dst->filter->name : "",
189190 end ? "\n" : "");
@@ -298,7 +299,8 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 108 unmodified lines
298299
299300 /* copy the slice if needed for permission reasons */
300301 if(link->srcpic) {
301− avcodec_get_chroma_sub_sample(link->format, &hsub, &vsub);
302+ hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w;
303+ vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;
302304
303305 for(i = 0; i < 4; i ++) {
304306 if(link->srcpic->data[i]) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t