Mercurial > mplayer.hg
changeset 31085:22779f940406
blackfin: fix yuv422 to yuv420 conversion
The old code is correct only when stride = 2*width.
Patch by Ronaldo Moura <ronaldo d moura monity com br>
author | mru |
---|---|
date | Fri, 07 May 2010 21:59:18 +0000 |
parents | eb4576887140 |
children | cca95ca6f52b |
files | libswscale/bfin/internal_bfin.S |
diffstat | 1 files changed, 12 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/bfin/internal_bfin.S Fri May 07 18:27:46 2010 +0000 +++ b/libswscale/bfin/internal_bfin.S Fri May 07 21:59:18 2010 +0000 @@ -479,9 +479,6 @@ r1 = [fp + ARG_srcStride]; r2 = r0 + r1; - r1 += -8; // i0,i1 is pre read need to correct - m0 = r1; - i0 = r0; // uyvy_T even i1 = r2; // uyvy_B odd @@ -494,6 +491,12 @@ p4 = p4 >> 1; p5 = p5 >> 2; + r2 = r0 << 1; + r1 = r1 << 1; + r1 = r1 - r2; // srcStride + (srcStride - 2*width) + r1 += -8; // i0,i1 is pre read need to correct + m0 = r1; + r2 = [fp + ARG_chromStride]; r0 = r0 >> 1; r2 = r2 - r0; @@ -549,8 +552,6 @@ r1 = [fp + ARG_srcStride]; r2 = r0 + r1; - r1 += -8; // i0,i1 is pre read need to correct - m0 = r1; i0 = r0; // uyvy_T even i1 = r2; // uyvy_B odd @@ -564,6 +565,12 @@ p4 = p4 >> 1; p5 = p5 >> 2; + r2 = r0 << 1; + r1 = r1 << 1; + r1 = r1 - r2; // srcStride + (srcStride - 2*width) + r1 += -8; // i0,i1 is pre read need to correct + m0 = r1; + r2 = [fp + ARG_chromStride]; r0 = r0 >> 1; r2 = r2 - r0;