summaryrefslogtreecommitdiff
path: root/postproc/postprocess_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-01-05 19:10:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-01-05 19:10:42 +0000
commite9effafdf929571275dfd9efd30af7806bec1704 (patch)
treeed6973adff4fd84acb54da51c2014f695d0038fa /postproc/postprocess_template.c
parentf7b47594dca27fffed9d0314ac09ffc1316514b5 (diff)
YUV 411/422/444 support for pp
Originally committed as revision 8806 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/postprocess_template.c')
-rw-r--r--postproc/postprocess_template.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/postproc/postprocess_template.c b/postproc/postprocess_template.c
index 092d8c6626..df54e6f09c 100644
--- a/postproc/postprocess_template.c
+++ b/postproc/postprocess_template.c
@@ -2663,6 +2663,9 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int
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 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int
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 @@ static void RENAME(postProcess)(uint8_t src[], int srcStride, uint8_t dst[], int
#endif
if(isColor)
{
- QP= QPptr[x>>3];
- c.nonBQP= nonBQPptr[x>>3];
+ QP= QPptr[x>>qpHShift];
+ c.nonBQP= nonBQPptr[x>>qpHShift];
}
else
{