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