decodebin: Add autoplug-query signal to handle queries for yet unconnected elements
[platform/upstream/gstreamer.git] / gst / videoscale / gstvideoscaleorc.orc
1
2 .function video_scale_orc_merge_linear_u8
3 .dest 1 d1
4 .source 1 s1
5 .source 1 s2
6 .param 1 p1
7 .temp 2 t1
8 .temp 2 t2
9 .temp 1 a
10 .temp 1 t
11
12 loadb a, s1
13 convubw t1, s1
14 convubw t2, s2
15 subw t2, t2, t1
16 mullw t2, t2, p1
17 addw t2, t2, 128
18 convhwb t, t2
19 addb d1, t, a
20
21
22
23 .function video_scale_orc_merge_linear_u16
24 .dest 2 d1
25 .source 2 s1
26 .source 2 s2
27 .param 2 p1
28 .param 2 p2
29 .temp 4 t1
30 .temp 4 t2
31
32 # This is slightly different thatn the u8 case, since muluwl
33 # tends to be much faster than mulll
34 muluwl t1, s1, p1
35 muluwl t2, s2, p2
36 addl t1, t1, t2
37 shrul t1, t1, 16
38 convlw d1, t1
39
40
41 .function video_scale_orc_splat_u16
42 .dest 2 d1
43 .param 2 p1
44
45 copyw d1, p1
46
47
48 .function video_scale_orc_splat_u32
49 .dest 4 d1
50 .param 4 p1
51
52 copyl d1, p1
53
54
55 .function video_scale_orc_splat_u64
56 .dest 8 d1
57 .longparam 8 p1
58
59 copyq d1, p1
60
61
62 .function video_scale_orc_downsample_u8
63 .dest 1 d1 guint8
64 .source 2 s1 guint8
65 .temp 1 t1
66 .temp 1 t2
67
68 splitwb t1, t2, s1
69 avgub d1, t1, t2
70
71
72 .function video_scale_orc_downsample_u16
73 .dest 2 d1 guint16
74 .source 4 s1 guint16
75 .temp 2 t1
76 .temp 2 t2
77
78 splitlw t1, t2, s1
79 avguw d1, t1, t2
80
81
82 .function video_scale_orc_downsample_u32
83 .dest 4 d1 guint8
84 .source 8 s1 guint8
85 .temp 4 t1
86 .temp 4 t2
87
88 splitql t1, t2, s1
89 x4 avgub d1, t1, t2
90
91
92 .function video_scale_orc_downsample_yuyv
93 .dest 4 d1 guint8
94 .source 8 s1 guint8
95 .temp 4 yyyy
96 .temp 4 uvuv
97 .temp 2 t1
98 .temp 2 t2
99 .temp 2 yy
100 .temp 2 uv
101
102 x4 splitwb yyyy, uvuv, s1
103 x2 splitwb t1, t2, yyyy
104 x2 avgub yy, t1, t2
105 splitlw t1, t2, uvuv
106 x2 avgub uv, t1, t2
107 x2 mergebw d1, yy, uv
108
109
110
111 .function video_scale_orc_resample_nearest_u8
112 .dest 1 d1 guint8
113 .source 1 s1 guint8
114 .param 4 p1
115 .param 4 p2
116
117 ldresnearb d1, s1, p1, p2
118
119
120 .function video_scale_orc_resample_bilinear_u8
121 .dest 1 d1 guint8
122 .source 1 s1 guint8
123 .param 4 p1
124 .param 4 p2
125
126 ldreslinb d1, s1, p1, p2
127
128
129 .function video_scale_orc_resample_nearest_u32
130 .dest 4 d1 guint8
131 .source 4 s1 guint8
132 .param 4 p1
133 .param 4 p2
134
135 ldresnearl d1, s1, p1, p2
136
137
138 .function video_scale_orc_resample_bilinear_u32
139 .dest 4 d1 guint8
140 .source 4 s1 guint8
141 .param 4 p1
142 .param 4 p2
143
144 ldreslinl d1, s1, p1, p2
145
146
147 .function video_scale_orc_resample_merge_bilinear_u32
148 .dest 4 d1 guint8
149 .dest 4 d2 guint8
150 .source 4 s1 guint8
151 .source 4 s2 guint8
152 .temp 4 a
153 .temp 4 b
154 .temp 4 t
155 .temp 8 t1
156 .temp 8 t2
157 .param 4 p1
158 .param 4 p2
159 .param 4 p3
160
161 ldreslinl b, s2, p2, p3
162 storel d2, b
163 loadl a, s1
164 x4 convubw t1, a
165 x4 convubw t2, b
166 x4 subw t2, t2, t1
167 x4 mullw t2, t2, p1
168 x4 convhwb t, t2
169 x4 addb d1, t, a
170
171
172
173 .function video_scale_orc_merge_bicubic_u8
174 .dest 1 d1 guint8
175 .source 1 s1 guint8
176 .source 1 s2 guint8
177 .source 1 s3 guint8
178 .source 1 s4 guint8
179 .param 4 p1
180 .param 4 p2
181 .param 4 p3
182 .param 4 p4
183 .temp 2 t1
184 .temp 2 t2
185
186 mulubw t1, s2, p2
187 mulubw t2, s3, p3
188 addw t1, t1, t2
189 mulubw t2, s1, p1
190 subw t1, t1, t2
191 mulubw t2, s4, p4
192 subw t1, t1, t2
193 addw t1, t1, 32
194 shrsw t1, t1, 6
195 convsuswb d1, t1
196
197