Mercurial > mplayer.hg
diff postproc/postprocess_template.c @ 8805:e547ce712577
YUV 411/422/444 support for pp
author | michael |
---|---|
date | Sun, 05 Jan 2003 19:10:42 +0000 |
parents | 809adad85bbc |
children | 8b2dde0dccf6 |
line wrap: on
line diff
--- a/postproc/postprocess_template.c Sun Jan 05 16:44:44 2003 +0000 +++ b/postproc/postprocess_template.c Sun Jan 05 19:10:42 2003 +0000 @@ -2663,6 +2663,9 @@ int i; #endif + const int qpHShift= isColor ? 4-c.hChromaSubSample : 4; + const int qpVShift= isColor ? 4-c.vChromaSubSample : 4; + //FIXME remove uint64_t * const yHistogram= c.yHistogram; uint8_t * const tempSrc= c.tempSrc; @@ -2846,8 +2849,8 @@ uint8_t *tempBlock1= c.tempBlocks; uint8_t *tempBlock2= c.tempBlocks + 8; #endif - int8_t *QPptr= isColor ? &QPs[(y>>3)*QPStride] :&QPs[(y>>4)*QPStride]; - int8_t *nonBQPptr= isColor ? &c.nonBQPTable[(y>>3)*mbWidth] :&c.nonBQPTable[(y>>4)*mbWidth]; + int8_t *QPptr= &QPs[(y>>qpVShift)*QPStride]; + int8_t *nonBQPptr= &c.nonBQPTable[(y>>qpVShift)*mbWidth]; int QP=0; /* can we mess with a 8x16 block from srcBlock/dstBlock downwards and 1 line upwards if not than use a temporary buffer */ @@ -2886,8 +2889,8 @@ #endif if(isColor) { - QP= QPptr[x>>3]; - c.nonBQP= nonBQPptr[x>>3]; + QP= QPptr[x>>qpHShift]; + c.nonBQP= nonBQPptr[x>>qpHShift]; } else {