History

avfilter/vf_eq: add support for alpha channel

the.real.laplace@gmail.com committed 5 years ago

Commit c13a2f71 parent 2aa343b1 file · +8 −7Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_eq.c+8−7
@@ -236,9 +236,9 @@ static const enum AVPixelFormat pixel_fmts_eq[] = { · 235 unmodified lines
236236 AV_PIX_FMT_GRAY8,
237237 AV_PIX_FMT_YUV410P,
238238 AV_PIX_FMT_YUV411P,
239− AV_PIX_FMT_YUV420P,
240− AV_PIX_FMT_YUV422P,
241− AV_PIX_FMT_YUV444P,
239+ AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P,
240+ AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA422P,
241+ AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P,
242242 AV_PIX_FMT_NONE
243243 };
244244
@@ -281,12 +281,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 36 unmodified lines
281281 h = AV_CEIL_RSHIFT(h, desc->log2_chroma_h);
282282 }
283283
284− if (eq->param[i].adjust)
285− eq->param[i].adjust(&eq->param[i], out->data[i], out->linesize[i],
286− in->data[i], in->linesize[i], w, h);
287− else
284+ if (i == 3 || !eq->param[i].adjust)
288285 av_image_copy_plane(out->data[i], out->linesize[i],
289286 in->data[i], in->linesize[i], w, h);
287+
288+ else
289+ eq->param[i].adjust(&eq->param[i], out->data[i], out->linesize[i],
290+ in->data[i], in->linesize[i], w, h);
290291 }
291292
292293 av_frame_free(&in);

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