aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/utils.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-24 12:55:05 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2010-01-24 12:55:05 +0000
commit30b6147521a3b2a9df4a4094ccee65a5fd8bc18f (patch)
treef3435c0c3c7df45cd01b8b4889d37f8259793dcb /libswscale/utils.c
parent59398ea9c0ffb22dc1038fba2d3aa72a414ab615 (diff)
downloadffmpeg-30b6147521a3b2a9df4a4094ccee65a5fd8bc18f.tar.gz
Use av_get_bits_per_pixel() for computing the bits per pixel of the
source and destination format, cache those values in the newly added SwsContext:srcFormatBpp and SwsContext:dstFormatBpp fields, and remove the fmt_depth() function. Originally committed as revision 30419 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale/utils.c')
-rw-r--r--libswscale/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index b2347087b2..512b23f043 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -854,6 +854,8 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
c->flags= flags;
c->dstFormat= dstFormat;
c->srcFormat= srcFormat;
+ c->dstFormatBpp = av_get_bits_per_pixel(&av_pix_fmt_descriptors[dstFormat]);
+ c->srcFormatBpp = av_get_bits_per_pixel(&av_pix_fmt_descriptors[srcFormat]);
c->vRounder= 4* 0x0001000100010001ULL;
usesHFilter= usesVFilter= 0;