summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/yuv2rgb_arm2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb_arm2.c b/noncore/multimedia/opieplayer2/yuv2rgb_arm2.c
index cbd32e8..91cd0b1 100644
--- a/noncore/multimedia/opieplayer2/yuv2rgb_arm2.c
+++ b/noncore/multimedia/opieplayer2/yuv2rgb_arm2.c
@@ -23,96 +23,97 @@
23 * project. 23 * project.
24 * In order to improve performance, by strongly reducing memory bandwidth 24 * In order to improve performance, by strongly reducing memory bandwidth
25 * needed, the scaling functions are merged with the yuv2rgb function. 25 * needed, the scaling functions are merged with the yuv2rgb function.
26 */ 26 */
27 27
28#ifdef __arm__ 28#ifdef __arm__
29 29
30#include <stdio.h> 30#include <stdio.h>
31#include <stdlib.h> 31#include <stdlib.h>
32#include <string.h> 32#include <string.h>
33#include <inttypes.h> 33#include <inttypes.h>
34 34
35#include "yuv2rgb.h" 35#include "yuv2rgb.h"
36#include <xine/xineutils.h> 36#include <xine/xineutils.h>
37 37
38/* Prototypes of the "local" functions available here: */ 38/* Prototypes of the "local" functions available here: */
39/* first prototype, function called when no scaling is needed: */ 39/* first prototype, function called when no scaling is needed: */
40static void arm_rgb16_noscale(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*); 40static void arm_rgb16_noscale(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*);
41/* second prototype, function called when no horizontal scaling is needed: */ 41/* second prototype, function called when no horizontal scaling is needed: */
42static void arm_rgb16_step_dx_32768(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*); 42static void arm_rgb16_step_dx_32768(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*);
43/* third prototype, function called when scaling is needed for zooming in: */ 43/* third prototype, function called when scaling is needed for zooming in: */
44static void arm_rgb16_step_dx_inf_32768(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*); 44static void arm_rgb16_step_dx_inf_32768(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*);
45/* fourth prototype, function called when scaling is needed for zooming out (between 1x and 2x): */ 45/* fourth prototype, function called when scaling is needed for zooming out (between 1x and 2x): */
46static void arm_rgb16_step_dx_bet_32768_65536(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*); 46static void arm_rgb16_step_dx_bet_32768_65536(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*);
47/* fifth prototype, function called when scaling is needed for zooming out (greater than 2x): */ 47/* fifth prototype, function called when scaling is needed for zooming out (greater than 2x): */
48static void arm_rgb16_step_dx_sup_65536(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*); 48static void arm_rgb16_step_dx_sup_65536(yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*);
49/* sixth prototype, function where the decision of the scaling function to use is made.*/ 49/* sixth prototype, function where the decision of the scaling function to use is made.*/
50static void arm_rgb16_2 (yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*); 50static void arm_rgb16_2 (yuv2rgb_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*);
51 51
52 52
53 53
54 54
55/* extern function: */ 55/* extern function: */
56 56
57/* Function: */ 57/* Function: */
58void yuv2rgb_init_arm (yuv2rgb_factory_t *this) 58void yuv2rgb_init_arm (yuv2rgb_factory_t *this)
59/* This function initialise the member yuv2rgb_fun, if everything is right 59/* This function initialise the member yuv2rgb_fun, if everything is right
60the function optimised for the arm target should be used.*/ 60the function optimised for the arm target should be used.*/
61 { 61 {
62 if (this->swapped) 62 if (this->swapped)
63 return; /*no swapped pixel output upto now*/ 63 return; /*no swapped pixel output upto now*/
64 64
65 switch (this->mode) 65 switch (this->mode)
66 { 66 {
67 case MODE_16_RGB: 67 case MODE_16_RGB:
68 this->yuv2rgb_fun = arm_rgb16_2; 68 this->yuv2rgb_fun = arm_rgb16_2;
69 break; 69 break;
70 default: 70 default:
71 break;
71 } 72 }
72 } 73 }
73 74
74 75
75 76
76/* local functions: */ 77/* local functions: */
77 78
78/* Function: */ 79/* Function: */
79static void arm_rgb16_2 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _py, uint8_t * _pu, uint8_t * _pv) 80static void arm_rgb16_2 (yuv2rgb_t *this, uint8_t * _dst, uint8_t * _py, uint8_t * _pu, uint8_t * _pv)
80/* This function takes care of applying the right scaling conversion 81/* This function takes care of applying the right scaling conversion
81(yuv2rgb is included in each scaling function!)*/ 82(yuv2rgb is included in each scaling function!)*/
82 { 83 {
83 if (!this->do_scale) 84 if (!this->do_scale)
84 { 85 {
85 arm_rgb16_noscale(this, _dst, _py, _pu, _pv); 86 arm_rgb16_noscale(this, _dst, _py, _pu, _pv);
86 return; 87 return;
87 } 88 }
88 if (this->step_dx<32768) 89 if (this->step_dx<32768)
89 { 90 {
90 arm_rgb16_step_dx_inf_32768(this, _dst, _py, _pu, _pv); 91 arm_rgb16_step_dx_inf_32768(this, _dst, _py, _pu, _pv);
91 return; 92 return;
92 } 93 }
93 if (this->step_dx==32768) 94 if (this->step_dx==32768)
94 { 95 {
95 arm_rgb16_step_dx_32768(this, _dst, _py, _pu, _pv); 96 arm_rgb16_step_dx_32768(this, _dst, _py, _pu, _pv);
96 return; 97 return;
97 } 98 }
98 if (this->step_dx<65536) 99 if (this->step_dx<65536)
99 { 100 {
100 arm_rgb16_step_dx_bet_32768_65536(this, _dst, _py, _pu, _pv); 101 arm_rgb16_step_dx_bet_32768_65536(this, _dst, _py, _pu, _pv);
101 return; 102 return;
102 } 103 }
103 arm_rgb16_step_dx_sup_65536(this, _dst, _py, _pu, _pv); 104 arm_rgb16_step_dx_sup_65536(this, _dst, _py, _pu, _pv);
104 return; 105 return;
105 } 106 }
106 107
107 108
108/* Function: */ 109/* Function: */
109static void arm_rgb16_noscale(yuv2rgb_t *this, uint8_t * _dst, uint8_t * _py, uint8_t * _pu, uint8_t * _pv) 110static void arm_rgb16_noscale(yuv2rgb_t *this, uint8_t * _dst, uint8_t * _py, uint8_t * _pu, uint8_t * _pv)
110/* This function is called when the source and the destination pictures have the same size. 111/* This function is called when the source and the destination pictures have the same size.
111 In this case, scaling part is not needed. 112 In this case, scaling part is not needed.
112 (This code is probably far from being optimised, in particular, the asm 113 (This code is probably far from being optimised, in particular, the asm
113 generated is not the most efficient, a pure asm version will probably 114 generated is not the most efficient, a pure asm version will probably
114 emerge sooner or later). But at least, this version is faster than what 115 emerge sooner or later). But at least, this version is faster than what
115 was used before.*/ 116 was used before.*/
116 { 117 {
117 int height; 118 int height;
118 119