| @@ -115,16 +115,22 @@ AVFILTER_DEFINE_CLASS(extractplanes); · 114 unmodified lines |
| 115 | 115 | AV_PIX_FMT_YUV422P14##suf, \ |
| 116 | 116 | AV_PIX_FMT_YUV444P14##suf |
| 117 | 117 | |
| 118 | +#define FLOAT_FORMATS(suf) \ |
| 119 | + AV_PIX_FMT_GRAYF32##suf, \ |
| 120 | + AV_PIX_FMT_GBRPF32##suf, AV_PIX_FMT_GBRAPF32##suf \ |
| 121 | + |
| 118 | 122 | static int query_formats(AVFilterContext *ctx) |
| 119 | 123 | { |
| 120 | 124 | static const enum AVPixelFormat in_pixfmts_le[] = { |
| 121 | 125 | EIGHTBIT_FORMATS, |
| 122 | 126 | HIGHDEPTH_FORMATS(LE), |
| 127 | + FLOAT_FORMATS(LE), |
| 123 | 128 | AV_PIX_FMT_NONE, |
| 124 | 129 | }; |
| 125 | 130 | static const enum AVPixelFormat in_pixfmts_be[] = { |
| 126 | 131 | EIGHTBIT_FORMATS, |
| 127 | 132 | HIGHDEPTH_FORMATS(BE), |
| 133 | + FLOAT_FORMATS(BE), |
| 128 | 134 | AV_PIX_FMT_NONE, |
| 129 | 135 | }; |
| 130 | 136 | static const enum AVPixelFormat out8_pixfmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; |
| @@ -138,6 +144,8 @@ static int query_formats(AVFilterContext *ctx) · 7 unmodified lines |
| 138 | 144 | static const enum AVPixelFormat out14be_pixfmts[] = { AV_PIX_FMT_GRAY14BE, AV_PIX_FMT_NONE }; |
| 139 | 145 | static const enum AVPixelFormat out16le_pixfmts[] = { AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_NONE }; |
| 140 | 146 | static const enum AVPixelFormat out16be_pixfmts[] = { AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_NONE }; |
| 147 | + static const enum AVPixelFormat out32le_pixfmts[] = { AV_PIX_FMT_GRAYF32LE, AV_PIX_FMT_NONE }; |
| 148 | + static const enum AVPixelFormat out32be_pixfmts[] = { AV_PIX_FMT_GRAYF32BE, AV_PIX_FMT_NONE }; |
| 141 | 149 | const enum AVPixelFormat *out_pixfmts, *in_pixfmts; |
| 142 | 150 | const AVPixFmtDescriptor *desc; |
| 143 | 151 | AVFilterFormats *avff; |
| @@ -187,10 +195,14 @@ static int query_formats(AVFilterContext *ctx) · 43 unmodified lines |
| 187 | 195 | out_pixfmts = out14le_pixfmts; |
| 188 | 196 | else if (be && depth == 14) |
| 189 | 197 | out_pixfmts = out14be_pixfmts; |
| 190 | | − else if (be) |
| 198 | + else if (be && depth == 16) |
| 191 | 199 | out_pixfmts = out16be_pixfmts; |
| 192 | | − else |
| 200 | + else if (!be && depth == 16) |
| 193 | 201 | out_pixfmts = out16le_pixfmts; |
| 202 | + else if (be && depth == 32) |
| 203 | + out_pixfmts = out32be_pixfmts; |
| 204 | + else |
| 205 | + out_pixfmts = out32le_pixfmts; |
| 194 | 206 | |
| 195 | 207 | for (i = 0; i < ctx->nb_outputs; i++) |
| 196 | 208 | if ((ret = ff_formats_ref(ff_make_format_list(out_pixfmts), &ctx->outputs[i]->incfg.formats)) < 0) |