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
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user