From 148bc235b0dbf5e3dcd12fc4480475008a719576 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 18 Jan 2012 23:56:49 +0100 Subject: swscale: K&R formatting cosmetics for Blackfin code Also prettyprint some comments in Assembly code. --- libswscale/bfin/internal_bfin.S | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libswscale/bfin/internal_bfin.S') 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. -- cgit v1.2.3