~ubuntu-branches/ubuntu/saucy/gst-libav1.0/saucy-proposed

« back to all changes in this revision

Viewing changes to gst-libs/ext/libav/libswscale/bfin/internal_bfin.S

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2013-07-30 09:00:15 UTC
  • mfrom: (1.1.16) (7.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20130730090015-sc1ou2yssu7q5w4e
Tags: 1.1.3-1
* New upstream development snapshot:
  + debian/control:
    - Build depend on GStreamer and gst-plugins-base >= 1.1.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
The following calculation is used for the conversion:
32
32
 
33
 
  r = clipz((y-oy)*cy  + crv*(v-128))
34
 
  g = clipz((y-oy)*cy  + cgv*(v-128) + cgu*(u-128))
35
 
  b = clipz((y-oy)*cy  + cbu*(u-128))
 
33
  r = clipz((y - oy) * cy  + crv * (v - 128))
 
34
  g = clipz((y - oy) * cy  + cgv * (v - 128) + cgu * (u - 128))
 
35
  b = clipz((y - oy) * cy  + cbu * (u - 128))
36
36
 
37
 
y,u,v are prescaled by a factor of 4 i.e. left-shifted to gain precision.
 
37
y, u, v are prescaled by a factor of 4 i.e. left-shifted to gain precision.
38
38
 
39
39
 
40
40
New factorization to eliminate the truncation error which was
47
47
2) Scale operands up by a factor of 4 not 8 because Blackfin
48
48
   multiplies include a shift.
49
49
 
50
 
3) Compute into the accumulators cy*yx0, cy*yx1.
 
50
3) Compute into the accumulators cy * yx0, cy * yx1.
51
51
 
52
52
4) Compute each of the linear equations:
53
53
     r = clipz((y - oy) * cy  + crv * (v - 128))
73
73
 
74
74
Where coeffs have the following layout in memory.
75
75
 
76
 
uint32_t oy,oc,zero,cy,crv,rmask,cbu,bmask,cgu,cgv;
 
76
uint32_t oy, oc, zero, cy, crv, rmask, cbu, bmask, cgu, cgv;
77
77
 
78
78
coeffs is a pointer to oy.
79
79