History

avfilter/vf_pixdesctest: also take into account undefined alpha components

Ensure those bits are copied, which will result in the output being the same as the input, where swscale set them to the equivalent of fully opaque.

James Almer committed 2 years ago

Commit dfd7acf1 parent 8debc5a12 files · +12 −12Browse files

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

Unified · Split

libavfilter/vf_pixdesctest.c+1−1
@@ -84,7 +84,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 83 unmodified lines
84 if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL)84 if (priv->pix_desc->flags & AV_PIX_FMT_FLAG_PAL)
85 memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);85 memcpy(out->data[1], in->data[1], AVPALETTE_SIZE);
86 86
87 for (c = 0; c < priv->pix_desc->nb_components; c++) {87 for (c = 0; c < FF_ARRAY_ELEMS(priv->pix_desc->comp); c++) {
88 const int w1 = c == 1 || c == 2 ? cw : w;88 const int w1 = c == 1 || c == 2 ? cw : w;
89 const int h1 = c == 1 || c == 2 ? ch : h;89 const int h1 = c == 1 || c == 2 ? ch : h;
90 90

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