diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-18 17:43:10 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-18 17:43:10 +0100 |
commit | 4a06215c1aabad58151601ec4803518bcb3f6e5e (patch) | |
tree | 1d8643b1f95703751aa03968bd2bbeb104d2f410 /libavfilter/vf_spp.c | |
parent | 3ff8ef62bbb9412322be3b20135794c52d582b8e (diff) | |
download | ffmpeg-4a06215c1aabad58151601ec4803518bcb3f6e5e.tar.gz |
avfilter/vf_spp: add gray8 support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_spp.c')
-rw-r--r-- | libavfilter/vf_spp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index d1f60b3ed0..4cfdc489de 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -321,6 +321,7 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV420P10, + AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); @@ -421,8 +422,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) } filter(spp, out->data[0], in->data[0], out->linesize[0], in->linesize[0], inlink->w, inlink->h, qp_table, qp_stride, 1, sample_bytes); - filter(spp, out->data[1], in->data[1], out->linesize[1], in->linesize[1], cw, ch, qp_table, qp_stride, 0, sample_bytes); - filter(spp, out->data[2], in->data[2], out->linesize[2], in->linesize[2], cw, ch, qp_table, qp_stride, 0, sample_bytes); + + if (out->data[2]) { + filter(spp, out->data[1], in->data[1], out->linesize[1], in->linesize[1], cw, ch, qp_table, qp_stride, 0, sample_bytes); + filter(spp, out->data[2], in->data[2], out->linesize[2], in->linesize[2], cw, ch, qp_table, qp_stride, 0, sample_bytes); + } emms_c(); } } |