History

avfilter/vf_maskedminmax: add float pixel formats

Paul B Mahol committed 4 years ago

Commit ebcde3f1 parent b7dc07c1 file · +6 −1Browse files

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

Unified · Split

libavfilter/vf_maskedminmax.c+6−1
@@ -82,6 +82,7 @@ static const enum AVPixelFormat pix_fmts[] = { · 81 unmodified lines
8282 AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
8383 AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
8484 AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, AV_PIX_FMT_GRAY16,
85+ AV_PIX_FMT_GRAYF32, AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32,
8586 AV_PIX_FMT_NONE
8687 };
8788
@@ -103,6 +104,8 @@ MASKED(min8, uint8_t, <) · 15 unmodified lines
103104 MASKED(max8, uint8_t, >)
104105 MASKED(min16, uint16_t, <)
105106 MASKED(max16, uint16_t, >)
107+MASKED(min32, float, <)
108+MASKED(max32, float, >)
106109
107110 static int config_input(AVFilterLink *inlink)
108111 {
@@ -127,8 +130,10 @@ static int config_input(AVFilterLink *inlink) · 18 unmodified lines
127130
128131 if (desc->comp[0].depth == 8)
129132 s->maskedminmax = s->maskedmin ? maskedmin8 : maskedmax8;
130− else
133+ else if (desc->comp[0].depth <= 16)
131134 s->maskedminmax = s->maskedmin ? maskedmin16 : maskedmax16;
135+ else
136+ s->maskedminmax = s->maskedmin ? maskedmin32 : maskedmax32;
132137
133138 return 0;
134139 }

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