summaryrefslogtreecommitdiff
path: root/libswscale/bfin/internal_bfin.S
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-01-18 23:56:49 +0100
committerDiego Biurrun <diego@biurrun.de>2012-02-02 18:50:12 +0100
commit148bc235b0dbf5e3dcd12fc4480475008a719576 (patch)
treebbd6a3fe85fe7ab17ad90872bd8d6aaa3f9fced8 /libswscale/bfin/internal_bfin.S
parent3f57bde1f2a2538d46e1f26a1b0a773a89beaa67 (diff)
swscale: K&R formatting cosmetics for Blackfin code
Also prettyprint some comments in Assembly code.
Diffstat (limited to 'libswscale/bfin/internal_bfin.S')
-rw-r--r--libswscale/bfin/internal_bfin.S12
1 files changed, 6 insertions, 6 deletions
diff --git a/libswscale/bfin/internal_bfin.S b/libswscale/bfin/internal_bfin.S
index 9f985e7824..b007f07f53 100644
--- a/libswscale/bfin/internal_bfin.S
+++ b/libswscale/bfin/internal_bfin.S
@@ -30,11 +30,11 @@ and converts it to RGB565. R:5 bits, G:6 bits, B:5 bits.. packed into shorts.
The following calculation is used for the conversion:
- r = clipz((y-oy)*cy + crv*(v-128))
- g = clipz((y-oy)*cy + cgv*(v-128) + cgu*(u-128))
- b = clipz((y-oy)*cy + cbu*(u-128))
+ r = clipz((y - oy) * cy + crv * (v - 128))
+ g = clipz((y - oy) * cy + cgv * (v - 128) + cgu * (u - 128))
+ b = clipz((y - oy) * cy + cbu * (u - 128))
-y,u,v are prescaled by a factor of 4 i.e. left-shifted to gain precision.
+y, u, v are prescaled by a factor of 4 i.e. left-shifted to gain precision.
New factorization to eliminate the truncation error which was
@@ -47,7 +47,7 @@ occurring due to the byteop3p.
2) Scale operands up by a factor of 4 not 8 because Blackfin
multiplies include a shift.
-3) Compute into the accumulators cy*yx0, cy*yx1.
+3) Compute into the accumulators cy * yx0, cy * yx1.
4) Compute each of the linear equations:
r = clipz((y - oy) * cy + crv * (v - 128))
@@ -73,7 +73,7 @@ occurring due to the byteop3p.
Where coeffs have the following layout in memory.
-uint32_t oy,oc,zero,cy,crv,rmask,cbu,bmask,cgu,cgv;
+uint32_t oy, oc, zero, cy, crv, rmask, cbu, bmask, cgu, cgv;
coeffs is a pointer to oy.