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
30 -------------------------------------------------------------------------------
32 Name CX2341X_OSD_SET_PIXEL_FORMAT
43 -------------------------------------------------------------------------------
45 Name CX2341X_OSD_GET_STATE
51 Bits 1:2 alpha control
54 -------------------------------------------------------------------------------
56 Name CX2341X_OSD_SET_STATE
63 -------------------------------------------------------------------------------
65 Name CX2341X_OSD_GET_OSD_COORDS
68 Retrieve coordinates of OSD area blended with video
76 Horizontal offset in buffer
78 Vertical offset in buffer
80 -------------------------------------------------------------------------------
82 Name CX2341X_OSD_SET_OSD_COORDS
85 Assign the coordinates of the OSD area to blend with video
89 buffer stride in pixels
97 -------------------------------------------------------------------------------
99 Name CX2341X_OSD_GET_SCREEN_COORDS
102 Retrieve OSD screen area coordinates
104 top left horizontal offset
106 top left vertical offset
108 bottom right horizontal offset
110 bottom right vertical offset
112 -------------------------------------------------------------------------------
114 Name CX2341X_OSD_SET_SCREEN_COORDS
117 Assign the coordinates of the screen area to blend with video
119 top left horizontal offset
121 top left vertical offset
123 bottom left horizontal offset
125 bottom left vertical offset
127 -------------------------------------------------------------------------------
129 Name CX2341X_OSD_GET_GLOBAL_ALPHA
132 Retrieve OSD global alpha
134 global alpha: 0=off, 1=on
136 bits 0:7 global alpha
138 -------------------------------------------------------------------------------
140 Name CX2341X_OSD_SET_GLOBAL_ALPHA
145 global alpha: 0=off, 1=on
147 global alpha (8 bits)
149 local alpha: 0=on, 1=off
151 -------------------------------------------------------------------------------
153 Name CX2341X_OSD_SET_BLEND_COORDS
156 Move start of blending area within display buffer
158 horizontal offset in buffer
160 vertical offset in buffer
162 -------------------------------------------------------------------------------
164 Name CX2341X_OSD_GET_FLICKER_STATE
167 Retrieve flicker reduction module state
169 flicker state: 0=off, 1=on
171 -------------------------------------------------------------------------------
173 Name CX2341X_OSD_SET_FLICKER_STATE
176 Set flicker reduction module state
180 -------------------------------------------------------------------------------
182 Name CX2341X_OSD_BLT_COPY
188 '0001' ~destination AND ~source
189 '0010' ~destination AND source
191 '0100' destination AND ~source
193 '0110' destination XOR source
194 '0111' ~destination OR ~source
195 '1000' ~destination AND ~source
196 '1001' destination XNOR source
198 '1011' ~destination OR source
200 '1101' destination OR ~source
201 '1110' destination OR source
205 Resulting alpha blending
207 '10' destination_alpha
208 '11' source_alpha*destination_alpha+1
209 (zero if both source and destination alpha are zero)
211 '00' output_pixel = source_pixel
213 '01' if source_alpha=0:
214 output_pixel = destination_pixel
215 if 256 > source_alpha > 1:
216 output_pixel = ((source_alpha + 1)*source_pixel +
217 (255 - source_alpha)*destination_pixel)/256
219 '10' if destination_alpha=0:
220 output_pixel = source_pixel
221 if 255 > destination_alpha > 0:
222 output_pixel = ((255 - destination_alpha)*source_pixel +
223 (destination_alpha + 1)*destination_pixel)/256
225 '11' if source_alpha=0:
228 source_temp = source_pixel*256
229 if 255 > source_alpha > 0:
230 source_temp = source_pixel*(source_alpha + 1)
231 if destination_alpha=0:
233 if destination_alpha=255:
234 destination_temp = destination_pixel*256
235 if 255 > destination_alpha > 0:
236 destination_temp = destination_pixel*(destination_alpha + 1)
237 output_pixel = (source_temp + destination_temp)/256
243 destination pixel mask
245 destination rectangle start address
247 destination stride in dwords
249 source stride in dwords
251 source rectangle start address
253 -------------------------------------------------------------------------------
255 Name CX2341X_OSD_BLT_FILL
260 Same as Param[0] on API 0x52
262 Same as Param[1] on API 0x52
264 Same as Param[2] on API 0x52
270 destination pixel mask
272 destination rectangle start address
274 destination stride in dwords
278 -------------------------------------------------------------------------------
280 Name CX2341X_OSD_BLT_TEXT
283 BLT for 8 bit alpha text source
285 Same as Param[0] on API 0x52
287 Same as Param[1] on API 0x52
289 Same as Param[2] on API 0x52
295 destination pixel mask
297 destination rectangle start address
299 destination stride in dwords
301 source stride in dwords
303 source rectangle start address
307 -------------------------------------------------------------------------------
309 Name CX2341X_OSD_SET_FRAMEBUFFER_WINDOW
312 Positions the main output window on the screen. The coordinates must be
313 such that the entire window fits on the screen.
319 top left window corner horizontal offset
321 top left window corner vertical offset
323 -------------------------------------------------------------------------------
325 Name CX2341X_OSD_SET_CHROMA_KEY
328 Chroma key switch and color
334 -------------------------------------------------------------------------------
336 Name CX2341X_OSD_GET_ALPHA_CONTENT_INDEX
339 Retrieve alpha content index
341 alpha content index, Range 0:15
343 -------------------------------------------------------------------------------
345 Name CX2341X_OSD_SET_ALPHA_CONTENT_INDEX
348 Assign alpha content index
350 alpha content index, range 0:15