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
22/* #define DEBUG */22/* #define DEBUG */
23 23
24#include "libavcodec/imgconvert.h"24#include "libavcodec/imgconvert.h"
25#include "libavutil/pixdesc.h"
25#include "avfilter.h"26#include "avfilter.h"
26 27
27unsigned avfilter_version(void) {28unsigned avfilter_version(void) {
@@ -183,7 +184,7 @@ static void dprintf_link(void *ctx, AVFilterLink *link, int end) · 155 unmodified lines
183 dprintf(ctx,184 dprintf(ctx,
184 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",185 "link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s",
185 link, link->w, link->h,186 link, link->w, link->h,
186 avcodec_get_pix_fmt_name(link->format),187 av_pix_fmt_descriptors[link->format].name,
187 link->src ? link->src->filter->name : "",188 link->src ? link->src->filter->name : "",
188 link->dst ? link->dst->filter->name : "",189 link->dst ? link->dst->filter->name : "",
189 end ? "\n" : "");190 end ? "\n" : "");
@@ -298,7 +299,8 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) · 108 unmodified lines
298 299
299 /* copy the slice if needed for permission reasons */300 /* copy the slice if needed for permission reasons */
300 if(link->srcpic) {301 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;
302 304
303 for(i = 0; i < 4; i ++) {305 for(i = 0; i < 4; i ++) {
304 if(link->srcpic->data[i]) {306 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