summaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_kerndeint.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-01-05 14:40:06 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-01-05 14:40:06 +0100
commit6a9af925654ce91d100443c9f69b1d825c72a16f (patch)
treeedeb2d2e1860a998ae219fdafda0401442f699e8 /libavfilter/vf_kerndeint.c
parent860b5c0a631a8b751affde38d5aa1cbaca7a4047 (diff)
downloadffmpeg-streaming-6a9af925654ce91d100443c9f69b1d825c72a16f.zip
ffmpeg-streaming-6a9af925654ce91d100443c9f69b1d825c72a16f.tar.gz
Allow remaining 32bit RGB packed pix_fmts in kerndeint filter.
Reviewed-by: Stefano Sabatini
Diffstat (limited to 'libavfilter/vf_kerndeint.c')
-rw-r--r--libavfilter/vf_kerndeint.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c
index c97df45..6cd9bc2 100644
--- a/libavfilter/vf_kerndeint.c
+++ b/libavfilter/vf_kerndeint.c
@@ -82,7 +82,10 @@ static int query_formats(AVFilterContext *ctx)
static const enum PixelFormat pix_fmts[] = {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUYV422,
- AV_PIX_FMT_ARGB,
+ AV_PIX_FMT_ARGB, AV_PIX_FMT_0RGB,
+ AV_PIX_FMT_ABGR, AV_PIX_FMT_0BGR,
+ AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB0,
+ AV_PIX_FMT_BGRA, AV_PIX_FMT_BGR0,
AV_PIX_FMT_NONE
};
@@ -200,10 +203,11 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic)
(abs((int)prvp[x] - (int)srcp[x]) > thresh) ||
(abs((int)prvpp[x] - (int)srcpp[x]) > thresh) ||
(abs((int)prvpn[x] - (int)srcpn[x]) > thresh)) {
+ int is_packed_rgb = av_pix_fmt_desc_get(inlink->format)->flags & PIX_FMT_RGB;
if (map) {
g = x & ~3;
- if (inlink->format == AV_PIX_FMT_ARGB) {
+ if (is_packed_rgb) {
AV_WB32(dstp + g, 0xffffffff);
x = g + 3;
} else if (inlink->format == AV_PIX_FMT_YUYV422) {
@@ -214,7 +218,7 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpic)
dstp[x] = plane == 0 ? 235 : 128;
}
} else {
- if (inlink->format == AV_PIX_FMT_ARGB) {
+ if (is_packed_rgb) {
hi = 255;
lo = 0;
} else if (inlink->format == AV_PIX_FMT_YUYV422) {
OpenPOWER on IntegriCloud