Mercurial > libavcodec.hg
comparison imgconvert.c @ 11365:eb03ee2f7781 libavcodec
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>.
author | stefano |
---|---|
date | Fri, 05 Mar 2010 00:50:13 +0000 |
parents | ad0ea9f21f9a |
children | 3f231ba93f80 |
comparison
equal
deleted
inserted
replaced
11364:4b64693d115d | 11365:eb03ee2f7781 |
---|---|
775 | 775 |
776 /* compute loss */ | 776 /* compute loss */ |
777 loss = 0; | 777 loss = 0; |
778 pf = &pix_fmt_info[dst_pix_fmt]; | 778 pf = &pix_fmt_info[dst_pix_fmt]; |
779 if (pf->depth < ps->depth || | 779 if (pf->depth < ps->depth || |
780 ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE) && | 780 ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE || |
781 (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE))) | 781 dst_pix_fmt == PIX_FMT_BGR555BE || dst_pix_fmt == PIX_FMT_BGR555LE) && |
782 (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE || | |
783 src_pix_fmt == PIX_FMT_BGR565BE || src_pix_fmt == PIX_FMT_BGR565LE))) | |
782 loss |= FF_LOSS_DEPTH; | 784 loss |= FF_LOSS_DEPTH; |
783 if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w || | 785 if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w || |
784 dst_desc->log2_chroma_h > src_desc->log2_chroma_h) | 786 dst_desc->log2_chroma_h > src_desc->log2_chroma_h) |
785 loss |= FF_LOSS_RESOLUTION; | 787 loss |= FF_LOSS_RESOLUTION; |
786 switch(pf->color_type) { | 788 switch(pf->color_type) { |