Commit bac508fe authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add support for GRAY9 and GBRAP10

parent 86222a7e
...@@ -80,6 +80,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -80,6 +80,7 @@ static int query_formats(AVFilterContext *ctx)
{ {
static const enum AVPixelFormat pixel_fmts[] = { static const enum AVPixelFormat pixel_fmts[] = {
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8,
AV_PIX_FMT_GRAY9,
AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY10,
AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY12,
AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY16,
......
...@@ -241,8 +241,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -241,8 +241,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -63,7 +63,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -63,7 +63,7 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV444P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV444P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV420P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -104,8 +104,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -104,8 +104,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -94,7 +94,7 @@ AVFILTER_DEFINE_CLASS(deflicker); ...@@ -94,7 +94,7 @@ AVFILTER_DEFINE_CLASS(deflicker);
static int query_formats(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx)
{ {
static const enum AVPixelFormat pixel_fmts[] = { static const enum AVPixelFormat pixel_fmts[] = {
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10,
AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P,
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P,
......
...@@ -201,8 +201,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -201,8 +201,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -88,7 +88,7 @@ static const enum AVPixelFormat levels_in_pix_fmts[] = { ...@@ -88,7 +88,7 @@ static const enum AVPixelFormat levels_in_pix_fmts[] = {
AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10,
AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV440P12, AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV440P12,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP,
AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY8,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
...@@ -125,7 +125,7 @@ static const enum AVPixelFormat levels_out_rgb9_pix_fmts[] = { ...@@ -125,7 +125,7 @@ static const enum AVPixelFormat levels_out_rgb9_pix_fmts[] = {
}; };
static const enum AVPixelFormat levels_out_rgb10_pix_fmts[] = { static const enum AVPixelFormat levels_out_rgb10_pix_fmts[] = {
AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
...@@ -200,7 +200,9 @@ static int config_input(AVFilterLink *inlink) ...@@ -200,7 +200,9 @@ static int config_input(AVFilterLink *inlink)
h->mult = h->histogram_size / 256; h->mult = h->histogram_size / 256;
switch (inlink->format) { switch (inlink->format) {
case AV_PIX_FMT_GBRAP12:
case AV_PIX_FMT_GBRP12: case AV_PIX_FMT_GBRP12:
case AV_PIX_FMT_GBRAP10:
case AV_PIX_FMT_GBRP10: case AV_PIX_FMT_GBRP10:
case AV_PIX_FMT_GBRP9: case AV_PIX_FMT_GBRP9:
case AV_PIX_FMT_GBRAP: case AV_PIX_FMT_GBRAP:
......
...@@ -78,8 +78,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -78,8 +78,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -80,8 +80,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -80,8 +80,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -130,6 +130,7 @@ static av_cold void uninit(AVFilterContext *ctx) ...@@ -130,6 +130,7 @@ static av_cold void uninit(AVFilterContext *ctx)
AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGBA64LE, \ AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGBA64LE, \
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, \ AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, \
AV_PIX_FMT_GBRP9LE, AV_PIX_FMT_GBRP10LE, \ AV_PIX_FMT_GBRP9LE, AV_PIX_FMT_GBRP10LE, \
AV_PIX_FMT_GBRAP10LE, \
AV_PIX_FMT_GBRP12LE, AV_PIX_FMT_GBRP14LE, \ AV_PIX_FMT_GBRP12LE, AV_PIX_FMT_GBRP14LE, \
AV_PIX_FMT_GBRP16LE, AV_PIX_FMT_GBRAP12LE, \ AV_PIX_FMT_GBRP16LE, AV_PIX_FMT_GBRAP12LE, \
AV_PIX_FMT_GBRAP16LE AV_PIX_FMT_GBRAP16LE
......
...@@ -110,8 +110,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -110,8 +110,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA420P10, AV_PIX_FMT_YUVA422P10, AV_PIX_FMT_YUVA444P10,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP12,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -77,8 +77,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -77,8 +77,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -55,8 +55,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -55,8 +55,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -66,7 +66,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -66,7 +66,7 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P,
AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12,
AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9,
AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV420P12, AV_PIX_FMT_YUV422P12, AV_PIX_FMT_YUV444P12,
......
...@@ -65,7 +65,7 @@ static int query_formats(AVFilterContext *ctx) ...@@ -65,7 +65,7 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUV444P16, AV_PIX_FMT_YUV444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
...@@ -406,6 +406,7 @@ static int process_frame(FFFrameSync *fs) ...@@ -406,6 +406,7 @@ static int process_frame(FFFrameSync *fs)
case AV_PIX_FMT_GRAY8: case AV_PIX_FMT_GRAY8:
s->premultiply[0] = limited ? unpremultiply8offset : unpremultiply8; s->premultiply[0] = limited ? unpremultiply8offset : unpremultiply8;
break; break;
case AV_PIX_FMT_GRAY9:
case AV_PIX_FMT_GRAY10: case AV_PIX_FMT_GRAY10:
case AV_PIX_FMT_GRAY12: case AV_PIX_FMT_GRAY12:
case AV_PIX_FMT_GRAY16: case AV_PIX_FMT_GRAY16:
...@@ -443,6 +444,7 @@ static int process_frame(FFFrameSync *fs) ...@@ -443,6 +444,7 @@ static int process_frame(FFFrameSync *fs)
case AV_PIX_FMT_GRAY8: case AV_PIX_FMT_GRAY8:
s->premultiply[0] = limited ? premultiply8offset : premultiply8; s->premultiply[0] = limited ? premultiply8offset : premultiply8;
break; break;
case AV_PIX_FMT_GRAY9:
case AV_PIX_FMT_GRAY10: case AV_PIX_FMT_GRAY10:
case AV_PIX_FMT_GRAY12: case AV_PIX_FMT_GRAY12:
case AV_PIX_FMT_GRAY16: case AV_PIX_FMT_GRAY16:
......
...@@ -252,7 +252,7 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -252,7 +252,7 @@ static av_cold int init(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx)
{ {
static const enum AVPixelFormat pix_fmts[] = { static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
#define PF_NOALPHA(suf) AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf #define PF_NOALPHA(suf) AV_PIX_FMT_YUV420##suf, AV_PIX_FMT_YUV422##suf, AV_PIX_FMT_YUV444##suf
#define PF_ALPHA(suf) AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf #define PF_ALPHA(suf) AV_PIX_FMT_YUVA420##suf, AV_PIX_FMT_YUVA422##suf, AV_PIX_FMT_YUVA444##suf
#define PF(suf) PF_NOALPHA(suf), PF_ALPHA(suf) #define PF(suf) PF_NOALPHA(suf), PF_ALPHA(suf)
......
...@@ -83,6 +83,9 @@ static int query_formats(AVFilterContext *ctx) ...@@ -83,6 +83,9 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48, AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48,
AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64, AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9,
AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12,
AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
static const enum AVPixelFormat map_fmts[] = { static const enum AVPixelFormat map_fmts[] = {
......
...@@ -352,7 +352,7 @@ static av_cold int init(AVFilterContext *ctx) ...@@ -352,7 +352,7 @@ static av_cold int init(AVFilterContext *ctx)
static int query_formats(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx)
{ {
static const enum AVPixelFormat pix_fmts[] = { static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10,
AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P,
AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
......
...@@ -79,8 +79,8 @@ static int query_formats(AVFilterContext *ctx) ...@@ -79,8 +79,8 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16, AV_PIX_FMT_YUVA420P16, AV_PIX_FMT_YUVA422P16, AV_PIX_FMT_YUVA444P16,
AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRAP10, AV_PIX_FMT_GBRAP12 , AV_PIX_FMT_GBRAP16,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10,
AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY16,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
......
...@@ -154,7 +154,7 @@ static const enum AVPixelFormat out_rgb9_pix_fmts[] = { ...@@ -154,7 +154,7 @@ static const enum AVPixelFormat out_rgb9_pix_fmts[] = {
}; };
static const enum AVPixelFormat out_rgb10_pix_fmts[] = { static const enum AVPixelFormat out_rgb10_pix_fmts[] = {
AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
...@@ -169,7 +169,7 @@ static const enum AVPixelFormat in1_pix_fmts[] = { ...@@ -169,7 +169,7 @@ static const enum AVPixelFormat in1_pix_fmts[] = {
AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA444P10, AV_PIX_FMT_YUVA444P9, AV_PIX_FMT_YUVA444P10,
AV_PIX_FMT_YUV444P12, AV_PIX_FMT_YUV444P12,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP,
AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
...@@ -181,7 +181,7 @@ static const enum AVPixelFormat in2_pix_fmts[] = { ...@@ -181,7 +181,7 @@ static const enum AVPixelFormat in2_pix_fmts[] = {
AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUVJ411P, AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUVJ411P,
AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV410P,
AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_GBRP,
AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRAP10,
AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12,
AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9, AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9,
AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10,
......
...@@ -3,6 +3,7 @@ argb 4f575be3cd02799389f581df99c4de38 ...@@ -3,6 +3,7 @@ argb 4f575be3cd02799389f581df99c4de38
bgr24 fa43e3b2abfde8d9e60e157a9acc553d bgr24 fa43e3b2abfde8d9e60e157a9acc553d
bgra 4e2e689897ee7a8e42b16234597bab35 bgra 4e2e689897ee7a8e42b16234597bab35
gbrap 0d1eb2c39e291c53c57302cdc653c2fc gbrap 0d1eb2c39e291c53c57302cdc653c2fc
gbrap10le fed58af6d557a7069a4a39e6d8f5f4e0
gbrap12le 43fec231bd1d3dd957cdd8478cab9259 gbrap12le 43fec231bd1d3dd957cdd8478cab9259
gbrap16le 22ca3644658ae306541116c31e135074 gbrap16le 22ca3644658ae306541116c31e135074
gbrp e572d53183f3f2ed3951aa9940d440a1 gbrp e572d53183f3f2ed3951aa9940d440a1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment