aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>2010-03-05 00:50:13 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-03-05 00:50:13 +0000
commit4ef82b174a929c3cdce1c694810e8705dc51b320 (patch)
treeb918deb6cb2460ab10fee04f3dc3eec05ac6fbb4
parent8b6bdb6cf3908fdd1b162e3bade1d3fdb84ab1a5 (diff)
downloadffmpeg-4ef82b174a929c3cdce1c694810e8705dc51b320.tar.gz
Fix BGR cases missing from depth test in avcodec_get_pix_fmt_loss().
Patch by Janusz Krzysztofik: <${name initial}${surname less the final "ofik"}@tis.icnet.pl>. Originally committed as revision 22215 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/imgconvert.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index ea5914dba8..7f9593f8af 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -777,8 +777,10 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_
loss = 0;
pf = &pix_fmt_info[dst_pix_fmt];
if (pf->depth < ps->depth ||
- ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE) &&
- (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE)))
+ ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE ||
+ dst_pix_fmt == PIX_FMT_BGR555BE || dst_pix_fmt == PIX_FMT_BGR555LE) &&
+ (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE ||
+ src_pix_fmt == PIX_FMT_BGR565BE || src_pix_fmt == PIX_FMT_BGR565LE)))
loss |= FF_LOSS_DEPTH;
if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w ||
dst_desc->log2_chroma_h > src_desc->log2_chroma_h)