You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.7KB

  1. /*
  2. * Blackfin Pixel Operations
  3. * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com>
  4. *
  5. * This file is part of FFmpeg.
  6. *
  7. * FFmpeg is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU Lesser General Public
  9. * License as published by the Free Software Foundation; either
  10. * version 2.1 of the License, or (at your option) any later version.
  11. *
  12. * FFmpeg is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * Lesser General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU Lesser General Public
  18. * License along with FFmpeg; if not, write to the Free Software
  19. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  20. */
  21. #include "libavutil/bfin/asm.h"
  22. DEFUN(put_pixels8uc_no_rnd,mL1,
  23. (uint8_t *block, const uint8_t *s0, const uint8_t *s1,
  24. int line_size, int h)):
  25. i3=r0; // dest
  26. i0=r1; // src0
  27. i1=r2; // src1
  28. r2=[sp+12]; // line_size
  29. p0=[sp+16]; // h
  30. [--sp] = (r7:6);
  31. r2+=-4;
  32. m3=r2;
  33. r2+=-4;
  34. m0=r2;
  35. LSETUP(pp8$2,pp8$3) LC0=P0;
  36. DISALGNEXCPT || R0 = [I0++] || R2 =[I1++];
  37. pp8$2: DISALGNEXCPT || R1 = [I0++] || R3 =[I1++];
  38. R6 = BYTEOP1P(R1:0,R3:2)(T) || R0 = [I0++M0]|| R2 =[I1++M0];
  39. R7 = BYTEOP1P(R1:0,R3:2)(T,R) || R0 = [I0++] || [I3++] = R6 ;
  40. pp8$3: DISALGNEXCPT || R2 = [I1++] || [I3++M3] = R7;
  41. (r7:6) = [sp++];
  42. RTS;
  43. DEFUN_END(put_pixels8uc_no_rnd)
  44. DEFUN(put_pixels16uc_no_rnd,mL1,
  45. (uint8_t *block, const uint8_t *s0, const uint8_t *s1,
  46. int line_size, int h)):
  47. i3=r0; // dest
  48. i0=r1; // src0
  49. i1=r2; // src1
  50. r2=[sp+12]; // line_size
  51. p0=[sp+16]; // h
  52. [--sp] = (r7:6);
  53. r2+=-12;
  54. m3=r2; // line_size
  55. r2+=-4;
  56. m0=r2;
  57. LSETUP(pp16$2,pp16$3) LC0=P0;
  58. DISALGNEXCPT || R0 = [I0++] || R2 =[I1++];
  59. pp16$2:
  60. DISALGNEXCPT || R1 = [I0++] || R3 =[I1++];
  61. R6 = BYTEOP1P(R1:0,R3:2)(T) || R0 = [I0++] || R2 =[I1++];
  62. R7 = BYTEOP1P(R1:0,R3:2)(T,R) || R1 = [I0++] || R3 =[I1++];
  63. [I3++] = R6;
  64. R6 = BYTEOP1P(R1:0,R3:2)(T) || R0 = [I0++M0] || R2 =[I1++M0];
  65. R7 = BYTEOP1P(R1:0,R3:2)(T,R) || R0 = [I0++] || [I3++] = R7 ;
  66. [I3++] = R6;
  67. pp16$3: DISALGNEXCPT || R2 = [I1++] || [I3++M3] = R7;
  68. (r7:6) = [sp++];
  69. RTS;
  70. DEFUN_END(put_pixels16uc_no_rnd)