1 OSD firmware API description
2 ============================
4 Note: this API is part of the decoder firmware, so it's cx23415 only.
6 -------------------------------------------------------------------------------
8 Name CX2341X_OSD_GET_FRAMEBUFFER
11 Return base and length of contiguous OSD memory.
17 -------------------------------------------------------------------------------
19 Name CX2341X_OSD_GET_PIXEL_FORMAT
24 0=8bit index, 4=AlphaRGB 8:8:8:8
26 -------------------------------------------------------------------------------
28 Name CX2341X_OSD_SET_PIXEL_FORMAT
33 0=8bit index, 4=AlphaRGB 8:8:8:8
35 -------------------------------------------------------------------------------
37 Name CX2341X_OSD_GET_STATE
43 Bits 1:2 alpha control
46 -------------------------------------------------------------------------------
48 Name CX2341X_OSD_SET_STATE
55 -------------------------------------------------------------------------------
57 Name CX2341X_OSD_GET_OSD_COORDS
60 Retrieve coordinates of OSD area blended with video
68 Horizontal offset in buffer
70 Vertical offset in buffer
72 -------------------------------------------------------------------------------
74 Name CX2341X_OSD_SET_OSD_COORDS
77 Assign the coordinates of the OSD area to blend with video
81 buffer stride in pixels
89 -------------------------------------------------------------------------------
91 Name CX2341X_OSD_GET_SCREEN_COORDS
94 Retrieve OSD screen area coordinates
96 top left horizontal offset
98 top left vertical offset
100 bottom right horizontal offset
102 bottom right vertical offset
104 -------------------------------------------------------------------------------
106 Name CX2341X_OSD_SET_SCREEN_COORDS
109 Assign the coordinates of the screen area to blend with video
111 top left horizontal offset
113 top left vertical offset
115 bottom left horizontal offset
117 bottom left vertical offset
119 -------------------------------------------------------------------------------
121 Name CX2341X_OSD_GET_GLOBAL_ALPHA
124 Retrieve OSD global alpha
126 global alpha: 0=off, 1=on
128 bits 0:7 global alpha
130 -------------------------------------------------------------------------------
132 Name CX2341X_OSD_SET_GLOBAL_ALPHA
137 global alpha: 0=off, 1=on
139 global alpha (8 bits)
141 local alpha: 0=on, 1=off
143 -------------------------------------------------------------------------------
145 Name CX2341X_OSD_SET_BLEND_COORDS
148 Move start of blending area within display buffer
150 horizontal offset in buffer
152 vertical offset in buffer
154 -------------------------------------------------------------------------------
156 Name CX2341X_OSD_GET_FLICKER_STATE
159 Retrieve flicker reduction module state
161 flicker state: 0=off, 1=on
163 -------------------------------------------------------------------------------
165 Name CX2341X_OSD_SET_FLICKER_STATE
168 Set flicker reduction module state
172 -------------------------------------------------------------------------------
174 Name CX2341X_OSD_BLT_COPY
180 '0001' ~destination AND ~source
181 '0010' ~destination AND source
183 '0100' destination AND ~source
185 '0110' destination XOR source
186 '0111' ~destination OR ~source
187 '1000' ~destination AND ~source
188 '1001' destination XNOR source
190 '1011' ~destination OR source
192 '1101' destination OR ~source
193 '1110' destination OR source
197 Resulting alpha blending
199 '10' destination_alpha
200 '11' source_alpha*destination_alpha+1
201 (zero if both source and destination alpha are zero)
203 '00' output_pixel = source_pixel
205 '01' if source_alpha=0:
206 output_pixel = destination_pixel
207 if 256 > source_alpha > 1:
208 output_pixel = ((source_alpha + 1)*source_pixel +
209 (255 - source_alpha)*destination_pixel)/256
211 '10' if destination_alpha=0:
212 output_pixel = source_pixel
213 if 255 > destination_alpha > 0:
214 output_pixel = ((255 - destination_alpha)*source_pixel +
215 (destination_alpha + 1)*destination_pixel)/256
217 '11' if source_alpha=0:
220 source_temp = source_pixel*256
221 if 255 > source_alpha > 0:
222 source_temp = source_pixel*(source_alpha + 1)
223 if destination_alpha=0:
225 if destination_alpha=255:
226 destination_temp = destination_pixel*256
227 if 255 > destination_alpha > 0:
228 destination_temp = destination_pixel*(destination_alpha + 1)
229 output_pixel = (source_temp + destination_temp)/256
235 destination pixel mask
237 destination rectangle start address
239 destination stride in dwords
241 source stride in dwords
243 source rectangle start address
245 -------------------------------------------------------------------------------
247 Name CX2341X_OSD_BLT_FILL
252 Same as Param[0] on API 0x52
254 Same as Param[1] on API 0x52
256 Same as Param[2] on API 0x52
262 destination pixel mask
264 destination rectangle start address
266 destination stride in dwords
270 -------------------------------------------------------------------------------
272 Name CX2341X_OSD_BLT_TEXT
275 BLT for 8 bit alpha text source
277 Same as Param[0] on API 0x52
279 Same as Param[1] on API 0x52
281 Same as Param[2] on API 0x52
287 destination pixel mask
289 destination rectangle start address
291 destination stride in dwords
293 source stride in dwords
295 source rectangle start address
299 -------------------------------------------------------------------------------
301 Name CX2341X_OSD_SET_FRAMEBUFFER_WINDOW
304 Positions the main output window on the screen. The coordinates must be
305 such that the entire window fits on the screen.
311 top left window corner horizontal offset
313 top left window corner vertical offset
315 -------------------------------------------------------------------------------
317 Name CX2341X_OSD_SET_CHROMA_KEY
320 Chroma key switch and color
326 -------------------------------------------------------------------------------
328 Name CX2341X_OSD_GET_ALPHA_CONTENT_INDEX
331 Retrieve alpha content index
333 alpha content index, Range 0:15
335 -------------------------------------------------------------------------------
337 Name CX2341X_OSD_SET_ALPHA_CONTENT_INDEX
340 Assign alpha content index
342 alpha content index, range 0:15