diff options
author | Pedro Arthur <bygrandao@gmail.com> | 2015-09-04 18:11:21 -0300 |
---|---|---|
committer | Pedro Arthur <bygrandao@gmail.com> | 2015-09-04 19:00:20 -0300 |
commit | 3059562aa19a576bdf900a4875c1aa69ef69c86e (patch) | |
tree | 93638cfb4d090e600626060865a89b2e25b75ddb /libswscale/swscale.c | |
parent | f67aff3ad7168b0721e7e5ba05858d885966534a (diff) | |
download | ffmpeg-streaming-3059562aa19a576bdf900a4875c1aa69ef69c86e.zip ffmpeg-streaming-3059562aa19a576bdf900a4875c1aa69ef69c86e.tar.gz |
swscale: re-enable gamma
+added gamma conversion to refactored code
Diffstat (limited to 'libswscale/swscale.c')
-rw-r--r-- | libswscale/swscale.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 4008210..e9e4f62 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -379,7 +379,7 @@ static int swscale(SwsContext *c, const uint8_t *src[], int chrBufIndex = c->chrBufIndex; int lastInLumBuf = c->lastInLumBuf; int lastInChrBuf = c->lastInChrBuf; -// int perform_gamma = c->is_internal_gamma; + int perform_gamma = c->is_internal_gamma; #ifdef NEW_FILTER int lumStart = 0; @@ -392,9 +392,10 @@ static int swscale(SwsContext *c, const uint8_t *src[], SwsSlice *hout_slice = &c->slice[c->numSlice-2]; SwsSlice *vout_slice = &c->slice[c->numSlice-1]; SwsFilterDescriptor *desc = c->desc; -#endif + int hasLumHoles = 1; int hasChrHoles = 1; +#endif #ifndef NEW_FILTER if (!usePal(c->srcFormat)) { @@ -612,8 +613,8 @@ static int swscale(SwsContext *c, const uint8_t *src[], av_assert0(lastInLumBuf + 1 - srcSliceY < srcSliceH); av_assert0(lastInLumBuf + 1 - srcSliceY >= 0); - //if (perform_gamma) - // gamma_convert((uint8_t **)src1, srcW, c->inv_gamma); + if (perform_gamma) + gamma_convert((uint8_t **)src1, srcW, c->inv_gamma); hyscale(c, lumPixBuf[lumBufIndex], dstW, src1, srcW, lumXInc, hLumFilter, hLumFilterPos, hLumFilterSize, @@ -783,9 +784,9 @@ static int swscale(SwsContext *c, const uint8_t *src[], chrUSrcPtr, chrVSrcPtr, vChrFilterSize, alpSrcPtr, dest, dstW, dstY); } + if (perform_gamma) + gamma_convert(dest, dstW, c->gamma); #endif - //if (perform_gamma) - // gamma_convert(dest, dstW, c->gamma); } } if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf) { |