Mercurial > mplayer.hg
comparison libswscale/utils.c @ 30377:2eea1f09e2c5
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.
author | stefano |
---|---|
date | Sun, 24 Jan 2010 12:55:05 +0000 |
parents | a8c94e9dc653 |
children | 0bc34f21039e |
comparison
equal
deleted
inserted
replaced
30376:3365a4658320 | 30377:2eea1f09e2c5 |
---|---|
852 c->lumXInc= ((srcW<<16) + (dstW>>1))/dstW; | 852 c->lumXInc= ((srcW<<16) + (dstW>>1))/dstW; |
853 c->lumYInc= ((srcH<<16) + (dstH>>1))/dstH; | 853 c->lumYInc= ((srcH<<16) + (dstH>>1))/dstH; |
854 c->flags= flags; | 854 c->flags= flags; |
855 c->dstFormat= dstFormat; | 855 c->dstFormat= dstFormat; |
856 c->srcFormat= srcFormat; | 856 c->srcFormat= srcFormat; |
857 c->dstFormatBpp = av_get_bits_per_pixel(&av_pix_fmt_descriptors[dstFormat]); | |
858 c->srcFormatBpp = av_get_bits_per_pixel(&av_pix_fmt_descriptors[srcFormat]); | |
857 c->vRounder= 4* 0x0001000100010001ULL; | 859 c->vRounder= 4* 0x0001000100010001ULL; |
858 | 860 |
859 usesHFilter= usesVFilter= 0; | 861 usesHFilter= usesVFilter= 0; |
860 if (dstFilter->lumV && dstFilter->lumV->length>1) usesVFilter=1; | 862 if (dstFilter->lumV && dstFilter->lumV->length>1) usesVFilter=1; |
861 if (dstFilter->lumH && dstFilter->lumH->length>1) usesHFilter=1; | 863 if (dstFilter->lumH && dstFilter->lumH->length>1) usesHFilter=1; |