tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 5bd20f58041d25dbeab2fc0ead361445aef37211
parent 7db6455a4905188e6000934dd45119949e99c517
Author: rbckman <robinbackman@gmail.com>
Date:   Thu, 23 Aug 2018 09:35:47 +0300

cleaned up mess

Diffstat:
Agui/Makefile.include | 28++++++++++++++++++++++++++++
Agui/VeraMono.ttf | 0
Agui/libs/ilclient/Makefile | 5+++++
Agui/libs/ilclient/ilclient.c | 1836+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/ilclient/ilclient.h | 1039+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/ilclient/ilcore.c | 308+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/vgfont/Makefile | 7+++++++
Agui/libs/vgfont/font.c | 355+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/vgfont/graphics.c | 1608+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/vgfont/graphics_x_private.h | 366+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/vgfont/libvgfont.a | 0
Agui/libs/vgfont/vgfont.h | 136+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/vgfont/vgft.c | 416+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/libs/vgfont/vgft.h | 70++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/src/Makefile | 7+++++++
Agui/src/VeraMono.ttf | 0
Agui/src/fixedsys.ttf | 0
Agui/src/main.c | 484+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Agui/tarinagui.bin | 0
Mstartinterface.sh | 4++--
Mtarina.py | 4++--
Dvc/LICENCE | 35-----------------------------------
Dvc/bin/containers_check_frame_int | 0
Dvc/bin/containers_datagram_receiver | 0
Dvc/bin/containers_datagram_sender | 0
Dvc/bin/containers_dump_pktfile | 0
Dvc/bin/containers_rtp_decoder | 0
Dvc/bin/containers_stream_client | 0
Dvc/bin/containers_stream_server | 0
Dvc/bin/containers_test | 0
Dvc/bin/containers_test_bits | 0
Dvc/bin/containers_test_uri | 0
Dvc/bin/containers_uri_pipe | 0
Dvc/bin/edidparser | 0
Dvc/bin/mmal_vc_diag | 0
Dvc/bin/raspistill | 0
Dvc/bin/raspivid | 0
Dvc/bin/raspividyuv | 0
Dvc/bin/raspiyuv | 0
Dvc/bin/tvservice | 0
Dvc/bin/vcdbg | 0
Dvc/bin/vcgencmd | 0
Dvc/bin/vchiq_test | 0
Dvc/bin/vcmailbox | 0
Dvc/bin/vcsmem | 0
Dvc/include/EGL/egl.h | 329-------------------------------------------------------------------------------
Dvc/include/EGL/eglext.h | 205-------------------------------------------------------------------------------
Dvc/include/EGL/eglext_android.h | 99-------------------------------------------------------------------------------
Dvc/include/EGL/eglext_brcm.h | 197-------------------------------------------------------------------------------
Dvc/include/EGL/eglext_nvidia.h | 54------------------------------------------------------
Dvc/include/EGL/eglplatform.h | 205-------------------------------------------------------------------------------
Dvc/include/GLES/gl.h | 798-------------------------------------------------------------------------------
Dvc/include/GLES/glext.h | 1147-------------------------------------------------------------------------------
Dvc/include/GLES/glplatform.h | 64----------------------------------------------------------------
Dvc/include/GLES2/gl2.h | 649-------------------------------------------------------------------------------
Dvc/include/GLES2/gl2ext.h | 1218-------------------------------------------------------------------------------
Dvc/include/GLES2/gl2platform.h | 64----------------------------------------------------------------
Dvc/include/IL/OMX_Audio.h | 1391-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Broadcom.h | 2516-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Component.h | 579-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Core.h | 1456-------------------------------------------------------------------------------
Dvc/include/IL/OMX_ILCS.h | 65-----------------------------------------------------------------
Dvc/include/IL/OMX_IVCommon.h | 1096-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Image.h | 347-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Index.h | 532-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Other.h | 347-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Types.h | 372-------------------------------------------------------------------------------
Dvc/include/IL/OMX_Video.h | 1082-------------------------------------------------------------------------------
Dvc/include/KHR/khrplatform.h | 295-------------------------------------------------------------------------------
Dvc/include/VG/openvg.h | 745-------------------------------------------------------------------------------
Dvc/include/VG/vgext.h | 233-------------------------------------------------------------------------------
Dvc/include/VG/vgplatform.h | 86-------------------------------------------------------------------------------
Dvc/include/VG/vgu.h | 131-------------------------------------------------------------------------------
Dvc/include/WF/wfc.h | 275-------------------------------------------------------------------------------
Dvc/include/WF/wfcplatform.h | 71-----------------------------------------------------------------------
Dvc/include/bcm_host.h | 61-------------------------------------------------------------
Dvc/include/interface/mmal/core/mmal_buffer_private.h | 86-------------------------------------------------------------------------------
Dvc/include/interface/mmal/core/mmal_clock_private.h | 204-------------------------------------------------------------------------------
Dvc/include/interface/mmal/core/mmal_component_private.h | 169-------------------------------------------------------------------------------
Dvc/include/interface/mmal/core/mmal_core_private.h | 40----------------------------------------
Dvc/include/interface/mmal/core/mmal_events_private.h | 67-------------------------------------------------------------------
Dvc/include/interface/mmal/core/mmal_port_private.h | 213-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal.h | 390-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_buffer.h | 250-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_clock.h | 202-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_common.h | 83-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_component.h | 148-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_encodings.h | 234-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_events.h | 109-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_format.h | 223-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_logging.h | 71-----------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_metadata.h | 84-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_parameters.h | 194-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_parameters_audio.h | 66------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_parameters_camera.h | 889-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_parameters_clock.h | 88-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_parameters_common.h | 191-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_parameters_video.h | 487-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_pool.h | 167-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_port.h | 286-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_queue.h | 116-------------------------------------------------------------------------------
Dvc/include/interface/mmal/mmal_types.h | 100-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_component_wrapper.h | 157-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_connection.h | 230-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_default_components.h | 90-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_graph.h | 243-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_il.h | 212-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_list.h | 127-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_param_convert.h | 92-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_util.h | 173-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_util_params.h | 210-------------------------------------------------------------------------------
Dvc/include/interface/mmal/util/mmal_util_rational.h | 127-------------------------------------------------------------------------------
Dvc/include/interface/mmal/vc/mmal_vc_api.h | 234-------------------------------------------------------------------------------
Dvc/include/interface/mmal/vc/mmal_vc_api_drm.h | 55-------------------------------------------------------
Dvc/include/interface/mmal/vc/mmal_vc_client_priv.h | 80-------------------------------------------------------------------------------
Dvc/include/interface/mmal/vc/mmal_vc_msgnames.h | 37-------------------------------------
Dvc/include/interface/mmal/vc/mmal_vc_msgs.h | 535-------------------------------------------------------------------------------
Dvc/include/interface/mmal/vc/mmal_vc_opaque_alloc.h | 73-------------------------------------------------------------------------
Dvc/include/interface/mmal/vc/mmal_vc_shm.h | 62--------------------------------------------------------------
Dvc/include/interface/vchi/common/endian.h | 44--------------------------------------------
Dvc/include/interface/vchi/connections/connection.h | 324-------------------------------------------------------------------------------
Dvc/include/interface/vchi/message_drivers/message.h | 197-------------------------------------------------------------------------------
Dvc/include/interface/vchi/vchi.h | 379-------------------------------------------------------------------------------
Dvc/include/interface/vchi/vchi_cfg.h | 222-------------------------------------------------------------------------------
Dvc/include/interface/vchi/vchi_cfg_internal.h | 65-----------------------------------------------------------------
Dvc/include/interface/vchi/vchi_common.h | 170-------------------------------------------------------------------------------
Dvc/include/interface/vchi/vchi_mh.h | 36------------------------------------
Dvc/include/interface/vchiq_arm/vchiq.h | 36------------------------------------
Dvc/include/interface/vchiq_arm/vchiq_cfg.h | 63---------------------------------------------------------------
Dvc/include/interface/vchiq_arm/vchiq_if.h | 190-------------------------------------------------------------------------------
Dvc/include/interface/vchiq_arm/vchiq_ioctl.h | 116-------------------------------------------------------------------------------
Dvc/include/interface/vchiq_arm/vchiq_test.h | 135-------------------------------------------------------------------------------
Dvc/include/interface/vchiq_arm/vchiq_test_if.h | 35-----------------------------------
Dvc/include/interface/vchiq_arm/vchiq_util.h | 57---------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_common.h | 96-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_deprecated.h | 36------------------------------------
Dvc/include/interface/vcos/generic/vcos_generic_blockpool.h | 294-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_generic_event_flags.h | 127-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_generic_named_sem.h | 101-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_generic_quickslow_mutex.h | 95-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_generic_reentrant_mtx.h | 95-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_generic_tls.h | 164-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_joinable_thread_from_plain.h | 229-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_latch_from_sem.h | 68--------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_mem_from_malloc.h | 74--------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_mutexes_are_reentrant.h | 88-------------------------------------------------------------------------------
Dvc/include/interface/vcos/generic/vcos_thread_reaper.h | 55-------------------------------------------------------
Dvc/include/interface/vcos/pthreads/vcos_futex_mutex.h | 102-------------------------------------------------------------------------------
Dvc/include/interface/vcos/pthreads/vcos_platform.h | 746-------------------------------------------------------------------------------
Dvc/include/interface/vcos/pthreads/vcos_platform_types.h | 71-----------------------------------------------------------------------
Dvc/include/interface/vcos/user_nodefs.h | 47-----------------------------------------------
Dvc/include/interface/vcos/vcos.h | 221-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_assert.h | 324-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_atomic_flags.h | 92-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_attr.h | 153-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_blockpool.h | 171-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_build_info.h | 32--------------------------------
Dvc/include/interface/vcos/vcos_cfg.h | 126-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_cmd.h | 119-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_ctype.h | 49-------------------------------------------------
Dvc/include/interface/vcos/vcos_dlfcn.h | 86-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_event.h | 117-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_event_flags.h | 118-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_init.h | 110-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_inttypes.h | 49-------------------------------------------------
Dvc/include/interface/vcos/vcos_isr.h | 90-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_legacy_isr.h | 102-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_logging.h | 315-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_logging_control.h | 28----------------------------
Dvc/include/interface/vcos/vcos_lowlevel_thread.h | 129-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_mem.h | 101-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_mempool.h | 109-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_msgqueue.h | 280-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_mutex.h | 112-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_named_semaphore.h | 113-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_once.h | 62--------------------------------------------------------------
Dvc/include/interface/vcos/vcos_queue.h | 105-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_quickslow_mutex.h | 101-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_reentrant_mutex.h | 86-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_semaphore.h | 158-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_stdbool.h | 47-----------------------------------------------
Dvc/include/interface/vcos/vcos_stdint.h | 107-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_string.h | 129-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_thread.h | 282-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_thread_attr.h | 96-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_timer.h | 117-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_tls.h | 84-------------------------------------------------------------------------------
Dvc/include/interface/vcos/vcos_types.h | 283-------------------------------------------------------------------------------
Dvc/include/interface/vctypes/vc_display_types.h | 114-------------------------------------------------------------------------------
Dvc/include/interface/vctypes/vc_image_types.h | 170-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Audio.h | 1391-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Broadcom.h | 2516-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Component.h | 579-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Core.h | 1456-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_ILCS.h | 65-----------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_IVCommon.h | 1096-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Image.h | 347-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Index.h | 532-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Other.h | 347-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Types.h | 372-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/khronos/IL/OMX_Video.h | 1082-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/linux/vcfiled/vcfiled_check.h | 48------------------------------------------------
Dvc/include/interface/vmcs_host/linux/vchost_config.h | 61-------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_cec.h | 513-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_cecservice.h | 515-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_cecservice_defs.h | 182-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_cma.h | 70----------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_dispmanx.h | 142-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_dispmanx_types.h | 228-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_dispservice_defs.h | 250-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_dispservice_x_defs.h | 276-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_fileservice_defs.h | 119-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_gencmd_defs.h | 36------------------------------------
Dvc/include/interface/vmcs_host/vc_hdmi.h | 545-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_hdmi_property.h | 137-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_hostreq_defs.h | 166-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_ilcs_defs.h | 288-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_imageconv_defs.h | 51---------------------------------------------------
Dvc/include/interface/vmcs_host/vc_sdtv.h | 145-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_service_common.h | 46----------------------------------------------
Dvc/include/interface/vmcs_host/vc_tvservice.h | 524-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_tvservice_defs.h | 352-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_vchi_audioserv_defs.h | 156-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_vchi_bufman.h | 116-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_vchi_bufman_defs.h | 136-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_vchi_dispmanx.h | 69---------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_vchi_fileservice_defs.h | 75---------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_vchi_filesys.h | 184-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vc_vchi_gencmd.h | 88-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vcfilesys.h | 166-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vcfilesys_defs.h | 88-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vcgencmd.h | 95-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vchost.h | 273-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vchostreq.h | 108-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vcilcs.h | 103-------------------------------------------------------------------------------
Dvc/include/interface/vmcs_host/vcilcs_common.h | 83-------------------------------------------------------------------------------
Dvc/include/vcinclude/common.h | 140-------------------------------------------------------------------------------
Dvc/include/vcinclude/vc_image_types.h | 33---------------------------------
Dvc/include/vcinclude/vcore.h | 64----------------------------------------------------------------
Dvc/lib/libEGL.so | 0
Dvc/lib/libEGL_static.a | 0
Dvc/lib/libGLESv1_CM.so | 2--
Dvc/lib/libGLESv2.so | 0
Dvc/lib/libGLESv2_static.a | 0
Dvc/lib/libOpenVG.so | 0
Dvc/lib/libWFC.so | 0
Dvc/lib/libbcm_host.so | 0
Dvc/lib/libcontainers.so | 0
Dvc/lib/libdebug_sym.so | 0
Dvc/lib/libdebug_sym_static.a | 0
Dvc/lib/libkhrn_client.a | 0
Dvc/lib/libkhrn_static.a | 0
Dvc/lib/libmmal.so | 0
Dvc/lib/libmmal_components.so | 0
Dvc/lib/libmmal_core.so | 0
Dvc/lib/libmmal_util.so | 0
Dvc/lib/libmmal_vc_client.so | 0
Dvc/lib/libopenmaxil.so | 0
Dvc/lib/libvcfiled_check.a | 0
Dvc/lib/libvchiq_arm.so | 0
Dvc/lib/libvchostif.a | 0
Dvc/lib/libvcilcs.a | 0
Dvc/lib/libvcos.so | 0
Dvc/lib/libvcsm.so | 0
Dvc/lib/libvmcs_rpc_client.a | 0
Dvc/lib/plugins/plugins/reader_asf.so | 0
Dvc/lib/plugins/plugins/reader_avi.so | 0
Dvc/lib/plugins/plugins/reader_binary.so | 0
Dvc/lib/plugins/plugins/reader_flv.so | 0
Dvc/lib/plugins/plugins/reader_metadata_id3.so | 0
Dvc/lib/plugins/plugins/reader_mkv.so | 0
Dvc/lib/plugins/plugins/reader_mp4.so | 0
Dvc/lib/plugins/plugins/reader_mpga.so | 0
Dvc/lib/plugins/plugins/reader_ps.so | 0
Dvc/lib/plugins/plugins/reader_qsynth.so | 0
Dvc/lib/plugins/plugins/reader_raw_video.so | 0
Dvc/lib/plugins/plugins/reader_rcv.so | 0
Dvc/lib/plugins/plugins/reader_rtp.so | 0
Dvc/lib/plugins/plugins/reader_rtsp.so | 0
Dvc/lib/plugins/plugins/reader_rv9.so | 0
Dvc/lib/plugins/plugins/reader_simple.so | 0
Dvc/lib/plugins/plugins/reader_wav.so | 0
Dvc/lib/plugins/plugins/writer_avi.so | 0
Dvc/lib/plugins/plugins/writer_binary.so | 0
Dvc/lib/plugins/plugins/writer_dummy.so | 0
Dvc/lib/plugins/plugins/writer_mp4.so | 0
Dvc/lib/plugins/plugins/writer_raw_video.so | 0
Dvc/lib/plugins/plugins/writer_simple.so | 0
Dvc/lib/plugins/reader_asf.so | 0
Dvc/lib/plugins/reader_avi.so | 0
Dvc/lib/plugins/reader_binary.so | 0
Dvc/lib/plugins/reader_flv.so | 0
Dvc/lib/plugins/reader_metadata_id3.so | 0
Dvc/lib/plugins/reader_mkv.so | 0
Dvc/lib/plugins/reader_mp4.so | 0
Dvc/lib/plugins/reader_mpga.so | 0
Dvc/lib/plugins/reader_ps.so | 0
Dvc/lib/plugins/reader_qsynth.so | 0
Dvc/lib/plugins/reader_raw_video.so | 0
Dvc/lib/plugins/reader_rcv.so | 0
Dvc/lib/plugins/reader_rtp.so | 0
Dvc/lib/plugins/reader_rtsp.so | 0
Dvc/lib/plugins/reader_rv9.so | 0
Dvc/lib/plugins/reader_simple.so | 0
Dvc/lib/plugins/reader_wav.so | 0
Dvc/lib/plugins/writer_avi.so | 0
Dvc/lib/plugins/writer_binary.so | 0
Dvc/lib/plugins/writer_dummy.so | 0
Dvc/lib/plugins/writer_mp4.so | 0
Dvc/lib/plugins/writer_raw_video.so | 0
Dvc/lib/plugins/writer_simple.so | 0
Dvc/sbin/vcfiled | 0
Dvc/src/hello_pi/Makefile.include | 28----------------------------
Dvc/src/hello_pi/README | 21---------------------
Dvc/src/hello_pi/hello_audio/Makefile | 6------
Dvc/src/hello_pi/hello_audio/audio.c | 426-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_audio/audioplay.h | 159-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_audio/hello_audio.bin | 0
Dvc/src/hello_pi/hello_audio/sinewave.c | 160-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_dispmanx/Makefile | 5-----
Dvc/src/hello_pi/hello_dispmanx/dispmanx.c | 163-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_dispmanx/hello_dispmanx.bin | 0
Dvc/src/hello_pi/hello_encode/Makefile | 6------
Dvc/src/hello_pi/hello_encode/encode.c | 320-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_encode/hello_encode.bin | 0
Dvc/src/hello_pi/hello_fft/gpu_fft.c | 135-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/gpu_fft.h | 101-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/gpu_fft.txt | 159-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/gpu_fft_base.c | 190-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/gpu_fft_shaders.c | 102-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/gpu_fft_trans.c | 95-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/gpu_fft_trans.h | 45---------------------------------------------
Dvc/src/hello_pi/hello_fft/gpu_fft_twiddles.c | 315-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hello_fft.bin | 0
Dvc/src/hello_pi/hello_fft/hello_fft.c | 109-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hello_fft_2d.bin | 0
Dvc/src/hello_pi/hello_fft/hello_fft_2d.c | 135-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hello_fft_2d_bitmap.h | 53-----------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_1024k.hex | 948-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_128k.hex | 735-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_16k.hex | 688-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_1k.hex | 523-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_2048k.hex | 1353-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_256.hex | 359-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_256k.hex | 861-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_2k.hex | 765-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_32k.hex | 697-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_4096k.hex | 1523-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_4k.hex | 514-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_512.hex | 494-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_512k.hex | 983-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_64k.hex | 940-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_8k.hex | 603-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/hex/shader_trans.hex | 126-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/mailbox.c | 258-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/mailbox.h | 47-----------------------------------------------
Dvc/src/hello_pi/hello_fft/makefile | 36------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft.qinc | 509-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_1024k.qasm | 319-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_128k.qasm | 319-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_16k.qasm | 282-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_1k.qasm | 231-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_2048k.qasm | 336-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_2048k.qinc | 91-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_256.qasm | 233-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_256k.qasm | 326-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_2k.qasm | 265-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_32k.qasm | 271-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_4096k.qasm | 356-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_4k.qasm | 276-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_512.qasm | 240-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_512k.qasm | 329-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_64k.qasm | 306-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_8k.qasm | 276-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_ex.qinc | 112-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_fft/qasm/gpu_fft_trans.qasm | 133-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_font/Fixedsys500c.ttf | 0
Dvc/src/hello_pi/hello_font/Makefile | 7-------
Dvc/src/hello_pi/hello_font/TerminusBold.ttf | 0
Dvc/src/hello_pi/hello_font/Vera.ttf | 0
Dvc/src/hello_pi/hello_font/fixedsys.ttf | 0
Dvc/src/hello_pi/hello_font/fixedsys500c.zip | 0
Dvc/src/hello_pi/hello_font/hello_font.bin | 0
Dvc/src/hello_pi/hello_font/interface.txt | 1-
Dvc/src/hello_pi/hello_font/main.c | 148-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_font/main.c! | 132-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_font/main.c.old | 138-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_font/unifont-8.0.01.ttf | 0
Dvc/src/hello_pi/hello_font/unifont.ttf | 0
Dvc/src/hello_pi/hello_font/vumeter.txt | 0
Dvc/src/hello_pi/hello_interface/Andale_Mono.ttf | 0
Dvc/src/hello_pi/hello_interface/Fixedsys500c.ttf | 0
Dvc/src/hello_pi/hello_interface/Makefile | 7-------
Dvc/src/hello_pi/hello_interface/TerminusBold.ttf | 0
Dvc/src/hello_pi/hello_interface/Vera.ttf | 0
Dvc/src/hello_pi/hello_interface/VeraMono.ttf | 0
Dvc/src/hello_pi/hello_interface/camerainterface.bin | 0
Dvc/src/hello_pi/hello_interface/fixedsys.ttf | 0
Dvc/src/hello_pi/hello_interface/fixedsys500c.zip | 0
Dvc/src/hello_pi/hello_interface/hello_font.bin | 0
Dvc/src/hello_pi/hello_interface/interface.txt | 1-
Dvc/src/hello_pi/hello_interface/main.c | 484-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_interface/main.c! | 132-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_interface/main.c.old | 138-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_interface/mainold.c | 170-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_interface/unifont-8.0.01.ttf | 0
Dvc/src/hello_pi/hello_interface/unifont.ttf | 0
Dvc/src/hello_pi/hello_interface/vumeter.txt | 2--
Dvc/src/hello_pi/hello_jpeg/Makefile | 6------
Dvc/src/hello_pi/hello_jpeg/hello_jpeg.bin | 0
Dvc/src/hello_pi/hello_jpeg/jpeg.c | 696-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_jpeg/jpeg.h | 68--------------------------------------------------------------------
Dvc/src/hello_pi/hello_teapot/Makefile | 7-------
Dvc/src/hello_pi/hello_teapot/README.md | 5-----
Dvc/src/hello_pi/hello_teapot/cube_texture_and_coords.h | 100-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_teapot/hello_teapot.bin | 0
Dvc/src/hello_pi/hello_teapot/models.c | 515-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_teapot/models.h | 36------------------------------------
Dvc/src/hello_pi/hello_teapot/teapot.obj.dat | 0
Dvc/src/hello_pi/hello_teapot/triangle.c | 468-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_teapot/triangle.h | 30------------------------------
Dvc/src/hello_pi/hello_teapot/video.c | 266-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_tiger/Makefile | 8--------
Dvc/src/hello_pi/hello_tiger/hello_tiger.bin | 0
Dvc/src/hello_pi/hello_tiger/license.txt | 53-----------------------------------------------------
Dvc/src/hello_pi/hello_tiger/main.c | 533-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_tiger/readme.txt | 263-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_tiger/tiger.c | 1952-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_tiger/tiger.h | 45---------------------------------------------
Dvc/src/hello_pi/hello_triangle/Djenne_128_128.raw | 4----
Dvc/src/hello_pi/hello_triangle/Gaudi_128_128.raw | 0
Dvc/src/hello_pi/hello_triangle/Lucca_128_128.raw | 0
Dvc/src/hello_pi/hello_triangle/Makefile | 5-----
Dvc/src/hello_pi/hello_triangle/cube_texture_and_coords.h | 100-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_triangle/hello_triangle.bin | 0
Dvc/src/hello_pi/hello_triangle/triangle.c | 540-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_triangle2/Makefile | 5-----
Dvc/src/hello_pi/hello_triangle2/hello_triangle2.bin | 0
Dvc/src/hello_pi/hello_triangle2/triangle2.c | 509-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_video/Makefile | 6------
Dvc/src/hello_pi/hello_video/README | 1-
Dvc/src/hello_pi/hello_video/hello_video.bin | 0
Dvc/src/hello_pi/hello_video/test.h264 | 0
Dvc/src/hello_pi/hello_video/video.c | 222-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_videocube/Makefile | 7-------
Dvc/src/hello_pi/hello_videocube/README.md | 5-----
Dvc/src/hello_pi/hello_videocube/cube_texture_and_coords.h | 100-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_videocube/hello_videocube.bin | 0
Dvc/src/hello_pi/hello_videocube/triangle.c | 481-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_videocube/triangle.h | 30------------------------------
Dvc/src/hello_pi/hello_videocube/video.c | 266-------------------------------------------------------------------------------
Dvc/src/hello_pi/hello_world/Makefile | 5-----
Dvc/src/hello_pi/hello_world/hello_world.bin | 0
Dvc/src/hello_pi/hello_world/world.c | 36------------------------------------
Dvc/src/hello_pi/libs/ilclient/Makefile | 5-----
Dvc/src/hello_pi/libs/ilclient/ilclient.c | 1836-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/ilclient/ilclient.h | 1039-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/ilclient/ilcore.c | 308-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/ilclient/libilclient.a | 0
Dvc/src/hello_pi/libs/vgfont/Makefile | 7-------
Dvc/src/hello_pi/libs/vgfont/font.c | 355-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/vgfont/graphics.c | 1609-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/vgfont/graphics_x_private.h | 366-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/vgfont/libvgfont.a | 0
Dvc/src/hello_pi/libs/vgfont/vgfont.h | 136-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/vgfont/vgft.c | 416-------------------------------------------------------------------------------
Dvc/src/hello_pi/libs/vgfont/vgft.h | 70----------------------------------------------------------------------
Dvc/src/hello_pi/rebuild.sh | 32--------------------------------
468 files changed, 6669 insertions(+), 86050 deletions(-)

diff --git a/gui/Makefile.include b/gui/Makefile.include @@ -0,0 +1,28 @@ + +CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi + +LDFLAGS+=-L$(SDKSTAGE)/opt/vc/lib/ -lbrcmGLESv2 -lbrcmEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L$(SDKSTAGE)/opt/vc/src/hello_pi/libs/ilclient -L$(SDKSTAGE)/opt/vc/src/hello_pi/libs/vgfont + +INCLUDES+=-I$(SDKSTAGE)/opt/vc/include/ -I$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/opt/vc/include/interface/vmcs_host/linux -I./ -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/ilclient -I$(SDKSTAGE)/opt/vc/src/hello_pi/libs/vgfont + +all: $(BIN) $(LIB) + +%.o: %.c + @rm -f $@ + $(CC) $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations + +%.o: %.cpp + @rm -f $@ + $(CXX) $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations + +%.bin: $(OBJS) + $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic + +%.a: $(OBJS) + $(AR) r $@ $^ + +clean: + for i in $(OBJS); do (if test -e "$$i"; then ( rm $$i ); fi ); done + @rm -f $(BIN) $(LIB) + + diff --git a/gui/VeraMono.ttf b/gui/VeraMono.ttf Binary files differ. diff --git a/gui/libs/ilclient/Makefile b/gui/libs/ilclient/Makefile @@ -0,0 +1,5 @@ +OBJS=ilclient.o ilcore.o +LIB=libilclient.a + +include ../../Makefile.include + diff --git a/gui/libs/ilclient/ilclient.c b/gui/libs/ilclient/ilclient.c @@ -0,0 +1,1836 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * \file + * + * \brief This API defines helper functions for writing IL clients. + * + * This file defines an IL client side library. This is useful when + * writing IL clients, since there tends to be much repeated and + * common code across both single and multiple clients. This library + * seeks to remove that common code and abstract some of the + * interactions with components. There is a wrapper around a + * component and tunnel, and some operations can be done on lists of + * these. The callbacks from components are handled, and specific + * events can be checked or waited for. +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <ctype.h> +#include <assert.h> + +#include "interface/vcos/vcos.h" +#include "interface/vcos/vcos_logging.h" +#include "interface/vmcs_host/vchost.h" + +#include "IL/OMX_Broadcom.h" +#include "ilclient.h" + +#define VCOS_LOG_CATEGORY (&ilclient_log_category) + +#ifndef ILCLIENT_THREAD_DEFAULT_STACK_SIZE +#define ILCLIENT_THREAD_DEFAULT_STACK_SIZE (6<<10) +#endif + +static VCOS_LOG_CAT_T ilclient_log_category; + +/****************************************************************************** +Static data and types used only in this file. +******************************************************************************/ + +struct _ILEVENT_T { + OMX_EVENTTYPE eEvent; + OMX_U32 nData1; + OMX_U32 nData2; + OMX_PTR pEventData; + struct _ILEVENT_T *next; +}; + +#define NUM_EVENTS 100 +struct _ILCLIENT_T { + ILEVENT_T *event_list; + VCOS_SEMAPHORE_T event_sema; + ILEVENT_T event_rep[NUM_EVENTS]; + + ILCLIENT_CALLBACK_T port_settings_callback; + void *port_settings_callback_data; + ILCLIENT_CALLBACK_T eos_callback; + void *eos_callback_data; + ILCLIENT_CALLBACK_T error_callback; + void *error_callback_data; + ILCLIENT_BUFFER_CALLBACK_T fill_buffer_done_callback; + void *fill_buffer_done_callback_data; + ILCLIENT_BUFFER_CALLBACK_T empty_buffer_done_callback; + void *empty_buffer_done_callback_data; + ILCLIENT_CALLBACK_T configchanged_callback; + void *configchanged_callback_data; +}; + +struct _COMPONENT_T { + OMX_HANDLETYPE comp; + ILCLIENT_CREATE_FLAGS_T flags; + VCOS_SEMAPHORE_T sema; + VCOS_EVENT_FLAGS_T event; + struct _COMPONENT_T *related; + OMX_BUFFERHEADERTYPE *out_list; + OMX_BUFFERHEADERTYPE *in_list; + char name[32]; + char bufname[32]; + unsigned int error_mask; + unsigned int private; + ILEVENT_T *list; + ILCLIENT_T *client; +}; + +#define random_wait() +static char *states[] = {"Invalid", "Loaded", "Idle", "Executing", "Pause", "WaitingForResources"}; + +typedef enum { + ILCLIENT_ERROR_UNPOPULATED = 0x1, + ILCLIENT_ERROR_SAMESTATE = 0x2, + ILCLIENT_ERROR_BADPARAMETER = 0x4 +} ILERROR_MASK_T; + +/****************************************************************************** +Static functions. +******************************************************************************/ + +static OMX_ERRORTYPE ilclient_empty_buffer_done(OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); +static OMX_ERRORTYPE ilclient_empty_buffer_done_error(OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); +static OMX_ERRORTYPE ilclient_fill_buffer_done(OMX_OUT OMX_HANDLETYPE hComponent, + OMX_OUT OMX_PTR pAppData, + OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); +static OMX_ERRORTYPE ilclient_fill_buffer_done_error(OMX_OUT OMX_HANDLETYPE hComponent, + OMX_OUT OMX_PTR pAppData, + OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); +static OMX_ERRORTYPE ilclient_event_handler(OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_EVENTTYPE eEvent, + OMX_IN OMX_U32 nData1, + OMX_IN OMX_U32 nData2, + OMX_IN OMX_PTR pEventData); +static void ilclient_lock_events(ILCLIENT_T *st); +static void ilclient_unlock_events(ILCLIENT_T *st); + +/****************************************************************************** +Global functions +******************************************************************************/ + +/*********************************************************** + * Name: ilclient_init + * + * Description: Creates ilclient pointer + * + * Returns: pointer to client structure + ***********************************************************/ +ILCLIENT_T *ilclient_init() +{ + ILCLIENT_T *st = vcos_malloc(sizeof(ILCLIENT_T), "ilclient"); + int i; + + if (!st) + return NULL; + + vcos_log_set_level(VCOS_LOG_CATEGORY, VCOS_LOG_WARN); + vcos_log_register("ilclient", VCOS_LOG_CATEGORY); + + memset(st, 0, sizeof(ILCLIENT_T)); + + i = vcos_semaphore_create(&st->event_sema, "il:event", 1); + vc_assert(i == VCOS_SUCCESS); + + ilclient_lock_events(st); + st->event_list = NULL; + for (i=0; i<NUM_EVENTS; i++) + { + st->event_rep[i].eEvent = -1; // mark as unused + st->event_rep[i].next = st->event_list; + st->event_list = st->event_rep+i; + } + ilclient_unlock_events(st); + return st; +} + +/*********************************************************** + * Name: ilclient_destroy + * + * Description: frees client state + * + * Returns: void + ***********************************************************/ +void ilclient_destroy(ILCLIENT_T *st) +{ + vcos_semaphore_delete(&st->event_sema); + vcos_free(st); + vcos_log_unregister(VCOS_LOG_CATEGORY); +} + +/*********************************************************** + * Name: ilclient_set_port_settings_callback + * + * Description: sets the callback used when receiving port settings + * changed messages. The data field in the callback function will be + * the port index reporting the message. + * + * Returns: void + ***********************************************************/ +void ilclient_set_port_settings_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) +{ + st->port_settings_callback = func; + st->port_settings_callback_data = userdata; +} + +/*********************************************************** + * Name: ilclient_set_eos_callback + * + * Description: sets the callback used when receiving eos flags. The + * data parameter in the callback function will be the port index + * reporting an eos flag. + * + * Returns: void + ***********************************************************/ +void ilclient_set_eos_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) +{ + st->eos_callback = func; + st->eos_callback_data = userdata; +} + +/*********************************************************** + * Name: ilclient_set_error_callback + * + * Description: sets the callback used when receiving error events. + * The data parameter in the callback function will be the error code + * being reported. + * + * Returns: void + ***********************************************************/ +void ilclient_set_error_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) +{ + st->error_callback = func; + st->error_callback_data = userdata; +} + +/*********************************************************** + * Name: ilclient_set_fill_buffer_done_callback + * + * Description: sets the callback used when receiving + * fill_buffer_done event + * + * Returns: void + ***********************************************************/ +void ilclient_set_fill_buffer_done_callback(ILCLIENT_T *st, ILCLIENT_BUFFER_CALLBACK_T func, void *userdata) +{ + st->fill_buffer_done_callback = func; + st->fill_buffer_done_callback_data = userdata; +} + +/*********************************************************** + * Name: ilclient_set_empty_buffer_done_callback + * + * Description: sets the callback used when receiving + * empty_buffer_done event + * + * Returns: void + ***********************************************************/ +void ilclient_set_empty_buffer_done_callback(ILCLIENT_T *st, ILCLIENT_BUFFER_CALLBACK_T func, void *userdata) +{ + st->empty_buffer_done_callback = func; + st->empty_buffer_done_callback_data = userdata; +} + +/*********************************************************** + * Name: ilclient_set_configchanged_callback + * + * Description: sets the callback used when a config changed + * event is received + * + * Returns: void + ***********************************************************/ +void ilclient_set_configchanged_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) +{ + st->configchanged_callback = func; + st->configchanged_callback_data = userdata; +} + +/*********************************************************** + * Name: ilclient_create_component + * + * Description: initialises a component state structure and creates + * the IL component. + * + * Returns: 0 on success, -1 on failure + ***********************************************************/ +int ilclient_create_component(ILCLIENT_T *client, COMPONENT_T **comp, char *name, + ILCLIENT_CREATE_FLAGS_T flags) +{ + OMX_CALLBACKTYPE callbacks; + OMX_ERRORTYPE error; + char component_name[128]; + int32_t status; + + *comp = vcos_malloc(sizeof(COMPONENT_T), "il:comp"); + if(!*comp) + return -1; + + memset(*comp, 0, sizeof(COMPONENT_T)); + +#define COMP_PREFIX "OMX.broadcom." + + status = vcos_event_flags_create(&(*comp)->event,"il:comp"); + vc_assert(status == VCOS_SUCCESS); + status = vcos_semaphore_create(&(*comp)->sema, "il:comp", 1); + vc_assert(status == VCOS_SUCCESS); + (*comp)->client = client; + + vcos_snprintf((*comp)->name, sizeof((*comp)->name), "cl:%s", name); + vcos_snprintf((*comp)->bufname, sizeof((*comp)->bufname), "cl:%s buffer", name); + vcos_snprintf(component_name, sizeof(component_name), "%s%s", COMP_PREFIX, name); + + (*comp)->flags = flags; + + callbacks.EventHandler = ilclient_event_handler; + callbacks.EmptyBufferDone = flags & ILCLIENT_ENABLE_INPUT_BUFFERS ? ilclient_empty_buffer_done : ilclient_empty_buffer_done_error; + callbacks.FillBufferDone = flags & ILCLIENT_ENABLE_OUTPUT_BUFFERS ? ilclient_fill_buffer_done : ilclient_fill_buffer_done_error; + + error = OMX_GetHandle(&(*comp)->comp, component_name, *comp, &callbacks); + + if (error == OMX_ErrorNone) + { + OMX_UUIDTYPE uid; + char name[128]; + OMX_VERSIONTYPE compVersion, specVersion; + + if(OMX_GetComponentVersion((*comp)->comp, name, &compVersion, &specVersion, &uid) == OMX_ErrorNone) + { + char *p = (char *) uid + strlen(COMP_PREFIX); + + vcos_snprintf((*comp)->name, sizeof((*comp)->name), "cl:%s", p); + (*comp)->name[sizeof((*comp)->name)-1] = 0; + vcos_snprintf((*comp)->bufname, sizeof((*comp)->bufname), "cl:%s buffer", p); + (*comp)->bufname[sizeof((*comp)->bufname)-1] = 0; + } + + if(flags & (ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_OUTPUT_ZERO_BUFFERS)) + { + OMX_PORT_PARAM_TYPE ports; + OMX_INDEXTYPE types[] = {OMX_IndexParamAudioInit, OMX_IndexParamVideoInit, OMX_IndexParamImageInit, OMX_IndexParamOtherInit}; + int i; + + ports.nSize = sizeof(OMX_PORT_PARAM_TYPE); + ports.nVersion.nVersion = OMX_VERSION; + + for(i=0; i<4; i++) + { + OMX_ERRORTYPE error = OMX_GetParameter((*comp)->comp, types[i], &ports); + if(error == OMX_ErrorNone) + { + uint32_t j; + for(j=0; j<ports.nPorts; j++) + { + if(flags & ILCLIENT_DISABLE_ALL_PORTS) + ilclient_disable_port(*comp, ports.nStartPortNumber+j); + + if(flags & ILCLIENT_OUTPUT_ZERO_BUFFERS) + { + OMX_PARAM_PORTDEFINITIONTYPE portdef; + portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); + portdef.nVersion.nVersion = OMX_VERSION; + portdef.nPortIndex = ports.nStartPortNumber+j; + if(OMX_GetParameter((*comp)->comp, OMX_IndexParamPortDefinition, &portdef) == OMX_ErrorNone) + { + if(portdef.eDir == OMX_DirOutput && portdef.nBufferCountActual > 0) + { + portdef.nBufferCountActual = 0; + OMX_SetParameter((*comp)->comp, OMX_IndexParamPortDefinition, &portdef); + } + } + } + } + } + } + } + return 0; + } + else + { + vcos_event_flags_delete(&(*comp)->event); + vcos_semaphore_delete(&(*comp)->sema); + vcos_free(*comp); + *comp = NULL; + return -1; + } +} + +/*********************************************************** + * Name: ilclient_remove_event + * + * Description: Removes an event from a component event list. ignore1 + * and ignore2 are flags indicating whether to not match on nData1 and + * nData2 respectively. + * + * Returns: 0 if the event was removed. -1 if no matching event was + * found. + ***********************************************************/ +int ilclient_remove_event(COMPONENT_T *st, OMX_EVENTTYPE eEvent, + OMX_U32 nData1, int ignore1, OMX_IN OMX_U32 nData2, int ignore2) +{ + ILEVENT_T *cur, *prev; + uint32_t set; + ilclient_lock_events(st->client); + + cur = st->list; + prev = NULL; + + while (cur && !(cur->eEvent == eEvent && (ignore1 || cur->nData1 == nData1) && (ignore2 || cur->nData2 == nData2))) + { + prev = cur; + cur = cur->next; + } + + if (cur == NULL) + { + ilclient_unlock_events(st->client); + return -1; + } + + if (prev == NULL) + st->list = cur->next; + else + prev->next = cur->next; + + // add back into spare list + cur->next = st->client->event_list; + st->client->event_list = cur; + cur->eEvent = -1; // mark as unused + + // if we're removing an OMX_EventError or OMX_EventParamOrConfigChanged event, then clear the error bit from the eventgroup, + // since the user might have been notified through the error callback, and then + // can't clear the event bit - this will then cause problems the next time they + // wait for an error. + if(eEvent == OMX_EventError) + vcos_event_flags_get(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); + else if(eEvent == OMX_EventParamOrConfigChanged) + vcos_event_flags_get(&st->event, ILCLIENT_CONFIG_CHANGED, VCOS_OR_CONSUME, 0, &set); + + ilclient_unlock_events(st->client); + return 0; +} + +/*********************************************************** + * Name: ilclient_state_transition + * + * Description: Transitions a null terminated list of IL components to + * a given state. All components are told to transition in a random + * order before any are checked for transition completion. + * + * Returns: void + ***********************************************************/ +void ilclient_state_transition(COMPONENT_T *list[], OMX_STATETYPE state) +{ + OMX_ERRORTYPE error; + int i, num; + uint32_t set; + + num=0; + while (list[num]) + num++; + + // if we transition the supplier port first, it will call freebuffer on the non + // supplier, which will correctly signal a port unpopulated error. We want to + // ignore these errors. + if (state == OMX_StateLoaded) + for (i=0; i<num; i++) + list[i]->error_mask |= ILCLIENT_ERROR_UNPOPULATED; + for (i=0; i<num; i++) + list[i]->private = ((rand() >> 13) & 0xff)+1; + + for (i=0; i<num; i++) + { + // transition the components in a random order + int j, min = -1; + for (j=0; j<num; j++) + if (list[j]->private && (min == -1 || list[min]->private > list[j]->private)) + min = j; + + list[min]->private = 0; + + random_wait(); + //Clear error event for this component + vcos_event_flags_get(&list[min]->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); + + error = OMX_SendCommand(list[min]->comp, OMX_CommandStateSet, state, NULL); + vc_assert(error == OMX_ErrorNone); + } + + random_wait(); + + for (i=0; i<num; i++) + if(ilclient_wait_for_command_complete(list[i], OMX_CommandStateSet, state) < 0) + vc_assert(0); + + if (state == OMX_StateLoaded) + for (i=0; i<num; i++) + list[i]->error_mask &= ~ILCLIENT_ERROR_UNPOPULATED; +} + +/*********************************************************** + * Name: ilclient_teardown_tunnels + * + * Description: tears down a null terminated list of tunnels. + * + * Returns: void + ***********************************************************/ +void ilclient_teardown_tunnels(TUNNEL_T *tunnel) +{ + int i; + OMX_ERRORTYPE error; + + i=0;; + while (tunnel[i].source) + { + error = OMX_SetupTunnel(tunnel[i].source->comp, tunnel[i].source_port, NULL, 0); + vc_assert(error == OMX_ErrorNone); + + error = OMX_SetupTunnel(tunnel[i].sink->comp, tunnel[i].sink_port, NULL, 0); + vc_assert(error == OMX_ErrorNone); + i++; + } +} + +/*********************************************************** + * Name: ilclient_disable_tunnel + * + * Description: disables a tunnel by disabling the ports. Allows + * ports to signal same state error if they were already disabled. + * + * Returns: void + ***********************************************************/ +void ilclient_disable_tunnel(TUNNEL_T *tunnel) +{ + OMX_ERRORTYPE error; + + if(tunnel->source == 0 || tunnel->sink == 0) + return; + + tunnel->source->error_mask |= ILCLIENT_ERROR_UNPOPULATED; + tunnel->sink->error_mask |= ILCLIENT_ERROR_UNPOPULATED; + + error = OMX_SendCommand(tunnel->source->comp, OMX_CommandPortDisable, tunnel->source_port, NULL); + vc_assert(error == OMX_ErrorNone); + + error = OMX_SendCommand(tunnel->sink->comp, OMX_CommandPortDisable, tunnel->sink_port, NULL); + vc_assert(error == OMX_ErrorNone); + + if(ilclient_wait_for_command_complete(tunnel->source, OMX_CommandPortDisable, tunnel->source_port) < 0) + vc_assert(0); + + if(ilclient_wait_for_command_complete(tunnel->sink, OMX_CommandPortDisable, tunnel->sink_port) < 0) + vc_assert(0); + + tunnel->source->error_mask &= ~ILCLIENT_ERROR_UNPOPULATED; + tunnel->sink->error_mask &= ~ILCLIENT_ERROR_UNPOPULATED; +} + +/*********************************************************** + * Name: ilclient_enable_tunnel + * + * Description: enables a tunnel by enabling the ports + * + * Returns: 0 on success, -1 on failure + ***********************************************************/ +int ilclient_enable_tunnel(TUNNEL_T *tunnel) +{ + OMX_STATETYPE state; + OMX_ERRORTYPE error; + + ilclient_debug_output("ilclient: enable tunnel from %x/%d to %x/%d", + tunnel->source, tunnel->source_port, + tunnel->sink, tunnel->sink_port); + + error = OMX_SendCommand(tunnel->source->comp, OMX_CommandPortEnable, tunnel->source_port, NULL); + vc_assert(error == OMX_ErrorNone); + + error = OMX_SendCommand(tunnel->sink->comp, OMX_CommandPortEnable, tunnel->sink_port, NULL); + vc_assert(error == OMX_ErrorNone); + + // to complete, the sink component can't be in loaded state + error = OMX_GetState(tunnel->sink->comp, &state); + vc_assert(error == OMX_ErrorNone); + if (state == OMX_StateLoaded) + { + int ret = 0; + + if(ilclient_wait_for_command_complete(tunnel->sink, OMX_CommandPortEnable, tunnel->sink_port) != 0 || + OMX_SendCommand(tunnel->sink->comp, OMX_CommandStateSet, OMX_StateIdle, NULL) != OMX_ErrorNone || + (ret = ilclient_wait_for_command_complete_dual(tunnel->sink, OMX_CommandStateSet, OMX_StateIdle, tunnel->source)) < 0) + { + if(ret == -2) + { + // the error was reported fom the source component: clear this error and disable the sink component + ilclient_wait_for_command_complete(tunnel->source, OMX_CommandPortEnable, tunnel->source_port); + ilclient_disable_port(tunnel->sink, tunnel->sink_port); + } + + ilclient_debug_output("ilclient: could not change component state to IDLE"); + ilclient_disable_port(tunnel->source, tunnel->source_port); + return -1; + } + } + else + { + if (ilclient_wait_for_command_complete(tunnel->sink, OMX_CommandPortEnable, tunnel->sink_port) != 0) + { + ilclient_debug_output("ilclient: could not change sink port %d to enabled", tunnel->sink_port); + + //Oops failed to enable the sink port + ilclient_disable_port(tunnel->source, tunnel->source_port); + //Clean up the port enable event from the source port. + ilclient_wait_for_event(tunnel->source, OMX_EventCmdComplete, + OMX_CommandPortEnable, 0, tunnel->source_port, 0, + ILCLIENT_PORT_ENABLED | ILCLIENT_EVENT_ERROR, VCOS_EVENT_FLAGS_SUSPEND); + return -1; + } + } + + if(ilclient_wait_for_command_complete(tunnel->source, OMX_CommandPortEnable, tunnel->source_port) != 0) + { + ilclient_debug_output("ilclient: could not change source port %d to enabled", tunnel->source_port); + + //Failed to enable the source port + ilclient_disable_port(tunnel->sink, tunnel->sink_port); + return -1; + } + + return 0; +} + + +/*********************************************************** + * Name: ilclient_flush_tunnels + * + * Description: flushes all ports used in a null terminated list of + * tunnels. max specifies the maximum number of tunnels to flush from + * the list, where max=0 means all tunnels. + * + * Returns: void + ***********************************************************/ +void ilclient_flush_tunnels(TUNNEL_T *tunnel, int max) +{ + OMX_ERRORTYPE error; + int i; + + i=0; + while (tunnel[i].source && (max == 0 || i < max)) + { + error = OMX_SendCommand(tunnel[i].source->comp, OMX_CommandFlush, tunnel[i].source_port, NULL); + vc_assert(error == OMX_ErrorNone); + + error = OMX_SendCommand(tunnel[i].sink->comp, OMX_CommandFlush, tunnel[i].sink_port, NULL); + vc_assert(error == OMX_ErrorNone); + + ilclient_wait_for_event(tunnel[i].source, OMX_EventCmdComplete, + OMX_CommandFlush, 0, tunnel[i].source_port, 0, + ILCLIENT_PORT_FLUSH, VCOS_EVENT_FLAGS_SUSPEND); + ilclient_wait_for_event(tunnel[i].sink, OMX_EventCmdComplete, + OMX_CommandFlush, 0, tunnel[i].sink_port, 0, + ILCLIENT_PORT_FLUSH, VCOS_EVENT_FLAGS_SUSPEND); + i++; + } +} + + +/*********************************************************** + * Name: ilclient_return_events + * + * Description: Returns all events from a component event list to the + * list of unused event structures. + * + * Returns: void + ***********************************************************/ +void ilclient_return_events(COMPONENT_T *comp) +{ + ilclient_lock_events(comp->client); + while (comp->list) + { + ILEVENT_T *next = comp->list->next; + comp->list->next = comp->client->event_list; + comp->client->event_list = comp->list; + comp->list = next; + } + ilclient_unlock_events(comp->client); +} + +/*********************************************************** + * Name: ilclient_cleanup_components + * + * Description: frees all components from a null terminated list and + * deletes resources used in component state structure. + * + * Returns: void + ***********************************************************/ +void ilclient_cleanup_components(COMPONENT_T *list[]) +{ + int i; + OMX_ERRORTYPE error; + + i=0; + while (list[i]) + { + ilclient_return_events(list[i]); + if (list[i]->comp) + { + error = OMX_FreeHandle(list[i]->comp); + + vc_assert(error == OMX_ErrorNone); + } + i++; + } + + i=0; + while (list[i]) + { + vcos_event_flags_delete(&list[i]->event); + vcos_semaphore_delete(&list[i]->sema); + vcos_free(list[i]); + list[i] = NULL; + i++; + } +} + +/*********************************************************** + * Name: ilclient_change_component_state + * + * Description: changes the state of a single component. Note: this + * may not be suitable if the component is tunnelled and requires + * connected components to also change state. + * + * Returns: 0 on success, -1 on failure (note - trying to change to + * the same state which causes a OMX_ErrorSameState is treated as + * success) + ***********************************************************/ +int ilclient_change_component_state(COMPONENT_T *comp, OMX_STATETYPE state) +{ + OMX_ERRORTYPE error; + error = OMX_SendCommand(comp->comp, OMX_CommandStateSet, state, NULL); + vc_assert(error == OMX_ErrorNone); + if(ilclient_wait_for_command_complete(comp, OMX_CommandStateSet, state) < 0) + { + ilclient_debug_output("ilclient: could not change component state to %d", state); + ilclient_remove_event(comp, OMX_EventError, 0, 1, 0, 1); + return -1; + } + return 0; +} + +/*********************************************************** + * Name: ilclient_disable_port + * + * Description: disables a port on a given component. + * + * Returns: void + ***********************************************************/ +void ilclient_disable_port(COMPONENT_T *comp, int portIndex) +{ + OMX_ERRORTYPE error; + error = OMX_SendCommand(comp->comp, OMX_CommandPortDisable, portIndex, NULL); + vc_assert(error == OMX_ErrorNone); + if(ilclient_wait_for_command_complete(comp, OMX_CommandPortDisable, portIndex) < 0) + vc_assert(0); +} + +/*********************************************************** + * Name: ilclient_enabled_port + * + * Description: enables a port on a given component. + * + * Returns: void + ***********************************************************/ +void ilclient_enable_port(COMPONENT_T *comp, int portIndex) +{ + OMX_ERRORTYPE error; + error = OMX_SendCommand(comp->comp, OMX_CommandPortEnable, portIndex, NULL); + vc_assert(error == OMX_ErrorNone); + if(ilclient_wait_for_command_complete(comp, OMX_CommandPortEnable, portIndex) < 0) + vc_assert(0); +} + + +/*********************************************************** + * Name: ilclient_enable_port_buffers + * + * Description: enables a port on a given component which requires + * buffers to be supplied by the client. + * + * Returns: void + ***********************************************************/ +int ilclient_enable_port_buffers(COMPONENT_T *comp, int portIndex, + ILCLIENT_MALLOC_T ilclient_malloc, + ILCLIENT_FREE_T ilclient_free, + void *private) +{ + OMX_ERRORTYPE error; + OMX_PARAM_PORTDEFINITIONTYPE portdef; + OMX_BUFFERHEADERTYPE *list = NULL, **end = &list; + OMX_STATETYPE state; + int i; + + memset(&portdef, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); + portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); + portdef.nVersion.nVersion = OMX_VERSION; + portdef.nPortIndex = portIndex; + + // work out buffer requirements, check port is in the right state + error = OMX_GetParameter(comp->comp, OMX_IndexParamPortDefinition, &portdef); + if(error != OMX_ErrorNone || portdef.bEnabled != OMX_FALSE || portdef.nBufferCountActual == 0 || portdef.nBufferSize == 0) + return -1; + + // check component is in the right state to accept buffers + error = OMX_GetState(comp->comp, &state); + if (error != OMX_ErrorNone || !(state == OMX_StateIdle || state == OMX_StateExecuting || state == OMX_StatePause)) + return -1; + + // send the command + error = OMX_SendCommand(comp->comp, OMX_CommandPortEnable, portIndex, NULL); + vc_assert(error == OMX_ErrorNone); + + for (i=0; i != portdef.nBufferCountActual; i++) + { + unsigned char *buf; + if(ilclient_malloc) + buf = ilclient_malloc(private, portdef.nBufferSize, portdef.nBufferAlignment, comp->bufname); + else + buf = vcos_malloc_aligned(portdef.nBufferSize, portdef.nBufferAlignment, comp->bufname); + + if(!buf) + break; + + error = OMX_UseBuffer(comp->comp, end, portIndex, NULL, portdef.nBufferSize, buf); + if(error != OMX_ErrorNone) + { + if(ilclient_free) + ilclient_free(private, buf); + else + vcos_free(buf); + + break; + } + end = (OMX_BUFFERHEADERTYPE **) &((*end)->pAppPrivate); + } + + // queue these buffers + vcos_semaphore_wait(&comp->sema); + + if(portdef.eDir == OMX_DirInput) + { + *end = comp->in_list; + comp->in_list = list; + } + else + { + *end = comp->out_list; + comp->out_list = list; + } + + vcos_semaphore_post(&comp->sema); + + if(i != portdef.nBufferCountActual || + ilclient_wait_for_command_complete(comp, OMX_CommandPortEnable, portIndex) < 0) + { + ilclient_disable_port_buffers(comp, portIndex, NULL, ilclient_free, private); + + // at this point the first command might have terminated with an error, which means that + // the port is disabled before the disable_port_buffers function is called, so we're left + // with the error bit set and an error event in the queue. Clear these now if they exist. + ilclient_remove_event(comp, OMX_EventError, 0, 1, 1, 0); + + return -1; + } + + // success + return 0; +} + + +/*********************************************************** + * Name: ilclient_disable_port_buffers + * + * Description: disables a port on a given component which has + * buffers supplied by the client. + * + * Returns: void + ***********************************************************/ +void ilclient_disable_port_buffers(COMPONENT_T *comp, int portIndex, + OMX_BUFFERHEADERTYPE *bufferList, + ILCLIENT_FREE_T ilclient_free, + void *private) +{ + OMX_ERRORTYPE error; + OMX_BUFFERHEADERTYPE *list = bufferList; + OMX_BUFFERHEADERTYPE **head, *clist, *prev; + OMX_PARAM_PORTDEFINITIONTYPE portdef; + int num; + + // get the buffers off the relevant queue + memset(&portdef, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); + portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); + portdef.nVersion.nVersion = OMX_VERSION; + portdef.nPortIndex = portIndex; + + // work out buffer requirements, check port is in the right state + error = OMX_GetParameter(comp->comp, OMX_IndexParamPortDefinition, &portdef); + if(error != OMX_ErrorNone || portdef.bEnabled != OMX_TRUE || portdef.nBufferCountActual == 0 || portdef.nBufferSize == 0) + return; + + num = portdef.nBufferCountActual; + + error = OMX_SendCommand(comp->comp, OMX_CommandPortDisable, portIndex, NULL); + vc_assert(error == OMX_ErrorNone); + + while(num > 0) + { + VCOS_UNSIGNED set; + + if(list == NULL) + { + vcos_semaphore_wait(&comp->sema); + + // take buffers for this port off the relevant queue + head = portdef.eDir == OMX_DirInput ? &comp->in_list : &comp->out_list; + clist = *head; + prev = NULL; + + while(clist) + { + if((portdef.eDir == OMX_DirInput ? clist->nInputPortIndex : clist->nOutputPortIndex) == portIndex) + { + OMX_BUFFERHEADERTYPE *pBuffer = clist; + + if(!prev) + clist = *head = (OMX_BUFFERHEADERTYPE *) pBuffer->pAppPrivate; + else + clist = prev->pAppPrivate = (OMX_BUFFERHEADERTYPE *) pBuffer->pAppPrivate; + + pBuffer->pAppPrivate = list; + list = pBuffer; + } + else + { + prev = clist; + clist = (OMX_BUFFERHEADERTYPE *) &(clist->pAppPrivate); + } + } + + vcos_semaphore_post(&comp->sema); + } + + while(list) + { + void *buf = list->pBuffer; + OMX_BUFFERHEADERTYPE *next = list->pAppPrivate; + + error = OMX_FreeBuffer(comp->comp, portIndex, list); + vc_assert(error == OMX_ErrorNone); + + if(ilclient_free) + ilclient_free(private, buf); + else + vcos_free(buf); + + num--; + list = next; + } + + if(num) + { + OMX_U32 mask = ILCLIENT_PORT_DISABLED | ILCLIENT_EVENT_ERROR; + mask |= (portdef.eDir == OMX_DirInput ? ILCLIENT_EMPTY_BUFFER_DONE : ILCLIENT_FILL_BUFFER_DONE); + + // also wait for command complete/error in case we didn't have all the buffers allocated + vcos_event_flags_get(&comp->event, mask, VCOS_OR_CONSUME, -1, &set); + + if((set & ILCLIENT_EVENT_ERROR) && ilclient_remove_event(comp, OMX_EventError, 0, 1, 1, 0) >= 0) + return; + + if((set & ILCLIENT_PORT_DISABLED) && ilclient_remove_event(comp, OMX_EventCmdComplete, OMX_CommandPortDisable, 0, portIndex, 0) >= 0) + return; + } + } + + if(ilclient_wait_for_command_complete(comp, OMX_CommandPortDisable, portIndex) < 0) + vc_assert(0); +} + + +/*********************************************************** + * Name: ilclient_setup_tunnel + * + * Description: creates a tunnel between components that require that + * ports be inititially disabled, then enabled after tunnel setup. If + * timeout is non-zero, it will initially wait until a port settings + * changes message has been received by the output port. If port + * streams are supported by the output port, the requested port stream + * will be selected. + * + * Returns: 0 indicates success, negative indicates failure. + * -1: a timeout waiting for the parameter changed + * -2: an error was returned instead of parameter changed + * -3: no streams are available from this port + * -4: requested stream is not available from this port + * -5: the data format was not acceptable to the sink + ***********************************************************/ +int ilclient_setup_tunnel(TUNNEL_T *tunnel, unsigned int portStream, int timeout) +{ + OMX_ERRORTYPE error; + OMX_PARAM_U32TYPE param; + OMX_STATETYPE state; + int32_t status; + int enable_error; + + // source component must at least be idle, not loaded + error = OMX_GetState(tunnel->source->comp, &state); + vc_assert(error == OMX_ErrorNone); + if (state == OMX_StateLoaded && ilclient_change_component_state(tunnel->source, OMX_StateIdle) < 0) + return -2; + + // wait for the port parameter changed from the source port + if(timeout) + { + status = ilclient_wait_for_event(tunnel->source, OMX_EventPortSettingsChanged, + tunnel->source_port, 0, -1, 1, + ILCLIENT_PARAMETER_CHANGED | ILCLIENT_EVENT_ERROR, timeout); + + if (status < 0) + { + ilclient_debug_output( + "ilclient: timed out waiting for port settings changed on port %d", tunnel->source_port); + return status; + } + } + + // disable ports + ilclient_disable_tunnel(tunnel); + + // if this source port uses port streams, we need to select one of them before proceeding + // if getparameter causes an error that's fine, nothing needs selecting + param.nSize = sizeof(OMX_PARAM_U32TYPE); + param.nVersion.nVersion = OMX_VERSION; + param.nPortIndex = tunnel->source_port; + if (OMX_GetParameter(tunnel->source->comp, OMX_IndexParamNumAvailableStreams, &param) == OMX_ErrorNone) + { + if (param.nU32 == 0) + { + // no streams available + // leave the source port disabled, and return a failure + return -3; + } + if (param.nU32 <= portStream) + { + // requested stream not available + // no streams available + // leave the source port disabled, and return a failure + return -4; + } + + param.nU32 = portStream; + error = OMX_SetParameter(tunnel->source->comp, OMX_IndexParamActiveStream, &param); + vc_assert(error == OMX_ErrorNone); + } + + // now create the tunnel + error = OMX_SetupTunnel(tunnel->source->comp, tunnel->source_port, tunnel->sink->comp, tunnel->sink_port); + + enable_error = 0; + + if (error != OMX_ErrorNone || (enable_error=ilclient_enable_tunnel(tunnel)) < 0) + { + // probably format not compatible + error = OMX_SetupTunnel(tunnel->source->comp, tunnel->source_port, NULL, 0); + vc_assert(error == OMX_ErrorNone); + error = OMX_SetupTunnel(tunnel->sink->comp, tunnel->sink_port, NULL, 0); + vc_assert(error == OMX_ErrorNone); + + if(enable_error) + { + //Clean up the errors. This does risk removing an error that was nothing to do with this tunnel :-/ + ilclient_remove_event(tunnel->sink, OMX_EventError, 0, 1, 0, 1); + ilclient_remove_event(tunnel->source, OMX_EventError, 0, 1, 0, 1); + } + + ilclient_debug_output("ilclient: could not setup/enable tunnel (setup=0x%x,enable=%d)", + error, enable_error); + return -5; + } + + return 0; +} + +/*********************************************************** + * Name: ilclient_wait_for_event + * + * Description: waits for a given event to appear on a component event + * list. If not immediately present, will wait on that components + * event group for the given event flag. + * + * Returns: 0 indicates success, negative indicates failure. + * -1: a timeout was received. + * -2: an error event was received. + * -3: a config change event was received. + ***********************************************************/ +int ilclient_wait_for_event(COMPONENT_T *comp, OMX_EVENTTYPE event, + OMX_U32 nData1, int ignore1, OMX_IN OMX_U32 nData2, int ignore2, + int event_flag, int suspend) +{ + int32_t status; + uint32_t set; + + while (ilclient_remove_event(comp, event, nData1, ignore1, nData2, ignore2) < 0) + { + // if we want to be notified of errors, check the list for an error now + // before blocking, the event flag may have been cleared already. + if(event_flag & ILCLIENT_EVENT_ERROR) + { + ILEVENT_T *cur; + ilclient_lock_events(comp->client); + cur = comp->list; + while(cur && cur->eEvent != OMX_EventError) + cur = cur->next; + + if(cur) + { + // clear error flag + vcos_event_flags_get(&comp->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); + ilclient_unlock_events(comp->client); + return -2; + } + + ilclient_unlock_events(comp->client); + } + // check for config change event if we are asked to be notified of that + if(event_flag & ILCLIENT_CONFIG_CHANGED) + { + ILEVENT_T *cur; + ilclient_lock_events(comp->client); + cur = comp->list; + while(cur && cur->eEvent != OMX_EventParamOrConfigChanged) + cur = cur->next; + + ilclient_unlock_events(comp->client); + + if(cur) + return ilclient_remove_event(comp, event, nData1, ignore1, nData2, ignore2) == 0 ? 0 : -3; + } + + status = vcos_event_flags_get(&comp->event, event_flag, VCOS_OR_CONSUME, + suspend, &set); + if (status != 0) + return -1; + if (set & ILCLIENT_EVENT_ERROR) + return -2; + if (set & ILCLIENT_CONFIG_CHANGED) + return ilclient_remove_event(comp, event, nData1, ignore1, nData2, ignore2) == 0 ? 0 : -3; + } + + return 0; +} + + + +/*********************************************************** + * Name: ilclient_wait_for_command_complete_dual + * + * Description: Waits for an event signalling command completion. In + * this version we may also return failure if there is an error event + * that has terminated a command on a second component. + * + * Returns: 0 on success, -1 on failure of comp, -2 on failure of other + ***********************************************************/ +int ilclient_wait_for_command_complete_dual(COMPONENT_T *comp, OMX_COMMANDTYPE command, OMX_U32 nData2, COMPONENT_T *other) +{ + OMX_U32 mask = ILCLIENT_EVENT_ERROR; + int ret = 0; + + switch(command) { + case OMX_CommandStateSet: mask |= ILCLIENT_STATE_CHANGED; break; + case OMX_CommandPortDisable: mask |= ILCLIENT_PORT_DISABLED; break; + case OMX_CommandPortEnable: mask |= ILCLIENT_PORT_ENABLED; break; + default: return -1; + } + + if(other) + other->related = comp; + + while(1) + { + ILEVENT_T *cur, *prev = NULL; + VCOS_UNSIGNED set; + + ilclient_lock_events(comp->client); + + cur = comp->list; + while(cur && + !(cur->eEvent == OMX_EventCmdComplete && cur->nData1 == command && cur->nData2 == nData2) && + !(cur->eEvent == OMX_EventError && cur->nData2 == 1)) + { + prev = cur; + cur = cur->next; + } + + if(cur) + { + if(prev == NULL) + comp->list = cur->next; + else + prev->next = cur->next; + + // work out whether this was a success or a fail event + ret = cur->eEvent == OMX_EventCmdComplete || cur->nData1 == OMX_ErrorSameState ? 0 : -1; + + if(cur->eEvent == OMX_EventError) + vcos_event_flags_get(&comp->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); + + // add back into spare list + cur->next = comp->client->event_list; + comp->client->event_list = cur; + cur->eEvent = -1; // mark as unused + + ilclient_unlock_events(comp->client); + break; + } + else if(other != NULL) + { + // check the other component for an error event that terminates a command + cur = other->list; + while(cur && !(cur->eEvent == OMX_EventError && cur->nData2 == 1)) + cur = cur->next; + + if(cur) + { + // we don't remove the event in this case, since the user + // can confirm that this event errored by calling wait_for_command on the + // other component + + ret = -2; + ilclient_unlock_events(comp->client); + break; + } + } + + ilclient_unlock_events(comp->client); + + vcos_event_flags_get(&comp->event, mask, VCOS_OR_CONSUME, VCOS_SUSPEND, &set); + } + + if(other) + other->related = NULL; + + return ret; +} + + +/*********************************************************** + * Name: ilclient_wait_for_command_complete + * + * Description: Waits for an event signalling command completion. + * + * Returns: 0 on success, -1 on failure. + ***********************************************************/ +int ilclient_wait_for_command_complete(COMPONENT_T *comp, OMX_COMMANDTYPE command, OMX_U32 nData2) +{ + return ilclient_wait_for_command_complete_dual(comp, command, nData2, NULL); +} + +/*********************************************************** + * Name: ilclient_get_output_buffer + * + * Description: Returns an output buffer returned from a component + * using the OMX_FillBufferDone callback from the output list for the + * given component and port index. + * + * Returns: pointer to buffer if available, otherwise NULL + ***********************************************************/ +OMX_BUFFERHEADERTYPE *ilclient_get_output_buffer(COMPONENT_T *comp, int portIndex, int block) +{ + OMX_BUFFERHEADERTYPE *ret = NULL, *prev = NULL; + VCOS_UNSIGNED set; + + do { + vcos_semaphore_wait(&comp->sema); + ret = comp->out_list; + while(ret != NULL && ret->nOutputPortIndex != portIndex) + { + prev = ret; + ret = ret->pAppPrivate; + } + + if(ret) + { + if(prev == NULL) + comp->out_list = ret->pAppPrivate; + else + prev->pAppPrivate = ret->pAppPrivate; + + ret->pAppPrivate = NULL; + } + vcos_semaphore_post(&comp->sema); + + if(block && !ret) + vcos_event_flags_get(&comp->event, ILCLIENT_FILL_BUFFER_DONE, VCOS_OR_CONSUME, -1, &set); + + } while(block && !ret); + + return ret; +} + +/*********************************************************** + * Name: ilclient_get_input_buffer + * + * Description: Returns an input buffer return from a component using + * the OMX_EmptyBufferDone callback from the output list for the given + * component and port index. + * + * Returns: pointer to buffer if available, otherwise NULL + ***********************************************************/ +OMX_BUFFERHEADERTYPE *ilclient_get_input_buffer(COMPONENT_T *comp, int portIndex, int block) +{ + OMX_BUFFERHEADERTYPE *ret = NULL, *prev = NULL; + + do { + VCOS_UNSIGNED set; + + vcos_semaphore_wait(&comp->sema); + ret = comp->in_list; + while(ret != NULL && ret->nInputPortIndex != portIndex) + { + prev = ret; + ret = ret->pAppPrivate; + } + + if(ret) + { + if(prev == NULL) + comp->in_list = ret->pAppPrivate; + else + prev->pAppPrivate = ret->pAppPrivate; + + ret->pAppPrivate = NULL; + } + vcos_semaphore_post(&comp->sema); + + if(block && !ret) + vcos_event_flags_get(&comp->event, ILCLIENT_EMPTY_BUFFER_DONE, VCOS_OR_CONSUME, -1, &set); + + } while(block && !ret); + + return ret; +} + +/*********************************************************** + * Name: ilclient_debug_output + * + * Description: prints a varg message to the log or the debug screen + * under win32 + * + * Returns: void + ***********************************************************/ +void ilclient_debug_output(char *format, ...) +{ + va_list args; + + va_start(args, format); + vcos_vlog_info(format, args); + va_end(args); +} + +/****************************************************************************** +Static functions +******************************************************************************/ + +/*********************************************************** + * Name: ilclient_lock_events + * + * Description: locks the client event structure + * + * Returns: void + ***********************************************************/ +static void ilclient_lock_events(ILCLIENT_T *st) +{ + vcos_semaphore_wait(&st->event_sema); +} + +/*********************************************************** + * Name: ilclient_unlock_events + * + * Description: unlocks the client event structure + * + * Returns: void + ***********************************************************/ +static void ilclient_unlock_events(ILCLIENT_T *st) +{ + vcos_semaphore_post(&st->event_sema); +} + +/*********************************************************** + * Name: ilclient_event_handler + * + * Description: event handler passed to core to use as component + * callback + * + * Returns: success + ***********************************************************/ +static OMX_ERRORTYPE ilclient_event_handler(OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_EVENTTYPE eEvent, + OMX_IN OMX_U32 nData1, + OMX_IN OMX_U32 nData2, + OMX_IN OMX_PTR pEventData) +{ + COMPONENT_T *st = (COMPONENT_T *) pAppData; + ILEVENT_T *event; + OMX_ERRORTYPE error = OMX_ErrorNone; + + ilclient_lock_events(st->client); + + // go through the events on this component and remove any duplicates in the + // existing list, since the client probably doesn't need them. it's better + // than asserting when we run out. + event = st->list; + while(event != NULL) + { + ILEVENT_T **list = &(event->next); + while(*list != NULL) + { + if((*list)->eEvent == event->eEvent && + (*list)->nData1 == event->nData1 && + (*list)->nData2 == event->nData2) + { + // remove this duplicate + ILEVENT_T *rem = *list; + ilclient_debug_output("%s: removing %d/%d/%d", st->name, event->eEvent, event->nData1, event->nData2); + *list = rem->next; + rem->eEvent = -1; + rem->next = st->client->event_list; + st->client->event_list = rem; + } + else + list = &((*list)->next); + } + + event = event->next; + } + + vc_assert(st->client->event_list); + event = st->client->event_list; + + switch (eEvent) { + case OMX_EventCmdComplete: + switch (nData1) { + case OMX_CommandStateSet: + ilclient_debug_output("%s: callback state changed (%s)", st->name, states[nData2]); + vcos_event_flags_set(&st->event, ILCLIENT_STATE_CHANGED, VCOS_OR); + break; + case OMX_CommandPortDisable: + ilclient_debug_output("%s: callback port disable %d", st->name, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_PORT_DISABLED, VCOS_OR); + break; + case OMX_CommandPortEnable: + ilclient_debug_output("%s: callback port enable %d", st->name, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_PORT_ENABLED, VCOS_OR); + break; + case OMX_CommandFlush: + ilclient_debug_output("%s: callback port flush %d", st->name, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_PORT_FLUSH, VCOS_OR); + break; + case OMX_CommandMarkBuffer: + ilclient_debug_output("%s: callback mark buffer %d", st->name, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_MARKED_BUFFER, VCOS_OR); + break; + default: + vc_assert(0); + } + break; + case OMX_EventError: + { + // check if this component failed a command, and we have to notify another command + // of this failure + if(nData2 == 1 && st->related != NULL) + vcos_event_flags_set(&st->related->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + + error = nData1; + switch (error) { + case OMX_ErrorPortUnpopulated: + if (st->error_mask & ILCLIENT_ERROR_UNPOPULATED) + { + ilclient_debug_output("%s: ignore error: port unpopulated (%d)", st->name, nData2); + event = NULL; + break; + } + ilclient_debug_output("%s: port unpopulated %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorSameState: + if (st->error_mask & ILCLIENT_ERROR_SAMESTATE) + { + ilclient_debug_output("%s: ignore error: same state (%d)", st->name, nData2); + event = NULL; + break; + } + ilclient_debug_output("%s: same state %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorBadParameter: + if (st->error_mask & ILCLIENT_ERROR_BADPARAMETER) + { + ilclient_debug_output("%s: ignore error: bad parameter (%d)", st->name, nData2); + event = NULL; + break; + } + ilclient_debug_output("%s: bad parameter %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorIncorrectStateTransition: + ilclient_debug_output("%s: incorrect state transition %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorBadPortIndex: + ilclient_debug_output("%s: bad port index %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorStreamCorrupt: + ilclient_debug_output("%s: stream corrupt %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorInsufficientResources: + ilclient_debug_output("%s: insufficient resources %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorUnsupportedSetting: + ilclient_debug_output("%s: unsupported setting %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorOverflow: + ilclient_debug_output("%s: overflow %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorDiskFull: + ilclient_debug_output("%s: disk full %x (%d)", st->name, error, nData2); + //we do not set the error + break; + case OMX_ErrorMaxFileSize: + ilclient_debug_output("%s: max file size %x (%d)", st->name, error, nData2); + //we do not set the error + break; + case OMX_ErrorDrmUnauthorised: + ilclient_debug_output("%s: drm file is unauthorised %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorDrmExpired: + ilclient_debug_output("%s: drm file has expired %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + case OMX_ErrorDrmGeneral: + ilclient_debug_output("%s: drm library error %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + default: + vc_assert(0); + ilclient_debug_output("%s: unexpected error %x (%d)", st->name, error, nData2); + vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); + break; + } + } + break; + case OMX_EventBufferFlag: + ilclient_debug_output("%s: buffer flag %d/%x", st->name, nData1, nData2); + if (nData2 & OMX_BUFFERFLAG_EOS) + { + vcos_event_flags_set(&st->event, ILCLIENT_BUFFER_FLAG_EOS, VCOS_OR); + nData2 = OMX_BUFFERFLAG_EOS; + } + else + vc_assert(0); + break; + case OMX_EventPortSettingsChanged: + ilclient_debug_output("%s: port settings changed %d", st->name, nData1); + vcos_event_flags_set(&st->event, ILCLIENT_PARAMETER_CHANGED, VCOS_OR); + break; + case OMX_EventMark: + ilclient_debug_output("%s: buffer mark %p", st->name, pEventData); + vcos_event_flags_set(&st->event, ILCLIENT_BUFFER_MARK, VCOS_OR); + break; + case OMX_EventParamOrConfigChanged: + ilclient_debug_output("%s: param/config 0x%X on port %d changed", st->name, nData2, nData1); + vcos_event_flags_set(&st->event, ILCLIENT_CONFIG_CHANGED, VCOS_OR); + break; + default: + vc_assert(0); + break; + } + + if (event) + { + // fill in details + event->eEvent = eEvent; + event->nData1 = nData1; + event->nData2 = nData2; + event->pEventData = pEventData; + + // remove from top of spare list + st->client->event_list = st->client->event_list->next; + + // put at head of component event queue + event->next = st->list; + st->list = event; + } + ilclient_unlock_events(st->client); + + // now call any callbacks without the event lock so the client can + // remove the event in context + switch(eEvent) { + case OMX_EventError: + if(event && st->client->error_callback) + st->client->error_callback(st->client->error_callback_data, st, error); + break; + case OMX_EventBufferFlag: + if ((nData2 & OMX_BUFFERFLAG_EOS) && st->client->eos_callback) + st->client->eos_callback(st->client->eos_callback_data, st, nData1); + break; + case OMX_EventPortSettingsChanged: + if (st->client->port_settings_callback) + st->client->port_settings_callback(st->client->port_settings_callback_data, st, nData1); + break; + case OMX_EventParamOrConfigChanged: + if (st->client->configchanged_callback) + st->client->configchanged_callback(st->client->configchanged_callback_data, st, nData2); + break; + default: + // ignore + break; + } + + return OMX_ErrorNone; +} + +/*********************************************************** + * Name: ilclient_empty_buffer_done + * + * Description: passed to core to use as component callback, puts + * buffer on list + * + * Returns: + ***********************************************************/ +static OMX_ERRORTYPE ilclient_empty_buffer_done(OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) +{ + COMPONENT_T *st = (COMPONENT_T *) pAppData; + OMX_BUFFERHEADERTYPE *list; + + ilclient_debug_output("%s: empty buffer done %p", st->name, pBuffer); + + vcos_semaphore_wait(&st->sema); + // insert at end of the list, so we process buffers in + // the same order + list = st->in_list; + while(list && list->pAppPrivate) + list = list->pAppPrivate; + + if(!list) + st->in_list = pBuffer; + else + list->pAppPrivate = pBuffer; + + pBuffer->pAppPrivate = NULL; + vcos_semaphore_post(&st->sema); + + vcos_event_flags_set(&st->event, ILCLIENT_EMPTY_BUFFER_DONE, VCOS_OR); + + if (st->client->empty_buffer_done_callback) + st->client->empty_buffer_done_callback(st->client->empty_buffer_done_callback_data, st); + + return OMX_ErrorNone; +} + +/*********************************************************** + * Name: ilclient_empty_buffer_done_error + * + * Description: passed to core to use as component callback, asserts + * on use as client not expecting component to use this callback. + * + * Returns: + ***********************************************************/ +static OMX_ERRORTYPE ilclient_empty_buffer_done_error(OMX_IN OMX_HANDLETYPE hComponent, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) +{ + vc_assert(0); + return OMX_ErrorNone; +} + +/*********************************************************** + * Name: ilclient_fill_buffer_done + * + * Description: passed to core to use as component callback, puts + * buffer on list + * + * Returns: + ***********************************************************/ +static OMX_ERRORTYPE ilclient_fill_buffer_done(OMX_OUT OMX_HANDLETYPE hComponent, + OMX_OUT OMX_PTR pAppData, + OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer) +{ + COMPONENT_T *st = (COMPONENT_T *) pAppData; + OMX_BUFFERHEADERTYPE *list; + + ilclient_debug_output("%s: fill buffer done %p", st->name, pBuffer); + + vcos_semaphore_wait(&st->sema); + // insert at end of the list, so we process buffers in + // the correct order + list = st->out_list; + while(list && list->pAppPrivate) + list = list->pAppPrivate; + + if(!list) + st->out_list = pBuffer; + else + list->pAppPrivate = pBuffer; + + pBuffer->pAppPrivate = NULL; + vcos_semaphore_post(&st->sema); + + vcos_event_flags_set(&st->event, ILCLIENT_FILL_BUFFER_DONE, VCOS_OR); + + if (st->client->fill_buffer_done_callback) + st->client->fill_buffer_done_callback(st->client->fill_buffer_done_callback_data, st); + + return OMX_ErrorNone; +} + +/*********************************************************** + * Name: ilclient_fill_buffer_done_error + * + * Description: passed to core to use as component callback, asserts + * on use as client not expecting component to use this callback. + * + * Returns: + ***********************************************************/ +static OMX_ERRORTYPE ilclient_fill_buffer_done_error(OMX_OUT OMX_HANDLETYPE hComponent, + OMX_OUT OMX_PTR pAppData, + OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer) +{ + vc_assert(0); + return OMX_ErrorNone; +} + + + +OMX_HANDLETYPE ilclient_get_handle(COMPONENT_T *comp) +{ + vcos_assert(comp); + return comp->comp; +} + + +static struct { + OMX_PORTDOMAINTYPE dom; + int param; +} port_types[] = { + { OMX_PortDomainVideo, OMX_IndexParamVideoInit }, + { OMX_PortDomainAudio, OMX_IndexParamAudioInit }, + { OMX_PortDomainImage, OMX_IndexParamImageInit }, + { OMX_PortDomainOther, OMX_IndexParamOtherInit }, +}; + +int ilclient_get_port_index(COMPONENT_T *comp, OMX_DIRTYPE dir, OMX_PORTDOMAINTYPE type, int index) +{ + uint32_t i; + // for each possible port type... + for (i=0; i<sizeof(port_types)/sizeof(port_types[0]); i++) + { + if ((port_types[i].dom == type) || (type == (OMX_PORTDOMAINTYPE) -1)) + { + OMX_PORT_PARAM_TYPE param; + OMX_ERRORTYPE error; + uint32_t j; + + param.nSize = sizeof(param); + param.nVersion.nVersion = OMX_VERSION; + error = OMX_GetParameter(ILC_GET_HANDLE(comp), port_types[i].param, &param); + assert(error == OMX_ErrorNone); + + // for each port of this type... + for (j=0; j<param.nPorts; j++) + { + int port = param.nStartPortNumber+j; + + OMX_PARAM_PORTDEFINITIONTYPE portdef; + portdef.nSize = sizeof(portdef); + portdef.nVersion.nVersion = OMX_VERSION; + portdef.nPortIndex = port; + + error = OMX_GetParameter(ILC_GET_HANDLE(comp), OMX_IndexParamPortDefinition, &portdef); + assert(error == OMX_ErrorNone); + + if (portdef.eDir == dir) + { + if (index-- == 0) + return port; + } + } + } + } + return -1; +} + +int ilclient_suggest_bufsize(COMPONENT_T *comp, OMX_U32 nBufSizeHint) +{ + OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE param; + OMX_ERRORTYPE error; + + param.nSize = sizeof(param); + param.nVersion.nVersion = OMX_VERSION; + param.nBufferSize = nBufSizeHint; + error = OMX_SetParameter(ILC_GET_HANDLE(comp), OMX_IndexParamBrcmOutputBufferSize, + &param); + assert(error == OMX_ErrorNone); + + return (error == OMX_ErrorNone) ? 0 : -1; +} + +unsigned int ilclient_stack_size(void) +{ + return ILCLIENT_THREAD_DEFAULT_STACK_SIZE; +} + diff --git a/gui/libs/ilclient/ilclient.h b/gui/libs/ilclient/ilclient.h @@ -0,0 +1,1039 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * \file + * + * \brief This API defines helper functions for writing IL clients. + * + * This file defines an IL client side library. This is useful when + * writing IL clients, since there tends to be much repeated and + * common code across both single and multiple clients. This library + * seeks to remove that common code and abstract some of the + * interactions with components. There is a wrapper around a + * component and tunnel, and some operations can be done on lists of + * these. The callbacks from components are handled, and specific + * events can be checked or waited for. + */ + +#ifndef _IL_CLIENT_H +#define _IL_CLIENT_H + +#include "IL/OMX_Broadcom.h" +#include "interface/vcos/vcos.h" + +/** + * The <DFN>ILCLIENT_T</DFN> structure encapsulates the state needed for the IL + * Client API. It contains a set of callback functions used to + * communicate with the user. It also includes a linked list of free + * event structures. + ***********************************************************/ +typedef struct _ILCLIENT_T ILCLIENT_T; + + +/** + * Each <DFN>ILEVENT_T</DFN> structure stores the result of an <DFN>EventHandler</DFN> + * callback from a component, storing the event message type and any + * parameters returned. + ***********************************************************/ +typedef struct _ILEVENT_T ILEVENT_T; + + + +struct _COMPONENT_T; + +/** + * The <DFN>COMPONENT_T</DFN> structure represents an IL component, + * together with the necessary extra information required by the IL + * Client API. This structure stores the handle to the OMX component, + * as well as the event list containing all events sent by this + * component. The component state structure also holds a pair of + * buffer queues, for input and output buffers returned to the client + * by the <DFN>FillBufferDone</DFN> and <DFN>EmptyBufferDone</DFN> + * callbacks. As some operations result in error callbacks that can + * be ignored, an error mask is maintained to allow some errors to be + * ignored. A pointer to the client state structure is also added. + ***********************************************************/ +typedef struct _COMPONENT_T COMPONENT_T; + + +/** + * The generic callback function is used for communicating events from + * a particular component to the user. + * + * @param userdata The data returned from when the callback was registered. + * + * @param comp The component structure representing the component that + * originated this event. + * + * @param data The relevant data field from the event. + * + * @return Void. + ***********************************************************/ +typedef void (*ILCLIENT_CALLBACK_T)(void *userdata, COMPONENT_T *comp, OMX_U32 data); + + +/** + * The buffer callback function is used for indicating that a + * component has returned a buffer on a port using client buffer + * communication. + * + * @param data The data returned from when the callback was registered. + * + * @param comp The component from which the buffer originated. + * + * @return Void. + ***********************************************************/ +typedef void (*ILCLIENT_BUFFER_CALLBACK_T)(void *data, COMPONENT_T *comp); + + +/** + * The malloc function is passed into + * <DFN>ilclient_enable_port_buffers()</DFN> and used for allocating the + * buffer payload. + * + * @param userdata Private pointer passed into + * <DFN>ilclient_enable_port_buffers()</DFN> call. + * + * @param size Size in bytes of the requested memory region. + * + * @param align Alignment requirement in bytes for the base memory address. + * + * @param description Text description of the memory being allocated. + * + * @return The memory address on success, <DFN>NULL</DFN> on failure. + ***********************************************************/ +typedef void *(*ILCLIENT_MALLOC_T)(void *userdata, VCOS_UNSIGNED size, VCOS_UNSIGNED align, const char *description); + + +/** + * The free function is passed into + * <DFN>ilclient_enable_port_buffers()</DFN> and + * <DFN>ilclient_disable_port_buffers()</DFN> and used for freeing the + * buffer payload. + * + * @param userdata Private pointer passed into + * <DFN>ilclient_enable_port_buffers()</DFN> and + * <DFN>ilclient_disable_port_buffers()</DFN>. + * + * @param pointer Memory address to free, that was previously returned + * from <DFN>ILCLIENT_MALLOC_T</DFN> function. + * + * @return Void. + ***********************************************************/ +typedef void (*ILCLIENT_FREE_T)(void *userdata, void *pointer); + + +/** + * The event mask enumeration describes the possible events that the + * user can ask to wait for when waiting for a particular event. + ***********************************************************/ +typedef enum { + ILCLIENT_EMPTY_BUFFER_DONE = 0x1, /**< Set when a buffer is + returned from an input + port */ + + ILCLIENT_FILL_BUFFER_DONE = 0x2, /**< Set when a buffer is + returned from an output + port */ + + ILCLIENT_PORT_DISABLED = 0x4, /**< Set when a port indicates + it has completed a disable + command. */ + + ILCLIENT_PORT_ENABLED = 0x8, /**< Set when a port indicates + is has completed an enable + command. */ + + ILCLIENT_STATE_CHANGED = 0x10, /**< Set when a component + indicates it has completed + a state change command. */ + + ILCLIENT_BUFFER_FLAG_EOS = 0x20, /**< Set when a port signals + an EOS event. */ + + ILCLIENT_PARAMETER_CHANGED = 0x40, /**< Set when a port signals a + port settings changed + event. */ + + ILCLIENT_EVENT_ERROR = 0x80, /**< Set when a component + indicates an error. */ + + ILCLIENT_PORT_FLUSH = 0x100, /**< Set when a port indicates + is has completed a flush + command. */ + + ILCLIENT_MARKED_BUFFER = 0x200, /**< Set when a port indicates + it has marked a buffer. */ + + ILCLIENT_BUFFER_MARK = 0x400, /**< Set when a port indicates + it has received a buffer + mark. */ + + ILCLIENT_CONFIG_CHANGED = 0x800 /**< Set when a config parameter + changed. */ +} ILEVENT_MASK_T; + + +/** + * On component creation the user can set flags to control the + * creation of that component. + ***********************************************************/ +typedef enum { + ILCLIENT_FLAGS_NONE = 0x0, /**< Used if no flags are + set. */ + + ILCLIENT_ENABLE_INPUT_BUFFERS = 0x1, /**< If set we allow the + client to communicate with + input ports via buffer + communication, rather than + tunneling with another + component. */ + + ILCLIENT_ENABLE_OUTPUT_BUFFERS = 0x2, /**< If set we allow the + client to communicate with + output ports via buffer + communication, rather than + tunneling with another + component. */ + + ILCLIENT_DISABLE_ALL_PORTS = 0x4, /**< If set we disable all + ports on creation. */ + + ILCLIENT_HOST_COMPONENT = 0x8, /**< Create a host component. + The default host ilcore + only can create host components + by being locally hosted + so should only be used for testing + purposes. */ + + ILCLIENT_OUTPUT_ZERO_BUFFERS = 0x10 /**< All output ports will have + nBufferCountActual set to zero, + if supported by the component. */ +} ILCLIENT_CREATE_FLAGS_T; + + +/** + * \brief This structure represents a tunnel in the OpenMAX IL API. + * + * Some operations in this API act on a tunnel, so the tunnel state + * structure (<DFN>TUNNEL_T</DFN>) is a convenient store of the source and sink + * of the tunnel. For each, a pointer to the relevant component state + * structure and the port index is stored. + ***********************************************************/ +typedef struct { + COMPONENT_T *source; /**< The source component */ + int source_port; /**< The output port index on the source component */ + COMPONENT_T *sink; /**< The sink component */ + int sink_port; /**< The input port index on the sink component */ +} TUNNEL_T; + + +/** + * The <DFN>set_tunnel</DFN> macro is a useful function that initialises a + * <DFN>TUNNEL_T</DFN> structure. + ***********************************************************/ +#define set_tunnel(t,a,b,c,d) do {TUNNEL_T *_ilct = (t); \ + _ilct->source = (a); _ilct->source_port = (b); \ + _ilct->sink = (c); _ilct->sink_port = (d);} while(0) + +/** + * For calling OpenMAX IL methods directory, we need to access the + * <DFN>OMX_HANDLETYPE</DFN> corresponding to the <DFN>COMPONENT_T</DFN> structure. This + * macro enables this while keeping the <DFN>COMPONENT_T</DFN> structure opaque. + * The parameter <DFN>x</DFN> should be of the type <DFN>*COMPONENT_T</DFN>. + ***********************************************************/ +#define ILC_GET_HANDLE(x) ilclient_get_handle(x) + +/** + * An IL Client structure is created by the <DFN>ilclient_init()</DFN> + * method. This structure is used when creating components, but + * otherwise is not needed in other API functions as a pointer to this + * structure is maintained in the <DFN>COMPONENT_T</DFN> structure. + * + * @return pointer to client structure + ***********************************************************/ +VCHPRE_ ILCLIENT_T VCHPOST_ *ilclient_init(void); + +/** + * When all components have been deleted, the IL Client structure can + * be destroyed by calling the <DFN>ilclient_destroy()</DFN> function. + * + * @param handle The client handle. After calling this function, this + * handle should not be used. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_destroy(ILCLIENT_T *handle); + +/** + * The <DFN>ilclient_set_port_settings_callback()</DFN> function registers a + * callback to be used when the <DFN>OMX_EventPortSettingsChanged</DFN> event is + * received. When the event is received, a pointer to the component + * structure and port index is returned by the callback. + * + * @param handle The client handle + * + * @param func The callback function to use. Calling this function + * with a <DFN>NULL</DFN> function pointer will deregister any existing + * registered callback. + * + * @param userdata Data to be passed back when calling the callback + * function. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_set_port_settings_callback(ILCLIENT_T *handle, + ILCLIENT_CALLBACK_T func, + void *userdata); + +/** + * The <DFN>ilclient_set_eos_callback()</DFN> function registers a callback to be + * used when the <DFN>OMX_EventBufferFlag</DFN> is received with the + * <DFN>OMX_BUFFERFLAG_EOS</DFN> flag set. When the event is received, a pointer + * to the component structure and port index is returned by the + * callback. + * + * @param handle The client handle + * + * @param func The callback function to use. Calling this function + * with a <DFN>NULL</DFN> function pointer will deregister any existing + * registered callback. + * + * @param userdata Data to be passed back when calling the callback + * function. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_set_eos_callback(ILCLIENT_T *handle, + ILCLIENT_CALLBACK_T func, + void *userdata); + +/** + * The <DFN>ilclient_set_error_callback()</DFN> function registers a callback to be + * used when the <DFN>OMX_EventError</DFN> is received from a component. When + * the event is received, a pointer to the component structure and the + * error code are reported by the callback. + * + * @param handle The client handle + * + * @param func The callback function to use. Calling this function + * with a <DFN>NULL</DFN> function pointer will deregister any existing + * registered callback. + * + * @param userdata Data to be passed back when calling the callback + * function. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_set_error_callback(ILCLIENT_T *handle, + ILCLIENT_CALLBACK_T func, + void *userdata); + +/** + * The <DFN>ilclient_set_configchanged_callback()</DFN> function + * registers a callback to be used when an + * <DFN>OMX_EventParamOrConfigChanged</DFN> event occurs. When the + * event is received, a pointer to the component structure and the + * index value that has changed are reported by the callback. The + * user may then use an <DFN>OMX_GetConfig</DFN> call with the index + * as specified to retrieve the updated information. + * + * @param handle The client handle + * + * @param func The callback function to use. Calling this function + * with a <DFN>NULL</DFN> function pointer will deregister any existing + * registered callback. + * + * @param userdata Data to be passed back when calling the callback + * function. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_set_configchanged_callback(ILCLIENT_T *handle, + ILCLIENT_CALLBACK_T func, + void *userdata); + + +/** + * The <DFN>ilclient_set_fill_buffer_done_callback()</DFN> function registers a + * callback to be used when a buffer passed to an output port using the + * <DFN>OMX_FillBuffer</DFN> call is returned with the <DFN>OMX_FillBufferDone</DFN> + * callback. When the event is received, a pointer to the component + * structure is returned by the callback. The user may then use the + * <DFN>ilclient_get_output_buffer()</DFN> function to retrieve the buffer. + * + * @param handle The client handle + * + * @param func The callback function to use. Calling this function + * with a <DFN>NULL</DFN> function pointer will deregister any existing + * registered callback. + * + * @param userdata Data to be passed back when calling the callback + * function. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_set_fill_buffer_done_callback(ILCLIENT_T *handle, + ILCLIENT_BUFFER_CALLBACK_T func, + void *userdata); + +/** + * The <DFN>ilclient_set_empty_buffer_done_callback()</DFN> function registers a + * callback to be used when a buffer passed to an input port using the + * <DFN>OMX_EmptyBuffer</DFN> call is returned with the <DFN>OMX_EmptyBufferDone</DFN> + * callback. When the event is received, a pointer to the component + * structure is returned by the callback. The user may then use the + * <DFN>ilclient_get_input_buffer()</DFN> function to retrieve the buffer. + * + * @param handle The client handle + * + * @param func The callback function to use. Calling this function + * with a <DFN>NULL</DFN> function pointer will deregister any existing + * registered callback. + * + * @param userdata Data to be passed back when calling the callback + * function. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_set_empty_buffer_done_callback(ILCLIENT_T *handle, + ILCLIENT_BUFFER_CALLBACK_T func, + void *userdata); + + +/** + * Components are created using the <DFN>ilclient_create_component()</DFN> + * function. + * + * @param handle The client handle + * + * @param comp On successful creation, the component structure pointer + * will be written back into <DFN>comp</DFN>. + * + * @param name The name of the component to be created. Component + * names as provided are automatically prefixed with + * <DFN>"OMX.broadcom."</DFN> before passing to the IL core. The name + * provided will also be used in debugging messages added about this + * component. + * + * @param flags The client can specify some creation behaviour by using + * the <DFN>flags</DFN> field. The meaning of each flag is defined + * by the <DFN>ILCLIENT_CREATE_FLAGS_T</DFN> type. + * + * @return 0 on success, -1 on failure + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_create_component(ILCLIENT_T *handle, + COMPONENT_T **comp, + char *name, + ILCLIENT_CREATE_FLAGS_T flags); + +/** + * The <DFN>ilclient_cleanup_components()</DFN> function deallocates all + * state associated with components and frees the OpenMAX component + * handles. All tunnels connecting components should have been torn + * down explicitly, and all components must be in loaded state. + * + * @param list A null-terminated list of component pointers to be + * deallocated. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_cleanup_components(COMPONENT_T *list[]); + + +/** + * The <DFN>ilclient_change_component_state()</DFN> function changes the + * state of an individual component. This will trigger the state + * change, and also wait for that state change to be completed. It + * should not be called if this state change has dependencies on other + * components also changing states. Trying to change a component to + * its current state is treated as success. + * + * @param comp The component to change. + * + * @param state The new state to transition to. + * + * @return 0 on success, -1 on failure. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_change_component_state(COMPONENT_T *comp, + OMX_STATETYPE state); + + +/** + * The <DFN>ilclient_state_transition()</DFN> function transitions a set of + * components that need to perform a simultaneous state transition; + * for example, when two components are tunnelled and the buffer + * supplier port needs to allocate and pass buffers to a non-supplier + * port. All components are sent a command to change state, then the + * function will wait for all components to signal that they have + * changed state. + * + * @param list A null-terminated list of component pointers. + * + * @param state The new state to which to transition all components. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_state_transition(COMPONENT_T *list[], + OMX_STATETYPE state); + + +/** + * The <DFN>ilclient_disable_port()</DFN> function disables a port on a + * given component. This function sends the disable port message to + * the component and waits for the component to signal that this has + * taken place. If the port is already disabled, this is treated as a + * success. + * + * @param comp The component containing the port to disable. + * + * @param portIndex The port index of the port to disable. This must + * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_disable_port(COMPONENT_T *comp, + int portIndex); + + +/** + * The <DFN>ilclient_enable_port()</DFN> function enables a port on a + * given component. This function sends the enable port message to + * the component and waits for the component to signal that this has + * taken place. If the port is already disabled, this is treated as a + * success. + * + * @param comp The component containing the port to enable. + * + * @param portIndex The port index of the port to enable. This must + * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_enable_port(COMPONENT_T *comp, + int portIndex); + + + +/** + * The <DFN>ilclient_enable_port_buffers()</DFN> function enables a port + * in base profile mode on a given component. The port is not + * tunneled, so requires buffers to be allocated. + * + * @param comp The component containing the port to enable. + * + * @param portIndex The port index of the port to enable. This must + * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. + * + * @param ilclient_malloc This function will be used to allocate + * buffer payloads. If <DFN>NULL</DFN> then + * <DFN>vcos_malloc_aligned</DFN> will be used. + * + * @param ilclient_free If an error occurs, this function is used to + * free previously allocated payloads. If <DFN>NULL</DFN> then + * <DFN>vcos_free</DFN> will be used. + * + * @param userdata The first argument to calls to + * <DFN>ilclient_malloc</DFN> and <DFN>ilclient_free</DFN>, if these + * arguments are not <DFN>NULL</DFN>. + * + * @return 0 indicates success. -1 indicates failure. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_enable_port_buffers(COMPONENT_T *comp, + int portIndex, + ILCLIENT_MALLOC_T ilclient_malloc, + ILCLIENT_FREE_T ilclient_free, + void *userdata); + + +/** + * The <DFN>ilclient_disable_port_buffers()</DFN> function disables a + * port in base profile mode on a given component. The port is not + * tunneled, and has been supplied with buffers by the client. + * + * @param comp The component containing the port to disable. + * + * @param portIndex The port index of the port to disable. This must + * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. + * + * @param bufferList A list of buffers, using <DFN>pAppPrivate</DFN> + * as the next pointer that were allocated on this port, and currently + * held by the application. If buffers on this port are held by IL + * client or the component then these are automatically freed. + * + * @param ilclient_free This function is used to free the buffer payloads. + * If <DFN>NULL</DFN> then <DFN>vcos_free</DFN> will be used. + * + * @param userdata The first argument to calls to + * <DFN>ilclient_free</DFN>. + * + * @return void + */ +VCHPRE_ void VCHPOST_ ilclient_disable_port_buffers(COMPONENT_T *comp, + int portIndex, + OMX_BUFFERHEADERTYPE *bufferList, + ILCLIENT_FREE_T ilclient_free, + void *userdata); + + +/** + * With a populated tunnel structure, the + * <DFN>ilclient_setup_tunnel()</DFN> function connects the tunnel. It + * first transitions the source component to idle if currently in + * loaded state, and then optionally checks the source event list for + * a port settings changed event from the source port. If this event + * is not in the event queue then this function optionally waits for + * it to arrive. To disable this check for the port settings changed + * event, set <DFN>timeout</DFN> to zero. + * + * Both ports are then disabled, and the source port is inspected for + * a port streams parameter. If this is supported, then the + * <DFN>portStream</DFN> argument is used to select which port stream + * to use. The two ports are then tunnelled using the + * <DFN>OMX_SetupTunnel</DFN> function. If this is successful, then + * both ports are enabled. Note that for disabling and enabling the + * tunnelled ports, the functions <DFN>ilclient_disable_tunnel()</DFN> + * and <DFN>ilclient_enable_tunnel()</DFN> are used, so the relevant + * documentation for those functions applies here. + * + * @param tunnel The tunnel structure representing the tunnel to + * set up. + * + * @param portStream If port streams are supported on the output port + * of the tunnel, then this parameter indicates the port stream to + * select on this port. + * + * @param timeout The time duration in milliseconds to wait for the + * output port to signal a port settings changed event before + * returning a timeout failure. If this is 0, then we do not check + * for a port settings changed before setting up the tunnel. + * + * @return 0 indicates success, negative indicates failure: + * - -1: a timeout waiting for the parameter changed + * - -2: an error was returned instead of parameter changed + * - -3: no streams are available from this port + * - -4: requested stream is not available from this port + * - -5: the data format was not acceptable to the sink + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_setup_tunnel(TUNNEL_T *tunnel, + unsigned int portStream, + int timeout); + + +/** + * The <DFN>ilclient_disable_tunnel()</DFN> function disables both ports listed in + * the tunnel structure. It will send a port disable command to each + * port, then waits for both to indicate they have completed the + * transition. The errors <DFN>OMX_ErrorPortUnpopulated</DFN> and + * <DFN>OMX_ErrorSameState</DFN> are both ignored by this function; the former + * since the first port to disable may deallocate buffers before the + * second port has been disabled, leading to the second port reporting + * the unpopulated error. + * + * @param tunnel The tunnel to disable. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_disable_tunnel(TUNNEL_T *tunnel); + + +/** + * The <DFN>ilclient_enable_tunnel()</DFN> function enables both ports listed in + * the tunnel structure. It will first send a port enable command to + * each port. It then checks whether the sink component is not in + * loaded state - if so, the function waits for both ports to complete + * the requested port enable. If the sink component was in loaded + * state, then this component is transitioned to idle to allow the + * ports to exchange buffers and enable the ports. This is since + * typically this function is used when creating a tunnel between two + * components, where the source component is processing data to enable + * it to report the port settings changed event, and the sink port has + * yet to be used. Before transitioning the sink component to idle, + * this function waits for the sink port to be enabled - since the + * component is in loaded state, this will happen quickly. If the + * transition to idle fails, the sink component is transitioned back + * to loaded and the source port disabled. If the transition + * succeeds, the function then waits for the source port to complete + * the requested port enable. + * + * @param tunnel The tunnel to enable. + * + * @return 0 on success, -1 on failure. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_enable_tunnel(TUNNEL_T *tunnel); + + +/** + * The <DFN>ilclient_flush_tunnels()</DFN> function will flush a number of tunnels + * from the list of tunnels presented. For each tunnel that is to be + * flushed, both source and sink ports are sent a flush command. The + * function then waits for both ports to report they have completed + * the flush operation. + * + * @param tunnel List of tunnels. The list must be terminated with a + * tunnel structure with <DFN>NULL</DFN> component entries. + * + * @param max The maximum number of tunnels to flush from the list. + * A value of 0 indicates that all tunnels in the list are flushed. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_flush_tunnels(TUNNEL_T *tunnel, + int max); + + +/** + * The <DFN>ilclient_teardown_tunnels()</DFN> function tears down all tunnels in + * the list of tunnels presented. For each tunnel in the list, the + * <DFN>OMX_SetupTunnel</DFN> is called on the source port and on the sink port, + * where for both calls the destination component is <DFN>NULL</DFN> and the + * destination port is zero. The VMCSX IL implementation requires + * that all tunnels are torn down in this manner before components are + * freed. + * + * @param tunnels List of tunnels to teardown. The list must be + * terminated with a tunnel structure with <DFN>NULL</DFN> component entries. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_teardown_tunnels(TUNNEL_T *tunnels); + + +/** + * The <DFN>ilclient_get_output_buffer()</DFN> function returns a buffer + * that was sent to an output port and that has been returned from a + * component using the <DFN>OMX_FillBufferDone</DFN> callback. + * + * @param comp The component that returned the buffer. + * + * @param portIndex The port index on the component that the buffer + * was returned from. + * + * @param block If non-zero, the function will block until a buffer is available. + * + * @return Pointer to buffer if available, otherwise <DFN>NULL</DFN>. + ***********************************************************/ +VCHPRE_ OMX_BUFFERHEADERTYPE* VCHPOST_ ilclient_get_output_buffer(COMPONENT_T *comp, + int portIndex, + int block); + + +/** + * The <DFN>ilclient_get_input_buffer()</DFN> function returns a buffer + * that was sent to an input port and that has been returned from a + * component using the <DFN>OMX_EmptyBufferDone</DFN> callback. + * + * @param comp The component that returned the buffer. + * + * @param portIndex The port index on the component from which the buffer + * was returned. + * + * @param block If non-zero, the function will block until a buffer is available. + * + * @return pointer to buffer if available, otherwise <DFN>NULL</DFN> + ***********************************************************/ +VCHPRE_ OMX_BUFFERHEADERTYPE* VCHPOST_ ilclient_get_input_buffer(COMPONENT_T *comp, + int portIndex, + int block); + + +/** + * The <DFN>ilclient_remove_event()</DFN> function queries the event list for the + * given component, matching against the given criteria. If a matching + * event is found, it is removed and added to the free event list. + * + * @param comp The component that returned the matching event. + * + * @param event The event type of the matching event. + * + * @param nData1 The <DFN>nData1</DFN> field of the matching event. + * + * @param ignore1 Whether to ignore the <DFN>nData1</DFN> field when finding a + * matching event. A value of 0 indicates that <DFN>nData1</DFN> must match, a + * value of 1 indicates that <DFN>nData1</DFN> does not have to match. + * + * @param nData2 The <DFN>nData2</DFN> field of the matching event. + * + * @param ignore2 Whether to ignore the <DFN>nData2</DFN> field when finding a + * matching event. A value of 0 indicates that <DFN>nData2</DFN> must match, a + * value of 1 indicates that <DFN>nData2</DFN> does not have to match. + * + * @return 0 if the event was removed. -1 if no matching event was + * found. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_remove_event(COMPONENT_T *comp, + OMX_EVENTTYPE event, + OMX_U32 nData1, + int ignore1, + OMX_U32 nData2, + int ignore2); + + +/** + * The <DFN>ilclient_return_events()</DFN> function removes all events + * from a component event list and adds them to the IL client free + * event list. This function is automatically called when components + * are freed. + * + * @param comp The component from which all events should be moved to + * the free list. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_return_events(COMPONENT_T *comp); + + +/** + * The <DFN>ilclient_wait_for_event()</DFN> function is similar to + * <DFN>ilclient_remove_event()</DFN>, but allows the caller to block until that + * event arrives. + * + * @param comp The component that returned the matching event. + * + * @param event The event type of the matching event. + * + * @param nData1 The <DFN>nData1</DFN> field of the matching event. + * + * @param ignore1 Whether to ignore the <DFN>nData1</DFN> field when finding a + * matching event. A value of 0 indicates that <DFN>nData1</DFN> must match, a + * value of 1 indicates that <DFN>nData1</DFN> does not have to match. + * + * @param nData2 The <DFN>nData2</DFN> field of the matching event. + * + * @param ignore2 Whether to ignore the <DFN>nData2</DFN> field when finding a + * matching event. A value of 0 indicates that <DFN>nData2</DFN> must match, a + * value of 1 indicates that <DFN>nData2</DFN> does not have to match. + * + * @param event_flag Specifies a bitfield of IL client events to wait + * for, given in <DFN>ILEVENT_MASK_T</DFN>. If any of these events + * are signalled by the component, the event list is then re-checked + * for a matching event. If the <DFN>ILCLIENT_EVENT_ERROR</DFN> bit + * is included, and an error is signalled by the component, then the + * function will return an error code. If the + * <DFN>ILCLIENT_CONFIG_CHANGED</DFN> bit is included, and this bit is + * signalled by the component, then the function will return an error + * code. + * + * @param timeout Specifies how long to block for in milliseconds + * before returning a failure. + * + * @return 0 indicates success, a matching event has been removed from + * the component's event queue. A negative return indicates failure, + * in this case no events have been removed from the component's event + * queue. + * - -1: a timeout was received. + * - -2: an error event was received. + * - -3: a config changed event was received. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_wait_for_event(COMPONENT_T *comp, + OMX_EVENTTYPE event, + OMX_U32 nData1, + int ignore1, + OMX_U32 nData2, + int ignore2, + int event_flag, + int timeout); + + +/** + * The <DFN>ilclient_wait_for_command_complete()</DFN> function waits + * for a message from a component that indicates that the command + * has completed. This is either a command success message, or an + * error message that signals the completion of an event. + * + * @param comp The component currently processing a command. + * + * @param command The command being processed. This must be either + * <DFN>OMX_CommandStateSet</DFN>, <DFN>OMX_CommandPortDisable</DFN> + * or <DFN>OMX_CommandPortEnable</DFN>. + * + * @param nData2 The expected value of <DFN>nData2</DFN> in the + * command complete message. + * + * @return 0 indicates success, either the command successfully completed + * or the <DFN>OMX_ErrorSameState</DFN> was returned. -1 indicates + * that the command terminated with a different error message. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_wait_for_command_complete(COMPONENT_T *comp, + OMX_COMMANDTYPE command, + OMX_U32 nData2); + + +/** + * The <DFN>ilclient_wait_for_command_complete_dual()</DFN> function + * is similar to <DFN>ilclient_wait_for_command_complete()</DFN>. The + * difference is that while waiting for the component to complete the + * event or raise an error, we can also report if another reports an + * error that terminates a command. This is useful if the two + * components are tunneled, and we need to wait for one component to + * enable a port, or change state to <DFN>OMX_StateIdle</DFN>. If the + * other component is the buffer supplier and reports an error, then + * it will not allocate buffers, so our first component may stall. + * + * @param comp The component currently processing a command. + * + * @param command The command being processed. This must be either + * <DFN>OMX_CommandStateSet</DFN>, <DFN>OMX_CommandPortDisable</DFN> + * or <DFN>OMX_CommandPortEnable</DFN>. + * + * @param nData2 The expected value of <DFN>nData2</DFN> in the + * command complete message. + * + * @param related Another component, where we will return if this + * component raises an error that terminates a command. + * + * @return 0 indicates success, either the command successfully + * completed or the <DFN>OMX_ErrorSameState</DFN> was returned. -1 + * indicates that the command terminated with a different error + * message. -2 indicates that the related component raised an error. + * In this case, the error is not cleared from the related + * component's event list. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_wait_for_command_complete_dual(COMPONENT_T *comp, + OMX_COMMANDTYPE command, + OMX_U32 nData2, + COMPONENT_T *related); + + +/** + * The <DFN>ilclient_debug_output()</DFN> function adds a message to a + * host-specific debug display. For a local VideoCore host the message is + * added to the internal message log. For a Win32 host the message is + * printed to the debug display. This function should be customised + * when IL client is ported to another platform. + * + * @param format A message to add, together with the variable + * argument list similar to <DFN>printf</DFN> and other standard C functions. + * + * @return void + ***********************************************************/ +VCHPRE_ void VCHPOST_ ilclient_debug_output(char *format, ...); + +/** + * The <DFN>ilclient_get_handle()</DFN> function returns the + * underlying OMX component held by an IL component handle. This is + * needed when calling methods such as <DFN>OMX_SetParameter</DFN> on + * a component created using the IL client library. + * + * @param comp IL component handle + * + * @return The <DFN>OMX_HANDLETYPE</DFN> value for the component. + ***********************************************************/ +VCHPRE_ OMX_HANDLETYPE VCHPOST_ ilclient_get_handle(COMPONENT_T *comp); + + +#ifndef OMX_SKIP64BIT + +/** + * Macro to return <DFN>OMX_TICKS</DFN> from a signed 64 bit value. + * This is the version where <DFN>OMX_TICKS</DFN> is a signed 64 bit + * value, an alternative definition is used when <DFN>OMX_TICKS</DFN> + * is a structure. + */ +#define ilclient_ticks_from_s64(s) (s) + +/** + * Macro to return signed 64 bit value from <DFN>OMX_TICKS</DFN>. + * This is the version where <DFN>OMX_TICKS</DFN> is a signed 64 bit + * value, an alternative definition is used when <DFN>OMX_TICKS</DFN> + * is a structure. + */ +#define ilclient_ticks_to_s64(t) (t) + +#else + +/** + * Inline function to return <DFN>OMX_TICKS</DFN> from a signed 64 bit + * value. This is the version where <DFN>OMX_TICKS</DFN> is a + * structure, an alternative definition is used when + * <DFN>OMX_TICKS</DFN> is a signed 64 bit value. + */ +static inline OMX_TICKS ilclient_ticks_from_s64(int64_t s) { + OMX_TICKS ret; + ret.nLowPart = s; + ret.nHighPart = s>>32; + return ret; +} + +/** + * Inline function to return signed 64 bit value from + * <DFN>OMX_TICKS</DFN>. This is the version where + * <DFN>OMX_TICKS</DFN> is a structure, an alternative definition is + * used when <DFN>OMX_TICKS</DFN> is a signed 64 bit value. + */ +static inline int64_t ilclient_ticks_to_s64(OMX_TICKS t) { + uint64_t u = t.nLowPart | ((uint64_t)t.nHighPart << 32); + return u; +} + + +#endif /* OMX_SKIP64BIT */ + +/** + * The <DFN>ilclient_get_port_index()</DFN> function returns the n'th + * port index of the specified type and direction for the given + * component. + * + * @param comp The component of interest + * @param dir The direction + * @param type The type, or -1 for any type. + * @param index Which port (counting from 0). + * + * @return The port index, or -1 if not found. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_get_port_index(COMPONENT_T *comp, + OMX_DIRTYPE dir, + OMX_PORTDOMAINTYPE type, + int index); + + +/** + * The <DFN>ilclient_suggest_bufsize()</DFN> function gives a + * component a hint about the size of buffer it should use. This size + * is set on the component by setting the + * <DFN>OMX_IndexParamBrcmOutputBufferSize</DFN> index on the given + * component. + * + * @param comp IL component handle + * @param nBufSizeHint Size of buffer in bytes + * + * @return 0 indicates success, -1 indicates failure. + ***********************************************************/ +VCHPRE_ int VCHPOST_ ilclient_suggest_bufsize(COMPONENT_T *comp, + OMX_U32 nBufSizeHint); + + +/** + * The <DFN>ilclient_stack_size()</DFN> function suggests a minimum + * stack size that tasks calling into with API will require. + * + * @return Suggested stack size in bytes. + ***********************************************************/ +VCHPRE_ unsigned int VCHPOST_ ilclient_stack_size(void); + +#endif /* ILCLIENT_H */ diff --git a/gui/libs/ilclient/ilcore.c b/gui/libs/ilclient/ilcore.c @@ -0,0 +1,308 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * \file + * + * \brief Host core implementation. + */ + +#include <stdio.h> +#include <stdarg.h> + +//includes +#include <memory.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "IL/OMX_Component.h" +#include "interface/vcos/vcos.h" + +#include "interface/vmcs_host/vcilcs.h" +#include "interface/vmcs_host/vchost.h" +#include "interface/vmcs_host/vcilcs_common.h" + +static int coreInit = 0; +static int nActiveHandles = 0; +static ILCS_SERVICE_T *ilcs_service = NULL; +static VCOS_MUTEX_T lock; +static VCOS_ONCE_T once = VCOS_ONCE_INIT; + +/* Atomic creation of lock protecting shared state */ +static void initOnce(void) +{ + VCOS_STATUS_T status; + status = vcos_mutex_create(&lock, VCOS_FUNCTION); + vcos_demand(status == VCOS_SUCCESS); +} + +/* OMX_Init */ +OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void) +{ + VCOS_STATUS_T status; + OMX_ERRORTYPE err = OMX_ErrorNone; + + status = vcos_once(&once, initOnce); + vcos_demand(status == VCOS_SUCCESS); + + vcos_mutex_lock(&lock); + + if(coreInit == 0) + { + // we need to connect via an ILCS connection to VideoCore + VCHI_INSTANCE_T initialise_instance; + VCHI_CONNECTION_T *connection; + ILCS_CONFIG_T config; + + vc_host_get_vchi_state(&initialise_instance, &connection); + + vcilcs_config(&config); + + ilcs_service = ilcs_init((VCHIQ_INSTANCE_T) initialise_instance, (void **) &connection, &config, 0); + + if(ilcs_service == NULL) + { + err = OMX_ErrorHardware; + goto end; + } + + coreInit = 1; + } + else + coreInit++; + +end: + vcos_mutex_unlock(&lock); + return err; +} + +/* OMX_Deinit */ +OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void) +{ + if(coreInit == 0) // || (coreInit == 1 && nActiveHandles > 0)) + return OMX_ErrorNotReady; + + vcos_mutex_lock(&lock); + + coreInit--; + + if(coreInit == 0) + { + // we need to teardown the ILCS connection to VideoCore + ilcs_deinit(ilcs_service); + ilcs_service = NULL; + } + + vcos_mutex_unlock(&lock); + + return OMX_ErrorNone; +} + + +/* OMX_ComponentNameEnum */ +OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( + OMX_OUT OMX_STRING cComponentName, + OMX_IN OMX_U32 nNameLength, + OMX_IN OMX_U32 nIndex) +{ + if(ilcs_service == NULL) + return OMX_ErrorBadParameter; + + return vcil_out_component_name_enum(ilcs_get_common(ilcs_service), cComponentName, nNameLength, nIndex); +} + + +/* OMX_GetHandle */ +OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( + OMX_OUT OMX_HANDLETYPE* pHandle, + OMX_IN OMX_STRING cComponentName, + OMX_IN OMX_PTR pAppData, + OMX_IN OMX_CALLBACKTYPE* pCallBacks) +{ + OMX_ERRORTYPE eError; + OMX_COMPONENTTYPE *pComp; + OMX_HANDLETYPE hHandle = 0; + + if (pHandle == NULL || cComponentName == NULL || pCallBacks == NULL || ilcs_service == NULL) + { + if(pHandle) + *pHandle = NULL; + return OMX_ErrorBadParameter; + } + + { + pComp = (OMX_COMPONENTTYPE *)malloc(sizeof(OMX_COMPONENTTYPE)); + if (!pComp) + { + vcos_assert(0); + return OMX_ErrorInsufficientResources; + } + memset(pComp, 0, sizeof(OMX_COMPONENTTYPE)); + hHandle = (OMX_HANDLETYPE)pComp; + pComp->nSize = sizeof(OMX_COMPONENTTYPE); + pComp->nVersion.nVersion = OMX_VERSION; + eError = vcil_out_create_component(ilcs_get_common(ilcs_service), hHandle, cComponentName); + + if (eError == OMX_ErrorNone) { + // Check that all function pointers have been filled in. + // All fields should be non-zero. + int i; + uint32_t *p = (uint32_t *) pComp; + for(i=0; i<sizeof(OMX_COMPONENTTYPE)>>2; i++) + if(*p++ == 0) + eError = OMX_ErrorInvalidComponent; + + if(eError != OMX_ErrorNone && pComp->ComponentDeInit) + pComp->ComponentDeInit(hHandle); + } + + if (eError == OMX_ErrorNone) { + eError = pComp->SetCallbacks(hHandle,pCallBacks,pAppData); + if (eError != OMX_ErrorNone) + pComp->ComponentDeInit(hHandle); + } + if (eError == OMX_ErrorNone) { + *pHandle = hHandle; + } + else { + *pHandle = NULL; + free(pComp); + } + } + + if (eError == OMX_ErrorNone) { + vcos_mutex_lock(&lock); + nActiveHandles++; + vcos_mutex_unlock(&lock); + } + + return eError; +} + +/* OMX_FreeHandle */ +OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( + OMX_IN OMX_HANDLETYPE hComponent) +{ + OMX_ERRORTYPE eError = OMX_ErrorNone; + OMX_COMPONENTTYPE *pComp; + + if (hComponent == NULL || ilcs_service == NULL) + return OMX_ErrorBadParameter; + + pComp = (OMX_COMPONENTTYPE*)hComponent; + + if (ilcs_service == NULL) + return OMX_ErrorBadParameter; + + eError = (pComp->ComponentDeInit)(hComponent); + if (eError == OMX_ErrorNone) { + vcos_mutex_lock(&lock); + --nActiveHandles; + vcos_mutex_unlock(&lock); + free(pComp); + } + + vcos_assert(nActiveHandles >= 0); + + return eError; +} + +/* OMX_SetupTunnel */ +OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( + OMX_IN OMX_HANDLETYPE hOutput, + OMX_IN OMX_U32 nPortOutput, + OMX_IN OMX_HANDLETYPE hInput, + OMX_IN OMX_U32 nPortInput) +{ + OMX_ERRORTYPE eError = OMX_ErrorNone; + OMX_COMPONENTTYPE *pCompIn, *pCompOut; + OMX_TUNNELSETUPTYPE oTunnelSetup; + + if ((hOutput == NULL && hInput == NULL) || ilcs_service == NULL) + return OMX_ErrorBadParameter; + + oTunnelSetup.nTunnelFlags = 0; + oTunnelSetup.eSupplier = OMX_BufferSupplyUnspecified; + + pCompOut = (OMX_COMPONENTTYPE*)hOutput; + + if (hOutput){ + eError = pCompOut->ComponentTunnelRequest(hOutput, nPortOutput, hInput, nPortInput, &oTunnelSetup); + } + + if (eError == OMX_ErrorNone && hInput) { + pCompIn = (OMX_COMPONENTTYPE*)hInput; + eError = pCompIn->ComponentTunnelRequest(hInput, nPortInput, hOutput, nPortOutput, &oTunnelSetup); + + if (eError != OMX_ErrorNone && hOutput) { + /* cancel tunnel request on output port since input port failed */ + pCompOut->ComponentTunnelRequest(hOutput, nPortOutput, NULL, 0, NULL); + } + } + return eError; +} + +/* OMX_GetComponentsOfRole */ +OMX_ERRORTYPE OMX_GetComponentsOfRole ( + OMX_IN OMX_STRING role, + OMX_INOUT OMX_U32 *pNumComps, + OMX_INOUT OMX_U8 **compNames) +{ + OMX_ERRORTYPE eError = OMX_ErrorNone; + + *pNumComps = 0; + return eError; +} + +/* OMX_GetRolesOfComponent */ +OMX_ERRORTYPE OMX_GetRolesOfComponent ( + OMX_IN OMX_STRING compName, + OMX_INOUT OMX_U32 *pNumRoles, + OMX_OUT OMX_U8 **roles) +{ + OMX_ERRORTYPE eError = OMX_ErrorNone; + + *pNumRoles = 0; + return eError; +} + +/* OMX_GetDebugInformation */ +OMX_ERRORTYPE OMX_GetDebugInformation ( + OMX_OUT OMX_STRING debugInfo, + OMX_INOUT OMX_S32 *pLen) +{ + if(ilcs_service == NULL) + return OMX_ErrorBadParameter; + + return vcil_out_get_debug_information(ilcs_get_common(ilcs_service), debugInfo, pLen); +} + + + +/* File EOF */ + diff --git a/gui/libs/vgfont/Makefile b/gui/libs/vgfont/Makefile @@ -0,0 +1,7 @@ +OBJS=font.o vgft.o graphics.o +LIB=libvgfont.a + +INCLUDES+=-I$(SDKSTAGE)/usr/include/freetype2 -I$(SDKSTAGE)/usr/include -I$(SDKSTAGE)/usr/include/arm-linux-gnueabi + +include ../../Makefile.include + diff --git a/gui/libs/vgfont/font.c b/gui/libs/vgfont/font.c @@ -0,0 +1,355 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// Font handling for graphicsx + +/** @file font.c + * + * Fairly primitive font handling, just enough to emulate the old API. + * + * Hinting and Font Size + * + * The old API does not create fonts explicitly, it just renders them + * as needed. That works fine for unhinted fonts, but for hinted fonts we + * care about font size. + * + * Since we now *can* do hinted fonts, we should do. Regenerating the + * fonts each time becomes quite slow, so we maintain a cache of fonts. + * + * For the typical applications which use graphics_x this is fine, but + * won't work well if lots of fonts sizes are used. + * + * Unicode + * + * This API doesn't support unicode at all at present, nor UTF-8. + */ + +#include <fcntl.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/types.h> + +#include "graphics_x_private.h" +#include "vgft.h" + +#define VMCS_INSTALL_PREFIX "" + +/** The one and only (default) font we support for now. + */ +static struct +{ + const char *file; + void *mem; + size_t len; +} default_font = { "VeraMono.ttf" }; + +/** An entry in our list of fonts + */ +typedef struct gx_font_cache_entry_t +{ + struct gx_font_cache_entry_t *next; + VGFT_FONT_T font; + uint32_t ptsize; /** size in points, 26.6 */ +} gx_font_cache_entry_t; + +static char fname[128]; +static int inited; +static gx_font_cache_entry_t *fonts; + +static VGFT_FONT_T *find_font(const char *text, uint32_t text_size); + +VCOS_STATUS_T gx_priv_font_init(const char *font_dir) +{ + VCOS_STATUS_T ret; + size_t len; + int rc; + if (vgft_init()) + { + ret = VCOS_ENOMEM; + goto fail_init; + } + + int fd = -1; + // search for the font + sprintf(fname, "%s/%s", font_dir, default_font.file); + fd = open(fname, O_RDONLY); + + if (fd < 0) + { + GX_ERROR("Could not open font file '%s'", default_font.file); + ret = VCOS_ENOENT; + goto fail_open; + } + + len = lseek(fd, 0, SEEK_END); + lseek(fd, 0, SEEK_SET); + + default_font.mem = vcos_malloc(len, default_font.file); + if (!default_font.mem) + { + GX_ERROR("No memory for font %s", fname); + ret = VCOS_ENOMEM; + goto fail_mem; + } + + rc = read(fd, default_font.mem, len); + if (rc != len) + { + GX_ERROR("Could not read font %s", fname); + ret = VCOS_EINVAL; + goto fail_rd; + } + default_font.len = len; + close(fd); + + GX_TRACE("Opened font file '%s'", fname); + + inited = 1; + return VCOS_SUCCESS; + +fail_rd: + vcos_free(default_font.mem); +fail_mem: + if (fd >= 0) close(fd); +fail_open: + vgft_term(); +fail_init: + return ret; +} + +void gx_priv_font_term(void) +{ + gx_font_cache_flush(); + vgft_term(); + vcos_free(default_font.mem); +} + +/** Render text. + * + * FIXME: Not at all optimal - re-renders each time. + * FIXME: Not UTF-8 aware + * FIXME: better caching + */ +VCOS_STATUS_T gx_priv_render_text( GX_DISPLAY_T *disp, + GRAPHICS_RESOURCE_HANDLE res, + int32_t x, + int32_t y, + uint32_t width, + uint32_t height, + uint32_t fg_colour, + uint32_t bg_colour, + const char *text, + uint32_t text_length, + uint32_t text_size ) +{ + VGfloat vg_colour[4]; + VGFT_FONT_T *font; + VGPaint fg; + GX_CLIENT_STATE_T save; + VCOS_STATUS_T status = VCOS_SUCCESS; + int clip = 1; + + vcos_demand(inited); // has gx_font_init() been called? + + gx_priv_save(&save, res); + + if (width == GRAPHICS_RESOURCE_WIDTH && + height == GRAPHICS_RESOURCE_HEIGHT) + { + clip = 0; + } + + width = (width == GRAPHICS_RESOURCE_WIDTH) ? res->width : width; + height = (height == GRAPHICS_RESOURCE_HEIGHT) ? res->height : height; + font = find_font(text, text_size); + if (!font) + { + status = VCOS_ENOMEM; + goto finish; + } + + // setup the clipping rectangle + if (clip) + { + VGint coords[] = {x,y,width,height}; + vgSeti(VG_SCISSORING, VG_TRUE); + vgSetiv(VG_SCISSOR_RECTS, 4, coords); + } + + // setup the background colour if needed + if (bg_colour != GRAPHICS_TRANSPARENT_COLOUR) + { + int err; + VGfloat rendered_w, rendered_h; + VGfloat vg_bg_colour[4]; + + // setup the background colour... + gx_priv_colour_to_paint(bg_colour, vg_bg_colour); + vgSetfv(VG_CLEAR_COLOR, 4, vg_bg_colour); + + // fill in a rectangle... + vgft_get_text_extents(font, text, text_length, (VGfloat)x, (VGfloat)y, &rendered_w, &rendered_h); + + if ( ( 0 < (VGint)rendered_w ) && ( 0 < (VGint)rendered_h ) ) + { + // Have to compensate for the messed up y position of multiline text. + VGfloat offset = vgft_first_line_y_offset(font); + int32_t bottom = y + offset - rendered_h; + + vgClear(x, bottom, (VGint)rendered_w, (VGint)rendered_h); + err = vgGetError(); + if (err) + { + GX_LOG("Error %d clearing bg text %d %d %g %g", + err, x, y, rendered_w, rendered_h); + vcos_assert(0); + } // if + } // if + } // if + // setup the foreground colour + fg = vgCreatePaint(); + if (!fg) + { + status = VCOS_ENOMEM; + goto finish; + } + + // draw the foreground text + vgSetParameteri(fg, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR); + gx_priv_colour_to_paint(fg_colour, vg_colour); + vgSetParameterfv(fg, VG_PAINT_COLOR, 4, vg_colour); + vgSetPaint(fg, VG_FILL_PATH); + + vgft_font_draw(font, (VGfloat)x, (VGfloat)y, text, text_length, VG_FILL_PATH); + + vgDestroyPaint(fg); + + vcos_assert(vgGetError() == 0); + vgSeti(VG_SCISSORING, VG_FALSE); + +finish: + gx_priv_restore(&save); + + return status; +} + + +/** Find a font in our cache, or create a new entry in the cache. + * + * Very primitive at present. + */ +static VGFT_FONT_T *find_font(const char *text, uint32_t text_size) +{ + int ptsize, dpi_x = 0, dpi_y = 0; + VCOS_STATUS_T status; + gx_font_cache_entry_t *font; + + ptsize = text_size << 6; // freetype takes size in points, in 26.6 format. + + for (font = fonts; font; font = font->next) + { + if (font->ptsize == ptsize) + return &font->font; + } + + font = vcos_malloc(sizeof(*font), "font"); + if (!font) + return NULL; + + font->ptsize = ptsize; + + status = vgft_font_init(&font->font); + if (status != VCOS_SUCCESS) + { + vcos_free(font); + return NULL; + } + + // load the font + status = vgft_font_load_mem(&font->font, default_font.mem, default_font.len); + if (status != VCOS_SUCCESS) + { + GX_LOG("Could not load font from memory: %d", status); + vgft_font_term(&font->font); + vcos_free(font); + return NULL; + } + + status = vgft_font_convert_glyphs(&font->font, ptsize, dpi_x, dpi_y); + if (status != VCOS_SUCCESS) + { + GX_LOG("Could not convert font '%s' at size %d", fname, ptsize); + vgft_font_term(&font->font); + vcos_free(font); + return NULL; + } + + font->next = fonts; + fonts = font; + + return &font->font; +} + +void gx_font_cache_flush(void) +{ + while (fonts != NULL) + { + struct gx_font_cache_entry_t *next = fonts->next; + vgft_font_term(&fonts->font); + vcos_free(fonts); + fonts = next; + } +} + +int32_t graphics_resource_text_dimensions_ext(GRAPHICS_RESOURCE_HANDLE res, + const char *text, + const uint32_t text_length, + uint32_t *width, + uint32_t *height, + const uint32_t text_size ) +{ + GX_CLIENT_STATE_T save; + VGfloat w, h; + int ret = -1; + + gx_priv_save(&save, res); + + VGFT_FONT_T *font = find_font(text, text_size); + if (!font) + goto finish; + + + vgft_get_text_extents(font, text, text_length, 0.0, 0.0, &w, &h); + *width = w; + *height = h; + ret = 0; + +finish: + gx_priv_restore(&save); + return ret; +} + diff --git a/gui/libs/vgfont/graphics.c b/gui/libs/vgfont/graphics.c @@ -0,0 +1,1608 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// Graphics library for VG + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include "vgfont.h" +#include "graphics_x_private.h" + +/****************************************************************************** +Defines. +******************************************************************************/ +#define ATEXT_FONT_SIZE 12 /*< Default font size (font size can be set with *_ext functions). */ + +/****************************************************************************** +Local data +******************************************************************************/ +static GX_DISPLAY_T display; /*< Our one and only EGL display. */ + +/** + * We create one eglContext for each of the possible graphics_x resource types + * that are supported. + ***********************************************************/ +static EGLContext gx_contexts[GRAPHICS_RESOURCE_HANDLE_TYPE_MAX]; + +/** Note: we have to share all our contexts, because otherwise it seems + * to be not valid to blit from one image to another if the images + * have different contexts. + * + * That means we have to use a single global lock to serialise all accesses + * to any contexts. + ***********************************************************/ +static VCOS_MUTEX_T lock; + +static EGLConfig gx_configs[GRAPHICS_RESOURCE_HANDLE_TYPE_MAX]; + +static int inited; + +/****************************************************************************** +Local Functions +******************************************************************************/ + +/** Convert graphics_x colour formats into EGL format. */ +static int gx_egl_attrib_colours(EGLint *attribs, GRAPHICS_RESOURCE_TYPE_T res_type) +{ + int i, n; + static EGLint rgba[] = {EGL_RED_SIZE, EGL_GREEN_SIZE, EGL_BLUE_SIZE, EGL_ALPHA_SIZE}; + static uint8_t rgb565[] = {5,6,5,0}; + static uint8_t rgb888[] = {8,8,8,0}; + static uint8_t rgb32a[] = {8,8,8,8}; + + uint8_t *sizes = NULL; + + switch (res_type) + { + case GRAPHICS_RESOURCE_RGB565: + sizes = rgb565; + break; + case GRAPHICS_RESOURCE_RGB888: + sizes = rgb888; + break; + case GRAPHICS_RESOURCE_RGBA32: + sizes = rgb32a; + break; + default: + vcos_assert(0); + return -1; + } + for (n=0, i=0; i<countof(rgba); i++) + { + attribs[n++] = rgba[i]; + attribs[n++] = sizes[i]; + } + return n; +} + +/* Create an EGLContext for a given GRAPHICS_RESOURCE_TYPE */ +static VCOS_STATUS_T create_context(EGLDisplay disp, + GRAPHICS_RESOURCE_TYPE_T image_type, + EGLContext *shared_with) +{ + int n; + EGLConfig configs[1]; + EGLint nconfigs, attribs[32]; + n = gx_egl_attrib_colours(attribs, image_type); + + // we want to be able to do OpenVG on this surface... + attribs[n++] = EGL_RENDERABLE_TYPE; attribs[n++] = EGL_OPENVG_BIT; + attribs[n++] = EGL_SURFACE_TYPE; attribs[n++] = EGL_WINDOW_BIT; + + attribs[n] = EGL_NONE; + + EGLBoolean egl_ret = eglChooseConfig(disp, + attribs, configs, + countof(configs), &nconfigs); + + if (!egl_ret || !nconfigs) + { + GX_LOG("%s: no suitable configurations for res type %d", + __FUNCTION__, image_type); + return VCOS_EINVAL; + } + + EGLContext cxt = eglCreateContext(disp, configs[0], *shared_with, 0); + if (!cxt) + { + GX_LOG("Could not create context for image type %d: 0x%x", + image_type, eglGetError()); + return VCOS_ENOSPC; + } + + gx_contexts[image_type] = cxt; + gx_configs[image_type] = configs[0]; + *shared_with = cxt; + + return VCOS_SUCCESS; +} + +/****************************************************************************** +Functions private to code inside GraphicsX +******************************************************************************/ + +static VCOS_STATUS_T gx_priv_initialise( void ) +{ + int i; + EGLDisplay disp; + EGLint egl_maj, egl_min; + int32_t ret = VCOS_EINVAL; + EGLBoolean result; + + vcos_demand(inited == 0); + + vcos_log_set_level(&gx_log_cat, VCOS_LOG_WARN); + vcos_log_register("graphics", &gx_log_cat); + + memset(&display,0,sizeof(display)); + + gx_priv_init(); + + disp = eglGetDisplay(EGL_DEFAULT_DISPLAY); + + if (disp == EGL_NO_DISPLAY) + { + GX_LOG("Could not open display: 0x%x", eglGetError()); + vcos_assert(0); + goto fail_disp; + } + + result = eglInitialize(disp, &egl_maj, &egl_min); + if (!result) + { + GX_LOG("Could not init display :0x%x", eglGetError()); + vcos_assert(0); // really can't continue + goto fail_egl_init; + } + + result = eglBindAPI(EGL_OPENVG_API); + vcos_assert(result); // really should succeed + + display.disp = disp; + + GX_TRACE("Supported client APIS: %s", eglQueryString(disp, EGL_CLIENT_APIS)); + + // create the available contexts + EGLContext shared_context = EGL_NO_CONTEXT; + ret = create_context(disp,GRAPHICS_RESOURCE_RGB565, &shared_context); + ret |= create_context(disp,GRAPHICS_RESOURCE_RGB888, &shared_context); + ret |= create_context(disp,GRAPHICS_RESOURCE_RGBA32, &shared_context); + + if (ret != VCOS_SUCCESS) + goto fail_cxt; + + eglSwapInterval(disp, 1); + + inited = 1; + + return ret; + +fail_cxt: + for (i=0; i<GRAPHICS_RESOURCE_HANDLE_TYPE_MAX; i++) + { + if (gx_contexts[i]) + { + eglDestroyContext(display.disp,gx_contexts[i]); + vcos_mutex_delete(&lock); + } + } + eglTerminate(display.disp); +fail_egl_init: +fail_disp: + return ret; +} + +/*****************************************************************************/ +void gx_priv_save(GX_CLIENT_STATE_T *state, GRAPHICS_RESOURCE_HANDLE res) +{ + EGLBoolean egl_result; + vcos_assert(res == NULL || (res->magic == RES_MAGIC)); + vcos_assert(res == NULL || !res->context_bound); + + state->context = eglGetCurrentContext(); + state->api = eglQueryAPI(); + state->read_surface = eglGetCurrentSurface(EGL_READ); + state->draw_surface = eglGetCurrentSurface(EGL_DRAW); + state->res = res; + + vcos_assert(state->api); // should never be anything other than VG or GL + + vcos_mutex_lock(&lock); + + egl_result = eglBindAPI(EGL_OPENVG_API); + vcos_assert(egl_result); + + if (res) + { + GX_TRACE("gx_priv_save: eglMakeCurrent: %s, res %x surface %x, cxt %x", vcos_thread_get_name(vcos_thread_current()), + (uint32_t)res, (uint32_t)res->surface, (uint32_t)res->context); + + egl_result = eglMakeCurrent(display.disp, res->surface, + res->surface, res->context); + vcos_assert(egl_result); + + res->context_bound = 1; + } +} + +/*****************************************************************************/ +void gx_priv_restore(GX_CLIENT_STATE_T *state) +{ + EGLBoolean egl_result; + + GX_TRACE("gx_priv_restore: eglMakeCurrent: %s, res %x draw_surface %x, surface %x, cxt %x", vcos_thread_get_name(vcos_thread_current()), + (uint32_t)state->res, (uint32_t)state->draw_surface, (uint32_t)state->read_surface, (uint32_t)state->context); + + // disconnect our thread from this context, so we other threads can use it via + // this API + egl_result = eglMakeCurrent(display.disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + vcos_assert(egl_result); + + // now return to the client's API binding + egl_result = eglBindAPI(state->api); + vcos_assert(egl_result); + + egl_result = eglMakeCurrent(display.disp, state->draw_surface, state->read_surface, state->context); + vcos_assert(egl_result); + + if (state->res) state->res->context_bound = 0; + + vcos_mutex_unlock(&lock); +} + +/****************************************************************************** +Functions and data exported as part of the public GraphicsX API +******************************************************************************/ + +VCOS_LOG_CAT_T gx_log_cat; /*< Logging category for GraphicsX. */ + +int32_t graphics_initialise( void ) +{ + // dummy initialisation function. This is typically called + // early in the day before VLLs are available, and so cannot + // do anything useful. + return 0; +} + +/*****************************************************************************/ +int32_t graphics_uninitialise( void ) +{ + int i; + vcos_assert(inited); + + gx_priv_font_term(); + + for (i=0; i<GRAPHICS_RESOURCE_HANDLE_TYPE_MAX; i++) + if (gx_contexts[i]) + eglDestroyContext(display.disp,gx_contexts[i]); + + eglTerminate(display.disp); + gx_priv_destroy(); + vcos_log_unregister(&gx_log_cat); + inited = 0; + return 0; +} + +/*****************************************************************************/ +VCOS_STATUS_T gx_create_window( uint32_t screen_id, + uint32_t width, + uint32_t height, + GRAPHICS_RESOURCE_TYPE_T image_type, + GRAPHICS_RESOURCE_HANDLE *resource_handle ) +{ + int rc; + VCOS_STATUS_T status = VCOS_SUCCESS; + GRAPHICS_RESOURCE_HANDLE h; + EGLBoolean egl_result; + void *cookie; + GX_CLIENT_STATE_T save; + + if (!gx_contexts[image_type]) + { + GX_LOG("Invalid image type %d", image_type); + return VCOS_EINVAL; + } + + h = vcos_calloc(1,sizeof(*h), "graphics_x_resource"); + if (!h) + { + GX_LOG("%s: no memory for resource", __FUNCTION__); + return VCOS_ENOMEM; + } + + // now need to get the native window + rc = gx_priv_create_native_window(screen_id, + width, height, image_type, + &h->u.native_window, + &cookie); + if (rc < 0) + { + GX_LOG("%s: could not create native window", __FUNCTION__); + status = VCOS_ENOMEM; + goto fail_create_native_win; + } + + h->magic = RES_MAGIC; + h->type = GX_WINDOW; + h->alpha = 1.0; + + h->surface = eglCreateWindowSurface(display.disp, gx_configs[image_type], &h->u.native_window.egl_win, NULL); + if (!h->surface) + { + GX_LOG("Could not create window surface: 0x%x", eglGetError()); + status = VCOS_ENOMEM; + goto fail_win; + } + + egl_result = eglSurfaceAttrib(display.disp, h->surface, + EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); + vcos_assert(egl_result); + + h->context = gx_contexts[image_type]; + h->screen_id = screen_id; + h->width = width; + h->height = height; + h->restype = image_type; + + gx_priv_save(&save, h); + + // fill it with black + status = gx_priv_resource_fill(h, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); + vcos_assert(status == VCOS_SUCCESS); + + gx_priv_finish_native_window(h, cookie); + gx_priv_flush(h); + + *resource_handle = h; + gx_priv_restore(&save); + return status; + +fail_win: + gx_priv_destroy_native_window(h); +fail_create_native_win: + vcos_free(h); + return status; +} + +/*****************************************************************************/ +int32_t graphics_delete_resource( GRAPHICS_RESOURCE_HANDLE res ) +{ + EGLBoolean result; + + if (!res) + { + // let it slide - mimics old behaviour + return 0; + } + GX_TRACE("delete resource @%p", res); + + vcos_assert(res->magic == RES_MAGIC); + + if (res->type == GX_PBUFFER) + { + GX_CLIENT_STATE_T save; + gx_priv_save(&save, res); + vgDestroyImage(res->u.pixmap); + vcos_assert(vgGetError() == 0); + gx_priv_restore(&save); + } + + GX_TRACE("graphics_delete_resource: calling eglDestroySurface..."); + result = eglDestroySurface(display.disp, res->surface); + vcos_assert(result); + + GX_TRACE("graphics_delete_resource: calling eglWaitClient..."); + eglWaitClient(); // wait for EGL to finish sorting out its surfaces + + if (res->type == GX_WINDOW) + { + GX_TRACE("graphics_delete_resource: calling gx_priv_destroy_native_window..."); + gx_priv_destroy_native_window(res); + } + + res->magic = ~RES_MAGIC; + vcos_free(res); + GX_TRACE("graphics_delete_resource: done"); + + return 0; +} + +/*****************************************************************************/ +int32_t graphics_update_displayed_resource(GRAPHICS_RESOURCE_HANDLE res, + const uint32_t x_offset, + const uint32_t y_offset, + const uint32_t width, + const uint32_t height ) +{ + GX_CLIENT_STATE_T save; + gx_priv_save(&save, res); + + gx_priv_flush(res); + + gx_priv_restore(&save); + + return 0; +} + +/*****************************************************************************/ +int32_t graphics_resource_fill(GRAPHICS_RESOURCE_HANDLE res, + uint32_t x, + uint32_t y, + uint32_t width, + uint32_t height, + uint32_t fill_colour ) +{ + GX_CLIENT_STATE_T save; + gx_priv_save(&save, res); + + VCOS_STATUS_T st = gx_priv_resource_fill( + res, + x, res->height-y-height, + width, height, + fill_colour); + + gx_priv_restore(&save); + + return st == VCOS_SUCCESS ? 0 : -1; +} + +/*****************************************************************************/ +int32_t graphics_resource_render_text_ext( GRAPHICS_RESOURCE_HANDLE res, + const int32_t x, + const int32_t y, + const uint32_t width, + const uint32_t height, + const uint32_t fg_colour, + const uint32_t bg_colour, + const char *text, + const uint32_t text_length, + const uint32_t text_size ) +{ + + /* + * FIXME: Not at all optimal - re-renders each time. + * FIXME: Not UTF-8 safe + * FIXME: much better caching (or any caching) + */ + VCOS_STATUS_T rc = gx_priv_render_text( + &display, res, + x, res->height-y-text_size, width, height, fg_colour, bg_colour, + text, text_length, text_size); + + return (rc == VCOS_SUCCESS) ? 0 : -1; +} + +/*****************************************************************************/ +int32_t graphics_resource_render_text( GRAPHICS_RESOURCE_HANDLE res, + const int32_t x, + const int32_t y, + const uint32_t width, /* this can be GRAPHICS_RESOURCE_WIDTH for no clipping */ + const uint32_t height, /* this can be GRAPHICS_RESOURCE_HEIGHT for no clipping */ + const uint32_t fg_colour, + const uint32_t bg_colour, + const char *text, + const uint32_t text_length) +{ + return graphics_resource_render_text_ext(res, x, y, width, height, + fg_colour, bg_colour, + text, text_length, + ATEXT_FONT_SIZE); +} + +/*****************************************************************************/ +int32_t graphics_get_resource_size( + const GRAPHICS_RESOURCE_HANDLE res, + uint32_t *w, + uint32_t *h) +{ + if (w) *w = res->width; + if (h) *h = res->height; + return 0; +} + +/*****************************************************************************/ +int32_t graphics_get_resource_type(const GRAPHICS_RESOURCE_HANDLE res, GRAPHICS_RESOURCE_TYPE_T *type) +{ + if (type) *type = res->restype; + return 0; +} + +/*****************************************************************************/ +int32_t graphics_bitblt( const GRAPHICS_RESOURCE_HANDLE src, + const uint32_t x, // offset within source + const uint32_t y, // offset within source + const uint32_t width, + const uint32_t height, + GRAPHICS_RESOURCE_HANDLE dest, + const uint32_t x_pos, + const uint32_t y_pos ) +{ + int rc = -1; + VGfloat old[9]; + uint32_t w, h; + VGPaint paint = VG_INVALID_HANDLE; + GX_CLIENT_STATE_T save; + int is_child = 0; + VGImage img = VG_INVALID_HANDLE; + + gx_priv_save(&save, dest); + + if (src->type != GX_PBUFFER) + { + vcos_assert(0); + goto finish; + } + + // create a child image that contains just the part wanted + w = width == GRAPHICS_RESOURCE_WIDTH ? src->width : width; + h = height == GRAPHICS_RESOURCE_HEIGHT ? src->height : height; + + if (x==0 && y==0 && + w == src->width && + h == src->height) + { + img = src->u.pixmap; + } + else + { + is_child = 1; + img = vgChildImage(src->u.pixmap, x, y, w, h); + if (img == VG_INVALID_HANDLE) + { + vcos_assert(0); + goto finish; + } + } + + vcos_assert(vgGetError()==0); + + vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE); + vgGetMatrix(old); + vgLoadIdentity(); + vgTranslate((VGfloat)x_pos, (VGfloat)(dest->height-y_pos)); + vgScale(1.0, -1.0); + + // Do we have a translucency going on? + if (src->alpha != 1.0) + { + VGfloat colour[4] = {1.0,1.0,1.0,src->alpha}; + paint = vgCreatePaint(); + + vgSetParameterfv(paint, VG_PAINT_COLOR, 4, colour); + vgSeti(VG_IMAGE_MODE, VG_DRAW_IMAGE_MULTIPLY); + vgSetPaint(paint, VG_STROKE_PATH | VG_FILL_PATH); + } + vcos_assert(vgGetError()==0); + + vgDrawImage(img); + vcos_assert(vgGetError()==0); + vgLoadMatrix(old); + + int err = vgGetError(); + + if (err) + { + GX_LOG("vg error %x blitting area", err); + vcos_assert(0); + rc = -1; + } + else + { + rc = 0; + } +finish: + if (paint != VG_INVALID_HANDLE) + vgDestroyPaint(paint); + + if (is_child) + vgDestroyImage(img); + + gx_priv_restore(&save); + return rc; +} + +void gx_priv_flush(GRAPHICS_RESOURCE_HANDLE res) +{ + EGLBoolean result; + result = eglSwapBuffers(display.disp, res->surface); + vcos_assert(result); +} + + +/** Map a colour, which the client will have supplied in RGB888. + */ + +void gx_priv_colour_to_paint(uint32_t col, VGfloat *rgba) +{ + // with OpenVG we use RGB order. + rgba[0] = ((VGfloat)((col & R_888_MASK) >> 16 )) / 0xff; + rgba[1] = ((VGfloat)((col & G_888_MASK) >> 8 )) / 0xff; + rgba[2] = ((VGfloat)((col & B_888_MASK) >> 0 )) / 0xff; + rgba[3] = ((VGfloat)((col & ALPHA_888_MASK) >> 24)) / 0xff; +} + +/** Fill an area of a surface with a fixed colour. + */ +VCOS_STATUS_T gx_priv_resource_fill(GRAPHICS_RESOURCE_HANDLE res, + uint32_t x, + uint32_t y, + uint32_t width, + uint32_t height, + uint32_t fill_colour ) +{ + VGfloat vg_clear_colour[4]; + + gx_priv_colour_to_paint(fill_colour, vg_clear_colour); + vgSeti(VG_SCISSORING, VG_FALSE); + + vgSetfv(VG_CLEAR_COLOR, 4, vg_clear_colour); + vgClear(x, y, width, height); + + int err = vgGetError(); + if (err) + { + GX_LOG("vg error %x filling area", err); + vcos_assert(0); + } + + return VCOS_SUCCESS; +} + +VCOS_STATUS_T gx_priv_get_pixels(const GRAPHICS_RESOURCE_HANDLE res, void **p_pixels, GX_RASTER_ORDER_T raster_order) +{ + VCOS_STATUS_T status = VCOS_SUCCESS; + void *pixels, *dest; + uint32_t width, height; + int data_size, pitch; + VGImageFormat image_format; + + if (!p_pixels) + { + status = VCOS_EINVAL; + goto finish; + } + + GX_TRACE("%s: res %p", __FUNCTION__, res); + + graphics_get_resource_size(res, &width, &height); + + /* FIXME: implement e.g. gx_get_pitch */ + switch (res->restype) + { + case GRAPHICS_RESOURCE_RGB565: + pitch = ((width + 31)&(~31)) << 1; + break; + case GRAPHICS_RESOURCE_RGB888: + case GRAPHICS_RESOURCE_RGBA32: + pitch = ((width + 31)&(~31)) << 2; + break; + default: + { + GX_LOG("Unsupported pixel format"); + status = VCOS_EINVAL; + goto finish; + } + } + + data_size = pitch * height; + + /* NB: vgReadPixels requires that the data pointer is aligned, but does not + require the stride to be aligned. Most implementations probably will + require that as well though... */ + pixels = vcos_malloc(data_size, "gx_get_pixels data"); + if (!pixels) + { + GX_LOG("Could not allocate %d bytes for vgReadPixels", data_size); + status = VCOS_ENOMEM; + goto finish; + } + /* FIXME: introduce e.g. GX_COLOR_FORMAT and mapping to VGImageFormat... */ + + /* Hand out image data formatted to match OpenGL RGBA format. + */ + switch (res->restype) + { + case GRAPHICS_RESOURCE_RGB565: + image_format = VG_sBGR_565; + break; + case GRAPHICS_RESOURCE_RGB888: + image_format = VG_sXBGR_8888; + break; + case GRAPHICS_RESOURCE_RGBA32: + image_format = VG_sABGR_8888; + break; + default: + { + GX_LOG("Unsupported pixel format"); + status = VCOS_EINVAL; + goto finish; + } + } + + /* VG raster order is bottom-to-top */ + if (raster_order == GX_TOP_BOTTOM) + { + dest = ((uint8_t*)pixels)+(pitch*(height-1)); + pitch = -pitch; + } + else + { + dest = pixels; + } + + vgReadPixels(dest, pitch, image_format, 0, 0, width, height); + + vcos_assert(vgGetError() == 0); + + *p_pixels = pixels; + +finish: + return status; +} + +static VCOS_STATUS_T convert_image_type(GRAPHICS_RESOURCE_TYPE_T image_type, + VGImageFormat *vg_image_type, + int *pbytes_per_pixel) +{ + int bytes_per_pixel; + + switch (image_type) + { + case GRAPHICS_RESOURCE_RGB565: + *vg_image_type = VG_sRGB_565; + bytes_per_pixel = 2; + break; + case GRAPHICS_RESOURCE_RGB888: + *vg_image_type = VG_sRGBX_8888; + bytes_per_pixel = 3; // 24 bpp + break; + case GRAPHICS_RESOURCE_RGBA32: + *vg_image_type = VG_sARGB_8888; + bytes_per_pixel = 4; + break; + default: + vcos_assert(0); + *vg_image_type = 0; + return VCOS_EINVAL; + } + if (pbytes_per_pixel) + *pbytes_per_pixel = bytes_per_pixel; + + return VCOS_SUCCESS; +} + + +/*****************************************************************************/ +VCOS_STATUS_T gx_create_pbuffer( uint32_t width, + uint32_t height, + GRAPHICS_RESOURCE_TYPE_T image_type, + GRAPHICS_RESOURCE_HANDLE *resource_handle ) +{ + VCOS_STATUS_T status = VCOS_SUCCESS; + GRAPHICS_RESOURCE_HANDLE h; + VGImage image; + VGImageFormat vg_image_type; + GX_CLIENT_STATE_T save; + + h = vcos_calloc(1,sizeof(*h), "graphics_x_resource"); + if (!h) + { + GX_LOG("%s: no memory for resource", __FUNCTION__); + return VCOS_ENOMEM; + } + + status = convert_image_type(image_type, &vg_image_type, NULL); + if (status != VCOS_SUCCESS) + { + vcos_free(h); + return status; + } + + h->magic = RES_MAGIC; + h->context = gx_contexts[image_type]; + h->config = gx_configs[image_type]; + h->alpha = 1.0; + h->type = GX_PBUFFER; + h->width = width; + h->height = height; + h->restype = image_type; + + GX_TRACE("Creating pbuffer surface"); + + EGLint attribs[] = {EGL_WIDTH, width, EGL_HEIGHT, height, EGL_NONE}; + h->surface = eglCreatePbufferSurface(display.disp, h->config, + attribs); + if (!h->surface) + { + GX_LOG("Could not create EGL pbuffer surface: 0x%x", eglGetError()); + vcos_free(h); + return VCOS_EINVAL; + } + + gx_priv_save(&save, h); + + image = vgCreateImage(vg_image_type, width, height, VG_IMAGE_QUALITY_BETTER); + if (image == VG_INVALID_HANDLE) + { + GX_LOG("Could not create vg image type %d: vg error 0x%x", + vg_image_type, vgGetError()); + eglDestroySurface(display.disp, h->surface); + vcos_free(h); + status = VCOS_ENOMEM; + goto finish; + } + + h->u.pixmap = image; + + // fill it with black + status = gx_priv_resource_fill(h, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); + vcos_assert(status == VCOS_SUCCESS); + + *resource_handle = h; +finish: + gx_priv_restore(&save); + return status; +} + +/*****************************************************************************/ +GX_PAINT_T *gx_create_gradient(GRAPHICS_RESOURCE_HANDLE res, + uint32_t start_colour, + uint32_t end_colour) +{ + // holds the two colour stops (offset,r,g,b,a). + VGfloat fill_stops[10]; + GX_CLIENT_STATE_T save; + VGPaint paint = VG_INVALID_HANDLE; + + gx_priv_save(&save, res); + + paint = vgCreatePaint(); + if (!paint) + { + gx_priv_restore(&save); + vcos_log("Could not create paint: vg %d\n", vgGetError()); + vcos_assert(0); + goto finish; + } + + fill_stops[0] = 0.0; + gx_priv_colour_to_paint(start_colour, fill_stops+1); + + fill_stops[5] = 1.0; + gx_priv_colour_to_paint(end_colour, fill_stops+6); + + vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT); + vgSetParameterfv(paint, VG_PAINT_COLOR_RAMP_STOPS, 5*2, fill_stops); + +finish: + gx_priv_restore(&save); + return (GX_PAINT_T*)paint; +} + +/*****************************************************************************/ +void gx_destroy_paint(GRAPHICS_RESOURCE_HANDLE res, GX_PAINT_T *p) +{ + GX_CLIENT_STATE_T save; + VGPaint paint = (VGPaint)p; + gx_priv_save(&save, res); + vgDestroyPaint(paint); + gx_priv_restore(&save); +} + +/*****************************************************************************/ +VCOS_STATUS_T gx_fill_gradient(GRAPHICS_RESOURCE_HANDLE dest, + uint32_t x, uint32_t y, + uint32_t width, uint32_t height, + uint32_t radius, + GX_PAINT_T *p) +{ + /* Define start and end points of gradient, see OpenVG specification, + section 9.3.3. */ + VGfloat gradient[4] = {0.0, 0.0, 0.0, 0.0}; + VGPaint paint = (VGPaint)p; + VGPath path; + GX_CLIENT_STATE_T save; + VCOS_STATUS_T status = VCOS_SUCCESS; + + if (!paint) + return VCOS_EINVAL; + + gx_priv_save(&save, dest); + + if (width == GRAPHICS_RESOURCE_WIDTH) + width = dest->width; + + if (height == GRAPHICS_RESOURCE_HEIGHT) + height = dest->height; + + gradient[2] = width; + + vgSetParameterfv(paint, VG_PAINT_LINEAR_GRADIENT, 4, gradient); + vgSetPaint(paint, VG_FILL_PATH); + + path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32, + 1.0, 0.0, 8, 8, VG_PATH_CAPABILITY_ALL); + if (!path) + { + status = VCOS_ENOMEM; + goto finish; + } + + vguRoundRect(path, (VGfloat)x, (VGfloat)y, (VGfloat)width, (VGfloat)height, + (VGfloat)radius, (VGfloat)radius); + vgDrawPath(path, VG_FILL_PATH); + vgDestroyPath(path); + + vcos_assert(vgGetError() == 0); + +finish: + gx_priv_restore(&save); + + return status; +} + +/*****************************************************************************/ +VCOS_STATUS_T gx_graphics_init(const char *font_dir) +{ + GX_CLIENT_STATE_T save; + VCOS_STATUS_T rc; + + gx_priv_save(&save, NULL); + + rc = gx_priv_initialise(); + if (rc == VCOS_SUCCESS) + rc = gx_priv_font_init(font_dir); + + gx_priv_restore(&save); + + return rc; +} + +/*****************************************************************************/ +int gx_is_double_buffered(void) +{ + return 1; +} + +/*****************************************************************************/ +int32_t graphics_userblt(GRAPHICS_RESOURCE_TYPE_T src_type, + const void *src_data, + const uint32_t src_x, + const uint32_t src_y, + const uint32_t width, + const uint32_t height, + const uint32_t pitch, + GRAPHICS_RESOURCE_HANDLE dest, + const uint32_t x_pos, + const uint32_t y_pos ) +{ + VCOS_STATUS_T status; + VGImageFormat vg_src_type; + int bytes_per_pixel; + GX_CLIENT_STATE_T save; + + status = convert_image_type(src_type, &vg_src_type, &bytes_per_pixel); + if (status != VCOS_SUCCESS) + return status; + + gx_priv_save(&save, dest); + + if (dest->type == GX_PBUFFER) + { + vgImageSubData(dest->u.pixmap, + src_data, + pitch, + vg_src_type, + x_pos, y_pos, width, height); + } + else if (dest->type == GX_WINDOW) + { + // need to invert this as VG thinks zero is at the bottom + // while graphics_x thinks it is at the top. + vgWritePixels((uint8_t*)src_data + pitch*(height-1), + -pitch, + vg_src_type, + x_pos, dest->height-y_pos-height, width, height); + } + else + { + vcos_assert(0); + } + + if (vgGetError() == 0) + status = VCOS_SUCCESS; + else + { + vcos_assert(0); + status = VCOS_EINVAL; + } + + gx_priv_restore(&save); + return status; +} + +/*****************************************************************************/ +int32_t graphics_resource_text_dimensions( GRAPHICS_RESOURCE_HANDLE resource_handle, + const char *text, + const uint32_t text_length, + uint32_t *width, + uint32_t *height ) +{ + return graphics_resource_text_dimensions_ext(resource_handle, text, text_length, width, height, ATEXT_FONT_SIZE); +} + +/*****************************************************************************/ +VCOS_STATUS_T gx_render_arrowhead(GRAPHICS_RESOURCE_HANDLE res, + uint32_t tip_x, uint32_t tip_y, + int32_t w, int32_t h, + GX_PAINT_T *p) +{ + VGfloat gradient[4]; + VGPaint paint = (VGPaint)p; + VGPath path; + VCOS_STATUS_T status = VCOS_SUCCESS; + + GX_CLIENT_STATE_T save; + gx_priv_save(&save, res); + + if (!paint) + { + vcos_assert(0); + status = VCOS_EINVAL; + goto finish; + } + + gradient[0] = 0.0; gradient[1] = 0.0; + gradient[2] = w; gradient[2] = 0.0; + + vgSetParameterfv(paint, VG_PAINT_LINEAR_GRADIENT, 4, gradient); + vgSetPaint(paint, VG_FILL_PATH); + + path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32, + 1.0, 0.0, 8, 8, VG_PATH_CAPABILITY_ALL); + if (!path) + { + status = VCOS_ENOMEM; + goto finish; + } + VGfloat points[] = { + (VGfloat)tip_x, (VGfloat)tip_y, + (VGfloat)tip_x + w, (VGfloat)tip_y + h/2, + (VGfloat)tip_x + w, (VGfloat)tip_y - h/2, + }; + + vguPolygon(path, points, 3, 1); + + vgDrawPath(path, VG_FILL_PATH); + vgDestroyPath(path); + + vcos_assert(vgGetError()==0); + +finish: + gx_priv_restore(&save); + return status; +} + +/*****************************************************************************/ +int32_t gx_apply_alpha( GRAPHICS_RESOURCE_HANDLE resource_handle, + const uint8_t alpha ) +{ + vcos_assert(resource_handle); + if (resource_handle->type != GX_PBUFFER) + { + vcos_assert(0); + return -1; + } + resource_handle->alpha = 1.0*alpha/255; + return 0; +} + +/*****************************************************************************/ +int32_t graphics_resource_set_alpha_per_colour( GRAPHICS_RESOURCE_HANDLE res, + const uint32_t colour, + const uint8_t alpha ) +{ + GX_ERROR("Not implemented yet!"); + return 0; +} + +/*****************************************************************************/ +VCOS_STATUS_T gx_get_pixels(const GRAPHICS_RESOURCE_HANDLE res, void **pixels) +{ + VCOS_STATUS_T status = VCOS_SUCCESS; + GX_CLIENT_STATE_T save; + gx_priv_save(&save, res); + + /* Default to top-top-bottom raster scan order */ + status = gx_priv_get_pixels(res, pixels, GX_TOP_BOTTOM); + + gx_priv_restore(&save); + return status; +} + +/*****************************************************************************/ +VCOS_STATUS_T gx_get_pixels_in_raster_order(const GRAPHICS_RESOURCE_HANDLE res, + void **pixels, + GX_RASTER_ORDER_T raster_order) +{ + VCOS_STATUS_T status = VCOS_SUCCESS; + GX_CLIENT_STATE_T save; + gx_priv_save(&save, res); + + status = gx_priv_get_pixels(res, pixels, raster_order); + + gx_priv_restore(&save); + return status; +} + +/*****************************************************************************/ +void gx_free_pixels(const GRAPHICS_RESOURCE_HANDLE res, void *pixels) +{ + vcos_free(pixels); +} + +VCOS_STATUS_T gx_bind_vg( GX_CLIENT_STATE_T *save, GRAPHICS_RESOURCE_HANDLE res ) +{ + gx_priv_save(save, res); + vcos_assert(vgGetError()==0); + return VCOS_SUCCESS; +} + +/** Unbind VG */ +void gx_unbind_vg(GX_CLIENT_STATE_T *restore) +{ + gx_priv_restore(restore); +} + + +GX_CLIENT_STATE_T *gx_alloc_context(void) +{ + GX_CLIENT_STATE_T *ret = vcos_calloc(1,sizeof(*ret), "gx_client_state"); + return ret; +} + +void gx_free_context(GX_CLIENT_STATE_T *state) +{ + vcos_free(state); +} + +void gx_convert_colour(uint32_t colour, float *dest) +{ + gx_priv_colour_to_paint(colour, dest); +} + + +#define MAX_DISPLAY_HANDLES 4 + +#define CHANGE_LAYER (1<<0) +#define CHANGE_OPACITY (1<<1) +#define CHANGE_DEST (1<<2) +#define CHANGE_SRC (1<<3) +#define CHANGE_MASK (1<<4) +#define CHANGE_XFORM (1<<5) + +typedef struct +{ + /** Keep a display handle going for each connected screen (LCD, HDMI). */ + DISPMANX_DISPLAY_HANDLE_T screens[MAX_DISPLAY_HANDLES]; + int refcounts[MAX_DISPLAY_HANDLES]; + + //a flag to count the number of dispman starts that have been invoked + + uint32_t dispman_start_count; + // maintain the single global handle to the update in progress + DISPMANX_UPDATE_HANDLE_T current_update; + + VCOS_MUTEX_T lock; +} gx_priv_state_t; + +static gx_priv_state_t gx; + +void gx_priv_init(void) +{ + vcos_mutex_create(&gx.lock,NULL); +} + +void gx_priv_destroy(void) +{ + vcos_mutex_delete(&gx.lock); +} + + +static +int32_t gx_priv_open_screen(uint32_t index, DISPMANX_DISPLAY_HANDLE_T *pscreen) +{ + int ret = -1; + vcos_mutex_lock(&gx.lock); + + if (gx.refcounts[index] != 0) + { + *pscreen = gx.screens[index]; + gx.refcounts[index]++; + ret = 0; + } + else + { + DISPMANX_DISPLAY_HANDLE_T h = vc_dispmanx_display_open(index); + if (h == DISPMANX_NO_HANDLE) + { + GX_LOG("Could not open dispmanx display %d", index); + ret = -1; + goto finish; + } + gx.screens[index] = h; + gx.refcounts[index] = 1; + *pscreen = h; + ret = 0; + } +finish: + vcos_mutex_unlock(&gx.lock); + return ret; +} + +static +int32_t gx_priv_release_screen(uint32_t index) +{ + vcos_mutex_lock(&gx.lock); + gx.refcounts[index]--; + if (gx.refcounts[index] == 0) + { + vc_dispmanx_display_close(gx.screens[index]); + gx.screens[index] = DISPMANX_NO_HANDLE; + } + vcos_mutex_unlock(&gx.lock); + return 0; +} + + + + +int gx_priv_create_native_window(uint32_t screen_id, + uint32_t w, uint32_t h, + GRAPHICS_RESOURCE_TYPE_T type, + GX_NATIVE_WINDOW_T *win, + void **cookie) +{ + int rc; + DISPMANX_DISPLAY_HANDLE_T dispmanx_display; + VC_RECT_T dst_rect; + VC_RECT_T src_rect; + DISPMANX_UPDATE_HANDLE_T current_update; + *cookie = NULL; + + rc = gx_priv_open_screen(screen_id, &dispmanx_display); + if (rc < 0) + { + GX_LOG("Could not open display %d", screen_id); + goto fail_screen; + } + + current_update = vc_dispmanx_update_start(0); + if (!current_update) + { + GX_LOG("Could not start update on screen %d", screen_id); + goto fail_update; + } + + src_rect.x = src_rect.y = 0; + src_rect.width = w << 16; + src_rect.height = h << 16; + + dst_rect.x = dst_rect.y = 0; + dst_rect.width = dst_rect.height = 1; + + win->egl_win.width = w; + win->egl_win.height = h; + VC_DISPMANX_ALPHA_T alpha; + memset(&alpha, 0x0, sizeof(VC_DISPMANX_ALPHA_T)); + alpha.flags = DISPMANX_FLAGS_ALPHA_FROM_SOURCE; + + DISPMANX_CLAMP_T clamp; + memset(&clamp, 0x0, sizeof(DISPMANX_CLAMP_T)); + + win->egl_win.element = vc_dispmanx_element_add(current_update, dispmanx_display, + 0 /* layer */, &dst_rect, + 0 /* src */, &src_rect, + DISPMANX_PROTECTION_NONE, + &alpha /* alpha */, + &clamp /* clamp */, + 0 /* transform */); + + if ( !win->egl_win.element ) + { + GX_LOG("Could not add element %dx%d",w,h); + vc_dispmanx_update_submit_sync(current_update); + rc = -1; + } + + // have to pass back the update so it can be completed *After* the + // window has been initialised (filled with background colour). + *cookie = (void*)current_update; + + return 0; + +fail_update: + gx_priv_release_screen(screen_id); +fail_screen: + return rc; +} + +void gx_priv_finish_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res, + void *current_update) +{ + vc_dispmanx_update_submit_sync((DISPMANX_UPDATE_HANDLE_T)current_update); +} + +void +gx_priv_destroy_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res) +{ + DISPMANX_UPDATE_HANDLE_T current_update; + + if((current_update = vc_dispmanx_update_start(0)) != 0) + { + int ret = vc_dispmanx_element_remove(current_update, res->u.native_window.egl_win.element); + vcos_assert(ret == 0); + ret = vc_dispmanx_update_submit_sync(current_update); + vcos_assert(ret == 0); + } + + gx_priv_release_screen(res->screen_id); +} + + +/*********************************************************** + * Name: graphics_get_display_size + * + * Arguments: + * void + * + * Description: Return size of display + * + * Returns: int32_t: + * >=0 if it succeeded + * + ***********************************************************/ +int32_t graphics_get_display_size( const uint16_t display_number, + uint32_t *width, + uint32_t *height) +{ + DISPMANX_MODEINFO_T mode_info; + int32_t success = -1; + DISPMANX_DISPLAY_HANDLE_T disp; + vcos_assert(width && height); + *width = *height = 0; + + if(vcos_verify(display_number < MAX_DISPLAY_HANDLES)) + { + // TODO Shouldn't this close the display if it wasn't previously open? + if (gx_priv_open_screen(display_number, &disp) < 0) + { + vcos_assert(0); + return -1; + } + success = vc_dispmanx_display_get_info(disp, &mode_info); + + if( success >= 0 ) + { + *width = mode_info.width; + *height = mode_info.height; + vcos_assert(*height > 64); + } + else + { + vcos_assert(0); + } + } + + return success; +} + +static inline uint16_t auto_size(uint16_t arg, uint16_t actual_size) +{ + return arg == GRAPHICS_RESOURCE_WIDTH ? actual_size : arg; +} + +int32_t graphics_display_resource( GRAPHICS_RESOURCE_HANDLE res, + const uint16_t screen_number, + const int16_t z_order, + const uint16_t offset_x, + const uint16_t offset_y, + const uint16_t dest_width, + const uint16_t dest_height, + const VC_DISPMAN_TRANSFORM_T transform, + const uint8_t display ) +{ + DISPMANX_UPDATE_HANDLE_T update; + int32_t rc; + int xform_changed; + + if (!res) + { + // mimics old behaviour. + (void)vcos_verify(0); + return 0; + } + vcos_assert(res->magic == RES_MAGIC); + + xform_changed = transform != res->transform; + res->transform = transform; + + rc = graphics_update_start(); + update = gx.current_update; + vcos_assert(rc == 0); + + if (display) + { + VC_RECT_T src_rect, dest_rect; + + int32_t src_width = res->width; + int32_t src_height = res->height; + + uint32_t change_flags = CHANGE_LAYER; + + // has the destination position changed? + uint32_t w = auto_size(dest_width, res->width); + uint32_t h = auto_size(dest_height, res->height); + + vcos_assert(screen_number == res->screen_id); + + if (gx.screens[screen_number] == 0) + { + vcos_assert(0); + DISPMANX_DISPLAY_HANDLE_T display_handle; + gx_priv_open_screen(screen_number, &display_handle); + } + + if ((offset_x != res->dest.x) || + (offset_y != res->dest.y) || + (h != res->dest.height) || + (w != res->dest.width)) + { + change_flags |= CHANGE_DEST; + res->dest.x = offset_x; + res->dest.y = offset_y; + res->dest.height = h; + res->dest.width = w; + } + + if (xform_changed) + change_flags |= CHANGE_XFORM; + + vc_dispmanx_rect_set( &src_rect, 0, 0, ((uint32_t)src_width)<<16, ((uint32_t)src_height)<<16 ); + vc_dispmanx_rect_set( &dest_rect, offset_x, offset_y, w, h); + + rc = vc_dispmanx_element_change_attributes(update, + res->u.native_window.egl_win.element, + change_flags, + z_order, /* layer */ + 0xff, /* opacity */ + &dest_rect, + &src_rect, + 0, transform); + + vcos_assert(rc==0); + gx_priv_flush(res); + + } + else + { + vgFinish(); + eglWaitClient(); + rc = vc_dispmanx_element_change_source(update, res->u.native_window.egl_win.element, 0); + vcos_assert(rc==0); + } + + rc = graphics_update_end(); + vcos_assert(rc==0); + + return rc; +} + +/*********************************************************** + * Name: graphics_update_start + * + * Arguments: + * void + * + * Description: Starts an update UNLESS and update is already in progress + * + * Returns: int32_t: + * >=0 if it succeeded + * + ***********************************************************/ +int32_t graphics_update_start(void) +{ + int32_t success = 0; + + //check we are not already in an update + if ( 0 == gx.dispman_start_count ) + { + gx.current_update = vc_dispmanx_update_start( 10 ); + if( gx.current_update == DISPMANX_NO_HANDLE ) + { + //error + success = -1; + vc_assert( 0 ); + } + } + + if( success == 0 ) + { + //inc the counter + gx.dispman_start_count++; + } + + return success; +} + + +/*********************************************************** + * Name: graphics_update_end + * + * Arguments: + * void + * + * Description: Ends an update UNLESS more than one update is in progress + * + * Returns: int32_t: + * >=0 if it succeeded + * + ***********************************************************/ +int32_t graphics_update_end( void ) +{ + int32_t success = -1; + + // make sure you are checking the return value of graphics_update_start + if(vcos_verify(gx.current_update != DISPMANX_NO_HANDLE)) + { + //check we are in an update + if(vcos_verify(gx.dispman_start_count > 0)) + { + //dec the counter + gx.dispman_start_count--; + + success = 0; + + //is the counter now 0? + if( 0 == gx.dispman_start_count ) + { + eglWaitClient(); + if( vc_dispmanx_update_submit_sync( gx.current_update ) != 0 ) + { + //error + success = -1; + vc_assert( 0 ); + } + } + } + } + + return success; +} + diff --git a/gui/libs/vgfont/graphics_x_private.h b/gui/libs/vgfont/graphics_x_private.h @@ -0,0 +1,366 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// Graphics library for VG + +#ifndef GRAPHICS_X_PRIVATE_H +#define GRAPHICS_X_PRIVATE_H + +#define VCOS_LOG_CATEGORY (&gx_log_cat) + +#include "EGL/egl.h" +#include "EGL/eglext.h" +#include "VG/openvg.h" +#include "VG/vgu.h" + +#include "vgfont.h" +#include "bcm_host.h" + +extern VCOS_LOG_CAT_T gx_log_cat; + +#define LOG_ERR( fmt, arg... ) vcos_log_error( "%s:%d " fmt, __func__, __LINE__, ##arg) + +#define GX_ERROR(format, arg...) if (1) {} else printf( format "\n", ##arg) +#define GX_LOG(format, arg...) if (1) {} else printf( format "\n", ##arg) +#define GX_TRACE(format, arg...) if (1) {} else printf( format "\n", ##arg) + +typedef struct +{ + EGL_DISPMANX_WINDOW_T egl_win; +} GX_NATIVE_WINDOW_T; + +typedef enum +{ + GX_TOP_BOTTOM, + GX_BOTTOM_TOP, +} GX_RASTER_ORDER_T; + +typedef struct {} GX_PAINT_T; + +typedef struct GX_CLIENT_STATE_T GX_CLIENT_STATE_T; +typedef struct { + EGLDisplay disp; +} GX_DISPLAY_T; + +struct GX_DISPLAY_T +{ + EGLDisplay disp; +}; + +typedef enum +{ + GX_WINDOW, GX_PIXMAP, GX_PBUFFER +} GX_RES_TYPE; + +#define RES_MAGIC ('G'<<24|'X'<<16|'R'<<8|'S'<<0) +#define GX_PRIV_FLAG_FLIP (1<<0) + +/** + * Structure encapsulating the per-surface state. + ***********************************************************/ +typedef struct GRAPHICS_RESOURCE_HANDLE_TABLE_T +{ + union + { + GX_NATIVE_WINDOW_T native_window; + VGImage pixmap; + } u; + GX_RES_TYPE type; + + uint32_t magic; /** To work around broken create interface */ + int context_bound; + const char *last_caller; + EGLSurface surface; + EGLContext context; + EGLConfig config; + uint32_t screen_id; /** 0-LCD, etc */ + uint16_t width; + uint16_t height; + GRAPHICS_RESOURCE_TYPE_T restype; + VC_DISPMAN_TRANSFORM_T transform; + + VC_RECT_T dest; /** destination rectangle in use, for book-keeping */ + + VGfloat alpha; +} GRAPHICS_RESOURCE_HANDLE_TABLE_T; + +/** + * Structure used to store an EGL client state. + ***********************************************************/ +struct GX_CLIENT_STATE_T +{ + EGLSurface read_surface; + EGLSurface draw_surface; + EGLContext context; + EGLenum api; + GRAPHICS_RESOURCE_HANDLE res; +}; + +/** + * \fixme add documentation + * + ***********************************************************/ +void gx_priv_init(void); + +/** + * \fixme add documentation + * + ***********************************************************/ +void gx_priv_destroy(void); + +/** + * \fixme add documentation + * + * @param col colour + * + * @param rgba OpenVG paint colour + * + ***********************************************************/ +void gx_priv_colour_to_paint(uint32_t col, VGfloat *rgba); + +/** + * Save current EGL client state. + * + * @param state upon return, holds the saved EGL client state. + * + * @param res handle to the surface the EGL client state belongs to (may be <code>NULL</code>). + * + */ +void gx_priv_save(GX_CLIENT_STATE_T *state, GRAPHICS_RESOURCE_HANDLE res); + +/** + * Restore current EGL client state. + * + * @param state the EGL client state to restore. + * + */ +void gx_priv_restore(GX_CLIENT_STATE_T *state); + +/** + * Create a native window for a surface. + * + * @param screen_id \fixme + * + * @param w width of the window + * + * @param h height of the window + * + * @param type color/raster format of the resource + * + * @param win upon successful return, holds a handle to the native window + * + * @param cookie \fixme + * + * @return VCOS_SUCCESS on success, or error code. + */ +int gx_priv_create_native_window(uint32_t screen_id, + uint32_t w, uint32_t h, + GRAPHICS_RESOURCE_TYPE_T type, + GX_NATIVE_WINDOW_T *win, + void **cookie); + +/** + * Destroy native window bound to surface. + * + * @param res Handle to surface. + * + */ +void gx_priv_destroy_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res); + +/** + * Initialise font from the given directory. + * + * @param font_dir path to font + * + * \fixme only supports Vera.tff at the moment? + * + * @return VCOS_SUCCESS on success, or error code. + */ +VCOS_STATUS_T gx_priv_font_init(const char *font_dir); + +/** + * \fixme add documentation + * + ***********************************************************/ +void gx_priv_font_term(void); + +/** + * Fill an area of a surface with a single colour. + * + * @param res Handle to surface. + * + * @param x x-offset of area to fill + * + * @param y y-offset of area to fill + * + * @param width width of area to fill + * + * @param height height of area to fill + * + * @param fill_colour fill colour + * + ***********************************************************/ +VCOS_STATUS_T gx_priv_resource_fill(GRAPHICS_RESOURCE_HANDLE res, + uint32_t x, + uint32_t y, + uint32_t width, + uint32_t height, + uint32_t fill_colour ); + +/** + * Render text into a surface + * + * @param disp Handle to display. + * + * @param res Handle to surface. + * + * @param x x-offset + * + * @param y y-offset + * + * @param width bounding rectangle width + * + * @param height bounding rectangle height + * + * @param fg_colour foreground color + * + * @param bg_colour background color + * + * @param text text to render + * + * @param text_length length of text + * + * @param text_size size of text + * + ***********************************************************/ +VCOS_STATUS_T gx_priv_render_text( GX_DISPLAY_T *disp, + GRAPHICS_RESOURCE_HANDLE res, + int32_t x, + int32_t y, + uint32_t width, + uint32_t height, + uint32_t fg_colour, + uint32_t bg_colour, + const char *text, + uint32_t text_length, + uint32_t text_size ); + +/** + * Flush a surface. + * + * @param res Handle to surface. + * + ***********************************************************/ +void gx_priv_flush(GRAPHICS_RESOURCE_HANDLE res); + +/** + * Called after the EGL/VG initialisation of a window has completed + * following its creation. + * + * @param res ??? + * + * @param cookie ??? + * + ***********************************************************/ +void gx_priv_finish_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res, + void *cookie); + +/** + * Flush font cache. + * + ***********************************************************/ +void gx_font_cache_flush(void); + +/** + * Read a bitmap (.BMP) image from the given file. + * + * @param filename filename (must not be <code>NULL</code>). + * + * @param width holds the width of the image upon return. + * + * @param height holds the height of the image upon return. + * + * @param pitch_bytes holds the pitch of the image data (in bytes) upon return. + * + * @param restype holds the type of the image upon return. + * + * @param vg_format holds the OpenVG image format upon return. + * + * @param flags holds flags describing image properties upon return. + * + * @param image_data_size holds size of the image data upon return. + * + * @param pimage_data holds the image data buffer upon return (must not be <code>NULL</code>), + * the caller is responsible for releasing the buffer afterwards. + * + * @return 0 if success, non-zero otherwise (in which case the output parameters + * may be invalid). + * + ***********************************************************/ +int gx_priv_read_bmp(const char *file_name, + uint32_t *width, uint32_t *height, uint32_t *pitch_bytes, + GRAPHICS_RESOURCE_TYPE_T *restype, + VGImageFormat *vg_format, + uint32_t *flags, + uint32_t *image_data_size, + void **pimage_data); + +/** + * Read a Targa (.TGA) image from the given file. + * + * @param filename filename (must not be <code>NULL</code>). + * + * @param width holds the width of the image upon return. + * + * @param height holds the height of the image upon return. + * + * @param pitch_bytes holds the pitch of the image data (in bytes) upon return. + * + * @param restype holds the type of the image upon return. + * + * @param vg_format holds the OpenVG image format upon return. + * + * @param flags holds flags describing image properties upon return. + * + * @param image_data_size holds size of the image data upon return. + * + * @param pimage_data holds the image data buffer upon return (must not be <code>NULL</code>), + * the caller is responsible for releasing the memory afterwards. + * + * @return 0 if success, non-zero otherwise (in which case the output parameters. + * may be invalid). + * + ***********************************************************/ +int gx_priv_read_tga(const char *file_name, + uint32_t *width, uint32_t *height, uint32_t *pitch_bytes, + GRAPHICS_RESOURCE_TYPE_T *restype, + VGImageFormat *vg_format, + uint32_t *flags, + uint32_t *image_data_size, + void **pimage_data); + +#endif diff --git a/gui/libs/vgfont/libvgfont.a b/gui/libs/vgfont/libvgfont.a Binary files differ. diff --git a/gui/libs/vgfont/vgfont.h b/gui/libs/vgfont/vgfont.h @@ -0,0 +1,136 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// Font handling for graphicsx + +#ifndef VCFTLIB_H +#define VCFTLIB_H + +#include <stdint.h> +#include "interface/vmcs_host/vc_dispservice_x_defs.h" +#include "interface/vctypes/vc_image_types.h" +#include "interface/vcos/vcos.h" + +//Definitions which in certain functions can be used to mean the actual width and height of a resource, without +//having to know the data implicitly. +#define GRAPHICS_RESOURCE_WIDTH 0xFFFF +#define GRAPHICS_RESOURCE_HEIGHT 0xFFFF + +#define R_888_MASK (0x00FF0000) +#define G_888_MASK (0x0000FF00) +#define B_888_MASK (0x000000FF) +#define ALPHA_888_MASK (0xFF000000) +#define GRAPHICS_RGBA32( r, g, b, a ) GRAPHICS_RGBA888( r, g, b, a ) +#define GRAPHICS_RGBA888( r, g, b, a ) ( (((a) << (8+8+8)) & ALPHA_888_MASK) | (((b) << (8+8)) & R_888_MASK) | (((g) << 8) & G_888_MASK) | ((r) & B_888_MASK) ) +#define GRAPHICS_TRANSPARENT_COLOUR 0x00000001UL + +//resource defs + +typedef enum +{ + GRAPHICS_RESOURCE_HANDLE_TYPE_MIN, + + GRAPHICS_RESOURCE_RGB565, + GRAPHICS_RESOURCE_RGB888, /* 888 format is ONLY used when loading bitmaps + - you can't create or delete bitmaps with this format */ + GRAPHICS_RESOURCE_RGBA32, + GRAPHICS_RESOURCE_TF_RGB32A, + GRAPHICS_RESOURCE_TF_RGB565, + GRAPHICS_RESOURCE_YUV420, + + GRAPHICS_RESOURCE_HANDLE_TYPE_MAX + +} GRAPHICS_RESOURCE_TYPE_T; + + +typedef struct GRAPHICS_RESOURCE_HANDLE_TABLE_T *GRAPHICS_RESOURCE_HANDLE; + +VCOS_STATUS_T gx_graphics_init(const char *font_dir); +int32_t graphics_delete_resource( GRAPHICS_RESOURCE_HANDLE res ); +VCOS_STATUS_T gx_create_window( uint32_t screen_id, + uint32_t width, + uint32_t height, + GRAPHICS_RESOURCE_TYPE_T image_type, + GRAPHICS_RESOURCE_HANDLE *resource_handle ); + +int32_t graphics_display_resource( GRAPHICS_RESOURCE_HANDLE res, + const uint16_t screen_number, + const int16_t z_order, + const uint16_t offset_x, + const uint16_t offset_y, + const uint16_t dest_width, + const uint16_t dest_height, + const VC_DISPMAN_TRANSFORM_T transform, + const uint8_t display ); + +int32_t graphics_resource_fill(GRAPHICS_RESOURCE_HANDLE res, + uint32_t x, + uint32_t y, + uint32_t width, + uint32_t height, + uint32_t fill_colour ); + +int32_t graphics_update_displayed_resource(GRAPHICS_RESOURCE_HANDLE res, + const uint32_t x_offset, + const uint32_t y_offset, + const uint32_t width, + const uint32_t height ); + +int32_t graphics_resource_render_text_ext( GRAPHICS_RESOURCE_HANDLE res, + const int32_t x, + const int32_t y, + const uint32_t width, + const uint32_t height, + const uint32_t fg_colour, + const uint32_t bg_colour, + const char *text, + const uint32_t text_length, + const uint32_t text_size ); + +int32_t graphics_resource_text_dimensions_ext(GRAPHICS_RESOURCE_HANDLE res, + const char *text, + const uint32_t text_length, + uint32_t *width, + uint32_t *height, + const uint32_t text_size ); + +int32_t graphics_get_resource_size( + const GRAPHICS_RESOURCE_HANDLE res, + uint32_t *w, + uint32_t *h); + +int32_t graphics_update_start(void); + +int32_t graphics_update_end( void ); + +int32_t graphics_resource_text_dimensions( GRAPHICS_RESOURCE_HANDLE resource_handle, + const char *text, + const uint32_t text_length, + uint32_t *width, + uint32_t *height ); + +#endif diff --git a/gui/libs/vgfont/vgft.c b/gui/libs/vgfont/vgft.c @@ -0,0 +1,416 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// Font handling for graphicsx + +#include <assert.h> +#include <stdlib.h> + +#include "graphics_x_private.h" +#include "vgft.h" + +static FT_Library lib; + +int vgft_init(void) +{ + if (FT_Init_FreeType(&lib) == 0) + return 0; + else + { + return -1; + } +} + +void vgft_term(void) +{ + FT_Done_FreeType(lib); +} + +#define SEGMENTS_COUNT_MAX 256 +#define COORDS_COUNT_MAX 1024 + +static VGuint segments_count; +static VGubyte segments[SEGMENTS_COUNT_MAX]; +static VGuint coords_count; +static VGfloat coords[COORDS_COUNT_MAX]; + +static VGfloat float_from_26_6(FT_Pos x) +{ + return (VGfloat)x / 64.0f; +} + +static void convert_contour(const FT_Vector *points, const char *tags, short points_count) +{ + int first_coords = coords_count; + + int first = 1; + char last_tag = 0; + int c = 0; + + for (; points_count != 0; ++points, ++tags, --points_count) { + ++c; + + char tag = *tags; + if (first) { + assert(tag & 0x1); + assert(c==1); c=0; + segments[segments_count++] = VG_MOVE_TO; + first = 0; + } else if (tag & 0x1) { + /* on curve */ + + if (last_tag & 0x1) { + /* last point was also on -- line */ + assert(c==1); c=0; + segments[segments_count++] = VG_LINE_TO; + } else { + /* last point was off -- quad or cubic */ + if (last_tag & 0x2) { + /* cubic */ + assert(c==3); c=0; + segments[segments_count++] = VG_CUBIC_TO; + } else { + /* quad */ + assert(c==2); c=0; + segments[segments_count++] = VG_QUAD_TO; + } + } + } else { + /* off curve */ + + if (tag & 0x2) { + /* cubic */ + + assert((last_tag & 0x1) || (last_tag & 0x2)); /* last either on or off and cubic */ + } else { + /* quad */ + + if (!(last_tag & 0x1)) { + /* last was also off curve */ + + assert(!(last_tag & 0x2)); /* must be quad */ + + /* add on point half-way between */ + assert(c==2); c=1; + segments[segments_count++] = VG_QUAD_TO; + VGfloat x = (coords[coords_count - 2] + float_from_26_6(points->x)) * 0.5f; + VGfloat y = (coords[coords_count - 1] + float_from_26_6(points->y)) * 0.5f; + coords[coords_count++] = x; + coords[coords_count++] = y; + } + } + } + last_tag = tag; + + coords[coords_count++] = float_from_26_6(points->x); + coords[coords_count++] = float_from_26_6(points->y); + } + + if (last_tag & 0x1) { + /* last point was also on -- line (implicit with close path) */ + assert(c==0); + } else { + ++c; + + /* last point was off -- quad or cubic */ + if (last_tag & 0x2) { + /* cubic */ + assert(c==3); c=0; + segments[segments_count++] = VG_CUBIC_TO; + } else { + /* quad */ + assert(c==2); c=0; + segments[segments_count++] = VG_QUAD_TO; + } + + coords[coords_count++] = coords[first_coords + 0]; + coords[coords_count++] = coords[first_coords + 1]; + } + + segments[segments_count++] = VG_CLOSE_PATH; +} + +static void convert_outline(const FT_Vector *points, const char *tags, const short *contours, short contours_count, short points_count) +{ + segments_count = 0; + coords_count = 0; + + short last_contour = 0; + for (; contours_count != 0; ++contours, --contours_count) { + short contour = *contours + 1; + convert_contour(points + last_contour, tags + last_contour, contour - last_contour); + last_contour = contour; + } + assert(last_contour == points_count); + + assert(segments_count <= SEGMENTS_COUNT_MAX); /* oops... we overwrote some memory */ + assert(coords_count <= COORDS_COUNT_MAX); +} + +VCOS_STATUS_T vgft_font_init(VGFT_FONT_T *font) +{ + font->ft_face = NULL; + font->vg_font = vgCreateFont(0); + if (font->vg_font == VG_INVALID_HANDLE) + { + return VCOS_ENOMEM; + } + return VCOS_SUCCESS; +} + +VCOS_STATUS_T vgft_font_load_mem(VGFT_FONT_T *font, void *mem, size_t len) +{ + if (FT_New_Memory_Face(lib, mem, len, 0, &font->ft_face)) + { + return VCOS_EINVAL; + } + return VCOS_SUCCESS; +} + +VCOS_STATUS_T vgft_font_load_file(VGFT_FONT_T *font, const char *file) +{ + if (FT_New_Face(lib, file, 0, &font->ft_face)) { + return VCOS_EINVAL; + } + return VCOS_SUCCESS; +} + +VCOS_STATUS_T vgft_font_convert_glyphs(VGFT_FONT_T *font, unsigned int char_height, unsigned int dpi_x, unsigned int dpi_y) +{ + FT_UInt glyph_index; + FT_ULong ch; + + if (FT_Set_Char_Size(font->ft_face, 0, char_height, dpi_x, dpi_y)) + { + FT_Done_Face(font->ft_face); + vgDestroyFont(font->vg_font); + return VCOS_EINVAL; + } + + ch = FT_Get_First_Char(font->ft_face, &glyph_index); + + while (ch != 0) + { + if (FT_Load_Glyph(font->ft_face, glyph_index, FT_LOAD_DEFAULT)) { + FT_Done_Face(font->ft_face); + vgDestroyFont(font->vg_font); + return VCOS_ENOMEM; + } + + VGPath vg_path; + FT_Outline *outline = &font->ft_face->glyph->outline; + if (outline->n_contours != 0) { + vg_path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_ALL); + assert(vg_path != VG_INVALID_HANDLE); + + convert_outline(outline->points, outline->tags, outline->contours, outline->n_contours, outline->n_points); + vgAppendPathData(vg_path, segments_count, segments, coords); + } else { + vg_path = VG_INVALID_HANDLE; + } + + VGfloat origin[] = { 0.0f, 0.0f }; + VGfloat escapement[] = { float_from_26_6(font->ft_face->glyph->advance.x), float_from_26_6(font->ft_face->glyph->advance.y) }; + vgSetGlyphToPath(font->vg_font, glyph_index, vg_path, VG_FALSE, origin, escapement); + + if (vg_path != VG_INVALID_HANDLE) { + vgDestroyPath(vg_path); + } + ch = FT_Get_Next_Char(font->ft_face, ch, &glyph_index); + } + + return VCOS_SUCCESS; +} + +void vgft_font_term(VGFT_FONT_T *font) +{ + if (font->ft_face) + FT_Done_Face(font->ft_face); + if (font->vg_font) + vgDestroyFont(font->vg_font); + memset(font, 0, sizeof(*font)); +} + + +#define CHAR_COUNT_MAX 200 +static VGuint glyph_indices[CHAR_COUNT_MAX]; +static VGfloat adjustments_x[CHAR_COUNT_MAX]; +static VGfloat adjustments_y[CHAR_COUNT_MAX]; + +// Draws the first char_count characters from text, with adjustments, starting +// from the current origin. The peek argument indicates whether to peek ahead +// and get a final adjustment based on the next character past char_count, or +// else just assume that this is the end of the text and add no final +// adjustment. + +static void draw_chars(VGFT_FONT_T *font, const char *text, int char_count, VGbitfield paint_modes, int peek) { + // Put in first character + glyph_indices[0] = FT_Get_Char_Index(font->ft_face, text[0]); + int prev_glyph_index = glyph_indices[0]; + + // Calculate glyph_indices and adjustments + int i; + FT_Vector kern; + for (i = 1; i != char_count; ++i) { + int glyph_index = FT_Get_Char_Index(font->ft_face, text[i]); + if (!glyph_index) { return; } + glyph_indices[i] = glyph_index; + + if (FT_Get_Kerning(font->ft_face, prev_glyph_index, glyph_index, FT_KERNING_DEFAULT, &kern)) assert(0); + adjustments_x[i - 1] = float_from_26_6(kern.x); + adjustments_y[i - 1] = float_from_26_6(kern.y); + + prev_glyph_index = glyph_index; + } + + // Get the last adjustment? + if (peek) { + int peek_glyph_index = FT_Get_Char_Index(font->ft_face, text[i]); + if (!peek_glyph_index) { return; } + if (FT_Get_Kerning(font->ft_face, prev_glyph_index, peek_glyph_index, FT_KERNING_DEFAULT, &kern)) assert(0); + adjustments_x[char_count - 1] = float_from_26_6(kern.x); + adjustments_y[char_count - 1] = float_from_26_6(kern.y); + } else { + adjustments_x[char_count - 1] = 0.0f; + adjustments_y[char_count - 1] = 0.0f; + } + + vgDrawGlyphs(font->vg_font, char_count, glyph_indices, adjustments_x, adjustments_y, paint_modes, VG_FALSE); +} + +// Goes to the x,y position and draws arbitrary number of characters, draws +// iteratively if the char_count exceeds the max buffer size given above. + +static void draw_line(VGFT_FONT_T *font, VGfloat x, VGfloat y, const char *text, int char_count, VGbitfield paint_modes) { + if (char_count == 0) return; + + // Set origin to requested x,y + VGfloat glor[] = { x, y }; + vgSetfv(VG_GLYPH_ORIGIN, 2, glor); + + // Draw the characters in blocks to reuse buffer memory + const char *curr_text = text; + int chars_left = char_count; + while (chars_left > CHAR_COUNT_MAX) { + draw_chars(font, curr_text, CHAR_COUNT_MAX, paint_modes, 1); + chars_left -= CHAR_COUNT_MAX; + curr_text += CHAR_COUNT_MAX; + } + + // Draw the last block + draw_chars(font, curr_text, chars_left, paint_modes, 0); +} + +void vgft_font_draw(VGFT_FONT_T *font, VGfloat x, VGfloat y, const char *text, unsigned text_length, VGbitfield paint_modes) +{ + VGfloat descent = float_from_26_6(font->ft_face->size->metrics.descender); + int last_draw = 0; + int i = 0; + y -= descent; + for (;;) { + int last = !text[i] || (text_length && i==text_length); + + if ((text[i] == '\n') || last) + { + draw_line(font, x, y, text + last_draw, i - last_draw, paint_modes); + last_draw = i+1; + y -= float_from_26_6(font->ft_face->size->metrics.height); + } + if (last) + { + break; + } + ++i; + } +} + +// Get text extents for a single line + +static void line_extents(VGFT_FONT_T *font, VGfloat *x, VGfloat *y, const char *text, int chars_count) +{ + int i; + int prev_glyph_index = 0; + if (chars_count == 0) return; + + for (i=0; i < chars_count; i++) + { + int glyph_index = FT_Get_Char_Index(font->ft_face, text[i]); + if (!glyph_index) return; + + if (i != 0) + { + FT_Vector kern; + if (FT_Get_Kerning(font->ft_face, prev_glyph_index, glyph_index, + FT_KERNING_DEFAULT, &kern)) + { + assert(0); + } + *x += float_from_26_6(kern.x); + *y += float_from_26_6(kern.y); + } + FT_Load_Glyph(font->ft_face, glyph_index, FT_LOAD_DEFAULT); + *x += float_from_26_6(font->ft_face->glyph->advance.x); + + prev_glyph_index = glyph_index; + } +} + +// Text extents for some ASCII text. +// +// Use text_length if non-zero, otherwise look for trailing '\0'. + +void vgft_get_text_extents(VGFT_FONT_T *font, + const char *text, + unsigned text_length, + VGfloat unused0, VGfloat unused1, + VGfloat *w, VGfloat *h) { + int last_draw = 0; + VGfloat max_x = 0; + VGfloat y = 0; + + int i, last; + for (i = 0, last = 0; !last; ++i) { + last = !text[i] || (text_length && i==text_length); + if ((text[i] == '\n') || last) { + VGfloat x = 0; + line_extents(font, &x, &y, text + last_draw, i - last_draw); + last_draw = i + 1; + y -= float_from_26_6(font->ft_face->size->metrics.height); + if (x > max_x) max_x = x; + } + } + *w = max_x; + *h = -y; +} + +// Get y offset for first line; mitigates issue of start y being middle of block +// for multiline renders by vgft_font_draw. Currently simple, may be worth +// adding y kerning? + +VGfloat vgft_first_line_y_offset(VGFT_FONT_T *font) { + return float_from_26_6(font->ft_face->size->metrics.height); +} diff --git a/gui/libs/vgfont/vgft.h b/gui/libs/vgfont/vgft.h @@ -0,0 +1,70 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// Font handling for graphicsx + +#ifndef VGFT_H +#define VGFT_H + +#include "interface/vcos/vcos.h" +#include <VG/openvg.h> +#include <ft2build.h> + +typedef int VGFT_BOOL; +#define VGFT_FALSE 0 +#define VGFT_TRUE (!VGFT_FALSE) + +#include FT_FREETYPE_H + +/* Returns 0 on success */ +extern int vgft_init(void); +extern void vgft_term(void); + +typedef struct { + VGFont vg_font; + FT_Face ft_face; +} VGFT_FONT_T; + +/** Initialise a FT->VG font */ +VCOS_STATUS_T vgft_font_init(VGFT_FONT_T *font); + +/** Load a font file from memory */ +VCOS_STATUS_T vgft_font_load_mem(VGFT_FONT_T *font, void *mem, size_t len); + +/** Convert a font into VG glyphs */ +VCOS_STATUS_T vgft_font_convert_glyphs(VGFT_FONT_T *font, unsigned int char_height, unsigned int dpi_x, unsigned int dpi_y); + +/** Release a font. */ +void vgft_font_term(VGFT_FONT_T *font); + +void vgft_font_draw(VGFT_FONT_T *font, VGfloat x, VGfloat y, const char *text, unsigned text_length, VGbitfield paint_modes); + +void vgft_get_text_extents(VGFT_FONT_T *font, const char *text, unsigned text_length, VGfloat start_x, VGfloat start_y, VGfloat *w, VGfloat *h); + +VGfloat vgft_first_line_y_offset(VGFT_FONT_T *font); + +#endif diff --git a/gui/src/Makefile b/gui/src/Makefile @@ -0,0 +1,7 @@ +OBJS=main.o +BIN=../tarinagui.bin + +LDFLAGS+=-lvgfont -lfreetype -lz + +include ../Makefile.include + diff --git a/gui/src/VeraMono.ttf b/gui/src/VeraMono.ttf Binary files differ. diff --git a/gui/src/fixedsys.ttf b/gui/src/fixedsys.ttf Binary files differ. diff --git a/gui/src/main.c b/gui/src/main.c @@ -0,0 +1,484 @@ +/* +Copyright (c) 2012, Broadcom Europe Ltd +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of the copyright holder nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +// Test app for VG font library. + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <assert.h> +#include <unistd.h> + +#include "bcm_host.h" +#include "vgfont.h" + +int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const uint32_t text_size, const uint32_t x_offset, const uint32_t y_offset, uint32_t fontcolor) +{ + uint32_t height=0; + uint32_t img_w, img_h; + + graphics_get_resource_size(img, &img_w, &img_h); + + // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line + if (fontcolor == 5) { + graphics_resource_render_text_ext(img, x_offset, y_offset-height, + GRAPHICS_RESOURCE_WIDTH, + GRAPHICS_RESOURCE_HEIGHT, + GRAPHICS_RGBA32(225,255,255,0xff), /* fg */ + GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ + text, 74, text_size); + } + if (fontcolor == 4) { + graphics_resource_render_text_ext(img, x_offset, y_offset-height, + GRAPHICS_RESOURCE_WIDTH, + GRAPHICS_RESOURCE_HEIGHT, + GRAPHICS_RGBA32(51,51,51,0xff), /* fg */ + GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ + text, 74, text_size); + } + if (fontcolor == 3) { + graphics_resource_render_text_ext(img, x_offset, y_offset-height, + GRAPHICS_RESOURCE_WIDTH, + GRAPHICS_RESOURCE_HEIGHT, + GRAPHICS_RGBA32(30,30,255,0xff), /* fg */ + GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ + text, 74, text_size); + } + if (fontcolor == 2) { + graphics_resource_render_text_ext(img, x_offset, y_offset-height, + GRAPHICS_RESOURCE_WIDTH, + GRAPHICS_RESOURCE_HEIGHT, + GRAPHICS_RGBA32(255,255,255,0xff), /* fg */ + GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ + text, 74, text_size); + } + if (fontcolor == 1) { + graphics_resource_render_text_ext(img, x_offset, y_offset-height, + GRAPHICS_RESOURCE_WIDTH, + GRAPHICS_RESOURCE_HEIGHT, + GRAPHICS_RGBA32(0,0,0,0xff), /* fg */ + GRAPHICS_RGBA32(200,200,200,0xff), /* bg */ + text, 74, text_size); + } + return 0; + } + +int main(void) +{ + GRAPHICS_RESOURCE_HANDLE img; + uint32_t width, height; + int LAYER=1; + bcm_host_init(); + int s; + + s = gx_graphics_init("."); + assert(s == 0); + + s = graphics_get_display_size(0, &width, &height); + assert(s == 0); + + s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); + assert(s == 0); + + // transparent before display to avoid screen flash + graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); + + graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); + + uint32_t text_size = 16; + int selected; + int len_string_header; + int len_string_film; + int len_string_scene; + int len_string_shot; + int len_string_take; + int len_string_rec; + int len_string_shutter; + int len_string_iso; + int len_string_red; + int len_string_blue; + int len_string_bright; + int len_string_cont; + int len_string_sat; + int len_string_flip; + int len_string_beep; + int len_string_lenght; + int len_string_mic; + int len_string_phones; + int len_string_dsk; + int len_string_more1; + int len_string_more2; + int len_string_more3; + int len_string_more4; + int len_string_more5; + int len_string_more6; + int len_string_more7; + char check[500]; + char oldcheck[500]; + char vumeter[80]; + char menu[4]; + char header[100]; + char film[30]; + char scene[20]; + char shot[20]; + char take[20]; + char rec[20]; + char shutter[30]; + char iso[20]; + char red[20]; + char blue[20]; + char bright[20]; + char cont[20]; + char sat[20]; + char flip[20]; + char beep[20]; + char lenght[20]; + char mic[20]; + char phones[20]; + char dsk[20]; + char more1[20]; + char more2[20]; + char more3[20]; + char more4[20]; + char more5[20]; + char more6[20]; + char more7[20]; + //graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); + while (1) { + // char ch; + FILE *fp; + fp = fopen("/dev/shm/vumeter","r"); + while(fgets(vumeter, 74, fp) != NULL); + fclose(fp); + FILE *fp2; + fp2 = fopen("/dev/shm/interface","r"); + fgets(check, 500, fp2); + fclose(fp2); + // check if something has changed + if (strcmp(check, oldcheck) != 0) { + strcpy(oldcheck, check); + fp2 = fopen("/dev/shm/interface","r"); + fgets(menu, 4, fp2); + selected = atoi(menu); + fgets(menu, 4, fp2); + len_string_header = atoi(menu) + 1; + fgets(header, len_string_header, fp2); + fgets(menu, 4, fp2); + len_string_film = atoi(menu) + 1; + fgets(film, len_string_film, fp2); + fgets(menu, 4, fp2); + len_string_scene = atoi(menu) + 1; + fgets(scene, len_string_scene, fp2); + fgets(menu, 4, fp2); + len_string_shot = atoi(menu) + 1; + fgets(shot, len_string_shot, fp2); + fgets(menu, 4, fp2); + len_string_take = atoi(menu) + 1; + fgets(take, len_string_take, fp2); + fgets(menu, 4, fp2); + len_string_rec = atoi(menu) + 1; + fgets(rec, len_string_rec, fp2); + fgets(menu, 4, fp2); + len_string_shutter = atoi(menu) + 1; + fgets(shutter, len_string_shutter, fp2); + fgets(menu, 4, fp2); + len_string_iso = atoi(menu) + 1; + fgets(iso, len_string_iso, fp2); + fgets(menu, 4, fp2); + len_string_red = atoi(menu) + 1; + fgets(red, len_string_red, fp2); + fgets(menu, 4, fp2); + len_string_blue = atoi(menu) + 1; + fgets(blue, len_string_blue, fp2); + fgets(menu, 4, fp2); + len_string_bright = atoi(menu) + 1; + fgets(bright, len_string_bright, fp2); + fgets(menu, 4, fp2); + len_string_cont = atoi(menu) + 1; + fgets(cont, len_string_cont, fp2); + fgets(menu, 4, fp2); + len_string_sat = atoi(menu) + 1; + fgets(sat, len_string_sat, fp2); + fgets(menu, 4, fp2); + len_string_flip = atoi(menu) + 1; + fgets(flip, len_string_flip, fp2); + fgets(menu, 4, fp2); + len_string_beep = atoi(menu) + 1; + fgets(beep, len_string_beep, fp2); + fgets(menu, 4, fp2); + len_string_lenght = atoi(menu) + 1; + fgets(lenght, len_string_lenght, fp2); + fgets(menu, 4, fp2); + len_string_mic = atoi(menu) + 1; + fgets(mic, len_string_mic, fp2); + fgets(menu, 4, fp2); + len_string_phones = atoi(menu) + 1; + fgets(phones, len_string_phones, fp2); + fgets(menu, 4, fp2); + len_string_dsk = atoi(menu) + 1; + fgets(dsk, len_string_dsk, fp2); + fgets(menu, 4, fp2); + len_string_more1 = atoi(menu) + 1; + fgets(more1, len_string_more1, fp2); + fgets(menu, 4, fp2); + len_string_more2 = atoi(menu) + 1; + fgets(more2, len_string_more2, fp2); + fgets(menu, 4, fp2); + len_string_more3 = atoi(menu) + 1; + fgets(more3, len_string_more3, fp2); + fgets(menu, 4, fp2); + len_string_more4 = atoi(menu) + 1; + fgets(more4, len_string_more4, fp2); + fgets(menu, 4, fp2); + len_string_more5 = atoi(menu) + 1; + fgets(more5, len_string_more5, fp2); + fgets(menu, 4, fp2); + len_string_more6 = atoi(menu) + 1; + fgets(more6, len_string_more6, fp2); + fgets(menu, 4, fp2); + len_string_more7 = atoi(menu) + 1; + fgets(more7, len_string_more7, fp2); + fgets(menu, 3, fp2); + fclose(fp2); + if (menu[0] == 'E' && menu[1] == 'O'){ + //FILE *fp3; + //fp3 = fopen("interface.txt","r"); + //while(fgets(text3, 57, fp3) != NULL); + //fclose(fp3); + //const char *text = "Never give up on your dreams"; + uint32_t y_offset2 = 0; + uint32_t y_offset3 = 22; + uint32_t y_offset4 = 44; + uint32_t y_offset5 = 418; + uint32_t y_offset6 = 440; + graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); + // blue, at the top (y=40) + // selected 0 1 2 3 4 5 6 7 8 + int space = 10; + int morespace = 6; + int color = 5; + // draw the text if updated + if(strlen(header) != 0) { + render_subtitle(img, header, text_size, 0, y_offset2, 5); + if(selected == 0){ + render_subtitle(img, film, text_size, 0, y_offset3, 1); + } + else{ + render_subtitle(img, film, text_size, 0, y_offset3, color); + } + if(selected == 1){ + render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset3, 1); + } + else{ + render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset3, color); + } + if(selected == 2){ + render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset3, 1); + } + else{ + render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset3, color); + } + if(selected == 3){ + render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset3, 1); + } + else{ + render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset3, color); + } + if(selected == 5){ + render_subtitle(img, shutter, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + morespace * 4, y_offset3, 1); + } + else{ + render_subtitle(img, shutter, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + morespace * 4, y_offset3, color); + } + if(selected == 6){ + render_subtitle(img, iso, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + len_string_shutter * space + morespace * 5, y_offset3, 1); + } + else{ + render_subtitle(img, iso, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + len_string_shutter * space + morespace * 5, y_offset3, color); + } + } + if(strlen(header) == 0) { + render_subtitle(img, rec, text_size, 700, y_offset3, 3); + if(selected == 0){ + render_subtitle(img, film, text_size, 0, y_offset2, 1); + } + else{ + render_subtitle(img, film, text_size, 0, y_offset2, color); + } + if(selected == 1){ + render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset2, 1); + } + else{ + render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset2, color); + } + if(selected == 2){ + render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset2, 1); + } + else{ + render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset2, color); + } + if(selected == 3){ + render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset2, 1); + } + else{ + render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset2, color); + } + if(selected == 5){ + render_subtitle(img, shutter, text_size, 0, y_offset3, 1); + } + else{ + render_subtitle(img, shutter, text_size, 0, y_offset3, color); + } + if(selected == 6){ + render_subtitle(img, iso, text_size, (len_string_shutter * space) + morespace, y_offset3, 1); + } + else{ + render_subtitle(img, iso, text_size, (len_string_shutter * space) + morespace, y_offset3, color); + } + if(selected == 7){ + render_subtitle(img, red, text_size, (len_string_shutter * space) + (len_string_iso * space) + morespace * 2, y_offset3, 1); + } + else{ + render_subtitle(img, red, text_size, len_string_shutter * space + len_string_iso * space + morespace * 2, y_offset3, color); + } + if(selected == 8){ + render_subtitle(img, blue, text_size, len_string_shutter * space + len_string_iso * space + len_string_red * space + morespace * 3, y_offset3, 1); + } + else{ + render_subtitle(img, blue, text_size, len_string_shutter * space + len_string_iso * space + len_string_red * space + morespace * 3, y_offset3, color); + } + if(selected == 9){ + render_subtitle(img, bright, text_size, 0, y_offset4, 1); + } + else{ + render_subtitle(img, bright, text_size, 0, y_offset4, color); + } + if(selected == 10){ + render_subtitle(img, cont, text_size, len_string_bright * space + morespace, y_offset4, 1); + } + else{ + render_subtitle(img, cont, text_size, len_string_bright * space + morespace, y_offset4, color); + } + if(selected == 11){ + render_subtitle(img, sat, text_size, len_string_bright * space + len_string_cont * space + morespace * 2, y_offset4, 1); + } + else{ + render_subtitle(img, sat, text_size, len_string_bright * space + len_string_cont * space + morespace * 2, y_offset4, color); + } + if(selected == 12){ + render_subtitle(img, flip, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + morespace * 3, y_offset4, 1); + } + else{ + render_subtitle(img, flip, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + morespace * 3, y_offset4, color); + } + if(selected == 13){ + render_subtitle(img, beep, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + morespace * 4, y_offset4, 1); + } + else{ + render_subtitle(img, beep, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + morespace * 4, y_offset4, color); + } + if(selected == 14){ + render_subtitle(img, lenght, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + len_string_beep * space + morespace * 5, y_offset4, 1); + } + else{ + render_subtitle(img, lenght, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + len_string_beep * space + morespace * 5, y_offset4, color); + } + if(selected == 15){ + render_subtitle(img, mic, text_size, 0, y_offset5, 1); + } + else{ + render_subtitle(img, mic, text_size, 0, y_offset5, color); + } + if(selected == 16){ + render_subtitle(img, phones, text_size, len_string_mic * space + morespace, y_offset5, 1); + } + else{ + render_subtitle(img, phones, text_size, len_string_mic * space + morespace, y_offset5, color); + } + if(selected == 17){ + render_subtitle(img, dsk, text_size, len_string_mic * space + len_string_phones * space + morespace * 2, y_offset5, 1); + } + else{ + render_subtitle(img, dsk, text_size, len_string_mic * space + len_string_phones * space + morespace * 2, y_offset5, color); + } + if(selected == 18){ + render_subtitle(img, more1, text_size, 0, y_offset6, 1); + } + else{ + render_subtitle(img, more1, text_size, 0, y_offset6, color); + } + if(selected == 19){ + render_subtitle(img, more2, text_size, len_string_more1 * space + morespace, y_offset6, 1); + } + else{ + render_subtitle(img, more2, text_size, len_string_more1 * space + morespace, y_offset6, color); + } + if(selected == 20){ + render_subtitle(img, more3, text_size, len_string_more1 * space + len_string_more2 * space + morespace * 2, y_offset6, 1); + } + else{ + render_subtitle(img, more3, text_size, len_string_more1 * space + len_string_more2 * space + morespace * 2, y_offset6, color); + } + if(selected == 21){ + render_subtitle(img, more4, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + morespace * 3, y_offset6, 1); + } + else{ + render_subtitle(img, more4, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + morespace * 3, y_offset6, color); + } + if(selected == 22){ + render_subtitle(img, more5, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + morespace * 4, y_offset6, 1); + } + else{ + render_subtitle(img, more5, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + morespace * 4, y_offset6, color); + } + if(selected == 23){ + render_subtitle(img, more6, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + morespace * 5, y_offset6, 1); + } + else{ + render_subtitle(img, more6, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + morespace * 5, y_offset6, color); + } + if(selected == 24){ + render_subtitle(img, more7, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + len_string_more6 * space + morespace * 6, y_offset6, 1); + } + else{ + render_subtitle(img, more7, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + len_string_more6 * space + morespace * 6, y_offset6, color); + } + } + //graphics_update_displayed_resource(img, 0, 0, 0, 0); + } + } + uint32_t y_offset = 460; + render_subtitle(img, vumeter, text_size, 0, y_offset, 5); + graphics_update_displayed_resource(img, 0, 0, 0, 0); + usleep(10000); + } + + graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); + graphics_delete_resource(img); + return 0; +} + diff --git a/gui/tarinagui.bin b/gui/tarinagui.bin Binary files differ. diff --git a/startinterface.sh b/startinterface.sh @@ -1,5 +1,5 @@ #!/bin/bash echo "Have fun!" > /dev/shm/vumeter echo "For the lulz" > /dev/shm/interface -cd ./vc/src/hello_pi/hello_interface -./camerainterface.bin +cd ./gui +./tarinagui.bin diff --git a/tarina.py b/tarina.py @@ -1083,7 +1083,7 @@ def stopinterface(camera): camera.close() os.system('pkill -9 arecord') os.system('pkill -9 startinterface') - os.system('pkill -9 camerainterface') + os.system('pkill -9 tarinagui') os.system('pkill -9 tarinaserver.py') curses.nocbreak() curses.echo() @@ -1699,7 +1699,7 @@ if __name__ == '__main__': print 'Unexpected error : ', sys.exc_info()[0], sys.exc_info()[1] os.system('pkill arecord') os.system('pkill startinterface') - os.system('pkill camerainterface') + os.system('pkill tarinagui') curses.nocbreak() curses.echo() curses.endwin() diff --git a/vc/LICENCE b/vc/LICENCE @@ -1,35 +0,0 @@ -Note: this licence applies to the binaries in the bin, sbin, and lib -sub-directories. The header files in the include sub-directory and the example -code in src describes their licence at the top of the file. - ----- - -Copyright (c) 2006, Broadcom Corporation. -All rights reserved. - -Redistribution. Redistribution and use in binary form, without -modification, are permitted provided that the following conditions are -met: - -* This software may only be used for the purposes of developing for, - running or using a Raspberry Pi device. -* Redistributions must reproduce the above copyright notice and the - following disclaimer in the documentation and/or other materials - provided with the distribution. -* Neither the name of Broadcom Corporation nor the names of its suppliers - may be used to endorse or promote products derived from this software - without specific prior written permission. - -DISCLAIMER. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - diff --git a/vc/bin/containers_check_frame_int b/vc/bin/containers_check_frame_int Binary files differ. diff --git a/vc/bin/containers_datagram_receiver b/vc/bin/containers_datagram_receiver Binary files differ. diff --git a/vc/bin/containers_datagram_sender b/vc/bin/containers_datagram_sender Binary files differ. diff --git a/vc/bin/containers_dump_pktfile b/vc/bin/containers_dump_pktfile Binary files differ. diff --git a/vc/bin/containers_rtp_decoder b/vc/bin/containers_rtp_decoder Binary files differ. diff --git a/vc/bin/containers_stream_client b/vc/bin/containers_stream_client Binary files differ. diff --git a/vc/bin/containers_stream_server b/vc/bin/containers_stream_server Binary files differ. diff --git a/vc/bin/containers_test b/vc/bin/containers_test Binary files differ. diff --git a/vc/bin/containers_test_bits b/vc/bin/containers_test_bits Binary files differ. diff --git a/vc/bin/containers_test_uri b/vc/bin/containers_test_uri Binary files differ. diff --git a/vc/bin/containers_uri_pipe b/vc/bin/containers_uri_pipe Binary files differ. diff --git a/vc/bin/edidparser b/vc/bin/edidparser Binary files differ. diff --git a/vc/bin/mmal_vc_diag b/vc/bin/mmal_vc_diag Binary files differ. diff --git a/vc/bin/raspistill b/vc/bin/raspistill Binary files differ. diff --git a/vc/bin/raspivid b/vc/bin/raspivid Binary files differ. diff --git a/vc/bin/raspividyuv b/vc/bin/raspividyuv Binary files differ. diff --git a/vc/bin/raspiyuv b/vc/bin/raspiyuv Binary files differ. diff --git a/vc/bin/tvservice b/vc/bin/tvservice Binary files differ. diff --git a/vc/bin/vcdbg b/vc/bin/vcdbg Binary files differ. diff --git a/vc/bin/vcgencmd b/vc/bin/vcgencmd Binary files differ. diff --git a/vc/bin/vchiq_test b/vc/bin/vchiq_test Binary files differ. diff --git a/vc/bin/vcmailbox b/vc/bin/vcmailbox Binary files differ. diff --git a/vc/bin/vcsmem b/vc/bin/vcsmem Binary files differ. diff --git a/vc/include/EGL/egl.h b/vc/include/EGL/egl.h @@ -1,329 +0,0 @@ -/* -*- mode: c; tab-width: 8; -*- */ -/* vi: set sw=4 ts=8: */ -/* Reference version of egl.h for EGL 1.4. - * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ - */ - -/* -** Copyright (c) 2007-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -#ifndef __egl_h_ -#define __egl_h_ - -/* All platform-dependent types and macro boilerplate (such as EGLAPI - * and EGLAPIENTRY) should go in eglplatform.h. - */ -#include "eglplatform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* EGL Types */ -/* EGLint is defined in eglplatform.h */ -typedef unsigned int EGLBoolean; -typedef unsigned int EGLenum; -typedef void *EGLConfig; -typedef void *EGLContext; -typedef void *EGLDisplay; -typedef void *EGLSurface; -typedef void *EGLClientBuffer; - -/* EGL Versioning */ -#define EGL_VERSION_1_0 1 -#define EGL_VERSION_1_1 1 -#define EGL_VERSION_1_2 1 -#define EGL_VERSION_1_3 1 -#define EGL_VERSION_1_4 1 - -/* EGL Enumerants. Bitmasks and other exceptional cases aside, most - * enums are assigned unique values starting at 0x3000. - */ - -/* EGL aliases */ -#define EGL_FALSE ((EGLBoolean)0) -#define EGL_TRUE ((EGLBoolean)1) - -/* Out-of-band handle values */ -#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) -#define EGL_NO_CONTEXT ((EGLContext)0) -#define EGL_NO_DISPLAY ((EGLDisplay)0) -#define EGL_NO_SURFACE ((EGLSurface)0) - -/* Out-of-band attribute value */ -#define EGL_DONT_CARE ((EGLint)-1) - -/* Errors / GetError return values */ -#define EGL_SUCCESS 0x3000 -#define EGL_NOT_INITIALIZED 0x3001 -#define EGL_BAD_ACCESS 0x3002 -#define EGL_BAD_ALLOC 0x3003 -#define EGL_BAD_ATTRIBUTE 0x3004 -#define EGL_BAD_CONFIG 0x3005 -#define EGL_BAD_CONTEXT 0x3006 -#define EGL_BAD_CURRENT_SURFACE 0x3007 -#define EGL_BAD_DISPLAY 0x3008 -#define EGL_BAD_MATCH 0x3009 -#define EGL_BAD_NATIVE_PIXMAP 0x300A -#define EGL_BAD_NATIVE_WINDOW 0x300B -#define EGL_BAD_PARAMETER 0x300C -#define EGL_BAD_SURFACE 0x300D -#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */ - -/* Reserved 0x300F-0x301F for additional errors */ - -/* Config attributes */ -#define EGL_BUFFER_SIZE 0x3020 -#define EGL_ALPHA_SIZE 0x3021 -#define EGL_BLUE_SIZE 0x3022 -#define EGL_GREEN_SIZE 0x3023 -#define EGL_RED_SIZE 0x3024 -#define EGL_DEPTH_SIZE 0x3025 -#define EGL_STENCIL_SIZE 0x3026 -#define EGL_CONFIG_CAVEAT 0x3027 -#define EGL_CONFIG_ID 0x3028 -#define EGL_LEVEL 0x3029 -#define EGL_MAX_PBUFFER_HEIGHT 0x302A -#define EGL_MAX_PBUFFER_PIXELS 0x302B -#define EGL_MAX_PBUFFER_WIDTH 0x302C -#define EGL_NATIVE_RENDERABLE 0x302D -#define EGL_NATIVE_VISUAL_ID 0x302E -#define EGL_NATIVE_VISUAL_TYPE 0x302F -#define EGL_SAMPLES 0x3031 -#define EGL_SAMPLE_BUFFERS 0x3032 -#define EGL_SURFACE_TYPE 0x3033 -#define EGL_TRANSPARENT_TYPE 0x3034 -#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 -#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 -#define EGL_TRANSPARENT_RED_VALUE 0x3037 -#define EGL_NONE 0x3038 /* Attrib list terminator */ -#define EGL_BIND_TO_TEXTURE_RGB 0x3039 -#define EGL_BIND_TO_TEXTURE_RGBA 0x303A -#define EGL_MIN_SWAP_INTERVAL 0x303B -#define EGL_MAX_SWAP_INTERVAL 0x303C -#define EGL_LUMINANCE_SIZE 0x303D -#define EGL_ALPHA_MASK_SIZE 0x303E -#define EGL_COLOR_BUFFER_TYPE 0x303F -#define EGL_RENDERABLE_TYPE 0x3040 -#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */ -#define EGL_CONFORMANT 0x3042 - -/* Reserved 0x3041-0x304F for additional config attributes */ - -/* Config attribute values */ -#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ -#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */ -#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ -#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */ -#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */ - -/* More config attribute values, for EGL_TEXTURE_FORMAT */ -#define EGL_NO_TEXTURE 0x305C -#define EGL_TEXTURE_RGB 0x305D -#define EGL_TEXTURE_RGBA 0x305E -#define EGL_TEXTURE_2D 0x305F - -/* Config attribute mask bits */ -#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */ -#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */ -#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */ -#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */ -#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */ -#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */ -#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */ - -#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ -#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ -#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ -#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ - -/* QueryString targets */ -#define EGL_VENDOR 0x3053 -#define EGL_VERSION 0x3054 -#define EGL_EXTENSIONS 0x3055 -#define EGL_CLIENT_APIS 0x308D - -/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */ -#define EGL_HEIGHT 0x3056 -#define EGL_WIDTH 0x3057 -#define EGL_LARGEST_PBUFFER 0x3058 -#define EGL_TEXTURE_FORMAT 0x3080 -#define EGL_TEXTURE_TARGET 0x3081 -#define EGL_MIPMAP_TEXTURE 0x3082 -#define EGL_MIPMAP_LEVEL 0x3083 -#define EGL_RENDER_BUFFER 0x3086 -#define EGL_VG_COLORSPACE 0x3087 -#define EGL_VG_ALPHA_FORMAT 0x3088 -#define EGL_HORIZONTAL_RESOLUTION 0x3090 -#define EGL_VERTICAL_RESOLUTION 0x3091 -#define EGL_PIXEL_ASPECT_RATIO 0x3092 -#define EGL_SWAP_BEHAVIOR 0x3093 -#define EGL_MULTISAMPLE_RESOLVE 0x3099 - -/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ -#define EGL_BACK_BUFFER 0x3084 -#define EGL_SINGLE_BUFFER 0x3085 - -/* OpenVG color spaces */ -#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */ -#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */ - -/* OpenVG alpha formats */ -#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */ -#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */ - -/* Constant scale factor by which fractional display resolutions & - * aspect ratio are scaled when queried as integer values. - */ -#define EGL_DISPLAY_SCALING 10000 - -/* Unknown display resolution/aspect ratio */ -#define EGL_UNKNOWN ((EGLint)-1) - -/* Back buffer swap behaviors */ -#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */ -#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */ - -/* CreatePbufferFromClientBuffer buffer types */ -#define EGL_OPENVG_IMAGE 0x3096 - -/* QueryContext targets */ -#define EGL_CONTEXT_CLIENT_TYPE 0x3097 - -/* CreateContext attributes */ -#define EGL_CONTEXT_CLIENT_VERSION 0x3098 - -/* Multisample resolution behaviors */ -#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */ -#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */ - -/* BindAPI/QueryAPI targets */ -#define EGL_OPENGL_ES_API 0x30A0 -#define EGL_OPENVG_API 0x30A1 -#define EGL_OPENGL_API 0x30A2 - -/* GetCurrentSurface targets */ -#define EGL_DRAW 0x3059 -#define EGL_READ 0x305A - -/* WaitNative engines */ -#define EGL_CORE_NATIVE_ENGINE 0x305B - -/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */ -#define EGL_COLORSPACE EGL_VG_COLORSPACE -#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT -#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB -#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR -#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE -#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE - -/* EGL extensions must request enum blocks from the Khronos - * API Registrar, who maintains the enumerant registry. Submit - * a bug in Khronos Bugzilla against task "Registry". - */ - - - -/* EGL Functions */ - -EGLAPI EGLint EGLAPIENTRY eglGetError(void); - -EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id); -EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); -EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy); - -EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name); - -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, - EGLint config_size, EGLint *num_config); -EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, - EGLConfig *configs, EGLint config_size, - EGLint *num_config); -EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, - EGLint attribute, EGLint *value); - -EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, - EGLNativeWindowType win, - const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, - const EGLint *attrib_list); -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, - EGLNativePixmapType pixmap, - const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, - EGLint attribute, EGLint *value); - -EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api); -EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void); - -EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void); - -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void); - -EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer( - EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, - EGLConfig config, const EGLint *attrib_list); - -EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, - EGLint attribute, EGLint value); -EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); -EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); - - -EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); - - -EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, - EGLContext share_context, - const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); -EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, - EGLSurface read, EGLContext ctx); - -EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void); -EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw); -EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, - EGLint attribute, EGLint *value); - -EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void); -EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine); -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); -EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, - EGLNativePixmapType target); - -/* This is a generic function pointer type, whose name indicates it must - * be cast to the proper type *and calling convention* before use. - */ -typedef void (*__eglMustCastToProperFunctionPointerType)(void); - -/* Now, define eglGetProcAddress using the generic function ptr. type */ -EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY - eglGetProcAddress(const char *procname); - -#ifdef __cplusplus -} -#endif - -#endif /* __egl_h_ */ diff --git a/vc/include/EGL/eglext.h b/vc/include/EGL/eglext.h @@ -1,205 +0,0 @@ -#ifndef __eglext_h_ -#define __eglext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2007-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -#include "eglplatform.h" - -/* We want this */ -#ifndef EGL_EGLEXT_PROTOTYPES -#define EGL_EGLEXT_PROTOTYPES -#endif - -/*************************************************************/ - -/* Header file version number */ -/* Current version at http://www.khronos.org/registry/egl/ */ -/* $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $ */ -#define EGL_EGLEXT_VERSION 3 - -#ifndef EGL_KHR_config_attribs -#define EGL_KHR_config_attribs 1 -#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ -#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ -#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ -#endif - -#ifndef EGL_KHR_lock_surface -#define EGL_KHR_lock_surface 1 -#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ -#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ -#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ -#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ -#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ -#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ -#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ -#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ -#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ -#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ -#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ -#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); -#endif - -#ifndef EGL_KHR_image -#define EGL_KHR_image 1 -#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ -typedef void *EGLImageKHR; -#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); -#endif - -#ifndef EGL_KHR_vg_parent_image -#define EGL_KHR_vg_parent_image 1 -#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ -#endif - -#ifndef EGL_KHR_gl_texture_2D_image -#define EGL_KHR_gl_texture_2D_image 1 -#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ -#endif - -#ifndef EGL_KHR_gl_texture_cubemap_image -#define EGL_KHR_gl_texture_cubemap_image 1 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ -#endif - -#ifndef EGL_KHR_gl_texture_3D_image -#define EGL_KHR_gl_texture_3D_image 0 -#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ -#endif - -#ifndef EGL_KHR_gl_renderbuffer_image -#define EGL_KHR_gl_renderbuffer_image 1 -#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ -#endif - -#ifndef EGL_KHR_image_base -#define EGL_KHR_image_base 1 -/* Most interfaces defined by EGL_KHR_image_pixmap above */ -#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ -#endif - -#ifndef EGL_KHR_image_pixmap -#define EGL_KHR_image_pixmap 1 -/* Interfaces defined by EGL_KHR_image above */ -#endif - -#ifndef EGL_KHR_fence_sync -#define EGL_KHR_fence_sync 1 -#define GL_OES_EGL_sync 1 -#endif - -#ifndef EGL_KHR_sync -#define EGL_KHR_sync 1 -#endif - -#if ((EGL_KHR_sync == 1) || (EGL_KHR_fence_sync == 1)) -#define EGL_KHR_sync 1 /* EGL_KHR_fence_sync depends on this stuff */ -/* -* EGLSyncKHR is an opaque handle to an EGL sync object -*/ - -typedef void* EGLSyncKHR; - -/* -* EGLTimeKHR is a 64-bit unsigned integer representing intervals -* in nanoseconds. -*/ - -typedef khronos_utime_nanoseconds_t EGLTimeKHR; - -#define EGL_SYNC_FENCE_KHR 0x30F9 -#define EGL_SYNC_REUSABLE_KHR 0x30FA -#define EGL_SYNC_TYPE_KHR 0x30F7 -#define EGL_SYNC_STATUS_KHR 0x30F1 -#define EGL_SYNC_CONDITION_KHR 0x30F8 -#define EGL_SIGNALED_KHR 0x30F2 -#define EGL_UNSIGNALED_KHR 0x30F3 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 -#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 -#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 -#define EGL_CONDITION_SATISFIED_KHR 0x30F6 - -#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull - -#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) - -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#endif - - -#ifdef __cplusplus -} -#endif - -#include "eglext_brcm.h" - -#if defined(ANDROID) -#include "eglext_android.h" -#include "eglext_nvidia.h" -#endif - -#endif diff --git a/vc/include/EGL/eglext_android.h b/vc/include/EGL/eglext_android.h @@ -1,99 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#if defined(ANDROID) - -#ifndef EGLEXT_ANDROID_H -#define EGLEXT_ANDROID_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef EGL_ANDROID_image_native_buffer - #define EGL_ANDROID_image_native_buffer 1 - #if defined(EGL_EGLEXT_ANDROID_STRUCT_HEADER) - #include <system/window.h> - #else - struct android_native_buffer_t; - #endif - #define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */ -#endif - -/* Structure layout for android native buffers. - * - * Note: this will be harmonized with gralloc_brcm.h. - */ -typedef enum -{ - EGL_BRCM_ANDROID_BUFFER_TYPE_GL_RESOURCE = 0, - EGL_BRCM_ANDROID_BUFFER_TYPE_MM_RESOURCE, -} EGL_BRCM_ANDROID_BUFFER_TYPE_T; - -/* By default Android always define this internally, also due to a missing -** proper pending #define in the Android frameworks/base/opengl/libs/egl/egl.cpp -** module we cannot actually disable EGL_ANDROID_swap_rectangle support via build -** configuration (ie setting 'TARGET_GLOBAL_CPPFLAGS += -DEGL_ANDROID_swap_rectangle=0' -** in our BoardConfig.mk) which would be the preferred mechanism, instead we therefore -** have to match Android behavior and define by default what is expected to be supported, -** as well as provide an implementation for it (which implementation may be empty as -** long as it satisfies Android expectations). -*/ -#ifndef EGL_ANDROID_swap_rectangle -#define EGL_ANDROID_swap_rectangle 1 -#endif - -#if EGL_ANDROID_swap_rectangle -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSetSwapRectangleANDROID (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSWAPRECTANGLEANDROIDPROC) (EGLDisplay dpy, EGLSurface draw, EGLint left, EGLint top, EGLint width, EGLint height); -#endif /* EGL_ANDROID_swap_rectangle */ - - -#ifndef EGL_ANDROID_render_buffer -#define EGL_ANDROID_render_buffer 1 -#endif - -#if EGL_ANDROID_render_buffer -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLClientBuffer EGLAPIENTRY eglGetRenderBufferANDROID (EGLDisplay dpy, EGLSurface sur); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLGETRENDERBUFFERANDROIDPROC) (EGLDisplay dpy, EGLSurface sur); -#endif /* EGL_ANDROID_swap_rectangle */ - -#ifndef EGL_ANDROID_recordable -#define EGL_ANDROID_recordable 1 -#define EGL_RECORDABLE_ANDROID 0x3142 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* EGLEXT_ANDROID_H */ - -#endif /* defined(ANDROID) */ diff --git a/vc/include/EGL/eglext_brcm.h b/vc/include/EGL/eglext_brcm.h @@ -1,197 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef EGLEXT_BRCM_H -#define EGLEXT_BRCM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define EGL_NATIVE_PIXMAP_CLIENT_SIDE_BRCM 0x99930B0 /* eglCreateImageKHR server-side target */ -#define EGL_IMAGE_FROM_SURFACE_BRCM 0x99930B1 /* eglCreateImageKHR server-side target */ -/* Multimedia target - created by gralloc */ -#define EGL_IMAGE_BRCM_MULTIMEDIA 0x99930B2 -#define EGL_IMAGE_BRCM_DUPLICATE 0x99930B3 /* a new EGL Image pointing at the same underlying object */ -#define EGL_IMAGE_BRCM_RAW_PIXELS 0x99930B4 /* Raw YUV multimedia pixels */ - -/* Fastpath for creating greyscale textures from a single plane of a - * MMAL opaque buffers. */ -#define EGL_IMAGE_BRCM_MULTIMEDIA_Y 0x99930C0 -#define EGL_IMAGE_BRCM_MULTIMEDIA_U 0x99930C1 -#define EGL_IMAGE_BRCM_MULTIMEDIA_V 0x99930C2 - -#ifndef EGL_BRCM_sane_choose_config -#define EGL_BRCM_sane_choose_config 1 -#endif -#if EGL_BRCM_sane_choose_config -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSaneChooseConfigBRCM(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSANECHOOSECONFIGBRCM)(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); -#endif - -#ifndef EGL_BRCM_global_image -#define EGL_BRCM_global_image 1 -#endif -#if EGL_BRCM_global_image -#define EGL_PIXEL_FORMAT_ARGB_8888_PRE_BRCM 0 -#define EGL_PIXEL_FORMAT_ARGB_8888_BRCM 1 -#define EGL_PIXEL_FORMAT_XRGB_8888_BRCM 2 -#define EGL_PIXEL_FORMAT_RGB_565_BRCM 3 -#define EGL_PIXEL_FORMAT_A_8_BRCM 4 -#define EGL_PIXEL_FORMAT_RENDER_GL_BRCM (1 << 3) -#define EGL_PIXEL_FORMAT_RENDER_GLES_BRCM (1 << 4) -#define EGL_PIXEL_FORMAT_RENDER_GLES2_BRCM (1 << 5) -#define EGL_PIXEL_FORMAT_RENDER_VG_BRCM (1 << 6) -#define EGL_PIXEL_FORMAT_RENDER_MASK_BRCM 0x78 -#define EGL_PIXEL_FORMAT_VG_IMAGE_BRCM (1 << 7) -#define EGL_PIXEL_FORMAT_GLES_TEXTURE_BRCM (1 << 8) -#define EGL_PIXEL_FORMAT_GLES2_TEXTURE_BRCM (1 << 9) -#define EGL_PIXEL_FORMAT_TEXTURE_MASK_BRCM 0x380 -#define EGL_PIXEL_FORMAT_USAGE_MASK_BRCM 0x3f8 -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglCreateGlobalImageBRCM(EGLint width, EGLint height, EGLint pixel_format, const void *data, EGLint data_stride, EGLint *id); -EGLAPI void EGLAPIENTRY eglCreateCopyGlobalImageBRCM(const EGLint *src_id, EGLint *id); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyGlobalImageBRCM(const EGLint *id); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryGlobalImageBRCM(const EGLint *id, EGLint *width_height_pixel_format); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef void (EGLAPIENTRYP PFNEGLCREATEGLOBALIMAGEBRCMPROC)(EGLint width, EGLint height, EGLint pixel_format, const void *data, EGLint data_stride, EGLint *id); -typedef void (EGLAPIENTRYP PFNEGLCREATECOPYGLOBALIMAGEBRCMPROC)(const EGLint *src_id, EGLint *id); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYGLOBALIMAGEBRCMPROC)(const EGLint *id); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYGLOBALIMAGEBRCMPROC)(const EGLint *id, EGLint *width_height_pixel_format); -#endif - -#ifndef EGL_BRCM_perf_monitor -#define EGL_BRCM_perf_monitor 0 -#endif -#if EGL_BRCM_perf_monitor -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglInitPerfMonitorBRCM(EGLDisplay display); -EGLAPI EGLBoolean EGLAPIENTRY eglTermPerfMonitorBRCM(EGLDisplay display); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef void (EGLAPIENTRYP PFNEGLINITPERFMONITORBRCMPROC)(EGLDisplay display); -typedef void (EGLAPIENTRYP PFNEGLTERMPERFMONITORBRCMPROC)(EGLDisplay display); -#endif - -#ifndef EGL_BRCM_driver_monitor -#define EGL_BRCM_driver_monitor 1 -#endif -#if EGL_BRCM_driver_monitor -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglInitDriverMonitorBRCM(EGLDisplay display, EGLint hw_bank, EGLint l3c_bank); -EGLAPI void EGLAPIENTRY eglGetDriverMonitorXMLBRCM(EGLDisplay display, EGLint bufSize, EGLint *length, char *xmlStats); -EGLAPI EGLBoolean EGLAPIENTRY eglTermDriverMonitorBRCM(EGLDisplay display); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef void (EGLAPIENTRYP PFNEGLINITDRIVERMONITORBRCMPROC)(EGLDisplay display, EGLint hw_bank, EGLint l3c_bank); -typedef void (EGLAPIENTRYP PFNEGLGETDRIVERMONITORXMLBRCMPROC)(EGLDisplay display, EGLint bufSize, EGLint *length, char *xmlStats); -typedef void (EGLAPIENTRYP PFNEGLTERMDRIVERMONITORBRCMPROC)(EGLDisplay display); -#endif - -#ifndef EGL_BRCM_perf_stats -#define EGL_BRCM_perf_stats 0 -#endif -#if EGL_BRCM_perf_stats -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void eglPerfStatsResetBRCM(void); -EGLAPI void eglPerfStatsGetBRCM(char *buffer, EGLint buffer_len, EGLBoolean reset); -#endif -typedef void (EGLAPIENTRYP PFNEGLPERFSTATSRESETBRCM) (void); -typedef void (EGLAPIENTRYP PFNEGLPERFSTATSGETBRCM) (char *buffer, EGLint buffer_len, EGLBoolean reset); -#endif - -#ifndef EGL_proc_state_valid -#define EGL_proc_state_valid 1 -#endif -#if EGL_proc_state_valid -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglProcStateValid( EGLDisplay dpy, EGLBoolean *result ); -#endif -typedef void (EGLAPIENTRYP PFNEGLPROCSTATEVALID) ( EGLDisplay dpy, EGLBoolean *valid ); -#endif - -#ifndef EGL_BRCM_flush -#define EGL_BRCM_flush 1 -#endif -#if EGL_BRCM_flush -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void EGLAPIENTRY eglFlushBRCM(void); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef void (EGLAPIENTRYP PFNEGLFLUSHBRCMPROC)(void); -#endif - -#ifndef EGL_BRCM_image_wrap -#define EGL_BRCM_image_wrap 1 -#define EGL_IMAGE_WRAP_BRCM 0x9993140 -#endif - -#ifndef EGL_BRCM_image_wrap_bcg -#define EGL_BRCM_image_wrap_bcg 0 -#define EGL_IMAGE_WRAP_BRCM_BCG 0x9993141 - -#if EGL_BRCM_image_wrap_bcg -typedef struct { - BEGL_BufferFormat format; - - uint16_t width; - uint16_t height; - - int32_t stride; /* in bytes */ - - void *storage; -} EGL_IMAGE_WRAP_BRCM_BCG_IMAGE_T; -#endif - -#endif - -#ifndef EGL_BRCM_mem_usage -#define EGL_BRCM_mem_usage 0 -#endif -#if EGL_BRCM_mem_usage -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI void eglProcessMemUsageGetBRCM(uint32_t id_0, uint32_t id_1, char *buffer, uint32_t buffer_len); -#endif -typedef void (EGLAPIENTRYP PFNEGLPROCESSMEMUSAGEGETBRCM) (uint32_t id_0, uint32_t id_1, char *buffer, uint32_t buffer_len); -#endif - -/* -Only enable this #define if the application (or wrapper layer) is going to call eglDirectRenderingPointer -when appropriate (i.e. the first time eglMakeCurrent is called, and then at eglSwapBuffers) - -Only used for testing purposes on 2763 -*/ -//#define DIRECT_RENDERING - -#ifdef DIRECT_RENDERING -EGLAPI EGLBoolean EGLAPIENTRY eglDirectRenderingPointer(EGLDisplay dpy, EGLSurface surf, void *image /* KHRN_IMAGE_WRAP_T */); -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/vc/include/EGL/eglext_nvidia.h b/vc/include/EGL/eglext_nvidia.h @@ -1,54 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#if defined(ANDROID) - -#ifndef EGLEXT_NVIDIA_H -#define EGLEXT_NVIDIA_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef EGL_NV_system_time -#define EGL_NV_system_time 1 -typedef khronos_int64_t EGLint64NV; -typedef khronos_uint64_t EGLuint64NV; -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void); -EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void); -#endif -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC)(void); -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC)(void); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* EGLEXT_NVIDIA_H */ - -#endif /* defined(ANDROID) */ diff --git a/vc/include/EGL/eglplatform.h b/vc/include/EGL/eglplatform.h @@ -1,205 +0,0 @@ -#ifndef __eglplatform_h_ -#define __eglplatform_h_ - -/* -** Copyright (c) 2007-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Platform-specific types and definitions for egl.h - * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "EGL" component "Registry". - */ - -#include "../KHR/khrplatform.h" - -#ifdef ABSTRACT_PLATFORM -#include "begl_memplatform.h" -#include "begl_hwplatform.h" -#include "begl_dispplatform.h" -#endif /* ABSTRACT_PLATFORM */ - -/* Macros used in EGL function prototype declarations. - * - * EGL functions should be prototyped as: - * - * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); - * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); - * - * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h - */ - -#ifndef EGLAPI -#define EGLAPI KHRONOS_APICALL -#endif - -#ifndef EGLAPIENTRY -#define EGLAPIENTRY KHRONOS_APIENTRY -#endif -#ifndef EGLAPIENTRYP -#define EGLAPIENTRYP EGLAPIENTRY * -#endif -#ifndef EGLAPI -#ifdef KHAPI -#define EGLAPI KHAPI -#else -#define EGLAPI extern -#endif -#endif - -/* The types NativeDisplayType, NativeWindowType, and NativePixmapType - * are aliases of window-system-dependent types, such as X Display * or - * Windows Device Context. They must be defined in platform-specific - * code below. The EGL-prefixed versions of Native*Type are the same - * types, renamed in EGL 1.3 so all types in the API start with "EGL". - * - * Khronos STRONGLY RECOMMENDS that you use the default definitions - * provided below, since these changes affect both binary and source - * portability of applications using EGL running on different EGL - * implementations. - */ - -/* Unix (tentative) - #include <X headers> - typedef Display *NativeDisplayType; - - or maybe, if encoding "hostname:display.head" - typedef const char *NativeWindowType; - etc. - */ -#if (defined (__ANDROID__) || defined(ANDROID)) && defined(KHRN_BCG_ANDROID) - -struct android_native_window_t; -struct egl_native_pixmap_t; - -typedef struct android_native_window_t* EGLNativeWindowType; -typedef struct egl_native_pixmap_t* EGLNativePixmapType; -typedef void *EGLNativeDisplayType; - -#else - -typedef void *EGLNativeDisplayType; -typedef void *EGLNativePixmapType; -typedef void *EGLNativeWindowType; -#endif - -#ifndef EGL_SERVER_SMALLINT - -#include "interface/vmcs_host/vc_dispmanx.h" -/* TODO: EGLNativeWindowType is really one of these but I'm leaving it - * as void* for now, in case changing it would cause problems - */ -typedef struct { - DISPMANX_ELEMENT_HANDLE_T element; - int width; /* This is necessary because dispmanx elements are not queriable. */ - int height; -} EGL_DISPMANX_WINDOW_T; -#elif defined (ABSTRACT_PLATFORM) - -#else - -/* window I of a horizontal strip of N WxH windows */ -#define PACK_NATIVE_WINDOW(W, H, I, N) ((NativeWindowType)((W) | ((H) << 12) | ((I) << 24) | ((N) << 28))) -#define UNPACK_NATIVE_WINDOW_W(WIN) ((unsigned int)(WIN) & 0xfff) -#define UNPACK_NATIVE_WINDOW_H(WIN) (((unsigned int)(WIN) >> 12) & 0xfff) -#define UNPACK_NATIVE_WINDOW_I(WIN) (((unsigned int)(WIN) >> 24) & 0xf) -#define UNPACK_NATIVE_WINDOW_N(WIN) ((unsigned int)(WIN) >> 28) - -/* todo: can we change these to use PACK_NATIVE_WINDOW and get rid of platform_canonical_win from platform.h? */ -#define NATIVE_WINDOW_800_480 ((NativeWindowType)0) -#define NATIVE_WINDOW_640_480 ((NativeWindowType)1) -#define NATIVE_WINDOW_320_240 ((NativeWindowType)2) -#define NATIVE_WINDOW_240_320 ((NativeWindowType)3) -#define NATIVE_WINDOW_64_64 ((NativeWindowType)4) -#define NATIVE_WINDOW_400_480_A ((NativeWindowType)5) -#define NATIVE_WINDOW_400_480_B ((NativeWindowType)6) -#define NATIVE_WINDOW_512_512 ((NativeWindowType)7) -#define NATIVE_WINDOW_360_640 ((NativeWindowType)8) -#define NATIVE_WINDOW_640_360 ((NativeWindowType)9) -#define NATIVE_WINDOW_1280_720 ((NativeWindowType)10) -#define NATIVE_WINDOW_1920_1080 ((NativeWindowType)11) -#define NATIVE_WINDOW_480_320 ((NativeWindowType)12) -#define NATIVE_WINDOW_1680_1050 ((NativeWindowType)13) -#endif - -/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ -typedef EGLNativeDisplayType NativeDisplayType; -typedef EGLNativePixmapType NativePixmapType; -typedef EGLNativeWindowType NativeWindowType; - - -/* Define EGLint. This must be a signed integral type large enough to contain - * all legal attribute names and values passed into and out of EGL, whether - * their type is boolean, bitmask, enumerant (symbolic constant), integer, - * handle, or other. While in general a 32-bit integer will suffice, if - * handles are 64 bit types, then EGLint should be defined as a signed 64-bit - * integer type. - */ -typedef khronos_int32_t EGLint; - -#ifdef ABSTRACT_PLATFORM - -#ifdef __cplusplus -extern "C" -{ -#endif - -/* -The client application, or default platform library must register valid versions of each of these -interfaces before any EGL or GL functions are invoked, using the following functions provided by the 3D driver. -*/ -typedef struct -{ - BEGL_MemoryInterface *memInterface; /* Memory interface which will called by the 3d driver */ - BEGL_HWInterface *hwInterface; /* Hardware interface which will be called by the driver */ - BEGL_DisplayInterface *displayInterface; /* Display interface which will be called by the driver */ - - BEGL_DisplayCallbacks displayCallbacks; /* Callback pointers set by BEGL_GetDefaultDriverInterfaces, for client to call into driver */ - int hwInterfaceCloned; - int memInterfaceCloned; - void *memInterfaceFn; - void *hwInterfaceFn; -} BEGL_DriverInterfaces; - -/* Register application level overrides for any or all of the abstract API calls made by the 3D driver. */ -EGLAPI void EGLAPIENTRY BEGL_RegisterDriverInterfaces(BEGL_DriverInterfaces *iface); - -/* Get a pointer to the registered driver interfaces, can be used to override partial defaults - see android platform layer(s) for example */ -EGLAPI BEGL_DriverInterfaces * BEGL_GetDriverInterfaces(void); - -/* Initializes all interfaces in the structure to NULL, fills out Callbacks with appropriate function pointers */ -EGLAPI void EGLAPIENTRY BEGL_GetDefaultDriverInterfaces(BEGL_DriverInterfaces *iface); - -#ifdef __cplusplus -} -#endif - -#endif /* ABSTRACT_PLATFORM */ - -#if 0 -#include "interface/khronos/common/khrn_client_mangle.h" -#endif - -#endif /* __eglplatform_h */ diff --git a/vc/include/GLES/gl.h b/vc/include/GLES/gl.h @@ -1,798 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef __gl_h_ -#define __gl_h_ - -/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ - -#include "glplatform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -#ifndef __gl2_h_ -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef khronos_int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; - -typedef khronos_intptr_t GLintptr; -typedef khronos_ssize_t GLsizeiptr; -#endif -typedef khronos_int32_t GLclampx; - -/*************************************************************/ - -/* OpenGL ES core versions */ -#define GL_VERSION_ES_CM_1_0 1 -#define GL_VERSION_ES_CL_1_0 1 -#define GL_VERSION_ES_CM_1_1 1 -#define GL_VERSION_ES_CL_1_1 1 - -/* ClearBufferMask */ -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 - -/* Boolean */ -#define GL_FALSE (GLboolean)0 -#define GL_TRUE (GLboolean)1 - -/* BeginMode */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 - -/* AlphaFunction */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 - -/* BlendingFactorDest */ -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 - -/* BlendingFactorSrc */ -/* GL_ZERO */ -/* GL_ONE */ -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -/* GL_SRC_ALPHA */ -/* GL_ONE_MINUS_SRC_ALPHA */ -/* GL_DST_ALPHA */ -/* GL_ONE_MINUS_DST_ALPHA */ - -/* ClipPlaneName */ -#define GL_CLIP_PLANE0 0x3000 -#define GL_CLIP_PLANE1 0x3001 -#define GL_CLIP_PLANE2 0x3002 -#define GL_CLIP_PLANE3 0x3003 -#define GL_CLIP_PLANE4 0x3004 -#define GL_CLIP_PLANE5 0x3005 - -/* ColorMaterialFace */ -/* GL_FRONT_AND_BACK */ - -/* ColorMaterialParameter */ -/* GL_AMBIENT_AND_DIFFUSE */ - -/* ColorPointerType */ -/* GL_UNSIGNED_BYTE */ -/* GL_FLOAT */ -/* GL_FIXED */ - -/* CullFaceMode */ -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 - -/* DepthFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* EnableCap */ -#define GL_FOG 0x0B60 -#define GL_LIGHTING 0x0B50 -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_ALPHA_TEST 0x0BC0 -#define GL_BLEND 0x0BE2 -#define GL_COLOR_LOGIC_OP 0x0BF2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -/* GL_LIGHT0 */ -/* GL_LIGHT1 */ -/* GL_LIGHT2 */ -/* GL_LIGHT3 */ -/* GL_LIGHT4 */ -/* GL_LIGHT5 */ -/* GL_LIGHT6 */ -/* GL_LIGHT7 */ -#define GL_POINT_SMOOTH 0x0B10 -#define GL_LINE_SMOOTH 0x0B20 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_MATERIAL 0x0B57 -#define GL_NORMALIZE 0x0BA1 -#define GL_RESCALE_NORMAL 0x803A -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_VERTEX_ARRAY 0x8074 -#define GL_NORMAL_ARRAY 0x8075 -#define GL_COLOR_ARRAY 0x8076 -#define GL_TEXTURE_COORD_ARRAY 0x8078 -#define GL_MULTISAMPLE 0x809D -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_ALPHA_TO_ONE 0x809F -#define GL_SAMPLE_COVERAGE 0x80A0 - -/* ErrorCode */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_STACK_OVERFLOW 0x0503 -#define GL_STACK_UNDERFLOW 0x0504 -#define GL_OUT_OF_MEMORY 0x0505 - -/* FogMode */ -/* GL_LINEAR */ -#define GL_EXP 0x0800 -#define GL_EXP2 0x0801 - -/* FogParameter */ -#define GL_FOG_DENSITY 0x0B62 -#define GL_FOG_START 0x0B63 -#define GL_FOG_END 0x0B64 -#define GL_FOG_MODE 0x0B65 -#define GL_FOG_COLOR 0x0B66 - -/* FrontFaceDirection */ -#define GL_CW 0x0900 -#define GL_CCW 0x0901 - -/* GetPName */ -#define GL_CURRENT_COLOR 0x0B00 -#define GL_CURRENT_NORMAL 0x0B02 -#define GL_CURRENT_TEXTURE_COORDS 0x0B03 -#define GL_POINT_SIZE 0x0B11 -#define GL_POINT_SIZE_MIN 0x8126 -#define GL_POINT_SIZE_MAX 0x8127 -#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128 -#define GL_POINT_DISTANCE_ATTENUATION 0x8129 -#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 -#define GL_LINE_WIDTH 0x0B21 -#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_SHADE_MODEL 0x0B54 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_MATRIX_MODE 0x0BA0 -#define GL_VIEWPORT 0x0BA2 -#define GL_MODELVIEW_STACK_DEPTH 0x0BA3 -#define GL_PROJECTION_STACK_DEPTH 0x0BA4 -#define GL_TEXTURE_STACK_DEPTH 0x0BA5 -#define GL_MODELVIEW_MATRIX 0x0BA6 -#define GL_PROJECTION_MATRIX 0x0BA7 -#define GL_TEXTURE_MATRIX 0x0BA8 -#define GL_ALPHA_TEST_FUNC 0x0BC1 -#define GL_ALPHA_TEST_REF 0x0BC2 -#define GL_BLEND_DST 0x0BE0 -#define GL_BLEND_SRC 0x0BE1 -#define GL_LOGIC_OP_MODE 0x0BF0 -#define GL_SCISSOR_BOX 0x0C10 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_LIGHTS 0x0D31 -#define GL_MAX_CLIP_PLANES 0x0D32 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 -#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 -#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_MAX_TEXTURE_UNITS 0x84E2 -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_VERTEX_ARRAY_SIZE 0x807A -#define GL_VERTEX_ARRAY_TYPE 0x807B -#define GL_VERTEX_ARRAY_STRIDE 0x807C -#define GL_NORMAL_ARRAY_TYPE 0x807E -#define GL_NORMAL_ARRAY_STRIDE 0x807F -#define GL_COLOR_ARRAY_SIZE 0x8081 -#define GL_COLOR_ARRAY_TYPE 0x8082 -#define GL_COLOR_ARRAY_STRIDE 0x8083 -#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 -#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 -#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A -#define GL_VERTEX_ARRAY_POINTER 0x808E -#define GL_NORMAL_ARRAY_POINTER 0x808F -#define GL_COLOR_ARRAY_POINTER 0x8090 -#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB - -/* GetTextureParameter */ -/* GL_TEXTURE_MAG_FILTER */ -/* GL_TEXTURE_MIN_FILTER */ -/* GL_TEXTURE_WRAP_S */ -/* GL_TEXTURE_WRAP_T */ - -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 - -/* HintMode */ -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* HintTarget */ -#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 -#define GL_POINT_SMOOTH_HINT 0x0C51 -#define GL_LINE_SMOOTH_HINT 0x0C52 -#define GL_FOG_HINT 0x0C54 -#define GL_GENERATE_MIPMAP_HINT 0x8192 - -/* LightModelParameter */ -#define GL_LIGHT_MODEL_AMBIENT 0x0B53 -#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 - -/* LightParameter */ -#define GL_AMBIENT 0x1200 -#define GL_DIFFUSE 0x1201 -#define GL_SPECULAR 0x1202 -#define GL_POSITION 0x1203 -#define GL_SPOT_DIRECTION 0x1204 -#define GL_SPOT_EXPONENT 0x1205 -#define GL_SPOT_CUTOFF 0x1206 -#define GL_CONSTANT_ATTENUATION 0x1207 -#define GL_LINEAR_ATTENUATION 0x1208 -#define GL_QUADRATIC_ATTENUATION 0x1209 - -/* DataType */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C - -/* LogicOp */ -#define GL_CLEAR 0x1500 -#define GL_AND 0x1501 -#define GL_AND_REVERSE 0x1502 -#define GL_COPY 0x1503 -#define GL_AND_INVERTED 0x1504 -#define GL_NOOP 0x1505 -#define GL_XOR 0x1506 -#define GL_OR 0x1507 -#define GL_NOR 0x1508 -#define GL_EQUIV 0x1509 -#define GL_INVERT 0x150A -#define GL_OR_REVERSE 0x150B -#define GL_COPY_INVERTED 0x150C -#define GL_OR_INVERTED 0x150D -#define GL_NAND 0x150E -#define GL_SET 0x150F - -/* MaterialFace */ -/* GL_FRONT_AND_BACK */ - -/* MaterialParameter */ -#define GL_EMISSION 0x1600 -#define GL_SHININESS 0x1601 -#define GL_AMBIENT_AND_DIFFUSE 0x1602 -/* GL_AMBIENT */ -/* GL_DIFFUSE */ -/* GL_SPECULAR */ - -/* MatrixMode */ -#define GL_MODELVIEW 0x1700 -#define GL_PROJECTION 0x1701 -#define GL_TEXTURE 0x1702 - -/* NormalPointerType */ -/* GL_BYTE */ -/* GL_SHORT */ -/* GL_FLOAT */ -/* GL_FIXED */ - -/* PixelFormat */ -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A - -/* PixelStoreParameter */ -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 - -/* PixelType */ -/* GL_UNSIGNED_BYTE */ -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 - -/* ShadingModel */ -#define GL_FLAT 0x1D00 -#define GL_SMOOTH 0x1D01 - -/* StencilFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* StencilOp */ -/* GL_ZERO */ -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -/* GL_INVERT */ - -/* StringName */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* TexCoordPointerType */ -/* GL_SHORT */ -/* GL_FLOAT */ -/* GL_FIXED */ -/* GL_BYTE */ - -/* TextureEnvMode */ -#define GL_MODULATE 0x2100 -#define GL_DECAL 0x2101 -/* GL_BLEND */ -#define GL_ADD 0x0104 -/* GL_REPLACE */ - -/* TextureEnvParameter */ -#define GL_TEXTURE_ENV_MODE 0x2200 -#define GL_TEXTURE_ENV_COLOR 0x2201 - -/* TextureEnvTarget */ -#define GL_TEXTURE_ENV 0x2300 - -/* TextureMagFilter */ -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 - -/* TextureMinFilter */ -/* GL_NEAREST */ -/* GL_LINEAR */ -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 - -/* TextureParameterName */ -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 -#define GL_GENERATE_MIPMAP 0x8191 - -/* TextureTarget */ -/* GL_TEXTURE_2D */ - -/* TextureUnit */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 -#define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 - -/* TextureWrapMode */ -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F - -/* VertexPointerType */ -/* GL_SHORT */ -/* GL_FLOAT */ -/* GL_FIXED */ -/* GL_BYTE */ - -/* LightName */ -#define GL_LIGHT0 0x4000 -#define GL_LIGHT1 0x4001 -#define GL_LIGHT2 0x4002 -#define GL_LIGHT3 0x4003 -#define GL_LIGHT4 0x4004 -#define GL_LIGHT5 0x4005 -#define GL_LIGHT6 0x4006 -#define GL_LIGHT7 0x4007 - -/* Buffer Objects */ -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 - -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 -#define GL_VERTEX_ARRAY_BUFFER_BINDING 0x8896 -#define GL_NORMAL_ARRAY_BUFFER_BINDING 0x8897 -#define GL_COLOR_ARRAY_BUFFER_BINDING 0x8898 -#define GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING 0x889A - -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 - -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 - -/* Texture combine + dot3 */ -#define GL_SUBTRACT 0x84E7 -#define GL_COMBINE 0x8570 -#define GL_COMBINE_RGB 0x8571 -#define GL_COMBINE_ALPHA 0x8572 -#define GL_RGB_SCALE 0x8573 -#define GL_ADD_SIGNED 0x8574 -#define GL_INTERPOLATE 0x8575 -#define GL_CONSTANT 0x8576 -#define GL_PRIMARY_COLOR 0x8577 -#define GL_PREVIOUS 0x8578 -#define GL_OPERAND0_RGB 0x8590 -#define GL_OPERAND1_RGB 0x8591 -#define GL_OPERAND2_RGB 0x8592 -#define GL_OPERAND0_ALPHA 0x8598 -#define GL_OPERAND1_ALPHA 0x8599 -#define GL_OPERAND2_ALPHA 0x859A - -#define GL_ALPHA_SCALE 0x0D1C - -#define GL_SRC0_RGB 0x8580 -#define GL_SRC1_RGB 0x8581 -#define GL_SRC2_RGB 0x8582 -#define GL_SRC0_ALPHA 0x8588 -#define GL_SRC1_ALPHA 0x8589 -#define GL_SRC2_ALPHA 0x858A - -#define GL_DOT3_RGB 0x86AE -#define GL_DOT3_RGBA 0x86AF - -/*------------------------------------------------------------------------* - * required OES extension tokens - *------------------------------------------------------------------------*/ - -/* OES_read_format */ -#ifndef GL_OES_read_format -#define GL_IMPLEMENTATION_COLOR_READ_TYPE_OES 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES 0x8B9B -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif - -/* OES_point_size_array */ -#ifndef GL_OES_point_size_array -#define GL_POINT_SIZE_ARRAY_OES 0x8B9C -#define GL_POINT_SIZE_ARRAY_TYPE_OES 0x898A -#define GL_POINT_SIZE_ARRAY_STRIDE_OES 0x898B -#define GL_POINT_SIZE_ARRAY_POINTER_OES 0x898C -#define GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES 0x8B9F -#endif - -/* GL_OES_point_sprite */ -#ifndef GL_OES_point_sprite -#define GL_POINT_SPRITE_OES 0x8861 -#define GL_COORD_REPLACE_OES 0x8862 -#endif - -/*************************************************************/ - -/* Available only in Common profile */ -GL_API void GL_APIENTRY glAlphaFunc (GLenum func, GLclampf ref); -GL_API void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_API void GL_APIENTRY glClearDepthf (GLclampf depth); -GL_API void GL_APIENTRY glClipPlanef (GLenum plane, const GLfloat *equation); -GL_API void GL_APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); -GL_API void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); -GL_API void GL_APIENTRY glFogf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glFogfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glFrustumf (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glGetClipPlanef (GLenum pname, GLfloat eqn[4]); -GL_API void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexEnvfv (GLenum env, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glLightModelf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glLightModelfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glLineWidth (GLfloat width); -GL_API void GL_APIENTRY glLoadMatrixf (const GLfloat *m); -GL_API void GL_APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glMultMatrixf (const GLfloat *m); -GL_API void GL_APIENTRY glMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); -GL_API void GL_APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz); -GL_API void GL_APIENTRY glOrthof (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glPointParameterf (GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glPointSize (GLfloat size); -GL_API void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_API void GL_APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); -GL_API void GL_APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z); -GL_API void GL_APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z); - -/* Available in both Common and Common-Lite profiles */ -GL_API void GL_APIENTRY glActiveTexture (GLenum texture); -GL_API void GL_APIENTRY glAlphaFuncx (GLenum func, GLclampx ref); -GL_API void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_API void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_API void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_API void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); -GL_API void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); -GL_API void GL_APIENTRY glClear (GLbitfield mask); -GL_API void GL_APIENTRY glClearColorx (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -GL_API void GL_APIENTRY glClearDepthx (GLclampx depth); -GL_API void GL_APIENTRY glClearStencil (GLint s); -GL_API void GL_APIENTRY glClientActiveTexture (GLenum texture); -GL_API void GL_APIENTRY glClipPlanex (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); -GL_API void GL_APIENTRY glColor4x (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_API void GL_APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); -GL_API void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); -GL_API void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_API void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glCullFace (GLenum mode); -GL_API void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); -GL_API void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); -GL_API void GL_APIENTRY glDepthFunc (GLenum func); -GL_API void GL_APIENTRY glDepthMask (GLboolean flag); -GL_API void GL_APIENTRY glDepthRangex (GLclampx zNear, GLclampx zFar); -GL_API void GL_APIENTRY glDisable (GLenum cap); -GL_API void GL_APIENTRY glDisableClientState (GLenum array); -GL_API void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_API void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices); -GL_API void GL_APIENTRY glEnable (GLenum cap); -GL_API void GL_APIENTRY glEnableClientState (GLenum array); -GL_API void GL_APIENTRY glFinish (void); -GL_API void GL_APIENTRY glFlush (void); -GL_API void GL_APIENTRY glFogx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glFogxv (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glFrontFace (GLenum mode); -GL_API void GL_APIENTRY glFrustumx (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *params); -GL_API void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetClipPlanex (GLenum pname, GLfixed eqn[4]); -GL_API void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); -GL_API void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); -GL_API GLenum GL_APIENTRY glGetError (void); -GL_API void GL_APIENTRY glGetFixedv (GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetLightxv (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxv (GLenum face, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetPointerv (GLenum pname, GLvoid **params); -GL_API const GLubyte * GL_APIENTRY glGetString (GLenum name); -GL_API void GL_APIENTRY glGetTexEnviv (GLenum env, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexEnvxv (GLenum env, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexParameterxv (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_API GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_API GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_API GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_API void GL_APIENTRY glLightModelx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightModelxv (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLightx (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxv (GLenum light, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLineWidthx (GLfixed width); -GL_API void GL_APIENTRY glLoadIdentity (void); -GL_API void GL_APIENTRY glLoadMatrixx (const GLfixed *m); -GL_API void GL_APIENTRY glLogicOp (GLenum opcode); -GL_API void GL_APIENTRY glMaterialx (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxv (GLenum face, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glMatrixMode (GLenum mode); -GL_API void GL_APIENTRY glMultMatrixx (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4x (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GL_API void GL_APIENTRY glNormal3x (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glOrthox (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_API void GL_APIENTRY glPointParameterx (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glPointParameterxv (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glPointSizex (GLfixed size); -GL_API void GL_APIENTRY glPolygonOffsetx (GLfixed factor, GLfixed units); -GL_API void GL_APIENTRY glPopMatrix (void); -GL_API void GL_APIENTRY glPushMatrix (void); -GL_API void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels); -GL_API void GL_APIENTRY glRotatex (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); -GL_API void GL_APIENTRY glSampleCoveragex (GLclampx value, GLboolean invert); -GL_API void GL_APIENTRY glScalex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glShadeModel (GLenum mode); -GL_API void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_API void GL_APIENTRY glStencilMask (GLuint mask); -GL_API void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_API void GL_APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexEnvx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexEnvxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels); -GL_API void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexParameterx (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexParameterxv (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); -GL_API void GL_APIENTRY texSubImage2DAsync (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLint hpixels); -GL_API void GL_APIENTRY glTranslatex (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - -/*------------------------------------------------------------------------* - * Required OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_read_format */ -#ifndef GL_OES_read_format -#define GL_OES_read_format 1 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#endif - -/* GL_OES_point_size_array */ -#ifndef GL_OES_point_size_array -#define GL_OES_point_size_array 1 -GL_API void GL_APIENTRY glPointSizePointerOES (GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -/* GL_OES_point_sprite */ -#ifndef GL_OES_point_sprite -#define GL_OES_point_sprite 1 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __gl_h_ */ - diff --git a/vc/include/GLES/glext.h b/vc/include/GLES/glext.h @@ -1,1147 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef __glext_h_ -#define __glext_h_ - -/* $Revision: 13240 $ on $Date:: 2010-12-17 15:16:00 -0800 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* We want this */ -#ifndef GL_GLEXT_PROTOTYPES -#define GL_GLEXT_PROTOTYPES -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -#ifndef GL_APIENTRYP -# define GL_APIENTRYP GL_APIENTRY* -#endif - -/*------------------------------------------------------------------------* - * OES extension tokens - *------------------------------------------------------------------------*/ - -/* GL_OES_blend_equation_separate */ -#ifndef GL_OES_blend_equation_separate -/* BLEND_EQUATION_RGB_OES same as BLEND_EQUATION_OES */ -#define GL_BLEND_EQUATION_RGB_OES 0x8009 -#define GL_BLEND_EQUATION_ALPHA_OES 0x883D -#endif - -/* GL_OES_blend_func_separate */ -#ifndef GL_OES_blend_func_separate -#define GL_BLEND_DST_RGB_OES 0x80C8 -#define GL_BLEND_SRC_RGB_OES 0x80C9 -#define GL_BLEND_DST_ALPHA_OES 0x80CA -#define GL_BLEND_SRC_ALPHA_OES 0x80CB -#endif - -/* GL_OES_blend_subtract */ -#ifndef GL_OES_blend_subtract -#define GL_BLEND_EQUATION_OES 0x8009 -#define GL_FUNC_ADD_OES 0x8006 -#define GL_FUNC_SUBTRACT_OES 0x800A -#define GL_FUNC_REVERSE_SUBTRACT_OES 0x800B -#endif - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_ETC1_RGB8_OES 0x8D64 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif - -/* GL_OES_draw_texture */ -#ifndef GL_OES_draw_texture -#define GL_TEXTURE_CROP_RECT_OES 0x8B9D -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -/* GLeglImageOES defined in GL_OES_EGL_image already. */ -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_UNSIGNED_INT 0x1405 -#endif - -/* GL_OES_fixed_point */ -#ifndef GL_OES_fixed_point -#define GL_FIXED_OES 0x140C -#endif - -/* GL_OES_framebuffer_object */ -#ifndef GL_OES_framebuffer_object -#define GL_NONE_OES 0 -#define GL_FRAMEBUFFER_OES 0x8D40 -#define GL_RENDERBUFFER_OES 0x8D41 -#define GL_RGBA4_OES 0x8056 -#define GL_RGB5_A1_OES 0x8057 -#define GL_RGB565_OES 0x8D62 -#define GL_DEPTH_COMPONENT16_OES 0x81A5 -#define GL_RENDERBUFFER_WIDTH_OES 0x8D42 -#define GL_RENDERBUFFER_HEIGHT_OES 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT_OES 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE_OES 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE_OES 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE_OES 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE_OES 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE_OES 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE_OES 0x8D55 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES 0x8CD3 -#define GL_COLOR_ATTACHMENT0_OES 0x8CE0 -#define GL_DEPTH_ATTACHMENT_OES 0x8D00 -#define GL_STENCIL_ATTACHMENT_OES 0x8D20 -#define GL_FRAMEBUFFER_COMPLETE_OES 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES 0x8CD9 -#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES 0x8CDA -#define GL_FRAMEBUFFER_UNSUPPORTED_OES 0x8CDD -#define GL_FRAMEBUFFER_BINDING_OES 0x8CA6 -#define GL_RENDERBUFFER_BINDING_OES 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE_OES 0x84E8 -#define GL_INVALID_FRAMEBUFFER_OPERATION_OES 0x0506 -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -#endif - -/* GL_OES_matrix_get */ -#ifndef GL_OES_matrix_get -#define GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES 0x898D -#define GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES 0x898E -#define GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES 0x898F -#endif - -/* GL_OES_matrix_palette */ -#ifndef GL_OES_matrix_palette -#define GL_MAX_VERTEX_UNITS_OES 0x86A4 -#define GL_MAX_PALETTE_MATRICES_OES 0x8842 -#define GL_MATRIX_PALETTE_OES 0x8840 -#define GL_MATRIX_INDEX_ARRAY_OES 0x8844 -#define GL_WEIGHT_ARRAY_OES 0x86AD -#define GL_CURRENT_PALETTE_MATRIX_OES 0x8843 -#define GL_MATRIX_INDEX_ARRAY_SIZE_OES 0x8846 -#define GL_MATRIX_INDEX_ARRAY_TYPE_OES 0x8847 -#define GL_MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848 -#define GL_MATRIX_INDEX_ARRAY_POINTER_OES 0x8849 -#define GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E -#define GL_WEIGHT_ARRAY_SIZE_OES 0x86AB -#define GL_WEIGHT_ARRAY_TYPE_OES 0x86A9 -#define GL_WEIGHT_ARRAY_STRIDE_OES 0x86AA -#define GL_WEIGHT_ARRAY_POINTER_OES 0x86AC -#define GL_WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif - -/* GL_OES_stencil8 */ -#ifndef GL_OES_stencil8 -#define GL_STENCIL_INDEX8_OES 0x8D48 -#endif - -/* GL_OES_stencil_wrap */ -#ifndef GL_OES_stencil_wrap -#define GL_INCR_WRAP_OES 0x8507 -#define GL_DECR_WRAP_OES 0x8508 -#endif - -/* GL_OES_texture_cube_map */ -#ifndef GL_OES_texture_cube_map -#define GL_NORMAL_MAP_OES 0x8511 -#define GL_REFLECTION_MAP_OES 0x8512 -#define GL_TEXTURE_CUBE_MAP_OES 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP_OES 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES 0x851C -#define GL_TEXTURE_GEN_MODE_OES 0x2500 -#define GL_TEXTURE_GEN_STR_OES 0x8D60 -#endif - -/* GL_OES_texture_mirrored_repeat */ -#ifndef GL_OES_texture_mirrored_repeat -#define GL_MIRRORED_REPEAT_OES 0x8370 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -#endif - -/*------------------------------------------------------------------------* - * AMD extension tokens - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif - -/*------------------------------------------------------------------------* - * APPLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_APPLE_texture_2D_limited_npot */ -/* No new tokens introduced by this extension. */ - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif -/*------------------------------------------------------------------------* - * ARM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ARM_rgba8 */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * EXT extension tokens - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -#endif - -/* GL_EXT_multi_draw_arrays */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_BGRA_EXT 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -#ifndef GL_texture_format_RGBX8888_BRCM -#define GL_RGBX_BRCM 0x80EE -#endif - -/* GL_EXT_texture_lod_bias */ -#ifndef GL_EXT_texture_lod_bias -#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD -#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500 -#define GL_TEXTURE_LOD_BIAS_EXT 0x8501 -#endif - -/*------------------------------------------------------------------------* - * IMG extension tokens - *------------------------------------------------------------------------*/ - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif - -/* GL_IMG_texture_env_enhanced_fixed_function */ -#ifndef GL_IMG_texture_env_enhanced_fixed_function -#define GL_MODULATE_COLOR_IMG 0x8C04 -#define GL_RECIP_ADD_SIGNED_ALPHA_IMG 0x8C05 -#define GL_TEXTURE_ALPHA_MODULATE_IMG 0x8C06 -#define GL_FACTOR_ALPHA_MODULATE_IMG 0x8C07 -#define GL_FRAGMENT_ALPHA_MODULATE_IMG 0x8C08 -#define GL_ADD_BLEND_IMG 0x8C09 -#define GL_DOT3_RGBA_IMG 0x86AF -#endif - -/* GL_IMG_user_clip_plane */ -#ifndef GL_IMG_user_clip_plane -#define GL_CLIP_PLANE0_IMG 0x3000 -#define GL_CLIP_PLANE1_IMG 0x3001 -#define GL_CLIP_PLANE2_IMG 0x3002 -#define GL_CLIP_PLANE3_IMG 0x3003 -#define GL_CLIP_PLANE4_IMG 0x3004 -#define GL_CLIP_PLANE5_IMG 0x3005 -#define GL_MAX_CLIP_PLANES_IMG 0x0D32 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -#endif - -/*------------------------------------------------------------------------* - * NV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -/*------------------------------------------------------------------------* - * QCOM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_QCOM_driver_control */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -#endif - -/* GL_QCOM_extended_get2 */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -#endif - -/*------------------------------------------------------------------------* - * BRCM extension tokens - * TODO: these aren't official yet - *------------------------------------------------------------------------*/ -#ifndef GL_BRCM_side_by_side_stero_hint -#define GL_SIDE_BY_SIDE_STEREO_HINT_BRCM 0x8193 /* GET AN OFFICIAL ENUM */ -#endif - -/*------------------------------------------------------------------------* - * End of extension tokens, start of corresponding extension functions - *------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------* - * OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_blend_equation_separate */ -#ifndef GL_OES_blend_equation_separate -#define GL_OES_blend_equation_separate 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendEquationSeparateOES (GLenum modeRGB, GLenum modeAlpha); -#endif -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEOESPROC) (GLenum modeRGB, GLenum modeAlpha); -#endif - -/* GL_OES_blend_func_separate */ -#ifndef GL_OES_blend_func_separate -#define GL_OES_blend_func_separate 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendFuncSeparateOES (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif -typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEOESPROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -#endif - -/* GL_OES_blend_subtract */ -#ifndef GL_OES_blend_subtract -#define GL_OES_blend_subtract 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBlendEquationOES (GLenum mode); -#endif -typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONOESPROC) (GLenum mode); -#endif - -/* GL_OES_byte_coordinates */ -#ifndef GL_OES_byte_coordinates -#define GL_OES_byte_coordinates 0 -#endif - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_OES_depth24 0 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_OES_depth32 0 -#endif - -/* GL_OES_draw_texture */ -#ifndef GL_OES_draw_texture -#define GL_OES_draw_texture 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDrawTexsOES (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -GL_API void GL_APIENTRY glDrawTexiOES (GLint x, GLint y, GLint z, GLint width, GLint height); -GL_API void GL_APIENTRY glDrawTexxOES (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -GL_API void GL_APIENTRY glDrawTexsvOES (const GLshort *coords); -GL_API void GL_APIENTRY glDrawTexivOES (const GLint *coords); -GL_API void GL_APIENTRY glDrawTexxvOES (const GLfixed *coords); -GL_API void GL_APIENTRY glDrawTexfOES (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -GL_API void GL_APIENTRY glDrawTexfvOES (const GLfloat *coords); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWTEXSOESPROC) (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXIOESPROC) (GLint x, GLint y, GLint z, GLint width, GLint height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXXOESPROC) (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXSVOESPROC) (const GLshort *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXIVOESPROC) (const GLint *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXXVOESPROC) (const GLfixed *coords); -typedef void (GL_APIENTRYP PFNGLDRAWTEXFOESPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); -typedef void (GL_APIENTRYP PFNGLDRAWTEXFVOESPROC) (const GLfloat *coords); -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 0 -#endif - -/* GL_OES_extended_matrix_palette */ -#ifndef GL_OES_extended_matrix_palette -#define GL_OES_extended_matrix_palette 0 -#endif - -/* GL_OES_fbo_render_mipmap */ -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 0 -#endif - -/* GL_OES_fixed_point */ -#ifndef GL_OES_fixed_point -#define GL_OES_fixed_point 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glAlphaFuncxOES (GLenum func, GLclampx ref); -GL_API void GL_APIENTRY glClearColorxOES (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -GL_API void GL_APIENTRY glClearDepthxOES (GLclampx depth); -GL_API void GL_APIENTRY glClipPlanexOES (GLenum plane, const GLfixed *equation); -GL_API void GL_APIENTRY glColor4xOES (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -GL_API void GL_APIENTRY glDepthRangexOES (GLclampx zNear, GLclampx zFar); -GL_API void GL_APIENTRY glFogxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glFogxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glFrustumxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glGetClipPlanexOES (GLenum pname, GLfixed eqn[4]); -GL_API void GL_APIENTRY glGetFixedvOES (GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetLightxvOES (GLenum light, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetMaterialxvOES (GLenum face, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexEnvxvOES (GLenum env, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glGetTexParameterxvOES (GLenum target, GLenum pname, GLfixed *params); -GL_API void GL_APIENTRY glLightModelxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightModelxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLightxOES (GLenum light, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glLightxvOES (GLenum light, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glLineWidthxOES (GLfixed width); -GL_API void GL_APIENTRY glLoadMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMaterialxOES (GLenum face, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glMaterialxvOES (GLenum face, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glMultMatrixxOES (const GLfixed *m); -GL_API void GL_APIENTRY glMultiTexCoord4xOES (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -GL_API void GL_APIENTRY glNormal3xOES (GLfixed nx, GLfixed ny, GLfixed nz); -GL_API void GL_APIENTRY glOrthoxOES (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -GL_API void GL_APIENTRY glPointParameterxOES (GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glPointParameterxvOES (GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glPointSizexOES (GLfixed size); -GL_API void GL_APIENTRY glPolygonOffsetxOES (GLfixed factor, GLfixed units); -GL_API void GL_APIENTRY glRotatexOES (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glSampleCoveragexOES (GLclampx value, GLboolean invert); -GL_API void GL_APIENTRY glScalexOES (GLfixed x, GLfixed y, GLfixed z); -GL_API void GL_APIENTRY glTexEnvxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexEnvxvOES (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTexParameterxOES (GLenum target, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexParameterxvOES (GLenum target, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glTranslatexOES (GLfixed x, GLfixed y, GLfixed z); -#endif -typedef void (GL_APIENTRYP PFNGLALPHAFUNCXOESPROC) (GLenum func, GLclampx ref); -typedef void (GL_APIENTRYP PFNGLCLEARCOLORXOESPROC) (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHXOESPROC) (GLclampx depth); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXOESPROC) (GLenum plane, const GLfixed *equation); -typedef void (GL_APIENTRYP PFNGLCOLOR4XOESPROC) (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha); -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEXOESPROC) (GLclampx zNear, GLclampx zFar); -typedef void (GL_APIENTRYP PFNGLFOGXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLFOGXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLFRUSTUMXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEXOESPROC) (GLenum pname, GLfixed eqn[4]); -typedef void (GL_APIENTRYP PFNGLGETFIXEDVOESPROC) (GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETLIGHTXVOESPROC) (GLenum light, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETMATERIALXVOESPROC) (GLenum face, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXENVXVOESPROC) (GLenum env, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTMODELXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLIGHTXOESPROC) (GLenum light, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLLIGHTXVOESPROC) (GLenum light, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLLINEWIDTHXOESPROC) (GLfixed width); -typedef void (GL_APIENTRYP PFNGLLOADMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMATERIALXOESPROC) (GLenum face, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLMATERIALXVOESPROC) (GLenum face, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLMULTMATRIXXOESPROC) (const GLfixed *m); -typedef void (GL_APIENTRYP PFNGLMULTITEXCOORD4XOESPROC) (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q); -typedef void (GL_APIENTRYP PFNGLNORMAL3XOESPROC) (GLfixed nx, GLfixed ny, GLfixed nz); -typedef void (GL_APIENTRYP PFNGLORTHOXOESPROC) (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXOESPROC) (GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLPOINTPARAMETERXVOESPROC) (GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLPOINTSIZEXOESPROC) (GLfixed size); -typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETXOESPROC) (GLfixed factor, GLfixed units); -typedef void (GL_APIENTRYP PFNGLROTATEXOESPROC) (GLfixed angle, GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEXOESPROC) (GLclampx value, GLboolean invert); -typedef void (GL_APIENTRYP PFNGLSCALEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -typedef void (GL_APIENTRYP PFNGLTEXENVXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXENVXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXOESPROC) (GLenum target, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXPARAMETERXVOESPROC) (GLenum target, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLTRANSLATEXOESPROC) (GLfixed x, GLfixed y, GLfixed z); -#endif - -/* GL_OES_framebuffer_object */ -#ifndef GL_OES_framebuffer_object -#define GL_OES_framebuffer_object 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLboolean GL_APIENTRY glIsRenderbufferOES (GLuint renderbuffer); -GL_API void GL_APIENTRY glBindRenderbufferOES (GLenum target, GLuint renderbuffer); -GL_API void GL_APIENTRY glDeleteRenderbuffersOES (GLsizei n, const GLuint* renderbuffers); -GL_API void GL_APIENTRY glGenRenderbuffersOES (GLsizei n, GLuint* renderbuffers); -GL_API void GL_APIENTRY glRenderbufferStorageOES (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_API void GL_APIENTRY glGetRenderbufferParameterivOES (GLenum target, GLenum pname, GLint* params); -GL_API GLboolean GL_APIENTRY glIsFramebufferOES (GLuint framebuffer); -GL_API void GL_APIENTRY glBindFramebufferOES (GLenum target, GLuint framebuffer); -GL_API void GL_APIENTRY glDeleteFramebuffersOES (GLsizei n, const GLuint* framebuffers); -GL_API void GL_APIENTRY glGenFramebuffersOES (GLsizei n, GLuint* framebuffers); -GL_API GLenum GL_APIENTRY glCheckFramebufferStatusOES (GLenum target); -GL_API void GL_APIENTRY glFramebufferRenderbufferOES (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_API void GL_APIENTRY glFramebufferTexture2DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_API void GL_APIENTRY glGetFramebufferAttachmentParameterivOES (GLenum target, GLenum attachment, GLenum pname, GLint* params); -GL_API void GL_APIENTRY glGenerateMipmapOES (GLenum target); -#endif -typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFEROESPROC) (GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFEROESPROC) (GLenum target, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSOESPROC) (GLsizei n, const GLuint* renderbuffers); -typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSOESPROC) (GLsizei n, GLuint* renderbuffers); -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVOESPROC) (GLenum target, GLenum pname, GLint* params); -typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFEROESPROC) (GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFEROESPROC) (GLenum target, GLuint framebuffer); -typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSOESPROC) (GLsizei n, const GLuint* framebuffers); -typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSOESPROC) (GLsizei n, GLuint* framebuffers); -typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSOESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFEROESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint* params); -typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPOESPROC) (GLenum target); -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_API GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_API void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid ** params); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid ** params); -#endif - -/* GL_OES_matrix_get */ -#ifndef GL_OES_matrix_get -#define GL_OES_matrix_get 0 -#endif - -/* GL_OES_matrix_palette */ -#ifndef GL_OES_matrix_palette -#define GL_OES_matrix_palette 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glCurrentPaletteMatrixOES (GLuint matrixpaletteindex); -GL_API void GL_APIENTRY glLoadPaletteFromModelViewMatrixOES (void); -GL_API void GL_APIENTRY glMatrixIndexPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -GL_API void GL_APIENTRY glWeightPointerOES (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif -typedef void (GL_APIENTRYP PFNGLCURRENTPALETTEMATRIXOESPROC) (GLuint matrixpaletteindex); -typedef void (GL_APIENTRYP PFNGLLOADPALETTEFROMMODELVIEWMATRIXOESPROC) (void); -typedef void (GL_APIENTRYP PFNGLMATRIXINDEXPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -typedef void (GL_APIENTRYP PFNGLWEIGHTPOINTEROESPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 0 -#endif - -/* GL_OES_query_matrix */ -#ifndef GL_OES_query_matrix -#define GL_OES_query_matrix 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API GLbitfield GL_APIENTRY glQueryMatrixxOES (GLfixed mantissa[16], GLint exponent[16]); -#endif -typedef GLbitfield (GL_APIENTRYP PFNGLQUERYMATRIXXOESPROC) (GLfixed mantissa[16], GLint exponent[16]); -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 1 -#endif - -/* GL_OES_single_precision */ -#ifndef GL_OES_single_precision -#define GL_OES_single_precision 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDepthRangefOES (GLclampf zNear, GLclampf zFar); -GL_API void GL_APIENTRY glFrustumfOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glOrthofOES (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -GL_API void GL_APIENTRY glClipPlanefOES (GLenum plane, const GLfloat *equation); -GL_API void GL_APIENTRY glGetClipPlanefOES (GLenum pname, GLfloat eqn[4]); -GL_API void GL_APIENTRY glClearDepthfOES (GLclampf depth); -#endif -typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFOESPROC) (GLclampf zNear, GLclampf zFar); -typedef void (GL_APIENTRYP PFNGLFRUSTUMFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -typedef void (GL_APIENTRYP PFNGLORTHOFOESPROC) (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFOESPROC) (GLenum plane, const GLfloat *equation); -typedef void (GL_APIENTRYP PFNGLGETCLIPPLANEFOESPROC) (GLenum pname, GLfloat eqn[4]); -typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFOESPROC) (GLclampf depth); -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 0 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 0 -#endif - -/* GL_OES_stencil8 */ -#ifndef GL_OES_stencil8 -#define GL_OES_stencil8 1 -#endif - -/* GL_OES_stencil_wrap */ -#ifndef GL_OES_stencil_wrap -#define GL_OES_stencil_wrap 0 -#endif - -/* GL_OES_texture_cube_map */ -#ifndef GL_OES_texture_cube_map -#define GL_OES_texture_cube_map 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glTexGenfOES (GLenum coord, GLenum pname, GLfloat param); -GL_API void GL_APIENTRY glTexGenfvOES (GLenum coord, GLenum pname, const GLfloat *params); -GL_API void GL_APIENTRY glTexGeniOES (GLenum coord, GLenum pname, GLint param); -GL_API void GL_APIENTRY glTexGenivOES (GLenum coord, GLenum pname, const GLint *params); -GL_API void GL_APIENTRY glTexGenxOES (GLenum coord, GLenum pname, GLfixed param); -GL_API void GL_APIENTRY glTexGenxvOES (GLenum coord, GLenum pname, const GLfixed *params); -GL_API void GL_APIENTRY glGetTexGenfvOES (GLenum coord, GLenum pname, GLfloat *params); -GL_API void GL_APIENTRY glGetTexGenivOES (GLenum coord, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glGetTexGenxvOES (GLenum coord, GLenum pname, GLfixed *params); -#endif -typedef void (GL_APIENTRYP PFNGLTEXGENFOESPROC) (GLenum coord, GLenum pname, GLfloat param); -typedef void (GL_APIENTRYP PFNGLTEXGENFVOESPROC) (GLenum coord, GLenum pname, const GLfloat *params); -typedef void (GL_APIENTRYP PFNGLTEXGENIOESPROC) (GLenum coord, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLTEXGENIVOESPROC) (GLenum coord, GLenum pname, const GLint *params); -typedef void (GL_APIENTRYP PFNGLTEXGENXOESPROC) (GLenum coord, GLenum pname, GLfixed param); -typedef void (GL_APIENTRYP PFNGLTEXGENXVOESPROC) (GLenum coord, GLenum pname, const GLfixed *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENFVOESPROC) (GLenum coord, GLenum pname, GLfloat *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENIVOESPROC) (GLenum coord, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLGETTEXGENXVOESPROC) (GLenum coord, GLenum pname, GLfixed *params); -#endif - -/* GL_OES_texture_env_crossbar */ -#ifndef GL_OES_texture_env_crossbar -#define GL_OES_texture_env_crossbar 0 -#endif - -/* GL_OES_texture_mirrored_repeat */ -#ifndef GL_OES_texture_mirrored_repeat -#define GL_OES_texture_mirrored_repeat 0 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_API void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_API void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_API GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#endif - -/*------------------------------------------------------------------------* - * AMD extension functions - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 0 -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 0 -#endif - -/*------------------------------------------------------------------------* - * APPLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_APPLE_texture_2D_limited_npot */ -#ifndef GL_APPLE_texture_2D_limited_npot -#define GL_APPLE_texture_2D_limited_npot 0 -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_API void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 0 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 0 -#endif - -/*------------------------------------------------------------------------* - * ARM extension functions - *------------------------------------------------------------------------*/ - -/* GL_ARM_rgba8 */ -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 0 -#endif - -/*------------------------------------------------------------------------* - * EXT extension functions - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 0 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif - -/* GL_EXT_debug_marker */ -#ifndef GL_EXT_debug_marker -#define GL_EXT_debug_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GL_API void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); -GL_API void GL_APIENTRY glPopGroupMarkerEXT (void); -#endif -typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); -#endif - -/* GL_EXT_multi_draw_arrays */ -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); -GL_API void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 0 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 0 -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif - -#ifndef GL_texture_format_RGBX8888_BRCM -#define GL_texture_format_RGBX8888_BRCM 1 -#endif - -/* GL_EXT_texture_lod_bias */ -#ifndef GL_EXT_texture_lod_bias -#define GL_EXT_texture_lod_bias 0 -#endif - -/*------------------------------------------------------------------------* - * IMG extension functions - *------------------------------------------------------------------------*/ - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 0 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 0 -#endif - -/* GL_IMG_texture_env_enhanced_fixed_function */ -#ifndef GL_IMG_texture_env_enhanced_fixed_function -#define GL_IMG_texture_env_enhanced_fixed_function 0 -#endif - -/* GL_IMG_user_clip_plane */ -#ifndef GL_IMG_user_clip_plane -#define GL_IMG_user_clip_plane 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glClipPlanefIMG (GLenum, const GLfloat *); -GL_API void GL_APIENTRY glClipPlanexIMG (GLenum, const GLfixed *); -#endif -typedef void (GL_APIENTRYP PFNGLCLIPPLANEFIMGPROC) (GLenum p, const GLfloat *eqn); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMGPROC) (GLenum p, const GLfixed *eqn); -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_API void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/*------------------------------------------------------------------------* - * NV extension functions - *------------------------------------------------------------------------*/ - -/* NV_fence */ -#ifndef GL_NV_fence -#define GL_NV_fence 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GL_API void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); -GL_API GLboolean GL_APIENTRY glIsFenceNV (GLuint); -GL_API GLboolean GL_APIENTRY glTestFenceNV (GLuint); -GL_API void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); -GL_API void GL_APIENTRY glFinishFenceNV (GLuint); -GL_API void GL_APIENTRY glSetFenceNV (GLuint, GLenum); -#endif -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -/*------------------------------------------------------------------------* - * QCOM extension functions - *------------------------------------------------------------------------*/ - -/* GL_QCOM_driver_control */ -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_API void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_API void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_API void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#endif - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_API void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_API void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_API void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_API void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_API void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_API void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -GL_API void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); -#endif - -/* GL_QCOM_extended_get2 */ -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_API void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_API GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_API void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 0 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_API void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_API void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#endif - -/*------------------------------------------------------------------------* - * BRCM extension functions - * TODO: these aren't official yet - *------------------------------------------------------------------------*/ -#ifndef GL_BRCM_side_by_side_stero_hint -#define GL_BRCM_side_by_side_stero_hint 1 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __glext_h_ */ diff --git a/vc/include/GLES/glplatform.h b/vc/include/GLES/glplatform.h @@ -1,64 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef __glplatform_h_ -#define __glplatform_h_ - -/* $Revision: 10601 $ on $Date:: 2010-03-04 22:15:27 -0800 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 1.X gl.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include "../KHR/khrplatform.h" - -#ifndef GL_API -#define GL_API KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __glplatform_h_ */ diff --git a/vc/include/GLES2/gl2.h b/vc/include/GLES2/gl2.h @@ -1,649 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef __gl2_h_ -#define __gl2_h_ - -/* $Revision: 10602 $ on $Date:: 2010-03-05 06:35:34 +0000 #$ */ - -#include "gl2platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/*------------------------------------------------------------------------- - * Data type definitions - *-----------------------------------------------------------------------*/ - -#ifndef __gl_h_ -typedef void GLvoid; -typedef char GLchar; -typedef unsigned int GLenum; -typedef unsigned char GLboolean; -typedef unsigned int GLbitfield; -typedef khronos_int8_t GLbyte; -typedef short GLshort; -typedef int GLint; -typedef int GLsizei; -typedef khronos_uint8_t GLubyte; -typedef unsigned short GLushort; -typedef unsigned int GLuint; -typedef khronos_float_t GLfloat; -typedef khronos_float_t GLclampf; -typedef khronos_int32_t GLfixed; - -/* GL types for handling large vertex buffer objects */ -typedef khronos_intptr_t GLintptr; -typedef khronos_ssize_t GLsizeiptr; -#endif - -/* OpenGL ES core versions */ -#define GL_ES_VERSION_2_0 1 - -/* ClearBufferMask */ -#define GL_DEPTH_BUFFER_BIT 0x00000100 -#define GL_STENCIL_BUFFER_BIT 0x00000400 -#define GL_COLOR_BUFFER_BIT 0x00004000 - -/* Boolean */ -#define GL_FALSE (GLboolean)0 -#define GL_TRUE (GLboolean)1 - -/* BeginMode */ -#define GL_POINTS 0x0000 -#define GL_LINES 0x0001 -#define GL_LINE_LOOP 0x0002 -#define GL_LINE_STRIP 0x0003 -#define GL_TRIANGLES 0x0004 -#define GL_TRIANGLE_STRIP 0x0005 -#define GL_TRIANGLE_FAN 0x0006 - -/* AlphaFunction (not supported in ES20) */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* BlendingFactorDest */ -#define GL_ZERO 0 -#define GL_ONE 1 -#define GL_SRC_COLOR 0x0300 -#define GL_ONE_MINUS_SRC_COLOR 0x0301 -#define GL_SRC_ALPHA 0x0302 -#define GL_ONE_MINUS_SRC_ALPHA 0x0303 -#define GL_DST_ALPHA 0x0304 -#define GL_ONE_MINUS_DST_ALPHA 0x0305 - -/* BlendingFactorSrc */ -/* GL_ZERO */ -/* GL_ONE */ -#define GL_DST_COLOR 0x0306 -#define GL_ONE_MINUS_DST_COLOR 0x0307 -#define GL_SRC_ALPHA_SATURATE 0x0308 -/* GL_SRC_ALPHA */ -/* GL_ONE_MINUS_SRC_ALPHA */ -/* GL_DST_ALPHA */ -/* GL_ONE_MINUS_DST_ALPHA */ - -/* BlendEquationSeparate */ -#define GL_FUNC_ADD 0x8006 -#define GL_BLEND_EQUATION 0x8009 -#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ -#define GL_BLEND_EQUATION_ALPHA 0x883D - -/* BlendSubtract */ -#define GL_FUNC_SUBTRACT 0x800A -#define GL_FUNC_REVERSE_SUBTRACT 0x800B - -/* Separate Blend Functions */ -#define GL_BLEND_DST_RGB 0x80C8 -#define GL_BLEND_SRC_RGB 0x80C9 -#define GL_BLEND_DST_ALPHA 0x80CA -#define GL_BLEND_SRC_ALPHA 0x80CB -#define GL_CONSTANT_COLOR 0x8001 -#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 -#define GL_CONSTANT_ALPHA 0x8003 -#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 -#define GL_BLEND_COLOR 0x8005 - -/* Buffer Objects */ -#define GL_ARRAY_BUFFER 0x8892 -#define GL_ELEMENT_ARRAY_BUFFER 0x8893 -#define GL_ARRAY_BUFFER_BINDING 0x8894 -#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 - -#define GL_STREAM_DRAW 0x88E0 -#define GL_STATIC_DRAW 0x88E4 -#define GL_DYNAMIC_DRAW 0x88E8 - -#define GL_BUFFER_SIZE 0x8764 -#define GL_BUFFER_USAGE 0x8765 - -#define GL_CURRENT_VERTEX_ATTRIB 0x8626 - -/* CullFaceMode */ -#define GL_FRONT 0x0404 -#define GL_BACK 0x0405 -#define GL_FRONT_AND_BACK 0x0408 - -/* DepthFunction */ -/* GL_NEVER */ -/* GL_LESS */ -/* GL_EQUAL */ -/* GL_LEQUAL */ -/* GL_GREATER */ -/* GL_NOTEQUAL */ -/* GL_GEQUAL */ -/* GL_ALWAYS */ - -/* EnableCap */ -#define GL_TEXTURE_2D 0x0DE1 -#define GL_CULL_FACE 0x0B44 -#define GL_BLEND 0x0BE2 -#define GL_DITHER 0x0BD0 -#define GL_STENCIL_TEST 0x0B90 -#define GL_DEPTH_TEST 0x0B71 -#define GL_SCISSOR_TEST 0x0C11 -#define GL_POLYGON_OFFSET_FILL 0x8037 -#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E -#define GL_SAMPLE_COVERAGE 0x80A0 - -/* ErrorCode */ -#define GL_NO_ERROR 0 -#define GL_INVALID_ENUM 0x0500 -#define GL_INVALID_VALUE 0x0501 -#define GL_INVALID_OPERATION 0x0502 -#define GL_OUT_OF_MEMORY 0x0505 - -/* FrontFaceDirection */ -#define GL_CW 0x0900 -#define GL_CCW 0x0901 - -/* GetPName */ -#define GL_LINE_WIDTH 0x0B21 -#define GL_ALIASED_POINT_SIZE_RANGE 0x846D -#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E -#define GL_CULL_FACE_MODE 0x0B45 -#define GL_FRONT_FACE 0x0B46 -#define GL_DEPTH_RANGE 0x0B70 -#define GL_DEPTH_WRITEMASK 0x0B72 -#define GL_DEPTH_CLEAR_VALUE 0x0B73 -#define GL_DEPTH_FUNC 0x0B74 -#define GL_STENCIL_CLEAR_VALUE 0x0B91 -#define GL_STENCIL_FUNC 0x0B92 -#define GL_STENCIL_FAIL 0x0B94 -#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 -#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 -#define GL_STENCIL_REF 0x0B97 -#define GL_STENCIL_VALUE_MASK 0x0B93 -#define GL_STENCIL_WRITEMASK 0x0B98 -#define GL_STENCIL_BACK_FUNC 0x8800 -#define GL_STENCIL_BACK_FAIL 0x8801 -#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 -#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 -#define GL_STENCIL_BACK_REF 0x8CA3 -#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 -#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 -#define GL_VIEWPORT 0x0BA2 -#define GL_SCISSOR_BOX 0x0C10 -/* GL_SCISSOR_TEST */ -#define GL_COLOR_CLEAR_VALUE 0x0C22 -#define GL_COLOR_WRITEMASK 0x0C23 -#define GL_UNPACK_ALIGNMENT 0x0CF5 -#define GL_PACK_ALIGNMENT 0x0D05 -#define GL_MAX_TEXTURE_SIZE 0x0D33 -#define GL_MAX_VIEWPORT_DIMS 0x0D3A -#define GL_SUBPIXEL_BITS 0x0D50 -#define GL_RED_BITS 0x0D52 -#define GL_GREEN_BITS 0x0D53 -#define GL_BLUE_BITS 0x0D54 -#define GL_ALPHA_BITS 0x0D55 -#define GL_DEPTH_BITS 0x0D56 -#define GL_STENCIL_BITS 0x0D57 -#define GL_POLYGON_OFFSET_UNITS 0x2A00 -/* GL_POLYGON_OFFSET_FILL */ -#define GL_POLYGON_OFFSET_FACTOR 0x8038 -#define GL_TEXTURE_BINDING_2D 0x8069 -#define GL_SAMPLE_BUFFERS 0x80A8 -#define GL_SAMPLES 0x80A9 -#define GL_SAMPLE_COVERAGE_VALUE 0x80AA -#define GL_SAMPLE_COVERAGE_INVERT 0x80AB - -/* GetTextureParameter */ -/* GL_TEXTURE_MAG_FILTER */ -/* GL_TEXTURE_MIN_FILTER */ -/* GL_TEXTURE_WRAP_S */ -/* GL_TEXTURE_WRAP_T */ - -#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 -#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 - -/* HintMode */ -#define GL_DONT_CARE 0x1100 -#define GL_FASTEST 0x1101 -#define GL_NICEST 0x1102 - -/* HintTarget */ -#define GL_GENERATE_MIPMAP_HINT 0x8192 - -/* DataType */ -#define GL_BYTE 0x1400 -#define GL_UNSIGNED_BYTE 0x1401 -#define GL_SHORT 0x1402 -#define GL_UNSIGNED_SHORT 0x1403 -#define GL_INT 0x1404 -#define GL_UNSIGNED_INT 0x1405 -#define GL_FLOAT 0x1406 -#define GL_FIXED 0x140C - -/* PixelFormat */ -#define GL_DEPTH_COMPONENT 0x1902 -#define GL_ALPHA 0x1906 -#define GL_RGB 0x1907 -#define GL_RGBA 0x1908 -#define GL_LUMINANCE 0x1909 -#define GL_LUMINANCE_ALPHA 0x190A - -/* PixelType */ -/* GL_UNSIGNED_BYTE */ -#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 -#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 -#define GL_UNSIGNED_SHORT_5_6_5 0x8363 - -/* Shaders */ -#define GL_FRAGMENT_SHADER 0x8B30 -#define GL_VERTEX_SHADER 0x8B31 -#define GL_MAX_VERTEX_ATTRIBS 0x8869 -#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB -#define GL_MAX_VARYING_VECTORS 0x8DFC -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D -#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C -#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 -#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD -#define GL_SHADER_TYPE 0x8B4F -#define GL_DELETE_STATUS 0x8B80 -#define GL_LINK_STATUS 0x8B82 -#define GL_VALIDATE_STATUS 0x8B83 -#define GL_ATTACHED_SHADERS 0x8B85 -#define GL_ACTIVE_UNIFORMS 0x8B86 -#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 -#define GL_ACTIVE_ATTRIBUTES 0x8B89 -#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A -#define GL_SHADING_LANGUAGE_VERSION 0x8B8C -#define GL_CURRENT_PROGRAM 0x8B8D - -/* StencilFunction */ -#define GL_NEVER 0x0200 -#define GL_LESS 0x0201 -#define GL_EQUAL 0x0202 -#define GL_LEQUAL 0x0203 -#define GL_GREATER 0x0204 -#define GL_NOTEQUAL 0x0205 -#define GL_GEQUAL 0x0206 -#define GL_ALWAYS 0x0207 - -/* StencilOp */ -/* GL_ZERO */ -#define GL_KEEP 0x1E00 -#define GL_REPLACE 0x1E01 -#define GL_INCR 0x1E02 -#define GL_DECR 0x1E03 -#define GL_INVERT 0x150A -#define GL_INCR_WRAP 0x8507 -#define GL_DECR_WRAP 0x8508 - -/* StringName */ -#define GL_VENDOR 0x1F00 -#define GL_RENDERER 0x1F01 -#define GL_VERSION 0x1F02 -#define GL_EXTENSIONS 0x1F03 - -/* TextureMagFilter */ -#define GL_NEAREST 0x2600 -#define GL_LINEAR 0x2601 - -/* TextureMinFilter */ -/* GL_NEAREST */ -/* GL_LINEAR */ -#define GL_NEAREST_MIPMAP_NEAREST 0x2700 -#define GL_LINEAR_MIPMAP_NEAREST 0x2701 -#define GL_NEAREST_MIPMAP_LINEAR 0x2702 -#define GL_LINEAR_MIPMAP_LINEAR 0x2703 - -/* TextureParameterName */ -#define GL_TEXTURE_MAG_FILTER 0x2800 -#define GL_TEXTURE_MIN_FILTER 0x2801 -#define GL_TEXTURE_WRAP_S 0x2802 -#define GL_TEXTURE_WRAP_T 0x2803 - -/* TextureTarget */ -/* GL_TEXTURE_2D */ -#define GL_TEXTURE 0x1702 - -#define GL_TEXTURE_CUBE_MAP 0x8513 -#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 -#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 -#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A -#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C - -/* TextureUnit */ -#define GL_TEXTURE0 0x84C0 -#define GL_TEXTURE1 0x84C1 -#define GL_TEXTURE2 0x84C2 -#define GL_TEXTURE3 0x84C3 -#define GL_TEXTURE4 0x84C4 -#define GL_TEXTURE5 0x84C5 -#define GL_TEXTURE6 0x84C6 -#define GL_TEXTURE7 0x84C7 -#define GL_TEXTURE8 0x84C8 -#define GL_TEXTURE9 0x84C9 -#define GL_TEXTURE10 0x84CA -#define GL_TEXTURE11 0x84CB -#define GL_TEXTURE12 0x84CC -#define GL_TEXTURE13 0x84CD -#define GL_TEXTURE14 0x84CE -#define GL_TEXTURE15 0x84CF -#define GL_TEXTURE16 0x84D0 -#define GL_TEXTURE17 0x84D1 -#define GL_TEXTURE18 0x84D2 -#define GL_TEXTURE19 0x84D3 -#define GL_TEXTURE20 0x84D4 -#define GL_TEXTURE21 0x84D5 -#define GL_TEXTURE22 0x84D6 -#define GL_TEXTURE23 0x84D7 -#define GL_TEXTURE24 0x84D8 -#define GL_TEXTURE25 0x84D9 -#define GL_TEXTURE26 0x84DA -#define GL_TEXTURE27 0x84DB -#define GL_TEXTURE28 0x84DC -#define GL_TEXTURE29 0x84DD -#define GL_TEXTURE30 0x84DE -#define GL_TEXTURE31 0x84DF -#define GL_ACTIVE_TEXTURE 0x84E0 - -/* TextureWrapMode */ -#define GL_REPEAT 0x2901 -#define GL_CLAMP_TO_EDGE 0x812F -#define GL_MIRRORED_REPEAT 0x8370 - -/* Uniform Types */ -#define GL_FLOAT_VEC2 0x8B50 -#define GL_FLOAT_VEC3 0x8B51 -#define GL_FLOAT_VEC4 0x8B52 -#define GL_INT_VEC2 0x8B53 -#define GL_INT_VEC3 0x8B54 -#define GL_INT_VEC4 0x8B55 -#define GL_BOOL 0x8B56 -#define GL_BOOL_VEC2 0x8B57 -#define GL_BOOL_VEC3 0x8B58 -#define GL_BOOL_VEC4 0x8B59 -#define GL_FLOAT_MAT2 0x8B5A -#define GL_FLOAT_MAT3 0x8B5B -#define GL_FLOAT_MAT4 0x8B5C -#define GL_SAMPLER_2D 0x8B5E -#define GL_SAMPLER_CUBE 0x8B60 - -/* Vertex Arrays */ -#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 -#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 -#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 -#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 -#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A -#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 -#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F - -/* Read Format */ -#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A -#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B - -/* Shader Source */ -#define GL_COMPILE_STATUS 0x8B81 -#define GL_INFO_LOG_LENGTH 0x8B84 -#define GL_SHADER_SOURCE_LENGTH 0x8B88 -#define GL_SHADER_COMPILER 0x8DFA - -/* Shader Binary */ -#define GL_SHADER_BINARY_FORMATS 0x8DF8 -#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 - -/* Shader Precision-Specified Types */ -#define GL_LOW_FLOAT 0x8DF0 -#define GL_MEDIUM_FLOAT 0x8DF1 -#define GL_HIGH_FLOAT 0x8DF2 -#define GL_LOW_INT 0x8DF3 -#define GL_MEDIUM_INT 0x8DF4 -#define GL_HIGH_INT 0x8DF5 - -/* Framebuffer Object. */ -#define GL_FRAMEBUFFER 0x8D40 -#define GL_RENDERBUFFER 0x8D41 - -#define GL_RGBA4 0x8056 -#define GL_RGB5_A1 0x8057 -#define GL_RGB565 0x8D62 -#define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX 0x1901 -#define GL_STENCIL_INDEX8 0x8D48 - -#define GL_RENDERBUFFER_WIDTH 0x8D42 -#define GL_RENDERBUFFER_HEIGHT 0x8D43 -#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 -#define GL_RENDERBUFFER_RED_SIZE 0x8D50 -#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 -#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 -#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 -#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 -#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 - -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 -#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 - -#define GL_COLOR_ATTACHMENT0 0x8CE0 -#define GL_DEPTH_ATTACHMENT 0x8D00 -#define GL_STENCIL_ATTACHMENT 0x8D20 - -#define GL_NONE 0 - -#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 -#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 -#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 -#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 -#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD - -#define GL_FRAMEBUFFER_BINDING 0x8CA6 -#define GL_RENDERBUFFER_BINDING 0x8CA7 -#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 - -#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 - -/*------------------------------------------------------------------------- - * GL core functions. - *-----------------------------------------------------------------------*/ - -GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); -GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); -GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); -GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); -GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); -GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); -GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); -GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); -GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); -GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); -GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); -GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); -GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); -GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); -GL_APICALL void GL_APIENTRY glClearStencil (GLint s); -GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); -GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); -GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); -GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); -GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); -GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); -GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); -GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); -GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); -GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); -GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); -GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); -GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); -GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); -GL_APICALL void GL_APIENTRY glDisable (GLenum cap); -GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); -GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); -GL_APICALL void GL_APIENTRY glEnable (GLenum cap); -GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); -GL_APICALL void GL_APIENTRY glFinish (void); -GL_APICALL void GL_APIENTRY glFlush (void); -GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); -GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); -GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); -GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); -GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); -GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); -GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); -GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); -GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); -GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); -GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL GLenum GL_APIENTRY glGetError (void); -GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); -GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); -GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); -GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); -GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); -GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); -GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); -GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); -GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); -GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); -GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); -GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); -GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); -GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); -GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); -GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); -GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); -GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); -GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); -GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); -GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); -GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); -GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length); -GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); -GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); -GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); -GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); -GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); -GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); -GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); -GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); -GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); -GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); -GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); -GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); -GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); -GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); -GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); -GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); -GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); -GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); -GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); -GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); -GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); -GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); -GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2_h_ */ diff --git a/vc/include/GLES2/gl2ext.h b/vc/include/GLES2/gl2ext.h @@ -1,1218 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef __gl2ext_h_ -#define __gl2ext_h_ - -/* $Revision: 15049 $ on $Date:: 2011-07-07 01:28:16 +0100 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* We want this */ -#ifndef GL_GLEXT_PROTOTYPES -#define GL_GLEXT_PROTOTYPES -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -#ifndef GL_APIENTRYP -# define GL_APIENTRYP GL_APIENTRY* -#endif - -/*------------------------------------------------------------------------* - * OES extension tokens - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_ETC1_RGB8_OES 0x8D64 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_PALETTE4_RGB8_OES 0x8B90 -#define GL_PALETTE4_RGBA8_OES 0x8B91 -#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 -#define GL_PALETTE4_RGBA4_OES 0x8B93 -#define GL_PALETTE4_RGB5_A1_OES 0x8B94 -#define GL_PALETTE8_RGB8_OES 0x8B95 -#define GL_PALETTE8_RGBA8_OES 0x8B96 -#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 -#define GL_PALETTE8_RGBA4_OES 0x8B98 -#define GL_PALETTE8_RGB5_A1_OES 0x8B99 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_DEPTH_COMPONENT24_OES 0x81A6 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_DEPTH_COMPONENT32_OES 0x81A7 -#endif - -/* GL_OES_depth_texture */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -typedef void* GLeglImageOES; -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -/* GLeglImageOES defined in GL_OES_EGL_image already. */ -#define GL_TEXTURE_EXTERNAL_OES 0x8D65 -#define GL_SAMPLER_EXTERNAL_OES 0x8D66 -#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67 -#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68 -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_UNSIGNED_INT 0x1405 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 -#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE -#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_WRITE_ONLY_OES 0x88B9 -#define GL_BUFFER_ACCESS_OES 0x88BB -#define GL_BUFFER_MAPPED_OES 0x88BC -#define GL_BUFFER_MAP_POINTER_OES 0x88BD -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_DEPTH_STENCIL_OES 0x84F9 -#define GL_UNSIGNED_INT_24_8_OES 0x84FA -#define GL_DEPTH24_STENCIL8_OES 0x88F0 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_RGB8_OES 0x8051 -#define GL_RGBA8_OES 0x8058 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_STENCIL_INDEX1_OES 0x8D46 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_STENCIL_INDEX4_OES 0x8D47 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_TEXTURE_WRAP_R_OES 0x8072 -#define GL_TEXTURE_3D_OES 0x806F -#define GL_TEXTURE_BINDING_3D_OES 0x806A -#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 -#define GL_SAMPLER_3D_OES 0x8B5F -#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 -#endif - -/* GL_OES_texture_float */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_HALF_FLOAT_OES 0x8D61 -#endif - -/* GL_OES_texture_half_float_linear */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_texture_npot */ -/* No new tokens introduced by this extension. */ - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 -#endif - -/* GL_OES_vertex_half_float */ -/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 -#define GL_INT_10_10_10_2_OES 0x8DF7 -#endif - -/*------------------------------------------------------------------------* - * AMD extension tokens - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_3DC_X_AMD 0x87F9 -#define GL_3DC_XY_AMD 0x87FA -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_ATC_RGB_AMD 0x8C92 -#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 -#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE -#endif - -/* GL_AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_COUNTER_TYPE_AMD 0x8BC0 -#define GL_COUNTER_RANGE_AMD 0x8BC1 -#define GL_UNSIGNED_INT64_AMD 0x8BC2 -#define GL_PERCENTAGE_AMD 0x8BC3 -#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 -#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 -#define GL_PERFMON_RESULT_AMD 0x8BC6 -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_Z400_BINARY_AMD 0x8740 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56 -#define GL_MAX_SAMPLES_ANGLE 0x8D57 -#endif - -/*------------------------------------------------------------------------* - * APPLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56 -#define GL_MAX_SAMPLES_APPLE 0x8D57 -#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8 -#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9 -#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6 -#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D -#endif - -/*------------------------------------------------------------------------* - * ARM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_MALI_SHADER_BINARY_ARM 0x8F60 -#endif - -/* GL_ARM_rgba8 */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * EXT extension tokens - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_MIN_EXT 0x8007 -#define GL_MAX_EXT 0x8008 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_COLOR_EXT 0x1800 -#define GL_DEPTH_EXT 0x1801 -#define GL_STENCIL_EXT 0x1802 -#endif - -/* GL_EXT_multi_draw_arrays */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_BGRA_EXT 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 -#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 -#endif - -/* GL_EXT_shader_texture_lod */ -/* No new tokens introduced by this extension. */ - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE -#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_BGRA_EXT 0x80E1 -#endif - -#ifndef GL_texture_format_RGBX8888_BRCM -#define GL_RGBX_BRCM 0x80EE -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 -#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_UNPACK_ROW_LENGTH 0x0CF2 -#define GL_UNPACK_SKIP_ROWS 0x0CF3 -#define GL_UNPACK_SKIP_PIXELS 0x0CF4 -#endif - -/*------------------------------------------------------------------------* - * DMP extension tokens - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_SHADER_BINARY_DMP 0x9250 -#endif - -/*------------------------------------------------------------------------* - * IMG extension tokens - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_BGRA_IMG 0x80E1 -#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_SGX_BINARY_IMG 0x8C0A -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 -#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 -#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 -#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 -#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 -#define GL_MAX_SAMPLES_IMG 0x9135 -#define GL_TEXTURE_SAMPLES_IMG 0x9136 -#endif - -/*------------------------------------------------------------------------* - * NV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_COVERAGE_COMPONENT_NV 0x8ED0 -#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 -#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 -#define GL_COVERAGE_BUFFERS_NV 0x8ED3 -#define GL_COVERAGE_SAMPLES_NV 0x8ED4 -#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 -#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 -#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 -#define GL_COVERAGE_BUFFER_BIT_NV 0x8000 -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_MAX_DRAW_BUFFERS_NV 0x8824 -#define GL_DRAW_BUFFER0_NV 0x8825 -#define GL_DRAW_BUFFER1_NV 0x8826 -#define GL_DRAW_BUFFER2_NV 0x8827 -#define GL_DRAW_BUFFER3_NV 0x8828 -#define GL_DRAW_BUFFER4_NV 0x8829 -#define GL_DRAW_BUFFER5_NV 0x882A -#define GL_DRAW_BUFFER6_NV 0x882B -#define GL_DRAW_BUFFER7_NV 0x882C -#define GL_DRAW_BUFFER8_NV 0x882D -#define GL_DRAW_BUFFER9_NV 0x882E -#define GL_DRAW_BUFFER10_NV 0x882F -#define GL_DRAW_BUFFER11_NV 0x8830 -#define GL_DRAW_BUFFER12_NV 0x8831 -#define GL_DRAW_BUFFER13_NV 0x8832 -#define GL_DRAW_BUFFER14_NV 0x8833 -#define GL_DRAW_BUFFER15_NV 0x8834 -#define GL_COLOR_ATTACHMENT0_NV 0x8CE0 -#define GL_COLOR_ATTACHMENT1_NV 0x8CE1 -#define GL_COLOR_ATTACHMENT2_NV 0x8CE2 -#define GL_COLOR_ATTACHMENT3_NV 0x8CE3 -#define GL_COLOR_ATTACHMENT4_NV 0x8CE4 -#define GL_COLOR_ATTACHMENT5_NV 0x8CE5 -#define GL_COLOR_ATTACHMENT6_NV 0x8CE6 -#define GL_COLOR_ATTACHMENT7_NV 0x8CE7 -#define GL_COLOR_ATTACHMENT8_NV 0x8CE8 -#define GL_COLOR_ATTACHMENT9_NV 0x8CE9 -#define GL_COLOR_ATTACHMENT10_NV 0x8CEA -#define GL_COLOR_ATTACHMENT11_NV 0x8CEB -#define GL_COLOR_ATTACHMENT12_NV 0x8CEC -#define GL_COLOR_ATTACHMENT13_NV 0x8CED -#define GL_COLOR_ATTACHMENT14_NV 0x8CEE -#define GL_COLOR_ATTACHMENT15_NV 0x8CEF -#endif - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF -/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */ -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_ALL_COMPLETED_NV 0x84F2 -#define GL_FENCE_STATUS_NV 0x84F3 -#define GL_FENCE_CONDITION_NV 0x84F4 -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_READ_BUFFER_NV 0x0C02 -#endif - -/* GL_NV_read_buffer_front */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_depth_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_read_stencil */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_texture_compression_s3tc_update */ -/* No new tokens introduced by this extension. */ - -/* GL_NV_texture_npot_2D_mipmap */ -/* No new tokens introduced by this extension. */ - -/*------------------------------------------------------------------------* - * QCOM extension tokens - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_ALPHA_TEST_QCOM 0x0BC0 -#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1 -#define GL_ALPHA_TEST_REF_QCOM 0x0BC2 -#endif - -/* GL_QCOM_driver_control */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 -#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 -#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 -#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 -#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 -#define GL_TEXTURE_TYPE_QCOM 0x8BD7 -#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 -#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 -#define GL_TEXTURE_TARGET_QCOM 0x8BDA -#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB -#define GL_STATE_RESTORE 0x8BDC -#endif - -/* GL_QCOM_extended_get2 */ -/* No new tokens introduced by this extension. */ - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_WRITEONLY_RENDERING_QCOM 0x8823 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 -#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 -#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 -#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 -#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 -#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 -#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 -#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 -#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 -#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 -#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 -#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 -#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 -#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 -#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 -#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 -#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 -#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 -#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 -#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 -#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 -#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 -#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 -#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 -#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 -#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 -#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 -#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 -#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 -#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 -#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 -#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_SHADER_BINARY_VIV 0x8FC4 -#endif - -/*------------------------------------------------------------------------* - * BRCM extension tokens - * TODO: these aren't official yet - *------------------------------------------------------------------------*/ -#ifndef GL_BRCM_side_by_side_stero_hint -#define GL_SIDE_BY_SIDE_STEREO_HINT_BRCM 0x8193 /* GET AN OFFICIAL ENUM */ -#endif - -/*------------------------------------------------------------------------* - * End of extension tokens, start of corresponding extension functions - *------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------* - * OES extension functions - *------------------------------------------------------------------------*/ - -/* GL_OES_compressed_ETC1_RGB8_texture */ -#ifndef GL_OES_compressed_ETC1_RGB8_texture -#define GL_OES_compressed_ETC1_RGB8_texture 1 -#endif - -/* GL_OES_compressed_paletted_texture */ -#ifndef GL_OES_compressed_paletted_texture -#define GL_OES_compressed_paletted_texture 1 -#endif - -/* GL_OES_depth24 */ -#ifndef GL_OES_depth24 -#define GL_OES_depth24 1 -#endif - -/* GL_OES_depth32 */ -#ifndef GL_OES_depth32 -#define GL_OES_depth32 0 -#endif - -/* GL_OES_depth_texture */ -#ifndef GL_OES_depth_texture -#define GL_OES_depth_texture 0 -#endif - -/* GL_OES_EGL_image */ -#ifndef GL_OES_EGL_image -#define GL_OES_EGL_image 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); -GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); -#endif -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); -#endif - -/* GL_OES_EGL_image_external */ -#ifndef GL_OES_EGL_image_external -#define GL_OES_EGL_image_external 1 -/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */ -#endif - -/* GL_OES_element_index_uint */ -#ifndef GL_OES_element_index_uint -#define GL_OES_element_index_uint 0 -#endif - -/* GL_OES_fbo_render_mipmap */ -#ifndef GL_OES_fbo_render_mipmap -#define GL_OES_fbo_render_mipmap 0 -#endif - -/* GL_OES_fragment_precision_high */ -#ifndef GL_OES_fragment_precision_high -#define GL_OES_fragment_precision_high 0 -#endif - -/* GL_OES_get_program_binary */ -#ifndef GL_OES_get_program_binary -#define GL_OES_get_program_binary 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif -typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); -typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); -#endif - -/* GL_OES_mapbuffer */ -#ifndef GL_OES_mapbuffer -#define GL_OES_mapbuffer 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); -GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); -GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params); -#endif -typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); -typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); -typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params); -#endif - -/* GL_OES_packed_depth_stencil */ -#ifndef GL_OES_packed_depth_stencil -#define GL_OES_packed_depth_stencil 0 -#endif - -/* GL_OES_rgb8_rgba8 */ -#ifndef GL_OES_rgb8_rgba8 -#define GL_OES_rgb8_rgba8 0 -#endif - -/* GL_OES_standard_derivatives */ -#ifndef GL_OES_standard_derivatives -#define GL_OES_standard_derivatives 0 -#endif - -/* GL_OES_stencil1 */ -#ifndef GL_OES_stencil1 -#define GL_OES_stencil1 0 -#endif - -/* GL_OES_stencil4 */ -#ifndef GL_OES_stencil4 -#define GL_OES_stencil4 0 -#endif - -/* GL_OES_texture_3D */ -#ifndef GL_OES_texture_3D -#define GL_OES_texture_3D 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif -typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); -typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); -typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); -#endif - -/* GL_OES_texture_float */ -#ifndef GL_OES_texture_float -#define GL_OES_texture_float 0 -#endif - -/* GL_OES_texture_float_linear */ -#ifndef GL_OES_texture_float_linear -#define GL_OES_texture_float_linear 0 -#endif - -/* GL_OES_texture_half_float */ -#ifndef GL_OES_texture_half_float -#define GL_OES_texture_half_float 0 -#endif - -/* GL_OES_texture_half_float_linear */ -#ifndef GL_OES_texture_half_float_linear -#define GL_OES_texture_half_float_linear 0 -#endif - -/* GL_OES_texture_npot */ -#ifndef GL_OES_texture_npot -#define GL_OES_texture_npot 1 -#endif - -/* GL_OES_vertex_array_object */ -#ifndef GL_OES_vertex_array_object -#define GL_OES_vertex_array_object 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); -GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); -GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); -GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); -#endif -typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); -typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); -typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); -typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); -#endif - -/* GL_OES_vertex_half_float */ -#ifndef GL_OES_vertex_half_float -#define GL_OES_vertex_half_float 1 -#endif - -/* GL_OES_vertex_type_10_10_10_2 */ -#ifndef GL_OES_vertex_type_10_10_10_2 -#define GL_OES_vertex_type_10_10_10_2 0 -#endif - -/*------------------------------------------------------------------------* - * AMD extension functions - *------------------------------------------------------------------------*/ - -/* GL_AMD_compressed_3DC_texture */ -#ifndef GL_AMD_compressed_3DC_texture -#define GL_AMD_compressed_3DC_texture 0 -#endif - -/* GL_AMD_compressed_ATC_texture */ -#ifndef GL_AMD_compressed_ATC_texture -#define GL_AMD_compressed_ATC_texture 0 -#endif - -/* AMD_performance_monitor */ -#ifndef GL_AMD_performance_monitor -#define GL_AMD_performance_monitor 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); -GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); -GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); -typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); -typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); -typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); -typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); -#endif - -/* GL_AMD_program_binary_Z400 */ -#ifndef GL_AMD_program_binary_Z400 -#define GL_AMD_program_binary_Z400 0 -#endif - -/*------------------------------------------------------------------------* - * ANGLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_ANGLE_framebuffer_blit */ -#ifndef GL_ANGLE_framebuffer_blit -#define GL_ANGLE_framebuffer_blit 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif -typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - -/* GL_ANGLE_framebuffer_multisample */ -#ifndef GL_ANGLE_framebuffer_multisample -#define GL_ANGLE_framebuffer_multisample 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -#endif - -/*------------------------------------------------------------------------* - * APPLE extension functions - *------------------------------------------------------------------------*/ - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 0 -#endif - -/* GL_APPLE_framebuffer_multisample */ -#ifndef GL_APPLE_framebuffer_multisample -#define GL_APPLE_framebuffer_multisample 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void); -#endif - -/* GL_APPLE_texture_format_BGRA8888 */ -#ifndef GL_APPLE_texture_format_BGRA8888 -#define GL_APPLE_texture_format_BGRA8888 0 -#endif - -/* GL_APPLE_texture_max_level */ -#ifndef GL_APPLE_texture_max_level -#define GL_APPLE_texture_max_level 0 -#endif - -/*------------------------------------------------------------------------* - * ARM extension functions - *------------------------------------------------------------------------*/ - -/* GL_ARM_mali_shader_binary */ -#ifndef GL_ARM_mali_shader_binary -#define GL_ARM_mali_shader_binary 0 -#endif - -/* GL_ARM_rgba8 */ -#ifndef GL_ARM_rgba8 -#define GL_ARM_rgba8 0 -#endif - -/*------------------------------------------------------------------------* - * APPLE extension tokens - *------------------------------------------------------------------------*/ - -/* GL_APPLE_rgb_422 */ -#ifndef GL_APPLE_rgb_422 -#define GL_APPLE_rgb_422 1 -#define GL_RGB_422_APPLE 0x8A1F -#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA -#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB -#endif - -/*------------------------------------------------------------------------* - * EXT extension functions - *------------------------------------------------------------------------*/ - -/* GL_EXT_blend_minmax */ -#ifndef GL_EXT_blend_minmax -#define GL_EXT_blend_minmax 0 -#endif - -/* GL_EXT_discard_framebuffer */ -#ifndef GL_EXT_discard_framebuffer -#define GL_EXT_discard_framebuffer 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif -typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); -#endif - -/* GL_EXT_debug_marker */ -#ifndef GL_EXT_debug_marker -#define GL_EXT_debug_marker 1 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glInsertEventMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPushGroupMarkerEXT (GLsizei length, const GLchar *marker); -GL_APICALL void GL_APIENTRY glPopGroupMarkerEXT (void); -#endif -typedef void (GL_APIENTRYP PFNGLINSERTEVENTMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPUSHGROUPMARKEREXTPROC) (GLsizei length, const GLchar *marker); -typedef void (GL_APIENTRYP PFNGLPOPGROUPMARKEREXTPROC) (void); -#endif - -#ifndef GL_EXT_multi_draw_arrays -#define GL_EXT_multi_draw_arrays 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); -GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); -#endif /* GL_GLEXT_PROTOTYPES */ -typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); -typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); -#endif - -/* GL_EXT_read_format_bgra */ -#ifndef GL_EXT_read_format_bgra -#define GL_EXT_read_format_bgra 0 -#endif - -/* GL_EXT_shader_texture_lod */ -#ifndef GL_EXT_shader_texture_lod -#define GL_EXT_shader_texture_lod 0 -#endif - -/* GL_EXT_texture_filter_anisotropic */ -#ifndef GL_EXT_texture_filter_anisotropic -#define GL_EXT_texture_filter_anisotropic 0 -#endif - -/* GL_EXT_texture_format_BGRA8888 */ -#ifndef GL_EXT_texture_format_BGRA8888 -#define GL_EXT_texture_format_BGRA8888 1 -#endif - -#ifndef GL_texture_format_RGBX8888_BRCM -#define GL_texture_format_RGBX8888_BRCM 1 -#endif - -/* GL_EXT_texture_type_2_10_10_10_REV */ -#ifndef GL_EXT_texture_type_2_10_10_10_REV -#define GL_EXT_texture_type_2_10_10_10_REV 0 -#endif - -/* GL_EXT_texture_compression_dxt1 */ -#ifndef GL_EXT_texture_compression_dxt1 -#define GL_EXT_texture_compression_dxt1 0 -#endif - -/* GL_EXT_unpack_subimage */ -#ifndef GL_EXT_unpack_subimage -#define GL_EXT_unpack_subimage 0 -#endif - -/*------------------------------------------------------------------------* - * DMP extension functions - *------------------------------------------------------------------------*/ - -/* GL_DMP_shader_binary */ -#ifndef GL_DMP_shader_binary -#define GL_DMP_shader_binary 0 -#endif - -/*------------------------------------------------------------------------* - * IMG extension functions - *------------------------------------------------------------------------*/ - -/* GL_IMG_program_binary */ -#ifndef GL_IMG_program_binary -#define GL_IMG_program_binary 0 -#endif - -/* GL_IMG_read_format */ -#ifndef GL_IMG_read_format -#define GL_IMG_read_format 0 -#endif - -/* GL_IMG_shader_binary */ -#ifndef GL_IMG_shader_binary -#define GL_IMG_shader_binary 0 -#endif - -/* GL_IMG_texture_compression_pvrtc */ -#ifndef GL_IMG_texture_compression_pvrtc -#define GL_IMG_texture_compression_pvrtc 0 -#endif - -/* GL_IMG_multisampled_render_to_texture */ -#ifndef GL_IMG_multisampled_render_to_texture -#define GL_IMG_multisampled_render_to_texture 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); -GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); -#endif -typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); -typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); -#endif - -/*------------------------------------------------------------------------* - * NV extension functions - *------------------------------------------------------------------------*/ - -/* GL_NV_coverage_sample */ -#ifndef GL_NV_coverage_sample -#define GL_NV_coverage_sample 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); -GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); -#endif -typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); -typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); -#endif - -/* GL_NV_depth_nonlinear */ -#ifndef GL_NV_depth_nonlinear -#define GL_NV_depth_nonlinear 0 -#endif - -/* GL_NV_draw_buffers */ -#ifndef GL_NV_draw_buffers -#define GL_NV_draw_buffers 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs); -#endif -typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs); -#endif - -/* GL_NV_fbo_color_attachments */ -#ifndef GL_NV_fbo_color_attachments -#define GL_NV_fbo_color_attachments 0 -#endif - -/* GL_NV_fence */ -#ifndef GL_NV_fence -#define GL_NV_fence 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); -GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); -GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint); -GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint); -GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); -GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint); -GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum); -#endif -typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); -typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); -typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); -typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); -typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); -#endif - -/* GL_NV_read_buffer */ -#ifndef GL_NV_read_buffer -#define GL_NV_read_buffer 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode); -#endif -typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode); -#endif - -/* GL_NV_read_buffer_front */ -#ifndef GL_NV_read_buffer_front -#define GL_NV_read_buffer_front 0 -#endif - -/* GL_NV_read_depth */ -#ifndef GL_NV_read_depth -#define GL_NV_read_depth 0 -#endif - -/* GL_NV_read_depth_stencil */ -#ifndef GL_NV_read_depth_stencil -#define GL_NV_read_depth_stencil 0 -#endif - -/* GL_NV_read_stencil */ -#ifndef GL_NV_read_stencil -#define GL_NV_read_stencil 0 -#endif - -/* GL_NV_texture_compression_s3tc_update */ -#ifndef GL_NV_texture_compression_s3tc_update -#define GL_NV_texture_compression_s3tc_update 0 -#endif - -/* GL_NV_texture_npot_2D_mipmap */ -#ifndef GL_NV_texture_npot_2D_mipmap -#define GL_NV_texture_npot_2D_mipmap 0 -#endif - -/*------------------------------------------------------------------------* - * QCOM extension functions - *------------------------------------------------------------------------*/ - -/* GL_QCOM_alpha_test */ -#ifndef GL_QCOM_alpha_test -#define GL_QCOM_alpha_test 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref); -#endif -typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref); -#endif - -/* GL_QCOM_driver_control */ -#ifndef GL_QCOM_driver_control -#define GL_QCOM_driver_control 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); -GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); -GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); -#endif -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); -typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); -typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); -#endif - -/* GL_QCOM_extended_get */ -#ifndef GL_QCOM_extended_get -#define GL_QCOM_extended_get 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); -GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); -GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); -typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); -typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); -typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); -#endif - -/* GL_QCOM_extended_get2 */ -#ifndef GL_QCOM_extended_get2 -#define GL_QCOM_extended_get2 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); -GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); -GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif -typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); -typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); -typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); -#endif - -/* GL_QCOM_perfmon_global_mode */ -#ifndef GL_QCOM_perfmon_global_mode -#define GL_QCOM_perfmon_global_mode 0 -#endif - -/* GL_QCOM_writeonly_rendering */ -#ifndef GL_QCOM_writeonly_rendering -#define GL_QCOM_writeonly_rendering 0 -#endif - -/* GL_QCOM_tiled_rendering */ -#ifndef GL_QCOM_tiled_rendering -#define GL_QCOM_tiled_rendering 0 -#ifdef GL_GLEXT_PROTOTYPES -GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); -#endif -typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); -typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); -#endif - -/*------------------------------------------------------------------------* - * VIV extension tokens - *------------------------------------------------------------------------*/ - -/* GL_VIV_shader_binary */ -#ifndef GL_VIV_shader_binary -#define GL_VIV_shader_binary 0 -#endif - -/*------------------------------------------------------------------------* - * BRCM extension functions - * TODO: these aren't official yet - *------------------------------------------------------------------------*/ -#ifndef GL_BRCM_side_by_side_stero_hint -#define GL_BRCM_side_by_side_stero_hint 1 -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2ext_h_ */ diff --git a/vc/include/GLES2/gl2platform.h b/vc/include/GLES2/gl2platform.h @@ -1,64 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef __gl2platform_h_ -#define __gl2platform_h_ - -/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * This document is licensed under the SGI Free Software B License Version - * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . - */ - -/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h - * - * Adopters may modify khrplatform.h and this file to suit their platform. - * You are encouraged to submit all modifications to the Khronos group so that - * they can be included in future versions of this file. Please submit changes - * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) - * by filing a bug against product "OpenGL-ES" component "Registry". - */ - -#include "../KHR/khrplatform.h" - -#ifndef GL_APICALL -#define GL_APICALL KHRONOS_APICALL -#endif - -#ifndef GL_APIENTRY -#define GL_APIENTRY KHRONOS_APIENTRY -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* __gl2platform_h_ */ diff --git a/vc/include/IL/OMX_Audio.h b/vc/include/IL/OMX_Audio.h @@ -1,1391 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** @file OMX_Audio.h - OpenMax IL version 1.1.2 - * The structures needed by Audio components to exchange - * parameters and configuration data with the componenmilts. - */ - -#ifndef OMX_Audio_h -#define OMX_Audio_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Core.h" - -/** @defgroup midi MIDI - * @ingroup audio - */ - -/** @defgroup effects Audio effects - * @ingroup audio - */ - -/** @defgroup audio OpenMAX IL Audio Domain - * Structures for OpenMAX IL Audio domain - * @{ - */ - -/** Enumeration used to define the possible audio codings. - * If "OMX_AUDIO_CodingUnused" is selected, the coding selection must - * be done in a vendor specific way. Since this is for an audio - * processing element this enum is relevant. However, for another - * type of component other enums would be in this area. - */ -typedef enum OMX_AUDIO_CODINGTYPE { - OMX_AUDIO_CodingUnused = 0, /**< Placeholder value when coding is N/A */ - OMX_AUDIO_CodingAutoDetect, /**< auto detection of audio format */ - OMX_AUDIO_CodingPCM, /**< Any variant of PCM coding */ - OMX_AUDIO_CodingADPCM, /**< Any variant of ADPCM encoded data */ - OMX_AUDIO_CodingAMR, /**< Any variant of AMR encoded data */ - OMX_AUDIO_CodingGSMFR, /**< Any variant of GSM fullrate (i.e. GSM610) */ - OMX_AUDIO_CodingGSMEFR, /**< Any variant of GSM Enhanced Fullrate encoded data*/ - OMX_AUDIO_CodingGSMHR, /**< Any variant of GSM Halfrate encoded data */ - OMX_AUDIO_CodingPDCFR, /**< Any variant of PDC Fullrate encoded data */ - OMX_AUDIO_CodingPDCEFR, /**< Any variant of PDC Enhanced Fullrate encoded data */ - OMX_AUDIO_CodingPDCHR, /**< Any variant of PDC Halfrate encoded data */ - OMX_AUDIO_CodingTDMAFR, /**< Any variant of TDMA Fullrate encoded data (TIA/EIA-136-420) */ - OMX_AUDIO_CodingTDMAEFR, /**< Any variant of TDMA Enhanced Fullrate encoded data (TIA/EIA-136-410) */ - OMX_AUDIO_CodingQCELP8, /**< Any variant of QCELP 8kbps encoded data */ - OMX_AUDIO_CodingQCELP13, /**< Any variant of QCELP 13kbps encoded data */ - OMX_AUDIO_CodingEVRC, /**< Any variant of EVRC encoded data */ - OMX_AUDIO_CodingSMV, /**< Any variant of SMV encoded data */ - OMX_AUDIO_CodingG711, /**< Any variant of G.711 encoded data */ - OMX_AUDIO_CodingG723, /**< Any variant of G.723 dot 1 encoded data */ - OMX_AUDIO_CodingG726, /**< Any variant of G.726 encoded data */ - OMX_AUDIO_CodingG729, /**< Any variant of G.729 encoded data */ - OMX_AUDIO_CodingAAC, /**< Any variant of AAC encoded data */ - OMX_AUDIO_CodingMP3, /**< Any variant of MP3 encoded data */ - OMX_AUDIO_CodingSBC, /**< Any variant of SBC encoded data */ - OMX_AUDIO_CodingVORBIS, /**< Any variant of VORBIS encoded data */ - OMX_AUDIO_CodingWMA, /**< Any variant of WMA encoded data */ - OMX_AUDIO_CodingRA, /**< Any variant of RA encoded data */ - OMX_AUDIO_CodingMIDI, /**< Any variant of MIDI encoded data */ - OMX_AUDIO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - -#define OMX_AUDIO_CodingFLAC_Supported 1 - OMX_AUDIO_CodingFLAC, /**< Any variant of FLAC */ -#define OMX_AUDIO_CodingDDP_Supported 1 - OMX_AUDIO_CodingDDP, /**< Any variant of Dolby Digital Plus */ -#define OMX_AUDIO_CodingDTS_Supported 1 - OMX_AUDIO_CodingDTS, /**< Any variant of DTS */ -#define OMX_AUDIO_CodingWMAPRO_Supported 1 - OMX_AUDIO_CodingWMAPRO, /**< Any variant of WMA Professional */ -#define OMX_AUDIO_CodingATRAC3_Supported 1 - OMX_AUDIO_CodingATRAC3, /**< Sony ATRAC-3 variants */ -#define OMX_AUDIO_CodingATRACX_Supported 1 - OMX_AUDIO_CodingATRACX, /**< Sony ATRAC-X variants */ -#define OMX_AUDIO_CodingATRACAAL_Supported 1 - OMX_AUDIO_CodingATRACAAL, /**< Sony ATRAC advanced-lossless variants */ - - OMX_AUDIO_CodingMax = 0x7FFFFFFF -} OMX_AUDIO_CODINGTYPE; - - -/** The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output audio - * path. If additional information is needed to define the parameters of the - * port (such as frequency), additional structures must be sent such as the - * OMX_AUDIO_PARAM_PCMMODETYPE structure to supply the extra parameters for the port. - */ -typedef struct OMX_AUDIO_PORTDEFINITIONTYPE { - OMX_STRING cMIMEType; /**< MIME type of data for the port */ - OMX_NATIVE_DEVICETYPE pNativeRender; /** < platform specific reference - for an output device, - otherwise this field is 0 */ - OMX_BOOL bFlagErrorConcealment; /**< Turns on error concealment if it is - supported by the OMX component */ - OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this - port (e.g. PCM, AMR, MP3, etc) */ -} OMX_AUDIO_PORTDEFINITIONTYPE; - - -/** Port format parameter. This structure is used to enumerate - * the various data input/output format supported by the port. - */ -typedef struct OMX_AUDIO_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Indicates which port to set */ - OMX_U32 nIndex; /**< Indicates the enumeration index for the format from 0x0 to N-1 */ - OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this port (e.g. PCM, AMR, MP3, etc) */ -} OMX_AUDIO_PARAM_PORTFORMATTYPE; - - -/** PCM mode type */ -typedef enum OMX_AUDIO_PCMMODETYPE { - OMX_AUDIO_PCMModeLinear = 0, /**< Linear PCM encoded data */ - OMX_AUDIO_PCMModeALaw, /**< A law PCM encoded data (G.711) */ - OMX_AUDIO_PCMModeMULaw, /**< Mu law PCM encoded data (G.711) */ - OMX_AUDIO_PCMModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_PCMModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_PCMModeMax = 0x7FFFFFFF -} OMX_AUDIO_PCMMODETYPE; - - -typedef enum OMX_AUDIO_CHANNELTYPE { - OMX_AUDIO_ChannelNone = 0x0, /**< Unused or empty */ - OMX_AUDIO_ChannelLF = 0x1, /**< Left front */ - OMX_AUDIO_ChannelRF = 0x2, /**< Right front */ - OMX_AUDIO_ChannelCF = 0x3, /**< Center front */ - OMX_AUDIO_ChannelLS = 0x4, /**< Left surround */ - OMX_AUDIO_ChannelRS = 0x5, /**< Right surround */ - OMX_AUDIO_ChannelLFE = 0x6, /**< Low frequency effects */ - OMX_AUDIO_ChannelCS = 0x7, /**< Back surround */ - OMX_AUDIO_ChannelLR = 0x8, /**< Left rear. */ - OMX_AUDIO_ChannelRR = 0x9, /**< Right rear. */ - OMX_AUDIO_ChannelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_ChannelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_ChannelMax = 0x7FFFFFFF -} OMX_AUDIO_CHANNELTYPE; - -#define OMX_AUDIO_MAXCHANNELS 16 /**< maximum number distinct audio channels that a buffer may contain */ -#define OMX_MIN_PCMPAYLOAD_MSEC 5 /**< Minimum audio buffer payload size for uncompressed (PCM) audio */ - -/** PCM format description */ -typedef struct OMX_AUDIO_PARAM_PCMMODETYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels (e.g. 2 for stereo) */ - OMX_NUMERICALDATATYPE eNumData; /**< indicates PCM data as signed or unsigned */ - OMX_ENDIANTYPE eEndian; /**< indicates PCM data as little or big endian */ - OMX_BOOL bInterleaved; /**< True for normal interleaved data; false for - non-interleaved data (e.g. block data) */ - OMX_U32 nBitPerSample; /**< Bit per sample */ - OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_AUDIO_PCMMODETYPE ePCMMode; /**< PCM mode enumeration */ - OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMap[i] */ - -} OMX_AUDIO_PARAM_PCMMODETYPE; - - -/** Audio channel mode. This is used by both AAC and MP3, although the names are more appropriate - * for the MP3. For example, JointStereo for MP3 is CouplingChannels for AAC. - */ -typedef enum OMX_AUDIO_CHANNELMODETYPE { - OMX_AUDIO_ChannelModeStereo = 0, /**< 2 channels, the bitrate allocation between those - two channels changes accordingly to each channel information */ - OMX_AUDIO_ChannelModeJointStereo, /**< mode that takes advantage of what is common between - 2 channels for higher compression gain */ - OMX_AUDIO_ChannelModeDual, /**< 2 mono-channels, each channel is encoded with half - the bitrate of the overall bitrate */ - OMX_AUDIO_ChannelModeMono, /**< Mono channel mode */ - OMX_AUDIO_ChannelModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_ChannelModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_ChannelModeMax = 0x7FFFFFFF -} OMX_AUDIO_CHANNELMODETYPE; - - -typedef enum OMX_AUDIO_MP3STREAMFORMATTYPE { - OMX_AUDIO_MP3StreamFormatMP1Layer3 = 0, /**< MP3 Audio MPEG 1 Layer 3 Stream format */ - OMX_AUDIO_MP3StreamFormatMP2Layer3, /**< MP3 Audio MPEG 2 Layer 3 Stream format */ - OMX_AUDIO_MP3StreamFormatMP2_5Layer3, /**< MP3 Audio MPEG2.5 Layer 3 Stream format */ - OMX_AUDIO_MP3StreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MP3StreamFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MP3StreamFormatMax = 0x7FFFFFFF -} OMX_AUDIO_MP3STREAMFORMATTYPE; - -/** MP3 params */ -typedef struct OMX_AUDIO_PARAM_MP3TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should - limit the audio signal. Use 0 to let encoder decide */ - OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ - OMX_AUDIO_MP3STREAMFORMATTYPE eFormat; /**< MP3 stream format */ -} OMX_AUDIO_PARAM_MP3TYPE; - -typedef enum OMX_AUDIO_DDPBITSTREAMID { - OMX_AUDIO_DDPBitStreamIdAC3 = 8, - OMX_AUDIO_DDPBitStreamIdEAC3 = 16, - OMX_AUDIO_DDPBitStreamIdKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_DDPBitStreamIdVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_DDPBitStreamIdMax = 0x7FFFFFFF -} OMX_AUDIO_DDPBITSTREAMID; - -typedef enum OMX_AUDIO_DDPBITSTREAMMODE { - OMX_AUDIO_DDPBitStreamModeCM = 0, /**< DDP any main audio service: complete main (CM) */ - OMX_AUDIO_DDPBitStreamModeME, /**< DDP any main audio service: music and effects (ME) */ - OMX_AUDIO_DDPBitStreamModeVI, /**< DDP any associated service: visually impaired (VI) */ - OMX_AUDIO_DDPBitStreamModeHI, /**< DDP any associated service: hearing impaired (HI) */ - OMX_AUDIO_DDPBitStreamModeD, /**< DDP any associated service: dialogue (D) */ - OMX_AUDIO_DDPBitStreamModeC, /**< DDP any associated service: commentary (C) */ - OMX_AUDIO_DDPBitStreamModeE, /**< DDP any associated service: emergency (E) */ - OMX_AUDIO_DDPBitStreamModeVO, /**< DDP associated service: voice over (VO) */ - OMX_AUDIO_DDPBitStreamModeK, /**< DDP main audio service: karaoke */ - OMX_AUDIO_DDPBitStreamModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_DDPBitStreamModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_DDPBitStreamModeMax = 0x7FFFFFFF -} OMX_AUDIO_DDPBITSTREAMMODE; - -typedef enum OMX_AUDIO_DDPDOLBYSURROUNDMODE { - OMX_AUDIO_DDPDolbySurroundModeNotIndicated = 0, /**< Not indicated */ - OMX_AUDIO_DDPDolbySurroundModeNotDolbySurround, /**< Not Dolby Surround */ - OMX_AUDIO_DDPDolbySurroundModeDolbySurroundEncoded, /**< Dolby Surround encoded */ - OMX_AUDIO_DDPDolbySurroundModeReserverd, /**< Reserved */ - OMX_AUDIO_DDPDolbySurroundModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_DDPDolbySurroundModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_DDPDolbySurroundModeMax = 0x7FFFFFFF -} OMX_AUDIO_DDPDOLBYSURROUNDMODE; - -/** DDP params */ -typedef struct OMX_AUDIO_PARAM_DDPTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_AUDIO_DDPBITSTREAMID eBitStreamId; - OMX_AUDIO_DDPBITSTREAMMODE eBitStreamMode; - OMX_AUDIO_DDPDOLBYSURROUNDMODE eDolbySurroundMode; - OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMapping[i] */ -} OMX_AUDIO_PARAM_DDPTYPE; - -/** DTS params */ -typedef struct OMX_AUDIO_PARAM_DTSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nDtsType; /** DTS type 1, 2, or 3. */ - OMX_U32 nFormat; /** DTS stream is either big/little endian and 16/14 bit packing */ - OMX_U32 nDtsFrameSizeBytes; /** DTS frame size in bytes */ - OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMapping[i] */ -} OMX_AUDIO_PARAM_DTSTYPE; - -typedef enum OMX_AUDIO_AACSTREAMFORMATTYPE { - OMX_AUDIO_AACStreamFormatMP2ADTS = 0, /**< AAC Audio Data Transport Stream 2 format */ - OMX_AUDIO_AACStreamFormatMP4ADTS, /**< AAC Audio Data Transport Stream 4 format */ - OMX_AUDIO_AACStreamFormatMP4LOAS, /**< AAC Low Overhead Audio Stream format */ - OMX_AUDIO_AACStreamFormatMP4LATM, /**< AAC Low overhead Audio Transport Multiplex */ - OMX_AUDIO_AACStreamFormatADIF, /**< AAC Audio Data Interchange Format */ - OMX_AUDIO_AACStreamFormatMP4FF, /**< AAC inside MPEG-4/ISO File Format */ - OMX_AUDIO_AACStreamFormatRAW, /**< AAC Raw Format */ - OMX_AUDIO_AACStreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AACStreamFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AACStreamFormatMax = 0x7FFFFFFF -} OMX_AUDIO_AACSTREAMFORMATTYPE; - - -/** AAC mode type. Note that the term profile is used with the MPEG-2 - * standard and the term object type and profile is used with MPEG-4 */ -typedef enum OMX_AUDIO_AACPROFILETYPE{ - OMX_AUDIO_AACObjectNull = 0, /**< Null, not used */ - OMX_AUDIO_AACObjectMain = 1, /**< AAC Main object */ - OMX_AUDIO_AACObjectLC, /**< AAC Low Complexity object (AAC profile) */ - OMX_AUDIO_AACObjectSSR, /**< AAC Scalable Sample Rate object */ - OMX_AUDIO_AACObjectLTP, /**< AAC Long Term Prediction object */ - OMX_AUDIO_AACObjectHE, /**< AAC High Efficiency (object type SBR, HE-AAC profile) */ - OMX_AUDIO_AACObjectScalable, /**< AAC Scalable object */ - OMX_AUDIO_AACObjectERLC = 17, /**< ER AAC Low Complexity object (Error Resilient AAC-LC) */ - OMX_AUDIO_AACObjectLD = 23, /**< AAC Low Delay object (Error Resilient) */ - OMX_AUDIO_AACObjectHE_PS = 29, /**< AAC High Efficiency with Parametric Stereo coding (HE-AAC v2, object type PS) */ - OMX_AUDIO_AACObjectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AACObjectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AACObjectMax = 0x7FFFFFFF -} OMX_AUDIO_AACPROFILETYPE; - - -/** AAC tool usage (for nAACtools in OMX_AUDIO_PARAM_AACPROFILETYPE). - * Required for encoder configuration and optional as decoder info output. - * For MP3, OMX_AUDIO_CHANNELMODETYPE is sufficient. */ -#define OMX_AUDIO_AACToolNone 0x00000000 /**< no AAC tools allowed (encoder config) or active (decoder info output) */ -#define OMX_AUDIO_AACToolMS 0x00000001 /**< MS: Mid/side joint coding tool allowed or active */ -#define OMX_AUDIO_AACToolIS 0x00000002 /**< IS: Intensity stereo tool allowed or active */ -#define OMX_AUDIO_AACToolTNS 0x00000004 /**< TNS: Temporal Noise Shaping tool allowed or active */ -#define OMX_AUDIO_AACToolPNS 0x00000008 /**< PNS: MPEG-4 Perceptual Noise substitution tool allowed or active */ -#define OMX_AUDIO_AACToolLTP 0x00000010 /**< LTP: MPEG-4 Long Term Prediction tool allowed or active */ -#define OMX_AUDIO_AACToolAll 0x7FFFFFFF /**< all AAC tools allowed or active (*/ - -/** MPEG-4 AAC error resilience (ER) tool usage (for nAACERtools in OMX_AUDIO_PARAM_AACPROFILETYPE). - * Required for ER encoder configuration and optional as decoder info output */ -#define OMX_AUDIO_AACERNone 0x00000000 /**< no AAC ER tools allowed/used */ -#define OMX_AUDIO_AACERVCB11 0x00000001 /**< VCB11: Virtual Code Books for AAC section data */ -#define OMX_AUDIO_AACERRVLC 0x00000002 /**< RVLC: Reversible Variable Length Coding */ -#define OMX_AUDIO_AACERHCR 0x00000004 /**< HCR: Huffman Codeword Reordering */ -#define OMX_AUDIO_AACERAll 0x7FFFFFFF /**< all AAC ER tools allowed/used */ - - -/** AAC params */ -typedef struct OMX_AUDIO_PARAM_AACPROFILETYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should - limit the audio signal. Use 0 to let encoder decide */ - OMX_U32 nFrameLength; /**< Frame length (in audio samples per channel) of the codec. - Can be 1024 or 960 (AAC-LC), 2048 (HE-AAC), 480 or 512 (AAC-LD). - Use 0 to let encoder decide */ - OMX_U32 nAACtools; /**< AAC tool usage */ - OMX_U32 nAACERtools; /**< MPEG-4 AAC error resilience tool usage */ - OMX_AUDIO_AACPROFILETYPE eAACProfile; /**< AAC profile enumeration */ - OMX_AUDIO_AACSTREAMFORMATTYPE eAACStreamFormat; /**< AAC stream format enumeration */ - OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ -} OMX_AUDIO_PARAM_AACPROFILETYPE; - - -/** VORBIS params */ -typedef struct OMX_AUDIO_PARAM_VORBISTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the encoded data data. Use 0 for variable - rate or unknown bit rates. Encoding is set to the - bitrate closest to specified value (in bps) */ - OMX_U32 nMinBitRate; /**< Sets minimum bitrate (in bps). */ - OMX_U32 nMaxBitRate; /**< Sets maximum bitrate (in bps). */ - - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should - limit the audio signal. Use 0 to let encoder decide */ - OMX_S32 nQuality; /**< Sets encoding quality to n, between -1 (low) and 10 (high). - In the default mode of operation, teh quality level is 3. - Normal quality range is 0 - 10. */ - OMX_BOOL bManaged; /**< Set bitrate management mode. This turns off the - normal VBR encoding, but allows hard or soft bitrate - constraints to be enforced by the encoder. This mode can - be slower, and may also be lower quality. It is - primarily useful for streaming. */ - OMX_BOOL bDownmix; /**< Downmix input from stereo to mono (has no effect on - non-stereo streams). Useful for lower-bitrate encoding. */ -} OMX_AUDIO_PARAM_VORBISTYPE; - - -/** WMA Version */ -typedef enum OMX_AUDIO_WMAFORMATTYPE { - OMX_AUDIO_WMAFormatUnused = 0, /**< format unused or unknown */ - OMX_AUDIO_WMAFormat7, /**< Windows Media Audio format 7 */ - OMX_AUDIO_WMAFormat8, /**< Windows Media Audio format 8 */ - OMX_AUDIO_WMAFormat9, /**< Windows Media Audio format 9 */ - OMX_AUDIO_WMAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_WMAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_WMAFormatMax = 0x7FFFFFFF -} OMX_AUDIO_WMAFORMATTYPE; - - -/** WMA Profile */ -typedef enum OMX_AUDIO_WMAPROFILETYPE { - OMX_AUDIO_WMAProfileUnused = 0, /**< profile unused or unknown */ - OMX_AUDIO_WMAProfileL1, /**< Windows Media audio version 9 profile L1 */ - OMX_AUDIO_WMAProfileL2, /**< Windows Media audio version 9 profile L2 */ - OMX_AUDIO_WMAProfileL3, /**< Windows Media audio version 9 profile L3 */ - OMX_AUDIO_WMAProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_WMAProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_WMAProfileMax = 0x7FFFFFFF -} OMX_AUDIO_WMAPROFILETYPE; - - -/** WMA params */ -typedef struct OMX_AUDIO_PARAM_WMATYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U16 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_AUDIO_WMAFORMATTYPE eFormat; /**< Version of WMA stream / data */ - OMX_AUDIO_WMAPROFILETYPE eProfile; /**< Profile of WMA stream / data */ - OMX_U32 nSamplingRate; /**< Sampling rate of the source data */ - OMX_U16 nBlockAlign; /**< is the block alignment, or block size, in bytes of the audio codec */ - OMX_U16 nEncodeOptions; /**< WMA Type-specific data */ - OMX_U32 nSuperBlockAlign; /**< WMA Type-specific data */ -} OMX_AUDIO_PARAM_WMATYPE; - -/** - * RealAudio format - */ -typedef enum OMX_AUDIO_RAFORMATTYPE { - OMX_AUDIO_RAFormatUnused = 0, /**< Format unused or unknown */ - OMX_AUDIO_RA8, /**< RealAudio 8 codec */ - OMX_AUDIO_RA9, /**< RealAudio 9 codec */ - OMX_AUDIO_RA10_AAC, /**< MPEG-4 AAC codec for bitrates of more than 128kbps */ - OMX_AUDIO_RA10_CODEC, /**< RealAudio codec for bitrates less than 128 kbps */ - OMX_AUDIO_RA10_LOSSLESS, /**< RealAudio Lossless */ - OMX_AUDIO_RA10_MULTICHANNEL, /**< RealAudio Multichannel */ - OMX_AUDIO_RA10_VOICE, /**< RealAudio Voice for bitrates below 15 kbps */ - OMX_AUDIO_RAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_RAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_RAFormatMax = 0x7FFFFFFF -} OMX_AUDIO_RAFORMATTYPE; - -/** RA (Real Audio) params */ -typedef struct OMX_AUDIO_PARAM_RATYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nSamplingRate; /**< is the sampling rate of the source data */ - OMX_U32 nBitsPerFrame; /**< is the value for bits per frame */ - OMX_U32 nSamplePerFrame; /**< is the value for samples per frame */ - OMX_U32 nCouplingQuantBits; /**< is the number of coupling quantization bits in the stream */ - OMX_U32 nCouplingStartRegion; /**< is the coupling start region in the stream */ - OMX_U32 nNumRegions; /**< is the number of regions value */ - OMX_AUDIO_RAFORMATTYPE eFormat; /**< is the RealAudio audio format */ -} OMX_AUDIO_PARAM_RATYPE; - - -/** SBC Allocation Method Type */ -typedef enum OMX_AUDIO_SBCALLOCMETHODTYPE { - OMX_AUDIO_SBCAllocMethodLoudness, /**< Loudness allocation method */ - OMX_AUDIO_SBCAllocMethodSNR, /**< SNR allocation method */ - OMX_AUDIO_SBCAllocMethodKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_SBCAllocMethodVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_SBCAllocMethodMax = 0x7FFFFFFF -} OMX_AUDIO_SBCALLOCMETHODTYPE; - - -/** SBC params */ -typedef struct OMX_AUDIO_PARAM_SBCTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nBlocks; /**< Number of blocks */ - OMX_U32 nSubbands; /**< Number of subbands */ - OMX_U32 nBitPool; /**< Bitpool value */ - OMX_BOOL bEnableBitrate; /**< Use bitrate value instead of bitpool */ - OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ - OMX_AUDIO_SBCALLOCMETHODTYPE eSBCAllocType; /**< SBC Allocation method type */ -} OMX_AUDIO_PARAM_SBCTYPE; - - -/** ADPCM stream format parameters */ -typedef struct OMX_AUDIO_PARAM_ADPCMTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_U32 nBitsPerSample; /**< Number of bits in each sample */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ -} OMX_AUDIO_PARAM_ADPCMTYPE; - - -/** G723 rate */ -typedef enum OMX_AUDIO_G723RATE { - OMX_AUDIO_G723ModeUnused = 0, /**< AMRNB Mode unused / unknown */ - OMX_AUDIO_G723ModeLow, /**< 5300 bps */ - OMX_AUDIO_G723ModeHigh, /**< 6300 bps */ - OMX_AUDIO_G723ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_G723ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_G723ModeMax = 0x7FFFFFFF -} OMX_AUDIO_G723RATE; - - -/** G723 - Sample rate must be 8 KHz */ -typedef struct OMX_AUDIO_PARAM_G723TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_AUDIO_G723RATE eBitRate; /**< todo: Should this be moved to a config? */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ - OMX_BOOL bPostFilter; /**< Enable Post Filter */ -} OMX_AUDIO_PARAM_G723TYPE; - - -/** ITU G726 (ADPCM) rate */ -typedef enum OMX_AUDIO_G726MODE { - OMX_AUDIO_G726ModeUnused = 0, /**< G726 Mode unused / unknown */ - OMX_AUDIO_G726Mode16, /**< 16 kbps */ - OMX_AUDIO_G726Mode24, /**< 24 kbps */ - OMX_AUDIO_G726Mode32, /**< 32 kbps, most common rate, also G721 */ - OMX_AUDIO_G726Mode40, /**< 40 kbps */ - OMX_AUDIO_G726ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_G726ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_G726ModeMax = 0x7FFFFFFF -} OMX_AUDIO_G726MODE; - - -/** G.726 stream format parameters - must be at 8KHz */ -typedef struct OMX_AUDIO_PARAM_G726TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_G726MODE eG726Mode; -} OMX_AUDIO_PARAM_G726TYPE; - - -/** G729 coder type */ -typedef enum OMX_AUDIO_G729TYPE { - OMX_AUDIO_G729 = 0, /**< ITU G.729 encoded data */ - OMX_AUDIO_G729A, /**< ITU G.729 annex A encoded data */ - OMX_AUDIO_G729B, /**< ITU G.729 with annex B encoded data */ - OMX_AUDIO_G729AB, /**< ITU G.729 annexes A and B encoded data */ - OMX_AUDIO_G729KhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_G729VendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_G729Max = 0x7FFFFFFF -} OMX_AUDIO_G729TYPE; - - -/** G729 stream format parameters - fixed 6KHz sample rate */ -typedef struct OMX_AUDIO_PARAM_G729TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_AUDIO_G729TYPE eBitType; -} OMX_AUDIO_PARAM_G729TYPE; - - -/** AMR Frame format */ -typedef enum OMX_AUDIO_AMRFRAMEFORMATTYPE { - OMX_AUDIO_AMRFrameFormatConformance = 0, /**< Frame Format is AMR Conformance - (Standard) Format */ - OMX_AUDIO_AMRFrameFormatIF1, /**< Frame Format is AMR Interface - Format 1 */ - OMX_AUDIO_AMRFrameFormatIF2, /**< Frame Format is AMR Interface - Format 2*/ - OMX_AUDIO_AMRFrameFormatFSF, /**< Frame Format is AMR File Storage - Format */ - OMX_AUDIO_AMRFrameFormatRTPPayload, /**< Frame Format is AMR Real-Time - Transport Protocol Payload Format */ - OMX_AUDIO_AMRFrameFormatITU, /**< Frame Format is ITU Format (added at Motorola request) */ - OMX_AUDIO_AMRFrameFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AMRFrameFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AMRFrameFormatMax = 0x7FFFFFFF -} OMX_AUDIO_AMRFRAMEFORMATTYPE; - - -/** AMR band mode */ -typedef enum OMX_AUDIO_AMRBANDMODETYPE { - OMX_AUDIO_AMRBandModeUnused = 0, /**< AMRNB Mode unused / unknown */ - OMX_AUDIO_AMRBandModeNB0, /**< AMRNB Mode 0 = 4750 bps */ - OMX_AUDIO_AMRBandModeNB1, /**< AMRNB Mode 1 = 5150 bps */ - OMX_AUDIO_AMRBandModeNB2, /**< AMRNB Mode 2 = 5900 bps */ - OMX_AUDIO_AMRBandModeNB3, /**< AMRNB Mode 3 = 6700 bps */ - OMX_AUDIO_AMRBandModeNB4, /**< AMRNB Mode 4 = 7400 bps */ - OMX_AUDIO_AMRBandModeNB5, /**< AMRNB Mode 5 = 7950 bps */ - OMX_AUDIO_AMRBandModeNB6, /**< AMRNB Mode 6 = 10200 bps */ - OMX_AUDIO_AMRBandModeNB7, /**< AMRNB Mode 7 = 12200 bps */ - OMX_AUDIO_AMRBandModeWB0, /**< AMRWB Mode 0 = 6600 bps */ - OMX_AUDIO_AMRBandModeWB1, /**< AMRWB Mode 1 = 8850 bps */ - OMX_AUDIO_AMRBandModeWB2, /**< AMRWB Mode 2 = 12650 bps */ - OMX_AUDIO_AMRBandModeWB3, /**< AMRWB Mode 3 = 14250 bps */ - OMX_AUDIO_AMRBandModeWB4, /**< AMRWB Mode 4 = 15850 bps */ - OMX_AUDIO_AMRBandModeWB5, /**< AMRWB Mode 5 = 18250 bps */ - OMX_AUDIO_AMRBandModeWB6, /**< AMRWB Mode 6 = 19850 bps */ - OMX_AUDIO_AMRBandModeWB7, /**< AMRWB Mode 7 = 23050 bps */ - OMX_AUDIO_AMRBandModeWB8, /**< AMRWB Mode 8 = 23850 bps */ - OMX_AUDIO_AMRBandModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AMRBandModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AMRBandModeMax = 0x7FFFFFFF -} OMX_AUDIO_AMRBANDMODETYPE; - - -/** AMR Discontinuous Transmission mode */ -typedef enum OMX_AUDIO_AMRDTXMODETYPE { - OMX_AUDIO_AMRDTXModeOff = 0, /**< AMR Discontinuous Transmission Mode is disabled */ - OMX_AUDIO_AMRDTXModeOnVAD1, /**< AMR Discontinuous Transmission Mode using - Voice Activity Detector 1 (VAD1) is enabled */ - OMX_AUDIO_AMRDTXModeOnVAD2, /**< AMR Discontinuous Transmission Mode using - Voice Activity Detector 2 (VAD2) is enabled */ - OMX_AUDIO_AMRDTXModeOnAuto, /**< The codec will automatically select between - Off, VAD1 or VAD2 modes */ - - OMX_AUDIO_AMRDTXasEFR, /**< DTX as EFR instead of AMR standard (3GPP 26.101, frame type =8,9,10) */ - - OMX_AUDIO_AMRDTXModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AMRDTXModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AMRDTXModeMax = 0x7FFFFFFF -} OMX_AUDIO_AMRDTXMODETYPE; - - -/** AMR params */ -typedef struct OMX_AUDIO_PARAM_AMRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate read only field */ - OMX_AUDIO_AMRBANDMODETYPE eAMRBandMode; /**< AMR Band Mode enumeration */ - OMX_AUDIO_AMRDTXMODETYPE eAMRDTXMode; /**< AMR DTX Mode enumeration */ - OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat; /**< AMR frame format enumeration */ -} OMX_AUDIO_PARAM_AMRTYPE; - - -/** GSM_FR (ETSI 06.10, 3GPP 46.010) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_GSMFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_GSMFRTYPE; - - -/** GSM-HR (ETSI 06.20, 3GPP 46.020) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_GSMHRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_GSMHRTYPE; - - -/** GSM-EFR (ETSI 06.60, 3GPP 46.060) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_GSMEFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_GSMEFRTYPE; - - -/** TDMA FR (TIA/EIA-136-420, VSELP 7.95kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_TDMAFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_TDMAFRTYPE; - - -/** TDMA EFR (TIA/EIA-136-410, ACELP 7.4kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_TDMAEFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_TDMAEFRTYPE; - - -/** PDC FR ( RCR-27, VSELP 6.7kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_PDCFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_PDCFRTYPE; - - -/** PDC EFR ( RCR-27, ACELP 6.7kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_PDCEFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_PDCEFRTYPE; - -/** PDC HR ( RCR-27, PSI-CELP 3.45kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_PDCHRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_PDCHRTYPE; - - -/** CDMA Rate types */ -typedef enum OMX_AUDIO_CDMARATETYPE { - OMX_AUDIO_CDMARateBlank = 0, /**< CDMA encoded frame is blank */ - OMX_AUDIO_CDMARateFull, /**< CDMA encoded frame in full rate */ - OMX_AUDIO_CDMARateHalf, /**< CDMA encoded frame in half rate */ - OMX_AUDIO_CDMARateQuarter, /**< CDMA encoded frame in quarter rate */ - OMX_AUDIO_CDMARateEighth, /**< CDMA encoded frame in eighth rate (DTX)*/ - OMX_AUDIO_CDMARateErasure, /**< CDMA erasure frame */ - OMX_AUDIO_CDMARateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_CDMARateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_CDMARateMax = 0x7FFFFFFF -} OMX_AUDIO_CDMARATETYPE; - - -/** QCELP8 (TIA/EIA-96, up to 8kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_QCELP8TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */ -} OMX_AUDIO_PARAM_QCELP8TYPE; - - -/** QCELP13 ( CDMA, EIA/TIA-733, 13.3kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_QCELP13TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */ -} OMX_AUDIO_PARAM_QCELP13TYPE; - - -/** EVRC ( CDMA, EIA/TIA-127, RCELP up to 8.55kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_EVRCTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< actual Frame rate */ - OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this frame */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */ - OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter */ - OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-processing */ - OMX_BOOL bPostFilter; /**< Enable decoder's post Filter */ -} OMX_AUDIO_PARAM_EVRCTYPE; - - -/** SMV ( up to 8.55kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_SMVTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ - OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this frame */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 ??*/ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 ??*/ - OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter ??*/ - OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-processing */ - OMX_BOOL bPostFilter; /**< Enable decoder's post Filter ??*/ -} OMX_AUDIO_PARAM_SMVTYPE; - - -/** MIDI Format - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDIFORMATTYPE -{ - OMX_AUDIO_MIDIFormatUnknown = 0, /**< MIDI Format unknown or don't care */ - OMX_AUDIO_MIDIFormatSMF0, /**< Standard MIDI File Type 0 */ - OMX_AUDIO_MIDIFormatSMF1, /**< Standard MIDI File Type 1 */ - OMX_AUDIO_MIDIFormatSMF2, /**< Standard MIDI File Type 2 */ - OMX_AUDIO_MIDIFormatSPMIDI, /**< SP-MIDI */ - OMX_AUDIO_MIDIFormatXMF0, /**< eXtensible Music Format type 0 */ - OMX_AUDIO_MIDIFormatXMF1, /**< eXtensible Music Format type 1 */ - OMX_AUDIO_MIDIFormatMobileXMF, /**< Mobile XMF (eXtensible Music Format type 2) */ - OMX_AUDIO_MIDIFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDIFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDIFormatMax = 0x7FFFFFFF -} OMX_AUDIO_MIDIFORMATTYPE; - - -/** MIDI params - * @ingroup midi - */ -typedef struct OMX_AUDIO_PARAM_MIDITYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nFileSize; /**< size of the MIDI file in bytes, where the entire - MIDI file passed in, otherwise if 0x0, the MIDI data - is merged and streamed (instead of passed as an - entire MIDI file) */ - OMX_BU32 sMaxPolyphony; /**< Specifies the maximum simultaneous polyphonic - voices. A value of zero indicates that the default - polyphony of the device is used */ - OMX_BOOL bLoadDefaultSound; /**< Whether to load default sound - bank at initialization */ - OMX_AUDIO_MIDIFORMATTYPE eMidiFormat; /**< Version of the MIDI file */ -} OMX_AUDIO_PARAM_MIDITYPE; - - -/** Type of the MIDI sound bank - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDISOUNDBANKTYPE { - OMX_AUDIO_MIDISoundBankUnused = 0, /**< unused/unknown soundbank type */ - OMX_AUDIO_MIDISoundBankDLS1, /**< DLS version 1 */ - OMX_AUDIO_MIDISoundBankDLS2, /**< DLS version 2 */ - OMX_AUDIO_MIDISoundBankMobileDLSBase, /**< Mobile DLS, using the base functionality */ - OMX_AUDIO_MIDISoundBankMobileDLSPlusOptions, /**< Mobile DLS, using the specification-defined optional feature set */ - OMX_AUDIO_MIDISoundBankKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDISoundBankVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDISoundBankMax = 0x7FFFFFFF -} OMX_AUDIO_MIDISOUNDBANKTYPE; - - -/** Bank Layout describes how bank MSB & LSB are used in the DLS instrument definitions sound bank - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE { - OMX_AUDIO_MIDISoundBankLayoutUnused = 0, /**< unused/unknown soundbank type */ - OMX_AUDIO_MIDISoundBankLayoutGM, /**< GS layout (based on bank MSB 0x00) */ - OMX_AUDIO_MIDISoundBankLayoutGM2, /**< General MIDI 2 layout (using MSB 0x78/0x79, LSB 0x00) */ - OMX_AUDIO_MIDISoundBankLayoutUser, /**< Does not conform to any bank numbering standards */ - OMX_AUDIO_MIDISoundBankLayoutKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDISoundBankLayoutVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDISoundBankLayoutMax = 0x7FFFFFFF -} OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE; - - -/** MIDI params to load/unload user soundbank - * @ingroup midi - */ -typedef struct OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nDLSIndex; /**< DLS file index to be loaded */ - OMX_U32 nDLSSize; /**< Size in bytes */ - OMX_PTR pDLSData; /**< Pointer to DLS file data */ - OMX_AUDIO_MIDISOUNDBANKTYPE eMidiSoundBank; /**< Midi sound bank type enumeration */ - OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE eMidiSoundBankLayout; /**< Midi sound bank layout enumeration */ -} OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE; - - -/** Structure for Live MIDI events and MIP messages. - * (MIP = Maximum Instantaneous Polyphony; part of the SP-MIDI standard.) - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nMidiEventSize; /**< Size of immediate MIDI events or MIP message in bytes */ - OMX_U8 nMidiEvents[1]; /**< MIDI event array to be rendered immediately, or an - array for the MIP message buffer, where the size is - indicated by nMidiEventSize */ -} OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE; - - -/** MIDI sound bank/ program pair in a given channel - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nChannel; /**< Valid channel values range from 1 to 16 */ - OMX_U16 nIDProgram; /**< Valid program ID range is 1 to 128 */ - OMX_U16 nIDSoundBank; /**< Sound bank ID */ - OMX_U32 nUserSoundBankIndex;/**< User soundbank index, easier to access soundbanks - by index if multiple banks are present */ -} OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE; - - -/** MIDI control - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDICONTROLTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BS32 sPitchTransposition; /**< Pitch transposition in semitones, stored as Q22.10 - format based on JAVA MMAPI (JSR-135) requirement */ - OMX_BU32 sPlayBackRate; /**< Relative playback rate, stored as Q14.17 fixed-point - number based on JSR-135 requirement */ - OMX_BU32 sTempo ; /**< Tempo in beats per minute (BPM), stored as Q22.10 - fixed-point number based on JSR-135 requirement */ - OMX_U32 nMaxPolyphony; /**< Specifies the maximum simultaneous polyphonic - voices. A value of zero indicates that the default - polyphony of the device is used */ - OMX_U32 nNumRepeat; /**< Number of times to repeat playback */ - OMX_U32 nStopTime; /**< Time in milliseconds to indicate when playback - will stop automatically. Set to zero if not used */ - OMX_U16 nChannelMuteMask; /**< 16 bit mask for channel mute status */ - OMX_U16 nChannelSoloMask; /**< 16 bit mask for channel solo status */ - OMX_U32 nTrack0031MuteMask; /**< 32 bit mask for track mute status. Note: This is for tracks 0-31 */ - OMX_U32 nTrack3263MuteMask; /**< 32 bit mask for track mute status. Note: This is for tracks 32-63 */ - OMX_U32 nTrack0031SoloMask; /**< 32 bit mask for track solo status. Note: This is for tracks 0-31 */ - OMX_U32 nTrack3263SoloMask; /**< 32 bit mask for track solo status. Note: This is for tracks 32-63 */ - -} OMX_AUDIO_CONFIG_MIDICONTROLTYPE; - - -/** MIDI Playback States - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDIPLAYBACKSTATETYPE { - OMX_AUDIO_MIDIPlayBackStateUnknown = 0, /**< Unknown state or state does not map to - other defined states */ - OMX_AUDIO_MIDIPlayBackStateClosedEngaged, /**< No MIDI resource is currently open. - The MIDI engine is currently processing - MIDI events. */ - OMX_AUDIO_MIDIPlayBackStateParsing, /**< A MIDI resource is open and is being - primed. The MIDI engine is currently - processing MIDI events. */ - OMX_AUDIO_MIDIPlayBackStateOpenEngaged, /**< A MIDI resource is open and primed but - not playing. The MIDI engine is currently - processing MIDI events. The transition to - this state is only possible from the - OMX_AUDIO_MIDIPlayBackStatePlaying state, - when the 'playback head' reaches the end - of media data or the playback stops due - to stop time set.*/ - OMX_AUDIO_MIDIPlayBackStatePlaying, /**< A MIDI resource is open and currently - playing. The MIDI engine is currently - processing MIDI events.*/ - OMX_AUDIO_MIDIPlayBackStatePlayingPartially, /**< Best-effort playback due to SP-MIDI/DLS - resource constraints */ - OMX_AUDIO_MIDIPlayBackStatePlayingSilently, /**< Due to system resource constraints and - SP-MIDI content constraints, there is - no audible MIDI content during playback - currently. The situation may change if - resources are freed later.*/ - OMX_AUDIO_MIDIPlayBackStateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDIPlayBackStateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDIPlayBackStateMax = 0x7FFFFFFF -} OMX_AUDIO_MIDIPLAYBACKSTATETYPE; - - -/** MIDI status - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDISTATUSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U16 nNumTracks; /**< Number of MIDI tracks in the file, read only field. - NOTE: May not return a meaningful value until the entire - file is parsed and buffered. */ - OMX_U32 nDuration; /**< The length of the currently open MIDI resource - in milliseconds. NOTE: May not return a meaningful value - until the entire file is parsed and buffered. */ - OMX_U32 nPosition; /**< Current Position of the MIDI resource being played - in milliseconds */ - OMX_BOOL bVibra; /**< Does Vibra track exist? NOTE: May not return a meaningful - value until the entire file is parsed and buffered. */ - OMX_U32 nNumMetaEvents; /**< Total number of MIDI Meta Events in the currently - open MIDI resource. NOTE: May not return a meaningful value - until the entire file is parsed and buffered. */ - OMX_U32 nNumActiveVoices; /**< Number of active voices in the currently playing - MIDI resource. NOTE: May not return a meaningful value until - the entire file is parsed and buffered. */ - OMX_AUDIO_MIDIPLAYBACKSTATETYPE eMIDIPlayBackState; /**< MIDI playback state enumeration, read only field */ -} OMX_AUDIO_CONFIG_MIDISTATUSTYPE; - - -/** MIDI Meta Event structure one per Meta Event. - * MIDI Meta Events are like audio metadata, except that they are interspersed - * with the MIDI content throughout the file and are not localized in the header. - * As such, it is necessary to retrieve information about these Meta Events from - * the engine, as it encounters these Meta Events within the MIDI content. - * For example, SMF files can have up to 14 types of MIDI Meta Events (copyright, - * author, default tempo, etc.) scattered throughout the file. - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nIndex; /**< Index of Meta Event */ - OMX_U8 nMetaEventType; /**< Meta Event Type, 7bits (i.e. 0 - 127) */ - OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */ - OMX_U32 nTrack; /**< track number for the meta event */ - OMX_U32 nPosition; /**< Position of the meta-event in milliseconds */ -} OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE; - - -/** MIDI Meta Event Data structure - one per Meta Event. - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nIndex; /**< Index of Meta Event */ - OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */ - OMX_U8 nData[1]; /**< array of one or more bytes of meta data - as indicated by the nMetaEventSize field */ -} OMX_AUDIO_CONFIG__MIDIMETAEVENTDATATYPE; - - -/** Audio Volume adjustment for a port */ -typedef struct OMX_AUDIO_CONFIG_VOLUMETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's volume. Select the - output port to adjust the master - volume. */ - OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100) - or logarithmic scale (mB) */ - OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range, OR - Volume logarithmic setting for this port. The values - for volume are in mB (millibels = 1/100 dB) relative - to a gain of 1 (e.g. the output is the same as the - input level). Values are in mB from nMax - (maximum volume) to nMin mB (typically negative). - Since the volume is "voltage" - and not a "power", it takes a setting of - -600 mB to decrease the volume by 1/2. If - a component cannot accurately set the - volume to the requested value, it must - set the volume to the closest value BELOW - the requested value. When getting the - volume setting, the current actual volume - must be returned. */ -} OMX_AUDIO_CONFIG_VOLUMETYPE; - - -/** Audio Volume adjustment for a channel */ -typedef struct OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's volume. Select the - output port to adjust the master - volume. */ - OMX_U32 nChannel; /**< channel to select from 0 to N-1, - using OMX_ALL to apply volume settings - to all channels */ - OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100) or - logarithmic scale (mB) */ - OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range, OR - Volume logarithmic setting for this port. - The values for volume are in mB - (millibels = 1/100 dB) relative to a gain - of 1 (e.g. the output is the same as the - input level). Values are in mB from nMax - (maximum volume) to nMin mB (typically negative). - Since the volume is "voltage" - and not a "power", it takes a setting of - -600 mB to decrease the volume by 1/2. If - a component cannot accurately set the - volume to the requested value, it must - set the volume to the closest value BELOW - the requested value. When getting the - volume setting, the current actual volume - must be returned. */ - OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel, - FALSE otherwise */ -} OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE; - - -/** Audio balance setting */ -typedef struct OMX_AUDIO_CONFIG_BALANCETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's balance. Select the - output port to adjust the master - balance. */ - OMX_S32 nBalance; /**< balance setting for this port - (-100 to 100, where -100 indicates - all left, and no right */ -} OMX_AUDIO_CONFIG_BALANCETYPE; - - -/** Audio Port mute */ -typedef struct OMX_AUDIO_CONFIG_MUTETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's mute. Select the - output port to adjust the master - mute. */ - OMX_BOOL bMute; /**< Mute setting for this port */ -} OMX_AUDIO_CONFIG_MUTETYPE; - - -/** Audio Channel mute */ -typedef struct OMX_AUDIO_CONFIG_CHANNELMUTETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannel; /**< channel to select from 0 to N-1, - using OMX_ALL to apply mute settings - to all channels */ - OMX_BOOL bMute; /**< Mute setting for this channel */ - OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel, - FALSE otherwise */ -} OMX_AUDIO_CONFIG_CHANNELMUTETYPE; - - - -/** Enable / Disable for loudness control, which boosts bass and to a - * smaller extent high end frequencies to compensate for hearing - * ability at the extreme ends of the audio spectrum - */ -typedef struct OMX_AUDIO_CONFIG_LOUDNESSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bLoudness; /**< Enable/disable for loudness */ -} OMX_AUDIO_CONFIG_LOUDNESSTYPE; - - -/** Enable / Disable for bass, which controls low frequencies - */ -typedef struct OMX_AUDIO_CONFIG_BASSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for bass control */ - OMX_S32 nBass; /**< bass setting for the port, as a - continuous value from -100 to 100 - (0 means no change in bass level)*/ -} OMX_AUDIO_CONFIG_BASSTYPE; - - -/** Enable / Disable for treble, which controls high frequencies tones - */ -typedef struct OMX_AUDIO_CONFIG_TREBLETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for treble control */ - OMX_S32 nTreble; /**< treble setting for the port, as a - continuous value from -100 to 100 - (0 means no change in treble level) */ -} OMX_AUDIO_CONFIG_TREBLETYPE; - - -/** An equalizer is typically used for two reasons: to compensate for an - * sub-optimal frequency response of a system to make it sound more natural - * or to create intentionally some unnatural coloring to the sound to create - * an effect. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_EQUALIZERTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for equalizer */ - OMX_BU32 sBandIndex; /**< Band number to be set. Upper Limit is - N-1, where N is the number of bands, lower limit is 0 */ - OMX_BU32 sCenterFreq; /**< Center frequecies in Hz. This is a - read only element and is used to determine - the lower, center and upper frequency of - this band. */ - OMX_BS32 sBandLevel; /**< band level in millibels */ -} OMX_AUDIO_CONFIG_EQUALIZERTYPE; - - -/** Stereo widening mode type - * @ingroup effects - */ -typedef enum OMX_AUDIO_STEREOWIDENINGTYPE { - OMX_AUDIO_StereoWideningHeadphones, /**< Stereo widening for loudspeakers */ - OMX_AUDIO_StereoWideningLoudspeakers, /**< Stereo widening for closely spaced loudspeakers */ - OMX_AUDIO_StereoWideningKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_StereoWideningVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_StereoWideningMax = 0x7FFFFFFF -} OMX_AUDIO_STEREOWIDENINGTYPE; - - -/** Control for stereo widening, which is a special 2-channel - * case of the audio virtualizer effect. For example, for 5.1-channel - * output, it translates to virtual surround sound. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for stereo widening control */ - OMX_AUDIO_STEREOWIDENINGTYPE eWideningType; /**< Stereo widening algorithm type */ - OMX_U32 nStereoWidening; /**< stereo widening setting for the port, - as a continuous value from 0 to 100 */ -} OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE; - - -/** The chorus effect (or ``choralizer'') is any signal processor which makes - * one sound source (such as a voice) sound like many such sources singing - * (or playing) in unison. Since performance in unison is never exact, chorus - * effects simulate this by making independently modified copies of the input - * signal. Modifications may include (1) delay, (2) frequency shift, and - * (3) amplitude modulation. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_CHORUSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for chorus */ - OMX_BU32 sDelay; /**< average delay in milliseconds */ - OMX_BU32 sModulationRate; /**< rate of modulation in millihertz */ - OMX_U32 nModulationDepth; /**< depth of modulation as a percentage of - delay (i.e. 0 to 100) */ - OMX_BU32 nFeedback; /**< Feedback from chorus output to input in percentage */ -} OMX_AUDIO_CONFIG_CHORUSTYPE; - - -/** Reverberation is part of the reflected sound that follows the early - * reflections. In a typical room, this consists of a dense succession of - * echoes whose energy decays exponentially. The reverberation effect structure - * as defined here includes both (early) reflections as well as (late) reverberations. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_REVERBERATIONTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for reverberation control */ - OMX_BS32 sRoomLevel; /**< Intensity level for the whole room effect - (i.e. both early reflections and late - reverberation) in millibels */ - OMX_BS32 sRoomHighFreqLevel; /**< Attenuation at high frequencies - relative to the intensity at low - frequencies in millibels */ - OMX_BS32 sReflectionsLevel; /**< Intensity level of early reflections - (relative to room value), in millibels */ - OMX_BU32 sReflectionsDelay; /**< Delay time of the first reflection relative - to the direct path, in milliseconds */ - OMX_BS32 sReverbLevel; /**< Intensity level of late reverberation - relative to room level, in millibels */ - OMX_BU32 sReverbDelay; /**< Time delay from the first early reflection - to the beginning of the late reverberation - section, in milliseconds */ - OMX_BU32 sDecayTime; /**< Late reverberation decay time at low - frequencies, in milliseconds */ - OMX_BU32 nDecayHighFreqRatio; /**< Ratio of high frequency decay time relative - to low frequency decay time in percent */ - OMX_U32 nDensity; /**< Modal density in the late reverberation decay, - in percent (i.e. 0 - 100) */ - OMX_U32 nDiffusion; /**< Echo density in the late reverberation decay, - in percent (i.e. 0 - 100) */ - OMX_BU32 sReferenceHighFreq; /**< Reference high frequency in Hertz. This is - the frequency used as the reference for all - the high-frequency settings above */ - -} OMX_AUDIO_CONFIG_REVERBERATIONTYPE; - - -/** Possible settings for the Echo Cancelation structure to use - * @ingroup effects - */ -typedef enum OMX_AUDIO_ECHOCANTYPE { - OMX_AUDIO_EchoCanOff = 0, /**< Echo Cancellation is disabled */ - OMX_AUDIO_EchoCanNormal, /**< Echo Cancellation normal operation - - echo from plastics and face */ - OMX_AUDIO_EchoCanHFree, /**< Echo Cancellation optimized for - Hands Free operation */ - OMX_AUDIO_EchoCanCarKit, /**< Echo Cancellation optimized for - Car Kit (longer echo) */ - OMX_AUDIO_EchoCanKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_EchoCanVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_EchoCanMax = 0x7FFFFFFF -} OMX_AUDIO_ECHOCANTYPE; - - -/** Enable / Disable for echo cancelation, which removes undesired echo's - * from the audio - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_AUDIO_ECHOCANTYPE eEchoCancelation; /**< Echo cancelation settings */ -} OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE; - - -/** Enable / Disable for noise reduction, which undesired noise from - * the audio - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bNoiseReduction; /**< Enable/disable for noise reduction */ -} OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE; - -/** @} */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/IL/OMX_Broadcom.h b/vc/include/IL/OMX_Broadcom.h @@ -1,2516 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenMAX IL - Broadcom specific types - -#ifndef OMX_Broadcom_h -#define OMX_Broadcom_h - -#include "OMX_Component.h" - -// for use in buffer headers - marks the contained data -// as being a codec header -#define OMX_BUFFERFLAG_TIME_UNKNOWN 0x00000100 - -//for use in buffer headers - marks the buffer as being the -//snapshot preview image from a still capture. -//Mainly to be used with the DisplayFunction callback from camera. -#define OMX_BUFFERFLAG_CAPTURE_PREVIEW 0x00000200 - -/* Mark the end of a NAL unit produced by a video encoder. - */ -#define OMX_BUFFERFLAG_ENDOFNAL 0x00000400 - -/* Marks pBuffer in OMX_BUFFERHEADERTYPE as containing a fragment list instead of the actual buffer - */ -#define OMX_BUFFERFLAG_FRAGMENTLIST 0x00000800 - -/* Marks the start of a new sequence of data following any kind of seek operation. - */ -#define OMX_BUFFERFLAG_DISCONTINUITY 0x00001000 - -/** Codec side information Flag: -* OMX_BUFFERFLAG_CODECSIDEINFO is an optional flag that is set by an -* output port when all bytes in the buffer form part or all of a set of -* codec specific side information. For example, distortion information -* estimated by H.264 encoder can be sent using this flag to signal -* the decoder quality -*/ -#define OMX_BUFFERFLAG_CODECSIDEINFO 0x00002000 - -// for use in buffer headers - indicated the timestamp is a DTS rather than PTS -#define OMX_BUFFERFLAG_TIME_IS_DTS 0x000004000 - -/** - * Macros to convert to <code>OMX_TICKS</code> from a signed 64 bit value and - * vice-versa. These macros don't actually do anything unless <code>OMX_TICKS</code> - * is defined as a two-part structure (instead of a native signed 64-bit type). - **/ -#ifndef OMX_SKIP64BIT - #define omx_ticks_from_s64(s) (s) - #define omx_ticks_to_s64(t) (t) -#else - static inline OMX_TICKS omx_ticks_from_s64(signed long long s) { OMX_TICKS t; t.nLowPart = (OMX_U32)s; t.nHighPart = (OMX_U32)(s>>32); return t; } - #define omx_ticks_to_s64(t) ((t).nLowPart | ((uint64_t)((t).nHighPart) << 32)) -#endif /* OMX_SKIP64BIT */ - -/* Buffer fragment descriptor */ -typedef struct OMX_BUFFERFRAGMENTTYPE { - OMX_PTR pBuffer; /**< Pointer to actual block of memory that is acting as the fragment buffer */ - OMX_U32 nLen; /**< number of bytes in the buffer */ -} OMX_BUFFERFRAGMENTTYPE; - -/* OMX_IndexParamBrcmEnableIJGTableScaling: JPEG Quality Table Setting. */ -typedef struct OMX_PARAM_IJGSCALINGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; -} OMX_PARAM_IJGSCALINGTYPE; -/* -The boolean \code{bEnabled} value determines whether the component uses -the standard IJG quality tables when encoding images. -*/ - - -/* OMX_IndexConfigTimeInvalidStartTime: Invalid Start Times */ -/* -This allows clock clients to supply a start time notification to the -clock whilst indicating that this time is invalid. -*/ - -/* OMX_IndexParamBrcmMaxFrameSkips: Frame timestamp jumps */ -/* -This number represents the number of times a jump in frame timestamps -has been observed that is greater than expected. -*/ - -/* OMX_IndexConfigAsynchronousFailureURI: Asynchronous Failure Filename */ -/* -This allows the client to query for the filename that cause an asynchronous -output error. -*/ - -/* OMX_IndexParamAsynchronousOutput: Asynchronous Output */ -/* -The allows the client to specify to a component that is writing files -that this writing may happen asynchronously, including opening and closing -of files. -*/ - -/* OMX_IndexConfigClockAdjustment: Clock Adjustment */ -/* -This allows the client to read from the clock the total time -adjustment made to the clock whilst running by the reference clock. -If the reference clock sends a time that causes the media time to jump -this difference is added to the total, which can be reported via this -index. When the stream restarts by setting the clock state to -\code{OMX_TIME_ClockStateRunning} or -\code{OMX_TIME_ClockStateWaitingForStartTime} this adjustment total is -set to zero. -*/ - -/* OMX_IndexParamBrcmDataUnit: Data Unit */ -/* -The data unit is an indication to components connected to this -component of the type of data delivery available. -\code{OMX_DataUnitCodedPicture} indicates that we are able to give -framing information, using the \code{OMX_BUFFERFLAG_ENDOFFRAME} flag to -indicate that the data contained finishes a complete -frame. \code{OMX_DataUnitArbitraryStreamSection} indicates that no -end-of-frame markers will be present, and the decoder should perform -the steps necessary to decode the stream. The other enum values are -not used. -*/ - -/* OMX_IndexConfigPresentationOffset: Presentation Offset */ -/* -The value of \code{nTimestamp} is added to the offset requested for -each new input frame. Takes effect for all new input frames, and has -no effect on the offset used for currently-queued frames. A positive -value will make the requested port earlier relative to other streams, -a negative value will make the requested port later relative to other -streams. -*/ - -/* OMX_IndexConfigSingleStep: Single Step */ -/* -When setting this config on a paused clock, where the \code{nU32} -value is non-zero and \code{nPortIndex} is OMX_ALL, the media clock -will advance through the next \code{nU32} next requested media -times. A paused clock is in running state but has a time scale of -0. This will trigger the display of some video frames, so allowing -single-stepping functionality. This config can be set multiple times, -and will buffer up stepping requests until we have media requests to -fulfil, or the clock is stopped or un-paused. - -This config can also be used on some video output ports and, if -\code{nU32} is non-zero, requests that the output port forwards the -next \code{nU32} frames appending an EOS marker on the last frame, and -then ceases to forward data on this port. If \code{nU32} is zero, any -previous request to forward a limited number of frames is cancelled -and the default behaviour of this port will resume. -*/ - -/* OMX_IndexParamCameraCamplusId: Camera Subsystem Identification */ -/* -This parameter allows the configuration of the identifier to be used -to initialise the Broadcom Camplus subsystem that sits beneath the -camera component. If only one instance of the camera component is -used, the default value can be used. If more than one instance is -required, they must each have their own unique values for this -parameter. It is also used to tie the component to the image pool -created with \code{OMX_Set upCamPools}. -*/ - -/* OMX_IndexConfigAudioRenderingLatency: Audio Rendering Latency */ -/* -This config allows the client to query the current latency of audio -rendering. The latency is returned as the number of samples that -an audio rendering component has received but have not been played. -*/ - -/* OMX_IndexConfigBrcmPoolMemAllocSize: Pool memory usage values */ -/* -This config allows the client to query how much memory is being used by -the component for any image pools. -*/ - -/* OMX_IndexConfigDisplayRegion: Display Region */ -typedef enum OMX_DISPLAYTRANSFORMTYPE{ - OMX_DISPLAY_ROT0 = 0, - OMX_DISPLAY_MIRROR_ROT0 = 1, - OMX_DISPLAY_MIRROR_ROT180 = 2, - OMX_DISPLAY_ROT180 = 3, - OMX_DISPLAY_MIRROR_ROT90 = 4, - OMX_DISPLAY_ROT270 = 5, - OMX_DISPLAY_ROT90 = 6, - OMX_DISPLAY_MIRROR_ROT270 = 7, - OMX_DISPLAY_DUMMY = 0x7FFFFFFF -} OMX_DISPLAYTRANSFORMTYPE; - -typedef struct OMX_DISPLAYRECTTYPE { - OMX_S16 x_offset; - OMX_S16 y_offset; - OMX_S16 width; - OMX_S16 height; -} OMX_DISPLAYRECTTYPE; - -typedef enum OMX_DISPLAYMODETYPE { - OMX_DISPLAY_MODE_FILL = 0, - OMX_DISPLAY_MODE_LETTERBOX = 1, - // these allow a left eye source->dest to be specified and the right eye mapping will be inferred by symmetry - OMX_DISPLAY_MODE_STEREO_LEFT_TO_LEFT = 2, - OMX_DISPLAY_MODE_STEREO_TOP_TO_TOP = 3, - OMX_DISPLAY_MODE_STEREO_LEFT_TO_TOP = 4, - OMX_DISPLAY_MODE_STEREO_TOP_TO_LEFT = 5, - OMX_DISPLAY_MODE_DUMMY = 0x7FFFFFFF -} OMX_DISPLAYMODETYPE; - -typedef enum OMX_DISPLAYSETTYPE { - OMX_DISPLAY_SET_NONE = 0, - OMX_DISPLAY_SET_NUM = 1, - OMX_DISPLAY_SET_FULLSCREEN = 2, - OMX_DISPLAY_SET_TRANSFORM = 4, - OMX_DISPLAY_SET_DEST_RECT = 8, - OMX_DISPLAY_SET_SRC_RECT = 0x10, - OMX_DISPLAY_SET_MODE = 0x20, - OMX_DISPLAY_SET_PIXEL = 0x40, - OMX_DISPLAY_SET_NOASPECT = 0x80, - OMX_DISPLAY_SET_LAYER = 0x100, - OMX_DISPLAY_SET_COPYPROTECT = 0x200, - OMX_DISPLAY_SET_ALPHA = 0x400, - OMX_DISPLAY_SET_DUMMY = 0x7FFFFFFF -} OMX_DISPLAYSETTYPE; - -typedef struct OMX_CONFIG_DISPLAYREGIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_DISPLAYSETTYPE set; - OMX_U32 num; - OMX_BOOL fullscreen; - OMX_DISPLAYTRANSFORMTYPE transform; - OMX_DISPLAYRECTTYPE dest_rect; - OMX_DISPLAYRECTTYPE src_rect; - OMX_BOOL noaspect; - OMX_DISPLAYMODETYPE mode; - OMX_U32 pixel_x; - OMX_U32 pixel_y; - OMX_S32 layer; - OMX_BOOL copyprotect_required; - OMX_U32 alpha; - OMX_U32 wfc_context_width; - OMX_U32 wfc_context_height; -} OMX_CONFIG_DISPLAYREGIONTYPE; -/* -This config sets the output display device, as well as the region used -on the output display, any display transformation, and some flags to -indicate how to scale the image. - -The structure uses a bitfield, \code{set}, to indicate which fields are set -and should be used. All other fields will maintain their current -value. - -\code{num} describes the display output device, with 0 typically being -a directly connected LCD display. - -\code{fullscreen} indicates that we are using the full device screen -area, rather than a window of the display. If fullscreen is false, -then dest_rect is used to specify a region of the display to use. - -\code{transform} indicates any rotation or flipping used to map frames -onto the natural display orientation. - -The \code{src_rect} indicates which area of the frame to display. If -all values are zero, the whole frame will be used. - -The \code{noaspect} flag, if set, indicates that any display scaling -should disregard the aspect ratio of the frame region being displayed. - -\code{mode} indicates how the image should be scaled to fit the -display. \code{OMX_DISPLAY_MODE_FILL} indicates that the image should -fill the screen by potentially cropping the frames. Setting -\code{mode} to \code{OMX_DISPLAY_MODE_LETTERBOX} indicates that all -the source region should be displayed and black bars added if -necessary. - -The \code{pixel_x} and \code{pixel_y} values, if non-zero, are used to -describe the size of a source pixel. If values are zero, then pixels -default to being square. - -Set the \code{layer} that the image will appear on with the -\code{layer} field. -*/ - - - -/* OMX_IndexParamSource: Source Image Configuration */ -typedef enum OMX_SOURCETYPE { - OMX_SOURCE_WHITE = 0, // all white images - OMX_SOURCE_BLACK = 1, // all black images - OMX_SOURCE_DIAGONAL = 2, // greyscale diagonal stripes - OMX_SOURCE_NOISE = 3, // random pixel values - OMX_SOURCE_RANDOM = 4, // a shaded random pattern of colours - OMX_SOURCE_COLOUR = 5, // a solid colour determined by nParam - OMX_SOURCE_BLOCKS = 6, // random coloured blocks of 16x16 size - OMX_SOURCE_SWIRLY, // a swirly pattern used for encode testing - OMX_SOURCE_DUMMY = 0x7FFFFFFF -} OMX_SOURCETYPE; - -typedef struct OMX_PARAM_SOURCETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_SOURCETYPE eType; - OMX_U32 nParam; - OMX_U32 nFrameCount; - OMX_U32 xFrameRate; -} OMX_PARAM_SOURCETYPE; -/* -The source type determines the kind of image that is produced. Not all -combinations of source type and image type are supported. The -\code{OMX_SOURCE_SWIRLY} setting can only be used with YUV420 packed -planar image formats. When producing RGB565 image format, the -\code{OMX_SOURCE_DIAGONAL} and \code{OMX_SOURCE_RANDOM} modes are -treated as \code{OMX_SOURCE_NOISE}. - -The \code{nParam} field is used to specify the colour for the source -colour mode, and the offset of the diagonal pattern for diagonal mode. -For the blocks mode, \code{nParam} is used as the seed for the random -colour generator. - -The \code{nFrameCount} parameter determines how many frames to send. -If it is zero, then frames are sent continuously. For any other value, -it counts down until it has sent that many frames, and then stops, -sending out an EOS. The \code{xFrameRate} setting is used to determine -the timestamp for each frame produced, or can be set to zero if -timestamps should all remain at zero. -*/ - -/* OMX_IndexParamSourceSeed: Source Random Seed */ -typedef struct OMX_PARAM_SOURCESEEDTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U16 nData[16]; -} OMX_PARAM_SOURCESEEDTYPE; -/* -This structure sets the current state of the random number generator -used for \code{OMX_SOURCE_RANDOM} source type, allowing repeatable -random image creation. -*/ - -/* OMX_IndexParamResize: Resize Control */ -typedef enum OMX_RESIZEMODETYPE { - OMX_RESIZE_NONE, - OMX_RESIZE_CROP, - OMX_RESIZE_BOX, - OMX_RESIZE_BYTES, - OMX_RESIZE_DUMMY = 0x7FFFFFFF -} OMX_RESIZEMODETYPE; - -typedef struct OMX_PARAM_RESIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_RESIZEMODETYPE eMode; - OMX_U32 nMaxWidth; - OMX_U32 nMaxHeight; - OMX_U32 nMaxBytes; - OMX_BOOL bPreserveAspectRatio; - OMX_BOOL bAllowUpscaling; -} OMX_PARAM_RESIZETYPE; -/* -The mode determines the kind of resize. \code{OMX_RESIZE_BOX} allow -the \code{nMaxWidth} and \code{nMaxHeight} to set a bounding box into -which the output must fit. \code{OMX_RESIZE_BYTES} allows -\code{nMaxBytes} to set the maximum number of bytes into which the -full output frame must fit. Two flags aid the setting of the output -size. \code{bPreseveAspectRatio} sets whether the resize should -preserve the aspect ratio of the incoming -image. \code{bAllowUpscaling} sets whether the resize is allowed to -increase the size of the output image compared to the size of the -input image. -*/ - -typedef struct OMX_PARAM_TESTINTERFACETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bTest; - OMX_BOOL bSetExtra; - OMX_U32 nExtra; - OMX_BOOL bSetError; - OMX_BOOL stateError[2]; -} OMX_PARAM_TESTINTERFACETYPE; - -/* OMX_IndexConfigVisualisation: Visualisation Mode */ -typedef struct OMX_CONFIG_VISUALISATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U8 name[16]; - OMX_U8 property[64]; -} OMX_CONFIG_VISUALISATIONTYPE; - -/* -\code{name} is a string of characters specifying the type of -visualization. The component appends \code{"_vis.vll"} to the name -provided, and attempts to load a visualisation library contained in -this VLL. \code{property} contains configuration parameters and -values, which is interpreted by the visualisation library. Typically -all visualisations will accept a property string containing -\code{'mode=<number>'}, where \code{<number>} may be a random 32 bit -integer in decimal format. If provided, this may select a random mode -from that visualisation library. -*/ - -/* -This parameter is used when creating proprietary communication with -the display component, and provides the display function for passing -images to be displayed, together with a function used to flush all -pending image updates and release all images. -*/ - -/* OMX_IndexConfigBrcmAudioDestination: Audio Destination */ -typedef struct OMX_CONFIG_BRCMAUDIODESTINATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 sName[16]; -} OMX_CONFIG_BRCMAUDIODESTINATIONTYPE; -/* -This config sets the platform-specific audio destination or output -device for audio sink components (e.g. audio_render). - -\code{sName} describes the audio destination, with \code{"local"} -typically being directly connected to headphones. -*/ - -/* OMX_IndexConfigBrcmAudioSource: Audio Source */ -typedef struct OMX_CONFIG_BRCMAUDIOSOURCETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 sName[16]; -} OMX_CONFIG_BRCMAUDIOSOURCETYPE; -/* -This config sets the platform-specific audio source or input device -for audio source components (e.g. audio_capture). - -\code{sName} describes the audio source, with \code{"local"} -typically being directly connected to microphone. -*/ - -/* OMX_IndexConfigBrcmAudioDownmixCoefficients: Audio Downmix Coefficients */ -typedef struct OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 coeff[16]; -} OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS; -/* -This config sets the platform-specific audio downmixing coefficients for the -audio mixer component. The coefficients are 16.16 fixed point. -The even coefficients contribute to the left channel. -The odd coefficients contribute to the right channel. -L' = coeff[0] * sample[N] + coeff[2] * sample[N+1] + coeff[4] * sample[N+2] + coeff[6] * sample[N+3] - + coeff[8] * sample[N+4] + coeff[10] * sample[N+5] + coeff[12] * sample[N+6] + coeff[14] * sample[N+7] -R' = coeff[1] * sample[N] + coeff[3] * sample[N+1] + coeff[5] * sample[N+2] + coeff[7] * sample[N+3] - + coeff[9] * sample[N+4] + coeff[11] * sample[N+5] + coeff[13] * sample[N+6] + coeff[15] * sample[N+7] - -\code{coeff} describes the downmixing coefficients -*/ - -/* OMX_IndexConfigBrcmAudioDownmixCoefficients8x8: Audio Downmix Coefficients */ -typedef struct OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8 { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 coeff[64]; -} OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8; -/* -This config sets the platform-specific audio downmixing coefficients for the -audio mixer component. The coefficients are 16.16 fixed point. -The coefficients are a 8*8 mixing matrix from 8 input channels to 8 outputs channels - -\code{coeff} describes the downmixing coefficients -*/ - -/* OMX_IndexConfigBrcmAudioMaxSample: Maximum sample seen */ -typedef struct OMX_CONFIG_BRCMAUDIOMAXSAMPLE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nMaxSample; - OMX_TICKS nTimeStamp; -} OMX_CONFIG_BRCMAUDIOMAXSAMPLE; -/* -This gets the largest sample produced (after downmixing with OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8) -since this config was last read. The nTimestamp is the earliest timestamp processed. -This can be used for DRC schemes - -\code{coeff} maximum sample seen in current block -*/ - -/* OMX_IndexConfigPlayMode: Play Mode */ -typedef enum OMX_PLAYMODETYPE { - OMX_PLAYMODE_NORMAL, - OMX_PLAYMODE_FF, - OMX_PLAYMODE_REW, - OMX_PLAYMODE_DUMMY = 0x7FFFFFFF -} OMX_PLAYMODETYPE; - -typedef struct OMX_CONFIG_PLAYMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_PLAYMODETYPE eMode; -} OMX_CONFIG_PLAYMODETYPE; -/* -The playmode affects which frames are extracted from the media file -and passed on the output ports. \code{OMX_PLAYMODE_NORMAL} will -extract all frames, \code{OMX_PLAYMODE_FF} extracts only IDR frames -when video is present, or only occasional packets of audio if no video -is present. \code{OMX_PLAYMODE_REW} is similar to -\code{OMX_PLAYMODE_FF} but extracts packets in reverse time -order. -*/ - -typedef enum OMX_DELIVERYFORMATTYPE { - OMX_DELIVERYFORMAT_STREAM, // no framing information is known - OMX_DELIVERYFORMAT_SINGLE_PACKET, // packetised, at most one frame per buffer - OMX_DELIVERYFORMAT_DUMMY = 0x7FFFFFFF -} OMX_DELIVERYFORMATTYPE; - -typedef struct OMX_PARAM_DELIVERYFORMATTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_DELIVERYFORMATTYPE eFormat; -} OMX_PARAM_DELIVERYFORMATTYPE; - -/* OMX_IndexParamCodecConfig: Codec Configuration */ - -typedef struct OMX_PARAM_CODECCONFIGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 bCodecConfigIsComplete; - OMX_U8 nData[1]; -} OMX_PARAM_CODECCONFIGTYPE; - -/* -This parameter contains opaque data in a format specified by Broadcom -and allows out-of-band information such as cropping rectangles, aspect -ratio information, codec-specific header bytes, and other essential -information to be passed between connected components. - -\code{bCodecConfigIsCompete} specifies if the codec config is fully -contained in here and there is no need to wait for OMX_BUFFERFLAG_CODECCONFIG -buffers -*/ - -typedef struct OMX_PARAM_STILLSFUNCTIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bBuffer; - OMX_PTR (*pOpenFunc)(void); - OMX_PTR (*pCloseFunc)(void); - OMX_PTR (*pReadFunc)(void); - OMX_PTR (*pSeekFunc)(void); - OMX_PTR (*pWriteFunc)(void); -} OMX_PARAM_STILLSFUNCTIONTYPE; - -typedef void* OMX_BUFFERADDRESSHANDLETYPE; - -typedef struct OMX_PARAM_BUFFERADDRESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nAllocLen; - OMX_BUFFERADDRESSHANDLETYPE handle; -} OMX_PARAM_BUFFERADDRESSTYPE; - -typedef struct OMX_PARAM_TUNNELSETUPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_TUNNELSETUPTYPE sSetup; -} OMX_PARAM_TUNNELSETUPTYPE; - -/* OMX_IndexParamBrcmPortEGL: Used for querying whether a port is an EGL port or not. */ -typedef struct OMX_PARAM_BRCMPORTEGLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bPortIsEGL; -} OMX_PARAM_BRCMPORTEGLTYPE; -/* -*/ - -#define OMX_CONFIG_IMAGEFILTERPARAMS_MAXPARAMS 6 -/* OMX_IndexConfigCommonImageFilterParameters: Parameterized Image Filter */ -typedef struct OMX_CONFIG_IMAGEFILTERPARAMSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGEFILTERTYPE eImageFilter; - OMX_U32 nNumParams; - OMX_U32 nParams[OMX_CONFIG_IMAGEFILTERPARAMS_MAXPARAMS]; -} OMX_CONFIG_IMAGEFILTERPARAMSTYPE; -/* -This structure contains optional parameters for some image -filters. The following table lists all image filters that support -parameters. - -<table border="1" cellspacing="0" cellpadding="2"> -<tr><td>Filter<td>Parameters<td>Notes - -<tr><td>\code{OMX_ImageFilterSolarize} -<td>\code{[x0 y0 y1 y2]} -<td>Linear mapping of \code{[0,x0]} to \code{[0,y0>]} -and \code{[x0,255]} to \code{[y1,y2]}. -Default is \code{"128 128 128 0"}. - -<tr><td>\code{OMX_ImageFilterSharpen} -<td>\code{[sz [str [th]]} -<td>\code{sz} size of filter, either 1 or 2. -\code{str} strength of filter. -\code{th} threshold of filter. -Default is \code{"1 40 20"}. - -<tr><td>\code{OMX_ImageFilterFilm} -<td>\code{[[str] [u v]]} -<td>\code{str} strength of effect. -\code{u} sets u to constant value. -\code{v} sets v to constant value. -Default is \code{"24"}. - -<tr><td>\code{OMX_ImageFilterBlur} -<td>\code{[sz]} -<td>\code{sz} size of filter, either 1 or 2. -Default is \code{"2"}. - -<tr><td>\code{OMX_ImageFilterSaturation} -<td>\code{[str]} -<td>\code{str} strength of effect, in 8.8 fixed point format. u/v value -differences from 128 are multiplied by \code{str}. -Default is \code{"272"}. -</table> -*/ - - -/* OMX_IndexConfigTransitionControl: Transition Control */ -typedef struct OMX_CONFIG_TRANSITIONCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nPosStart; - OMX_U32 nPosEnd; - OMX_S32 nPosIncrement; - OMX_TICKS nFrameIncrement; - OMX_BOOL bSwapInputs; - OMX_U8 name[16]; - OMX_U8 property[64]; -} OMX_CONFIG_TRANSITIONCONTROLTYPE; -/* -This structure represents the internal configuration of the -transition. Transitions are generated by a loadable plug-in described -by the \code{name} field. The component appends \code{"_tran.vll"} to -the name provided, and attempts to load a transition library contained -in this VLL. The exact type of transition is configured in a -plug-in-dependent manner with the \code{property} field. All plug-ins -should accept a \code{property} field equal to -\code{"flags=<number>"}, where \code{<number>} can be a random 32 bit -number. If \code{bSwapInputs} is false, then the start image is on -port 210, the stop image on port 211. These are reversed if -\code{bSwapInputs} is true. - -Transition frames are generated from the plug-in by referencing a -frame position in [0,65536], where position 0 is the start image, -position 65536 is the stop image. The first frame position generated -is \code{nPosStart}. The last frame position generated is -\code{nPosEnd}. Each frame will increment the position by -\code{nPosIncrement}. The timestamp attached to each frame will -increment by \code{nFrameIncrement}. -*/ - - -/* -This parameter is used to provide a callback function pointer for -release events. It is used for internal clients on VideoCore. -*/ - - -/* OMX_IndexConfigAudioMonoTrackControl: Dual Mono Control */ -typedef enum OMX_AUDIOMONOTRACKOPERATIONSTYPE { - OMX_AUDIOMONOTRACKOPERATIONS_NOP, - OMX_AUDIOMONOTRACKOPERATIONS_L_TO_R, - OMX_AUDIOMONOTRACKOPERATIONS_R_TO_L, - OMX_AUDIOMONOTRACKOPERATIONS_DUMMY = 0x7FFFFFFF -} OMX_AUDIOMONOTRACKOPERATIONSTYPE ; - -typedef struct OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_AUDIOMONOTRACKOPERATIONSTYPE eMode; -} OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE; -/* -This config controls the options to support dual mono audio -streams. The output can be unchanged, or the left channel copied over -the right channel, or the right channel copied over the left -channel. This config can be applied at any time with stereo -16-bit-per-sample data. Since audio output is typically buffered, any -change will not be audible until that buffering has been played out. -*/ - -/* OMX_IndexParamCameraImagePool: Camera Image Pools */ -typedef enum OMX_CAMERAIMAGEPOOLINPUTMODETYPE { - OMX_CAMERAIMAGEPOOLINPUTMODE_ONEPOOL, /*All input images are allocated from one pool - Works for simple stills capture use cases - Can not be used with parallel stills capture - and video encode, as the pool will be sized for - capture or viewfinder, not both simultaneously. - The pool wouldn't divide sensibly in this mode - anyway. - */ - OMX_CAMERAIMAGEPOOLINPUTMODE_TWOPOOLS, /*All stills & video input images are allocated - from two seperate pools. - This ensures that parallel capture can work, but - would consume more memory if used on a simple - stills capture use case. - */ -} OMX_CAMERAIMAGEPOOLINPUTMODETYPE; - -typedef struct OMX_PARAM_CAMERAIMAGEPOOLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nNumHiResVideoFrames; - OMX_U32 nHiResVideoWidth; - OMX_U32 nHiResVideoHeight; - OMX_COLOR_FORMATTYPE eHiResVideoType; - OMX_U32 nNumHiResStillsFrames; - OMX_U32 nHiResStillsWidth; - OMX_U32 nHiResStillsHeight; - OMX_COLOR_FORMATTYPE eHiResStillsType; - OMX_U32 nNumLoResFrames; - OMX_U32 nLoResWidth; - OMX_U32 nLoResHeight; - OMX_COLOR_FORMATTYPE eLoResType; - OMX_U32 nNumSnapshotFrames; - OMX_COLOR_FORMATTYPE eSnapshotType; - OMX_CAMERAIMAGEPOOLINPUTMODETYPE eInputPoolMode; - OMX_U32 nNumInputVideoFrames; - OMX_U32 nInputVideoWidth; - OMX_U32 nInputVideoHeight; - OMX_COLOR_FORMATTYPE eInputVideoType; - OMX_U32 nNumInputStillsFrames; - OMX_U32 nInputStillsWidth; - OMX_U32 nInputStillsHeight; - OMX_COLOR_FORMATTYPE eInputStillsType; -} OMX_PARAM_CAMERAIMAGEPOOLTYPE; -/* -\sloppy This parameter specifies the size, type, and number, of images to -allow in the images pools required by Camplus. Supported types are -\code{OMX_COLOR_FormatYUV420PackedPlanar}, -\code{OMX_COLOR_FormatYUV422PackedPlanar}, -\code{OMX_COLOR_FormatRawBayer8bit}, -\code{OMX_COLOR_FormatRawBayer10bit}, -\code{OMX_COLOR_FormatRawBayer8bitcompressed}, and 0 (reserved for the -Broadcom-specific format required by the video encoder). The input -pool width, height, and type can be set as 0 to make the component -query Camplus for the sensor mode that would correspond to the largest -of the viewfinder port definition, the capture port definition, or the -high resolution image pool. -*/ - -/* OMX_IndexParamImagePoolSize: Specifying Image Pool Properties */ -typedef struct OMX_PARAM_IMAGEPOOLSIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 width; - OMX_U32 height; - OMX_U32 num_pages; -} OMX_PARAM_IMAGEPOOLSIZETYPE; -/* -This parameter is used to control the size of pool that the component -will allocate in the absence of setting an external pool. The default -can be reset by setting this parameter with all three fields set to -zero. -*/ - - -/* OMX_IndexParamImagePoolExternal: Client Allocated Image Pools */ -struct opaque_vc_pool_s; -typedef struct opaque_vc_pool_s OMX_BRCM_POOL_T; - -typedef struct OMX_PARAM_IMAGEPOOLEXTERNALTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BRCM_POOL_T *image_pool; - OMX_BRCM_POOL_T *image_pool2; - OMX_BRCM_POOL_T *image_pool3; - OMX_BRCM_POOL_T *image_pool4; - OMX_BRCM_POOL_T *image_pool5; -} OMX_PARAM_IMAGEPOOLEXTERNALTYPE; -/* -This config allows the client to pass in handles to pre-allocated -image pools for use within the component. -*/ - - -struct _IL_FIFO_T; -typedef struct OMX_PARAM_RUTILFIFOINFOTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - struct _IL_FIFO_T *pILFifo; -} OMX_PARAM_RUTILFIFOINFOTYPE; - -/* OMX_IndexParamILFifoConfig: Allows configuration of the FIFO settings. */ -typedef struct OMX_PARAM_ILFIFOCONFIG { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nDataSize; /**< The size of the FIFO's data area */ - OMX_U32 nHeaderCount; /**< The number of headers allocated */ -} OMX_PARAM_ILFIFOCONFIG; -/** - * Allows configuring the size of the ILFIFO used in a component. - */ - -/* OMX_IndexConfigCameraSensorModes: Camera Sensor Mode */ -typedef struct OMX_CONFIG_CAMERASENSORMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nModeIndex; - OMX_U32 nNumModes; - OMX_U32 nWidth; - OMX_U32 nHeight; - OMX_U32 nPaddingRight; - OMX_U32 nPaddingDown; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_U32 nFrameRateMax; - OMX_U32 nFrameRateMin; -} OMX_CONFIG_CAMERASENSORMODETYPE; -/* -This parameter is used by clients to determine the sensor mode, and -hence the memory usage, of the camera module. This is primarily used -for determining the size of the input image pool. - -It can be used in two ways dependent on \code{nPortIndex}. If -\code{nPortIndex} is \code{OMX_ALL}, it returns the sensor mode -corresponding to \code{nModeIndex}, and the number of modes in -\code{nNumModes}. If \code{nModeIndex} is greater than or equal to -\code{nNumModes} only \code{nNumModes} is returned. If -\code{nPortIndex} is equal to a camera video output port index, it -returns the sensor mode that would be selected for the values -currently in \code{OMX_IndexParamPortDefinition} for that port. - -The \code{nPaddingRight} and \code{nPaddingDown} values determine the -extra padding the sensor adds to the image. These values must be added -to \code{nWidth} and \code{nHeight} respectively if the client is -specifying the input image pool size. -*/ - -typedef struct OMX_BRCMBUFFERSTATSTYPE { - OMX_U32 nOrdinal; - OMX_TICKS nTimeStamp; - OMX_U32 nFilledLen; - OMX_U32 nFlags; - union - { - OMX_U32 nU32; - struct - { - OMX_U32 nYpart; - OMX_U32 nUVpart; - } image; - } crc; -} OMX_BRCMBUFFERSTATSTYPE; - -/* -Ports that gather statistics for debugging and diagnostics -might also collect information about buffer header fields -and data. - -Note that: - -The \code{nOrdinal} field increases monotonically whenever -a new buffer is received or emitted and shall not be reset -upon a port flush. - -The \code{nFilledLen} might indicate the size of a data area -larger than the data area that actually contributed to the -checksums (e.g. when image data is provided with cropping -information). -*/ - -/* OMX_IndexConfigBrcmPortBufferStats: Query port buffer stats history */ -typedef struct OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nCount; - OMX_BRCMBUFFERSTATSTYPE sData[1]; -} OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE; -/* -Ports that gather statistics for debugging and diagnostics -might also collect information about buffer header fields -and data. - -The \code{sStatsData} field is a variable length array and -the number of items is denoted by \code{nStatsCount}. -*/ - -/* OMX_IndexConfigBrcmPortStats: Query port statistics */ -typedef struct OMX_CONFIG_BRCMPORTSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nImageCount; - OMX_U32 nBufferCount; - OMX_U32 nFrameCount; - OMX_U32 nFrameSkips; - OMX_U32 nDiscards; - OMX_U32 nEOS; - OMX_U32 nMaxFrameSize; - - OMX_TICKS nByteCount; - OMX_TICKS nMaxTimeDelta; - OMX_U32 nCorruptMBs; /**< Number of corrupt macroblocks in the stream */ -} OMX_CONFIG_BRCMPORTSTATSTYPE; -/* -Some ports gather various statistics that can be used by clients for -debugging purposes. This structure is the set of all statistics that -are gathered. - -The \code{nFrameSkips} field indicates the number of frames that did -not have an expected PTS value based on the port frame rate. - -The \code{nByteCount} field is a 64 bit value, that will either use a -64 bit type or two 32 bit types, similarly to \code{OMX_TICKS}. -*/ - -/* OMX_IndexConfigBrcmClockMissCount: Missed clock request accounting */ -/* -For each port on the clock component, requests for media times may be -made. These are typically done one per video frame to allow for -scheduling the display of that frame at the correct time. If a -request is made after the time has occured, then that frame will be -displayed late, and the clock component keeps a per-port record of the -number of times this occurs. This record can be read using this -index. -*/ - -typedef struct OMX_CONFIG_BRCMCAMERASTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nOutFrameCount; - OMX_U32 nDroppedFrameCount; -} OMX_CONFIG_BRCMCAMERASTATSTYPE; - -// for backward compatibility -typedef struct OMX_CONFIG_BRCMCAMERASTATSTYPE OMX_CONFIG_BRCMCAMERASTATS; - - -#define OMX_BRCM_MAXIOPERFBANDS 10 -typedef struct { - OMX_U32 count[OMX_BRCM_MAXIOPERFBANDS]; - OMX_U32 num[OMX_BRCM_MAXIOPERFBANDS]; -} OMX_BRCM_PERFSTATS; - -/* OMX_IndexConfigBrcmIOPerfStats: Query I/O performance statistics */ -typedef struct OMX_CONFIG_BRCMIOPERFSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnabled; /**< Enable/disable I/O performance statistics */ - OMX_BRCM_PERFSTATS write; /**< count:bytes num:microseconds */ - OMX_BRCM_PERFSTATS flush; /**< count:frequency num:microseconds waiting to flush data */ - OMX_BRCM_PERFSTATS wait; /**< count:frequency num:microseconds waiting in calling function */ -} OMX_CONFIG_BRCMIOPERFSTATSTYPE; -/* -A sink component can gather various statistics about I/O (eg. file media) performance that can be used by -clients for debugging purposes. The \code{bEnabled} field is used to turn the gathering of statistics -on/off. -*/ - -typedef struct OMX_CONFIG_SHARPNESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nSharpness; -} OMX_CONFIG_SHARPNESSTYPE; - -/* OMX_IndexConfigCommonFlickerCancellation: Flicker cancellation */ -typedef enum OMX_COMMONFLICKERCANCELTYPE { - OMX_COMMONFLICKERCANCEL_OFF, - OMX_COMMONFLICKERCANCEL_AUTO, - OMX_COMMONFLICKERCANCEL_50, - OMX_COMMONFLICKERCANCEL_60, - OMX_COMMONFLICKERCANCEL_DUMMY = 0x7FFFFFFF -} OMX_COMMONFLICKERCANCELTYPE; - -typedef struct OMX_CONFIG_FLICKERCANCELTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_COMMONFLICKERCANCELTYPE eFlickerCancel; -} OMX_CONFIG_FLICKERCANCELTYPE; -/* -Query / set the flicker cancellation frequency. Values are defined for Off, -50Hz, 60Hz, or auto. The method for auto detecting the flicker frequency is -not defined, and currently results in the feature being turned off. -*/ - -/* OMX_IndexConfigCommonRedEyeRemoval: Red eye removal/reduction */ -typedef enum OMX_REDEYEREMOVALTYPE { - OMX_RedEyeRemovalNone, /**< No red eye removal */ - OMX_RedEyeRemovalOn, /**< Red eye removal on */ - OMX_RedEyeRemovalAuto, /**< Red eye removal will be done automatically when detected */ - OMX_RedEyeRemovalKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_RedEyeRemovalVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_RedEyeRemovalSimple, /**< Use simple red eye reduction mechanism if supported by algorithm */ - OMX_RedEyeRemovalMax = 0x7FFFFFFF -} OMX_REDEYEREMOVALTYPE; - -typedef struct OMX_CONFIG_REDEYEREMOVALTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_REDEYEREMOVALTYPE eMode; -} OMX_CONFIG_REDEYEREMOVALTYPE; -/* - Configures the red eye reduction algorithm in the camera processing - pipeline. The stage is only enabled if the flash mode is not FlashOff. - The OMX_RedEyeRemovalSimple mode requests that the algorithm uses a - reduced complexity algorithm to reduce the processing time. -*/ - - -typedef enum OMX_FACEDETECTIONCONTROLTYPE { - OMX_FaceDetectionControlNone, /**< Disables face detection */ - OMX_FaceDetectionControlOn, /**< Enables face detection */ - OMX_FaceDetectionControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_FaceDetectionControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_FaceDetectionControlMax = 0x7FFFFFFF -} OMX_FACEDETECTIONCONTROLTYPE; - -typedef struct OMX_CONFIG_FACEDETECTIONCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_FACEDETECTIONCONTROLTYPE eMode; - OMX_U32 nFrames; /**< number of frames to apply this setting for, - 0 for unlimited */ - OMX_U32 nMaxRegions; /**< maximum number of regions to detect, 0 for unlimited */ - OMX_U32 nQuality; /**< hint for algorithmic complexity, range is 0-100. - 0 for simplest algorithm, 100 for best quality */ -} OMX_CONFIG_FACEDETECTIONCONTROLTYPE; - -typedef enum OMX_FACEREGIONFLAGSTYPE { - OMX_FaceRegionFlagsNone = 0, - OMX_FaceRegionFlagsBlink = 1, - OMX_FaceRegionFlagsSmile = 2, - OMX_FaceRegionFlagsKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_FaceRegionFlagsVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_FaceRegionFlagsMax = 0x7FFFFFFF -} OMX_FACEREGIONFLAGSTYPE; - -typedef struct OMX_FACEREGIONTYPE { - OMX_S16 nLeft; /**< X Coordinate of the top left corner of the rectangle */ - OMX_S16 nTop; /**< Y Coordinate of the top left corner of the rectangle */ - OMX_U16 nWidth; /**< Width of the rectangle */ - OMX_U16 nHeight; /**< Height of the rectangle */ - OMX_FACEREGIONFLAGSTYPE nFlags; /**< Flags for the region */ -#ifndef OMX_SKIP64BIT - OMX_U64 nFaceRecognitionId; /**< ID returned by face recognition for this face */ -#else - struct - { - OMX_U32 nLowPart; /**< low bits of the signed 64 bit value */ - OMX_U32 nHighPart; /**< high bits of the signed 64 bit value */ - } nFaceRecognitionId; -#endif -} OMX_FACEREGIONTYPE; - -typedef struct OMX_CONFIG_FACEDETECTIONREGIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< index of port with face detection enabled */ - OMX_U32 nIndex; /**< first requested region number, allowing retrieval of many regions - over several requests */ - OMX_U32 nDetectedRegions; /**< total number of detected regions */ - OMX_S32 nValidRegions; /**< number of valid regions in sRegion array - When getting, the client sets this to the number of regions available. - The component writes region data and updates this field with how many - regions have been written to. */ - OMX_U32 nImageWidth; /**< Width of the image, hence reference for the face coordinates */ - OMX_U32 nImageHeight; /**< Height of the image, hence reference for the face coordinates */ - OMX_FACEREGIONTYPE sRegion[1]; /**< variable length array of face regions */ -} OMX_CONFIG_FACEDETECTIONREGIONTYPE; - -typedef enum OMX_INTERLACETYPE { - OMX_InterlaceProgressive, /**< The data is not interlaced, it is progressive scan */ - OMX_InterlaceFieldSingleUpperFirst, /**< The data is interlaced, fields sent - separately in temporal order, with upper field first */ - OMX_InterlaceFieldSingleLowerFirst, /**< The data is interlaced, fields sent - separately in temporal order, with lower field first */ - OMX_InterlaceFieldsInterleavedUpperFirst, /**< The data is interlaced, two fields sent together line - interleaved, with the upper field temporally earlier */ - OMX_InterlaceFieldsInterleavedLowerFirst, /**< The data is interlaced, two fields sent together line - interleaved, with the lower field temporally earlier */ - OMX_InterlaceMixed, /**< The stream may contain a mixture of progressive - and interlaced frames */ - OMX_InterlaceKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_InterlaceVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_InterlaceMax = 0x7FFFFFFF -} OMX_INTERLACETYPE; - -typedef struct OMX_CONFIG_INTERLACETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< index of port emitting or accepting the content */ - OMX_INTERLACETYPE eMode; /**< The interlace type of the content */ - OMX_BOOL bRepeatFirstField; /**< Whether to repeat the first field */ -} OMX_CONFIG_INTERLACETYPE; - -/* OMX_IndexParamIspTuner: Custom ISP tuner */ -typedef struct OMX_PARAM_CAMERAISPTUNERTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 tuner_name[64]; -} OMX_PARAM_CAMERAISPTUNERTYPE; -/* -This parameter allows a custom ISP tuner to be loaded instead of -the default one specified for the camera module. Setting an empty -string uses the default value. -*/ - -/* OMX_IndexConfigCameraInputFrame: Pointer to the raw input image */ -typedef struct OMX_CONFIG_IMAGEPTRTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_PTR pImage; -} OMX_CONFIG_IMAGEPTRTYPE; -/* -This parameter parameter allows the return of a pointer to a -VideoCore image resource. -*/ - -/* OMX_IndexConfigAFAssistLight: Autofocus assist light mode selection */ -typedef enum OMX_AFASSISTTYPE { - OMX_AFAssistAuto, - OMX_AFAssistOn, - OMX_AFAssistOff, - OMX_AFAssistTorch, - OMX_AFAssistKhronosExtensions = 0x6F000000, - OMX_AFAssistVendorStartUnused = 0x7F000000, - OMX_AFAssistMax = 0x7FFFFFFF -} OMX_AFASSISTTYPE; - -typedef struct OMX_CONFIG_AFASSISTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_AFASSISTTYPE eMode; -} OMX_CONFIG_AFASSISTTYPE; -/* -Set the mode to adopt for the autofocus assist light. -\code{OMX_AFAssistTorch} will turn the AF assist light on permanently, allowing -it to be used as a torch. -*/ - -/* OMX_IndexConfigInputCropPercentage: Specify input crop as a percentage */ -typedef struct OMX_CONFIG_INPUTCROPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 xLeft; /**< Fraction of the width for the top left corner of the rectangle */ - OMX_U32 xTop; /**< Fraction of the height for the top left corner of the rectangle */ - OMX_U32 xWidth; /**< Fraction of the image width desired */ - OMX_U32 xHeight; /**< Fraction of the image height desired */ -} OMX_CONFIG_INPUTCROPTYPE; -/* -This parameter allows the input cropping to be specified as a -percentage of the current width/height. Required for the camera -component where the output resolution varies dependent on the port. -All percentage values are as 16p16 fixed point numbers (0x10000 = -100\%) -*/ - -/* OMX_IndexParamCodecRequirements: Advanced codec requirements */ -typedef struct OMX_PARAM_CODECREQUIREMENTSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nCallbackID; - OMX_BOOL bTryHWCodec; -} OMX_PARAM_CODECREQUIREMENTSTYPE; -/* -This parameter allows internal users of RIL components controlling -video codecs to request that the component loads the component and -queries for requirements. The component will perform a callback with -the given nCallbackID value passing a pointer to the requirements -structure as the data field. -*/ - -/* OMX_IndexConfigBrcmEGLImageMemHandle: Mapping from an EGLImage to a VideoCore mem handle */ -typedef struct OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_PTR eglImage; - OMX_PTR memHandle; -} OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE; -/* -This config allows the EGL server to notify a RIL component that an -EGLImage is available for rendering into and to provide a mapping from -an EGLImage to a mem handle. -*/ - -/* OMX_IndexConfigPrivacyIndicator: Privacy indicator control */ -typedef enum OMX_PRIVACYINDICATORTYPE { - OMX_PrivacyIndicatorOff, - OMX_PrivacyIndicatorOn, - OMX_PrivacyIndicatorForceOn, - OMX_PrivacyIndicatorKhronosExtensions = 0x6F000000, - OMX_PrivacyIndicatorVendorStartUnused = 0x7F000000, - OMX_PrivacyIndicatorMax = 0x7FFFFFFF -} OMX_PRIVACYINDICATORTYPE; - -typedef struct OMX_CONFIG_PRIVACYINDICATORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_PRIVACYINDICATORTYPE ePrivacyIndicatorMode; -} OMX_CONFIG_PRIVACYINDICATORTYPE; -/* -This config allows control over the privacy indicator light. This -light indicates when a capture is in progress. - -\code{OMX_PrivacyIndicatorOff} indicator is disabled. - -\code{OMX_PrivacyIndicatorOn} indicator will be -turned on whenever an image is being captured as determined by the -capturing bit. Minimum on duration of approx 200ms. - -\code{OMX_PrivacyIndicatorForceOn} results in turning the indicator on -immediately, whether an image is being captured or not. The mode will -automatically revert to \code{OMX_PrivacyIndicatorOff} once the -indicator has been turned on, so \code{OMX_PrivacyIndicatorForceOn} -must be requested at least every 200ms if the indicator is to remain -on. -*/ - - -/* OMX_IndexParamCameraFlashType: Select flash type */ -typedef enum OMX_CAMERAFLASHTYPE { - OMX_CameraFlashDefault, - OMX_CameraFlashXenon, - OMX_CameraFlashLED, - OMX_CameraFlashNone, - OMX_CameraFlashKhronosExtensions = 0x6F000000, - OMX_CameraFlashVendorStartUnused = 0x7F000000, - OMX_CameraFlashMax = 0x7FFFFFFF -} OMX_CAMERAFLASHTYPE; - -typedef struct OMX_PARAM_CAMERAFLASHTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_CAMERAFLASHTYPE eFlashType; - OMX_BOOL bRedEyeUsesTorchMode; -} OMX_PARAM_CAMERAFLASHTYPE; -/* -This parameter allows the selection of xenon or LED flash devices -to be used with the currently selected camera. If that device is not -available, then the component will revert back to whatever flash -device is available for that camera. -\code{bRedEyeUsesTorchMode} allows the blinking for red eye reduction to -be switched between using the indicator mode, and the torch mode for the -flash driver. -*/ - -/* OMX_IndexConfigCameraFlashConfig: Flash cycle configuration */ -typedef enum OMX_CAMERAFLASHCONFIGSYNCTYPE { - OMX_CameraFlashConfigSyncFrontSlow, - OMX_CameraFlashConfigSyncRearSlow, - OMX_CameraFlashConfigSyncFrontFast, - OMX_CameraFlashConfigSyncKhronosExtensions = 0x6F000000, - OMX_CameraFlashConfigSyncVendorStartUnused = 0x7F000000, - OMX_CameraFlashConfigSyncMax = 0x7FFFFFFF -} OMX_CAMERAFLASHCONFIGSYNCTYPE; - -typedef struct OMX_CONFIG_CAMERAFLASHCONFIGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bUsePreFlash; - OMX_BOOL bUseFocusDistanceInfo; - OMX_CAMERAFLASHCONFIGSYNCTYPE eFlashSync; - OMX_BOOL bIgnoreChargeState; -} OMX_CONFIG_CAMERAFLASHCONFIGTYPE; -/* -This parameter allows the configuration of various parameters relating to -the flash cycle. Some of the options are only applicable to xenon flash. - -\code{bUsePreFlash} uses a low intensity pre-flash to determine flash intensity. This setting -is recommended for almost all flash situations. - -\code{bUseFocusDistanceInfo} uses the distance of the subject, as measured by the AF algorithm -to set the intensity of the flash. - -\code{eFlashSync} configures which edge of the shutter is used to synchronise the flash, and -the duration of the exposure. - -\code{eIgnoreChargeState} will make the flash fire, even if it is not fully charged. -*/ - -/* OMX_IndexConfigBrcmAudioTrackGaplessPlayback: Encoder/decoder delay and padding information for gapless playback. */ -typedef struct OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nDelay; /**< number of samples delay added by the codec */ - OMX_U32 nPadding; /**< number of silent samples added to the end */ -} OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE; -/* -This config allows communication between components to facilitate gapless playback. -*/ - - -/* OMX_IndexConfigBrcmAudioTrackChangeControl: Configure gapless/crossfaded audio track change. */ -typedef struct OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nSrcPortIndex; - OMX_U32 nDstPortIndex; - OMX_U32 nXFade; -} OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE; -/* -This config allows the client to specify the gapless or crossfade -parameters to be used on a track change. If \code{nXFade} is 0, then -a normal or gapless track change will result, otherwise a crossfade of -\code{nXFade} ms is used. -*/ - -/* OMX_IndexParamBrcmPixelValueRange: Describing the pixel value range */ -typedef enum OMX_BRCMPIXELVALUERANGETYPE -{ - OMX_PixelValueRangeUnspecified = 0, - OMX_PixelValueRangeITU_R_BT601, - OMX_PixelValueRangeFull8Bit, - OMX_PixelValueRangeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_PixelValueRangeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_PixelValueRangeMax = 0x7FFFFFFF -} OMX_BRCMPIXELVALUERANGETYPE; - -typedef struct OMX_PARAM_BRCMPIXELVALUERANGETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BRCMPIXELVALUERANGETYPE ePixelValueRange; -} OMX_PARAM_BRCMPIXELVALUERANGETYPE; -/* -This structure allows a description of the range that pixel values may -have. This is typically useful since some standards use the full 8 -bit range, whereas others introduce pedastals which reduce the range -at the top and bottom end. -*/ - -/* OMX_IndexParamCameraDisableAlgorithm: Disabling camera processing stages. */ -typedef enum OMX_CAMERADISABLEALGORITHMTYPE { - OMX_CameraDisableAlgorithmFacetracking, - OMX_CameraDisableAlgorithmRedEyeReduction, - OMX_CameraDisableAlgorithmVideoStabilisation, - OMX_CameraDisableAlgorithmWriteRaw, - OMX_CameraDisableAlgorithmVideoDenoise, - OMX_CameraDisableAlgorithmStillsDenoise, - OMX_CameraDisableAlgorithmAntiShake, - OMX_CameraDisableAlgorithmImageEffects, - OMX_CameraDisableAlgorithmDarkSubtract, - OMX_CameraDisableAlgorithmDynamicRangeExpansion, - OMX_CameraDisableAlgorithmFaceRecognition, - OMX_CameraDisableAlgorithmFaceBeautification, - OMX_CameraDisableAlgorithmSceneDetection, - OMX_CameraDisableAlgorithmHighDynamicRange, - OMX_CameraDisableAlgorithmKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CameraDisableAlgorithmVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CameraDisableAlgorithmMax = 0x7FFFFFFF -} OMX_CAMERADISABLEALGORITHMTYPE; - -typedef struct OMX_PARAM_CAMERADISABLEALGORITHMTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_CAMERADISABLEALGORITHMTYPE eAlgorithm; - OMX_BOOL bDisabled; -} OMX_PARAM_CAMERADISABLEALGORITHMTYPE; -/* -Allows plugin algorithms to be disabled to save memory -within the camera component -*/ - -/* OMX_IndexConfigBrcmAudioEffectControl: Audio Effect Control */ -typedef struct OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; - OMX_U8 name[16]; - OMX_U8 property[256]; -} OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE; -/* -This structure represents the internal configuration of an audio effect. -The audio effect is provided by a loadable plug-in described -in the \code{name} field and is configured in a plug-in-dependent -manner with the \code{property} field. The \code{bEnable} field is used to -turn the effect on/off. -*/ - -/* OMX_IndexConfigBrcmMinimumProcessingLatency: Processing Latency Bound */ -typedef struct OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_TICKS nOffset; -} OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY; -/* -Query/set the difference between the actual media time and when the -component receives request fulfillments for media time requests. This -can be used with e.g. splitter/mixer components to control when the -component stops waiting for input or output packets from active -streams and continues with processing (to maintain a constant -processing rate). -*/ - -/** Enable or disable Supplemental Enhancment Information (SEI) messages to be inserted in - * the H.264 bitstream. - */ -typedef struct OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; -} OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE; - -/* OMX_IndexParamBrcmAllowMemChange: Allowing changing memory allocation on state transition */ -typedef struct OMX_PARAM_BRCMALLOWMEMCHANGETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnable; -} OMX_PARAM_BRCMALLOWMEMCHANGETYPE; -/* -Let the component change the amount of memory it has allocated when -going from LOADED to IDLE. By default this is enabled, but if it is -disabled the component will fail to transition to IDLE if the -component requires more memory than has already been allocated. This -might occur if (for example) the component was configured, taken to -IDLE, then taken back to LOADED, the profile increased and the -component taken back to IDLE. -*/ - -typedef enum OMX_CONFIG_CAMERAUSECASE { - OMX_CameraUseCaseAuto, - OMX_CameraUseCaseVideo, - OMX_CameraUseCaseStills, - OMX_CameraUseCaseKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CameraUseCaseVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CameraUseCaseMax = 0x7FFFFFFF -} OMX_CONFIG_CAMERAUSECASE; - -typedef struct OMX_CONFIG_CAMERAUSECASETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_CONFIG_CAMERAUSECASE eUseCase; -} OMX_CONFIG_CAMERAUSECASETYPE; - -/* OMX_IndexParamBrcmDisableProprietaryTunnels: Disabling proprietary tunnelling */ -typedef struct OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bUseBuffers; -} OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE; -/* -Tell a source component to refuse to support proprietary tunnelling. Buffers will be used instead. -*/ - - -// -// Control for memory allocation and component-internal buffering -// - -/* OMX_IndexParamBrcmRetainMemory: Controlling memory use on state transition */ -typedef struct OMX_PARAM_BRCMRETAINMEMORYTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnable; -} OMX_PARAM_BRCMRETAINMEMORYTYPE; -/* -Ask a component to retain its memory when going from IDLE to LOADED, if possible. -This has the benefit that you are then guaranteed that the transition to IDLE cannot -fail due to lack of memory, but has the disadvantage that you cannot leave the component -lying around in LOADED, unused, since it is using significant amounts of memory. -*/ - -/** Tell write media how large the output buffer should be. This is a hint, and - * may be ignored. A good size is bandwidth*<SDcard-delay>, which works out at - * around 1Mbyte for up to 16Mbit/s. Sizes may (and probably will) be rounded down - * to the nearest power of 2. - */ -typedef struct OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nBufferSize; -} OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE; - -/* OMX_IndexConfigCameraInfo: Camera device driver information */ -#define OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN 16 -typedef struct OMX_CONFIG_LENSCALIBRATIONVALUETYPE -{ - OMX_U16 nShutterDelayTime; - OMX_U16 nNdTransparency; - OMX_U16 nPwmPulseNearEnd; /**< Num pulses to move lens 1um at near end */ - OMX_U16 nPwmPulseFarEnd; /**< Num pulses to move lens 1um at far end */ - OMX_U16 nVoltagePIOutNearEnd[3]; - OMX_U16 nVoltagePIOut10cm[3]; - OMX_U16 nVoltagePIOutInfinity[3]; - OMX_U16 nVoltagePIOutFarEnd[3]; - OMX_U32 nAdcConversionNearEnd; - OMX_U32 nAdcConversionFarEnd; -} OMX_CONFIG_LENSCALIBRATIONVALUETYPE; -/* -Ask the camera component for the driver info on the current camera device -*/ - -#define OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN 16 -#define OMX_CONFIG_CAMERAINFOTYPE_SERIALNUM_LEN 20 -#define OMX_CONFIG_CAMERAINFOTYPE_EPROMVER_LEN 8 -typedef struct OMX_CONFIG_CAMERAINFOTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 cameraname[OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN]; - OMX_U8 lensname[OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN]; - OMX_U16 nModelId; - OMX_U8 nManufacturerId; - OMX_U8 nRevNum; - OMX_U8 sSerialNumber[OMX_CONFIG_CAMERAINFOTYPE_SERIALNUM_LEN]; - OMX_U8 sEpromVersion[OMX_CONFIG_CAMERAINFOTYPE_EPROMVER_LEN]; - OMX_CONFIG_LENSCALIBRATIONVALUETYPE sLensCalibration; - OMX_U32 xFNumber; - OMX_U32 xFocalLength; -} OMX_CONFIG_CAMERAINFOTYPE; - - -typedef enum OMX_CONFIG_CAMERAFEATURESSHUTTER { - OMX_CameraFeaturesShutterUnknown, - OMX_CameraFeaturesShutterNotPresent, - OMX_CameraFeaturesShutterPresent, - OMX_CameraFeaturesShutterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CameraFeaturesShutterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CameraFeaturesShutterMax = 0x7FFFFFFF -} OMX_CONFIG_CAMERAFEATURESSHUTTER; - -typedef struct OMX_CONFIG_CAMERAFEATURESTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_CONFIG_CAMERAFEATURESSHUTTER eHasMechanicalShutter; - OMX_BOOL bHasLens; -} OMX_CONFIG_CAMERAFEATURESTYPE; - - -//Should be added to the spec as part of IL416c -/* OMX_IndexConfigRequestCallback: Enable config change notifications. */ -typedef struct OMX_CONFIG_REQUESTCALLBACKTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_INDEXTYPE nIndex; - OMX_BOOL bEnable; -} OMX_CONFIG_REQUESTCALLBACKTYPE; -/* -This config implements IL416c to allow clients to request notification -of when a config or parameter is changed. When the parameter specified -in \code{nIndex} for port \code{nPortIndex} changes, an -\code{OMX_EventParamOrConfigChanged} event is generated for the client. -*/ - -/* OMX_IndexConfigCommonFocusRegionXY: Define focus regions */ -typedef enum OMX_FOCUSREGIONTYPE { - OMX_FocusRegionNormal, - OMX_FocusRegionFace, - OMX_FocusRegionMax -} OMX_FOCUSREGIONTYPE; - -typedef struct OMX_FOCUSREGIONXY { - OMX_U32 xLeft; - OMX_U32 xTop; - OMX_U32 xWidth; - OMX_U32 xHeight; - OMX_U32 nWeight; - OMX_U32 nMask; - OMX_FOCUSREGIONTYPE eType; -} OMX_FOCUSREGIONXY; - -typedef struct OMX_CONFIG_FOCUSREGIONXYTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_U32 nTotalRegions; - OMX_S32 nValidRegions; - OMX_BOOL bLockToFaces; - OMX_U32 xFaceTolerance; - OMX_FOCUSREGIONXY sRegion[1]; -} OMX_CONFIG_FOCUSREGIONXYTYPE; -/* -Query / set the focus regions to use as a set of x/y/width/height boxes relative -to the overall image. - -\code{nIndex} - first region number being set/read, allowing retrieval/setting -of many regions over several requests. - -\code{nTotalRegions} - total number of regions currently defined. - -\code{nValidRegions} - number of valid regions in the \code{sRegion} array. -When getting, the client sets this to the number of regions available. -The component writes region data and updates this field with how many -regions have been written to. -When setting, this is the number of regions defined with this structure - -\code{bLockToFaces} - compare the region(s) given to the latest face tracking results. -If a face is found within xFaceTolerance of the defined region, then amend the -region to correspond to the face. - -\code{xFaceTolerance} - 0p16 value to define the max difference between the region centre -and face tracking result centre to take the FT results - -\code{sRegions} - variable length array of focus regions. -*/ - -typedef struct OMX_CONFIG_U8TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U8 nU8; /**< U8 value */ -} OMX_PARAM_U8TYPE; - -typedef struct OMX_CONFIG_CAMERASETTINGSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nExposure; - OMX_U32 nAnalogGain; - OMX_U32 nDigitalGain; - OMX_U32 nLux; - OMX_U32 nRedGain; - OMX_U32 nBlueGain; - OMX_U32 nFocusPosition; -} OMX_CONFIG_CAMERASETTINGSTYPE; - -/* OMX_IndexConfigDrawBoxLineParams: Face box style parameters. */ -typedef struct OMX_YUVCOLOUR { - OMX_U8 nY; - OMX_U8 nU; - OMX_U8 nV; -} OMX_YUVCOLOUR; - -typedef struct OMX_CONFIG_DRAWBOXLINEPARAMS { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port to which this config applies */ - OMX_U32 xCornerSize; /**< Size of the corners as a fraction of the complete side */ - OMX_U32 nPrimaryFaceLineWidth; /**< Width of the box line for the primary face in pixels */ - OMX_U32 nOtherFaceLineWidth; /**< Width of the box line for other faces in pixels */ - OMX_U32 nFocusRegionLineWidth; /**< Width of the box line for focus regions in pixels */ - OMX_YUVCOLOUR sPrimaryFaceColour; /**< YUV colour for the primary face */ - OMX_YUVCOLOUR sPrimaryFaceSmileColour; /**< YUV colour for the primary face if smiling */ - OMX_YUVCOLOUR sPrimaryFaceBlinkColour; /**< YUV colour for the primary face if blinking */ - OMX_YUVCOLOUR sOtherFaceColour; /**< YUV colour for the all other faces */ - OMX_YUVCOLOUR sOtherFaceSmileColour; /**< YUV colour for the all other faces if smiling */ - OMX_YUVCOLOUR sOtherFaceBlinkColour; /**< YUV colour for the all other faces if blinking */ - OMX_BOOL bShowFocusRegionsWhenIdle; /**< Are focus regions displayed when just in viewfinder/AF idle */ - OMX_YUVCOLOUR sFocusRegionColour; /**< YUV colour for focus regions */ - OMX_BOOL bShowAfState; /**< Change to the colours specified below if AF cycle has run */ - OMX_BOOL bShowOnlyPrimaryAfState; /**< Only show the primary face when displaying the AF status */ - OMX_BOOL bCombineNonFaceRegions; /**< Combine all regions not defined as faces into one single box covering them all */ - OMX_YUVCOLOUR sAfLockPrimaryFaceColour; /**< YUV colour for the primary face */ - OMX_YUVCOLOUR sAfLockOtherFaceColour; /**< YUV colour for the all other faces */ - OMX_YUVCOLOUR sAfLockFocusRegionColour; /**< YUV colour for focus regions */ - OMX_YUVCOLOUR sAfFailPrimaryFaceColour; /**< YUV colour for the primary face */ - OMX_YUVCOLOUR sAfFailOtherFaceColour; /**< YUV colour for the all other faces */ - OMX_YUVCOLOUR sAfFailFocusRegionColour; /**< YUV colour for focus regions */ - } OMX_CONFIG_DRAWBOXLINEPARAMS; -/* -Query / set the parameters for the box to be drawn around faces/focus regions. -*/ - - #define OMX_PARAM_CAMERARMITYPE_RMINAME_LEN 16 - //OMX_IndexParamCameraRmiControl - typedef struct OMX_PARAM_CAMERARMITYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnabled; - OMX_U8 sRmiName[OMX_PARAM_CAMERARMITYPE_RMINAME_LEN]; - OMX_U32 nInputBufferHeight; - OMX_U32 nRmiBufferSize; - OMX_BRCM_POOL_T *pImagePool; - } OMX_PARAM_CAMERARMITYPE; - -/* OMX_IndexConfigBrcmSyncOutput: Forcing a write sync */ -typedef struct OMX_CONFIG_BRCMSYNCOUTPUTTYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ -} OMX_CONFIG_BRCMSYNCOUTPUTTYPE; -/* -Setting this config forces a sync of data to the filesystem. -*/ - -/* OMX_IndexConfigDrmView: View information for DRM rental files */ -typedef struct OMX_CONFIG_DRMVIEWTYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nCurrentView; /**< Current view count */ - OMX_U32 nMaxView; /**< Max. no. of view allowed */ -} OMX_CONFIG_DRMVIEWTYPE; -/* -This structure contains information about the number of available -views in the selected DRM rental file, which typically have a given -maximum view count. It allows the user to explicitly agree to playing -the file, which will increment the number of current views the file -has had. -*/ - -typedef struct OMX_PARAM_BRCMU64TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nLowPart; /**< low bits of the unsigned 64 bit value */ - OMX_U32 nHighPart; /**< high bits of the unsigned 64 bit value */ -} OMX_PARAM_BRCMU64TYPE; - -/* OMX_IndexParamBrcmDisableEXIF: Disable generation of EXIF data */ -/* -This parameter is used by clients to control the generation of exif -data in JPEG images. -*/ - -/* OMX_IndexParamBrcmThumbnail: Control generation of thumbnail */ -typedef struct OMX_PARAM_BRCMTHUMBNAILTYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_BOOL bEnable; /**< Enable generation of thumbnails during still capture */ - OMX_BOOL bUsePreview; /**< Use the preview image (as is) as thumbnail */ - OMX_U32 nWidth; /**< Desired width of the thumbnail */ - OMX_U32 nHeight; /**< Desired height of the thumbnail */ -} OMX_PARAM_BRCMTHUMBNAILTYPE; -/* -This parameter is used by clients to control how thumbnails are -generated when creating still images. - -Thumbnail generation will be turned on or off depending on the -\code{bEnable} field. - -The \code{bUsePreview} field will let the component know whether it -should use the low resolution preview image (if the component has one -available) as is for the thumbnail. When this is set to true, it should -make the generation of thumbnails faster (if a preview image is available) -and should use less memory as well. - -The \code{nWidth} and \code{nHeight} fields allow the client to -specify the dimensions of the thumbnail. If both \code{nWidth} and -\code{nHeight} are 0, we will calculate a sensible size for the -thumbnail. -*/ - -typedef struct OMX_PARAM_BRCMASPECTRATIOTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nWidth; - OMX_U32 nHeight; -} OMX_PARAM_BRCMASPECTRATIOTYPE; - -/* OMX_IndexParamBrcmVideoDecodeErrorConcealment: Control error concealment for video decode */ -typedef struct OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bStartWithValidFrame; /**< Decoder will only start emitting frames from a non-corrupted frame */ -} OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE; -/* - This parameter is used by clients to control the type of error concealment - that will be done by the video decoder. - */ - -#define OMX_CONFIG_FLASHINFOTYPE_NAME_LEN 16 -typedef struct OMX_CONFIG_FLASHINFOTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 sFlashName[OMX_CONFIG_FLASHINFOTYPE_NAME_LEN]; - OMX_CAMERAFLASHTYPE eFlashType; - OMX_U8 nDeviceId; - OMX_U8 nDeviceVersion; -} OMX_CONFIG_FLASHINFOTYPE; - -/* OMX_IndexParamBrcmInterpolateMissingTimestamps: Configure component to interpolate missing timestamps */ -/* -Configures a component so that it tries to timestamp all the buffers it outputs. -If the timestamp information is missing from the original buffer, the -component will try its best to interpolate a value for the missing timestamp. - */ - -/* OMX_IndexParamBrcmSetCodecPerformanceMonitoring: Configure component to output performance statistics */ -/* -Configures a codec component so that it outputs performance statistics to -the given DECODE_PROGRESS_REPORT_T structure (passed as a pointer). -This structure can then be read by the client to find out where the codec is -at in its processing. - */ - -/* OMX_IndexConfigDynamicRangeExpansion: Configure image dynamic range expansion processing */ -typedef enum OMX_DYNAMICRANGEEXPANSIONMODETYPE { - OMX_DynRangeExpOff, - OMX_DynRangeExpLow, - OMX_DynRangeExpMedium, - OMX_DynRangeExpHigh, - OMX_DynRangeExpKhronosExtensions = 0x6F000000, - OMX_DynRangeExpVendorStartUnused = 0x7F000000, - OMX_DynRangeExpMax = 0x7FFFFFFF -} OMX_DYNAMICRANGEEXPANSIONMODETYPE; - -typedef struct OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_DYNAMICRANGEEXPANSIONMODETYPE eMode; -} OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE; -/* -Configures the intensity of an image dynamic range expansion processing stage -*/ - -/* OMX_IndexParamBrcmTransposeBufferCount: Configure the number of pre-allocated transpose buffers */ -/* -This config allows the client to explicitly set the number of destination buffers pre-allocated for -ports that support 90/270 degree rotation (e.g. in video_render). The buffers will be pre-allocated during -a state transition from LOADED to IDLE (the transition will fail if there is not enough memory available -for the buffers). -. -*/ - - -/* OMX_IndexParamBrcmThreadAffinity: Control the CPU affinity of component thread(s) */ -typedef enum OMX_BRCMTHREADAFFINITYTYPE { - OMX_BrcmThreadAffinityCPU0, - OMX_BrcmThreadAffinityCPU1, - OMX_BrcmThreadAffinityMax = 0x7FFFFFFF -} OMX_BRCMTHREADAFFINITYTYPE; - -typedef struct OMX_PARAM_BRCMTHREADAFFINITYTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BRCMTHREADAFFINITYTYPE eAffinity; /**< Thread CPU affinity */ -} OMX_PARAM_BRCMTHREADAFFINITYTYPE; -/* - This parameter is used by clients to hint the CPU that a component thread should run on. - */ - - /* OMX_IndexConfigCommonSceneDetected: Reports the scene type detected by a scene detection algorithm. */ -typedef enum OMX_SCENEDETECTTYPE { - OMX_SceneDetectUnknown, - OMX_SceneDetectLandscape, - OMX_SceneDetectPortrait, - OMX_SceneDetectMacro, - OMX_SceneDetectNight, - OMX_SceneDetectPortraitNight, - OMX_SceneDetectBacklit, - OMX_SceneDetectPortraitBacklit, - OMX_SceneDetectSunset, - OMX_SceneDetectBeach, - OMX_SceneDetectSnow, - OMX_SceneDetectFireworks, - OMX_SceneDetectMax = 0x7FFFFFFF -} OMX_SCENEDETECTTYPE; - -/* OMX_IndexConfigCommonSceneDetected: Reports the scene type detected by a scene detection algorithm. */ -typedef struct OMX_CONFIG_SCENEDETECTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_SCENEDETECTTYPE eScene; /**< Scene type detected */ -} OMX_CONFIG_SCENEDETECTTYPE; -/* - This config is used to report to clients the scene type that has been detected. - */ - -/* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */ -typedef enum OMX_INDEXEXTTYPE { - /* Video parameters and configurations */ - OMX_IndexExtVideoStartUnused = OMX_IndexKhronosExtensions + 0x00600000, - OMX_IndexParamNalStreamFormatSupported, /**< reference: OMX_NALSTREAMFORMATTYPE */ - OMX_IndexParamNalStreamFormat, /**< reference: OMX_NALSTREAMFORMATTYPE */ - OMX_IndexParamNalStreamFormatSelect, /**< reference: OMX_NALSTREAMFORMATTYPE */ - - OMX_IndexExtMax = 0x7FFFFFFF -} OMX_INDEXEXTTYPE; - -/* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */ -typedef enum OMX_NALUFORMATSTYPE { - OMX_NaluFormatStartCodes = 1, - OMX_NaluFormatOneNaluPerBuffer = 2, - OMX_NaluFormatOneByteInterleaveLength = 4, - OMX_NaluFormatTwoByteInterleaveLength = 8, - OMX_NaluFormatFourByteInterleaveLength = 16, - OMX_NaluFormatCodingMax = 0x7FFFFFFF -} OMX_NALUFORMATSTYPE; - -/* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */ -typedef struct OMX_NALSTREAMFORMATTYPE{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_NALUFORMATSTYPE eNaluFormat; -} OMX_NALSTREAMFORMATTYPE; -/* - This parameter is used to control the NAL unit packaging of an H264 video port. - */ - -/* OMX_IndexParamVideoMvc: MVC codec parameters */ -typedef struct OMX_VIDEO_PARAM_AVCTYPE OMX_VIDEO_PARAM_MVCTYPE; -/* -This parameter is currently identical to the AVC parameter type. -*/ - - /* OMX_IndexConfigBrcmDrawStaticBox: Define static box to be drawn */ -typedef enum OMX_STATICBOXTYPE { - OMX_StaticBoxNormal, - OMX_StaticBoxPrimaryFaceAfIdle, - OMX_StaticBoxNonPrimaryFaceAfIdle, - OMX_StaticBoxFocusRegionAfIdle, - OMX_StaticBoxPrimaryFaceAfSuccess, - OMX_StaticBoxNonPrimaryFaceAfSuccess, - OMX_StaticBoxFocusRegionAfSuccess, - OMX_StaticBoxPrimaryFaceAfFail, - OMX_StaticBoxNonPrimaryFaceAfFail, - OMX_StaticBoxFocusRegionAfFail, - OMX_StaticBoxMax -} OMX_STATICBOXTYPE; - -typedef struct OMX_STATICBOX { - OMX_U32 xLeft; - OMX_U32 xTop; - OMX_U32 xWidth; - OMX_U32 xHeight; - OMX_STATICBOXTYPE eType; -} OMX_STATICBOX; - -typedef struct OMX_CONFIG_STATICBOXTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_U32 nTotalBoxes; - OMX_S32 nValidBoxes; - OMX_BOOL bDrawOtherBoxes; - OMX_STATICBOX sBoxes[1]; -} OMX_CONFIG_STATICBOXTYPE; -/* -Query / set the parameters for a box to always be drawn on viewfinder images -The x/y/width/height values for the boxes are relative to the overall image. - -\code{nIndex} - first box number being set/read, allowing retrieval/setting -of many boxes over several requests. - -\code{nValidBoxes} - total number of boxes currently defined. - -\code{nValidBoxes} - number of valid boxes in the \code{sBoxes} array. -When getting, the client sets this to the number of boxes available. -The component writes box data and updates this field with how many -boxes have been written to. -When setting, this is the number of boxes defined with this structure - -\code{sBoxes} - variable length array of static boxes. -*/ - -/* OMX_IndexConfigPortCapturing: Per-port capturing state */ -typedef struct OMX_CONFIG_PORTBOOLEANTYPE{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; -} OMX_CONFIG_PORTBOOLEANTYPE; -/* -This is proposed in IL533f for controlling -which ports of a multi-port camera component are capturing frames. -*/ - -/* OMX_IndexConfigCaptureMode: Capturing mode type */ -typedef enum OMX_CAMERACAPTUREMODETYPE { - OMX_CameraCaptureModeWaitForCaptureEnd, - OMX_CameraCaptureModeWaitForCaptureEndAndUsePreviousInputImage, - OMX_CameraCaptureModeResumeViewfinderImmediately, - OMX_CameraCaptureModeMax, -} OMX_CAMERACAPTUREMODETYPE; - -typedef struct OMX_PARAM_CAMERACAPTUREMODETYPE{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_CAMERACAPTUREMODETYPE eMode; -} OMX_PARAM_CAMERACAPTUREMODETYPE; -/* -This controls the mode of operation for -still image capture in the camera component. -*/ - -/* OMX_IndexParamBrcmDrmEncryption: Set DRM encryption scheme */ -typedef enum OMX_BRCMDRMENCRYPTIONTYPE -{ - OMX_DrmEncryptionNone = 0, - OMX_DrmEncryptionHdcp2, - OMX_DrmEncryptionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DrmEncryptionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DrmEncryptionRangeMax = 0x7FFFFFFF -} OMX_BRCMDRMENCRYPTIONTYPE; - -typedef struct OMX_PARAM_BRCMDRMENCRYPTIONTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BRCMDRMENCRYPTIONTYPE eEncryption; - OMX_U32 nConfigDataLen; - OMX_U8 configData[1]; -} OMX_PARAM_BRCMDRMENCRYPTIONTYPE; -/* -Query/set the DRM encryption scheme used by a port writing out data. -*/ - - -/* OMX_IndexConfigBufferStall: Advertise buffer stall state */ -typedef struct OMX_CONFIG_BUFFERSTALLTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bStalled; /**< Whether we are stalled */ - OMX_U32 nDelay; /**< Delay in real time (us) from last buffer to current time */ -} OMX_CONFIG_BUFFERSTALLTYPE; -/* -Query/set the buffer stall threashold. When set the \code{nDelay} -parameter specifies a time to class whether buffer output is stalled. -When get, the \code{nDelay} parameter indicates the current buffer -delay, and the {bStalled} parameter indicates whether this time is -over a previously set threashold. When -\code{OMX_IndexConfigRequestCallback} is used with this index, a -notification is given when \code{bStalled} changes. -*/ - -/* OMX_IndexConfigLatencyTarget: Maintain target latency by adjusting clock speed */ -typedef struct OMX_CONFIG_LATENCYTARGETTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; /**< whether this mode is enabled */ - OMX_U32 nFilter; /**< number of latency samples to filter on, good value: 1 */ - OMX_U32 nTarget; /**< target latency, us */ - OMX_U32 nShift; /**< shift for storing latency values, good value: 7 */ - OMX_S32 nSpeedFactor; /**< multiplier for speed changes, in 24.8 format, good value: 256-512 */ - OMX_S32 nInterFactor; /**< divider for comparing latency versus gradiant, good value: 300 */ - OMX_S32 nAdjCap; /**< limit for speed change before nSpeedFactor is applied, good value: 100 */ -} OMX_CONFIG_LATENCYTARGETTYPE; -/* -Query/set parameters used when adjusting clock speed to match the -measured latency to a specified value. -*/ - -/* OMX_IndexConfigBrcmUseProprietaryCallback: Force use of proprietary callback */ -typedef struct OMX_CONFIG_BRCMUSEPROPRIETARYCALLBACKTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; -} OMX_CONFIG_BRCMUSEPROPRIETARYCALLBACKTYPE; -/* -Disable/enable the use of proprietary callbacks rather than OpenMAX IL buffer handling. -*/ - -/* OMX_IndexParamCommonUseStcTimestamps: Select timestamp mode */ -typedef enum OMX_TIMESTAMPMODETYPE -{ - OMX_TimestampModeZero = 0, /**< Use a timestamp of 0 */ - OMX_TimestampModeRawStc, /**< Use the raw STC as the timestamp */ - OMX_TimestampModeResetStc, /**< Store the STC when video capture port goes active, and subtract that from STC for the timestamp */ - OMX_TimestampModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TimestampModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TimestampModeMax = 0x7FFFFFFF -} OMX_TIMESTAMPMODETYPE; - -typedef struct OMX_PARAM_TIMESTAMPMODETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_TIMESTAMPMODETYPE eTimestampMode; -} OMX_PARAM_TIMESTAMPMODETYPE; -/* - Specifies what to use as timestamps in the abscence of a clock component. -*/ - -/* EGL image buffer for passing to video port. - * Used when port color format is OMX_COLOR_FormatBRCMEGL. - */ -typedef struct OMX_BRCMVEGLIMAGETYPE -{ - /* Passed between ARM + VC; use fixed width types. */ - OMX_U32 nWidth; - OMX_U32 nHeight; - OMX_U32 nStride; - OMX_U32 nUmemHandle; - OMX_U32 nUmemOffset; - OMX_U32 nFlipped; /* Non-zero -> vertically flipped image */ -} OMX_BRCMVEGLIMAGETYPE; - -/* Provides field of view - */ -typedef struct OMX_CONFIG_BRCMFOVTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 xFieldOfViewHorizontal; /**< Horizontal field of view in degrees. 16p16 value */ - OMX_U32 xFieldOfViewVertical; /**< Vertical field of view in degrees. 16p16 value */ -} OMX_CONFIG_BRCMFOVTYPE; - -/* OMX_IndexConfigBrcmDecoderPassThrough: Enabling Audio Passthrough */ -/* -This allows an audio decoder to disable decoding the stream and pass through correctly framed -data to enable playback of compressed audio to supported output devices. -*/ - -/* OMX_IndexConfigBrcmClockReferenceSource: Select Clock Reference Source */ -/* -This control allows communicating directly to an audio renderer component whether it should -act as a clock reference source or act as a slave. -*/ - -/* OMX_IndexConfigEncLevelExtension: AVC Override encode capabilities */ -typedef struct OMX_VIDEO_CONFIG_LEVEL_EXTEND { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nCustomMaxMBPS; /**< Specifies maximum macro-blocks per second */ - OMX_U32 nCustomMaxFS; /**< Specifies maximum frame size (macro-blocks per frame) */ - OMX_U32 nCustomMaxBRandCPB; /**< Specifies maximum bitrate in units of 1000 bits/s and Codec Picture Buffer (CPB derived from bitrate) */ -} OMX_VIDEO_CONFIG_LEVEL_EXTEND; -/* -This allows finer control of the H264 encode internal parameters. -*/ - -/* OMX_IndexParamBrcmEEDEEnable: Enable/Disable end to end distortion estimator */ -typedef struct OMX_VIDEO_EEDE_ENABLE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 enable; -} OMX_VIDEO_EEDE_ENABLE; -/* -This enables or disables the use of end to end distortion estimation. -*/ - -/* OMX_IndexParamBrcmEEDELossRate: Loss rate configuration for end to end distortion */ -typedef struct OMX_VIDEO_EEDE_LOSSRATE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 loss_rate; /**< loss rate, 5 means 5% */ -} OMX_VIDEO_EEDE_LOSSRATE; -/* -Set the packet loss rate used by the end to end distortion estimator. -*/ - -/* OMX_IndexParamColorSpace: Colour space information */ -typedef enum OMX_COLORSPACETYPE -{ - OMX_COLORSPACE_UNKNOWN, - OMX_COLORSPACE_JPEG_JFIF, - OMX_COLORSPACE_ITU_R_BT601, - OMX_COLORSPACE_ITU_R_BT709, - OMX_COLORSPACE_FCC, - OMX_COLORSPACE_SMPTE240M, - OMX_COLORSPACE_BT470_2_M, - OMX_COLORSPACE_BT470_2_BG, - OMX_COLORSPACE_JFIF_Y16_255, - OMX_COLORSPACE_MAX = 0x7FFFFFFF -} OMX_COLORSPACETYPE; - -typedef struct OMX_PARAM_COLORSPACETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_COLORSPACETYPE eColorSpace; -} OMX_PARAM_COLORSPACETYPE; - -typedef enum OMX_CAPTURESTATETYPE -{ - OMX_NotCapturing, - OMX_CaptureStarted, - OMX_CaptureComplete, - OMX_CaptureMax = 0x7FFFFFFF -} OMX_CAPTURESTATETYPE; - -typedef struct OMX_PARAM_CAPTURESTATETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_CAPTURESTATETYPE eCaptureState; -} OMX_PARAM_CAPTURESTATETYPE; - -/* -Provides information on the colour space that's in use during image/video processing. -*/ - -/* OMX_IndexConfigMinimiseFragmentation: Minimising Fragmentation */ -/* -This control can be supported to enable the client to request that the component works -to minimise fragmentation of output buffers. -*/ - -/* OMX_IndexConfigBrcmBufferFlagFilter: Filters buffers based on flags */ -/* -This control can be set to request that buffers are conditionally forwarded on -output ports based on matching flags set on that buffer. -*/ - -/* OMX_IndexParamPortMaxFrameSize: Specifying maximum frame size */ -/* -This control can be used to control the maximum frame size allowed on an output port. -*/ - -/* OMX_IndexConfigBrcmCameraRnDPreprocess: Enable use of development ISP software stage */ -/* -This control can be used to enable a developmental software stage to be inserted into -the preprocessor stage of the ISP. -*/ - -/* OMX_IndexConfigBrcmCameraRnDPostprocess: Enable use of development ISP software stage */ -/* -This control can be used to enable a developmental software stage to be inserted into -the postprocessor stage of the ISP. -*/ - -/* OMX_IndexParamDisableVllPool: Controlling use of memory for loadable modules */ -/* -This control can be used to control whether loadable modules used a dedicated memory -pool or use heap allocated memory. -*/ - -typedef struct OMX_PARAM_BRCMCONFIGFILETYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - actual URI name */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 fileSize; /**< Size of complete file data */ -} OMX_PARAM_BRCMCONFIGFILETYPE; - -typedef struct OMX_PARAM_BRCMCONFIGFILECHUNKTYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - actual chunk data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 size; /**< Number of bytes being transferred in this chunk */ - OMX_U32 offset; /**< Offset of this chunk in the file */ - OMX_U8 data[1]; /**< Chunk data */ -} OMX_PARAM_BRCMCONFIGFILECHUNKTYPE; - -typedef struct OMX_PARAM_BRCMFRAMERATERANGETYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - actual chunk data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; - OMX_U32 xFramerateLow; /**< Low end of framerate range. Q16 format */ - OMX_U32 xFramerateHigh; /**< High end of framerate range. Q16 format */ -} OMX_PARAM_BRCMFRAMERATERANGETYPE; - -typedef struct OMX_PARAM_S32TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_S32 nS32; /**< S32 value */ -} OMX_PARAM_S32TYPE; - -typedef struct OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 size_wanted; /**< Input. Zero size means internal video decoder buffer, - mem_handle and phys_addr not returned in this case */ - OMX_U32 protect; /**< Input. 1 = protect, 0 = unprotect */ - - OMX_U32 mem_handle; /**< Output. Handle for protected buffer */ - OMX_PTR phys_addr; /**< Output. Physical memory address of protected buffer */ -} OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE; - -typedef struct OMX_CONFIG_ZEROSHUTTERLAGTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 bZeroShutterMode; /**< Select ZSL mode from the camera. */ - OMX_U32 bConcurrentCapture; /**< Perform concurrent captures for full ZSL. */ - -} OMX_CONFIG_ZEROSHUTTERLAGTYPE; - -typedef struct OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - configuration data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8 config[1]; /**< Configuration data (a VD3_CONFIGURE_T) */ -} OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE; - -typedef struct OMX_CONFIG_CUSTOMAWBGAINSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - configuration data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 xGainR; /**< Red gain - 16p16 */ - OMX_U32 xGainB; /**< Blue gain - 16p16 */ -} OMX_CONFIG_CUSTOMAWBGAINSTYPE; - -/* OMX_IndexConfigBrcmRenderStats: Query port statistics */ -typedef struct OMX_CONFIG_BRCMRENDERSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL nValid; - OMX_U32 nMatch; - OMX_U32 nPeriod; - OMX_U32 nPhase; - OMX_U32 nPixelClockNominal; - OMX_U32 nPixelClock; - OMX_U32 nHvsStatus; - OMX_U32 dummy0[2]; -} OMX_CONFIG_BRCMRENDERSTATSTYPE; - -#define OMX_BRCM_MAXANNOTATETEXTLEN 256 -typedef struct OMX_CONFIG_BRCMANNOTATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnable; - OMX_BOOL bShowShutter; - OMX_BOOL bShowAnalogGain; - OMX_BOOL bShowLens; - OMX_BOOL bShowCaf; - OMX_BOOL bShowMotion; - OMX_BOOL bShowFrameNum; - OMX_BOOL bEnableBackground; - OMX_BOOL bCustomBackgroundColour; - OMX_U8 nBackgroundY; - OMX_U8 nBackgroundU; - OMX_U8 nBackgroundV; - OMX_U8 dummy1; - OMX_BOOL bCustomTextColour; - OMX_U8 nTextY; - OMX_U8 nTextU; - OMX_U8 nTextV; - OMX_U8 nTextSize; /**< Text size: 6-150 pixels */ - OMX_U8 sText[OMX_BRCM_MAXANNOTATETEXTLEN]; -} OMX_CONFIG_BRCMANNOTATETYPE; - -typedef enum OMX_BRCMSTEREOSCOPICMODETYPE { - OMX_STEREOSCOPIC_NONE = 0, - OMX_STEREOSCOPIC_SIDEBYSIDE = 1, - OMX_STEREOSCOPIC_TOPBOTTOM = 2, - OMX_STEREOSCOPIC_MAX = 0x7FFFFFFF, -} OMX_BRCMSTEREOSCOPICMODETYPE; - -typedef struct OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BRCMSTEREOSCOPICMODETYPE eMode; /**< Packing mode */ - OMX_BOOL bDecimate; /**< Half/half mode - (pixel aspect ratio = 1:2 or 2:1 if set. 1:1 if not set) */ - OMX_BOOL bSwapEyes; /**< False = left eye first. True = right eye first. */ -} OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE; - -typedef enum OMX_CAMERAINTERFACETYPE { - OMX_CAMERAINTERFACE_CSI = 0, - OMX_CAMERAINTERFACE_CCP2 = 1, - OMX_CAMERAINTERFACE_CPI = 2, - OMX_CAMERAINTERFACE_MAX = 0x7FFFFFFF, -} OMX_CAMERAINTERFACETYPE; - -typedef struct OMX_PARAM_CAMERAINTERFACETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_CAMERAINTERFACETYPE eMode; /**< Interface mode */ -} OMX_PARAM_CAMERAINTERFACETYPE; - -typedef enum OMX_CAMERACLOCKINGMODETYPE { - OMX_CAMERACLOCKINGMODE_STROBE = 0, - OMX_CAMERACLOCKINGMODE_CLOCK = 1, - OMX_CAMERACLOCKINGMODE_MAX = 0x7FFFFFFF, -} OMX_CAMERACLOCKINGMODETYPE; - -typedef struct OMX_PARAM_CAMERACLOCKINGMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_CAMERACLOCKINGMODETYPE eMode; /**< Clocking mode */ -} OMX_PARAM_CAMERACLOCKINGMODETYPE; - -typedef enum OMX_CAMERARXDECODETYPE { - OMX_CAMERARXDECODE_NONE = 0, - OMX_CAMERARXDECODE_DPCM8TO10 = 1, - OMX_CAMERARXDECODE_DPCM7TO10 = 2, - OMX_CAMERARXDECODE_DPCM6TO10 = 3, - OMX_CAMERARXDECODE_DPCM8TO12 = 4, - OMX_CAMERARXDECODE_DPCM7TO12 = 5, - OMX_CAMERARXDECODE_DPCM6TO12 = 6, - OMX_CAMERARXDECODE_DPCM10TO14 = 7, - OMX_CAMERARXDECODE_DPCM8TO14 = 8, - OMX_CAMERARXDECODE_DPCM12TO16 = 9, - OMX_CAMERARXDECODE_DPCM10TO16 = 10, - OMX_CAMERARXDECODE_DPCM8TO16 = 11, - OMX_CAMERARXDECODE_MAX = 0x7FFFFFFF -} OMX_CAMERARXDECODETYPE; - -typedef enum OMX_CAMERARXENCODETYPE { - OMX_CAMERARXENCODE_NONE = 0, - OMX_CAMERARXENCODE_DPCM10TO8 = 1, - OMX_CAMERARXENCODE_DPCM12TO8 = 2, - OMX_CAMERARXENCODE_DPCM14TO8 = 3, - OMX_CAMERARXENCODE_MAX = 0x7FFFFFFF -} OMX_CAMERARXENCODETYPE; - -typedef enum OMX_CAMERARXUNPACKTYPE { - OMX_CAMERARXUNPACK_NONE = 0, - OMX_CAMERARXUNPACK_6 = 1, - OMX_CAMERARXUNPACK_7 = 2, - OMX_CAMERARXUNPACK_8 = 3, - OMX_CAMERARXUNPACK_10 = 4, - OMX_CAMERARXUNPACK_12 = 5, - OMX_CAMERARXUNPACK_14 = 6, - OMX_CAMERARXUNPACK_16 = 7, - OMX_CAMERARXUNPACK_MAX = 0x7FFFFFFF -} OMX_CAMERARXUNPACKYPE; - -typedef enum OMX_CAMERARXPACKTYPE { - OMX_CAMERARXPACK_NONE = 0, - OMX_CAMERARXPACK_8 = 1, - OMX_CAMERARXPACK_10 = 2, - OMX_CAMERARXPACK_12 = 3, - OMX_CAMERARXPACK_14 = 4, - OMX_CAMERARXPACK_16 = 5, - OMX_CAMERARXPACK_RAW10 = 6, - OMX_CAMERARXPACK_RAW12 = 7, - OMX_CAMERARXPACK_MAX = 0x7FFFFFFF -} OMX_CAMERARXPACKTYPE; - -typedef struct OMX_PARAM_CAMERARXCONFIG_TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_CAMERARXDECODETYPE eDecode; - OMX_CAMERARXENCODETYPE eEncode; - OMX_CAMERARXUNPACKYPE eUnpack; - OMX_CAMERARXPACKTYPE ePack; - OMX_U32 nDataLanes; - OMX_U32 nEncodeBlockLength; - OMX_U32 nEmbeddedDataLines; - OMX_U32 nImageId; -} OMX_PARAM_CAMERARXCONFIG_TYPE; - -typedef struct OMX_PARAM_CAMERARXTIMING_TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nTiming1; - OMX_U32 nTiming2; - OMX_U32 nTiming3; - OMX_U32 nTiming4; - OMX_U32 nTiming5; - OMX_U32 nTerm1; - OMX_U32 nTerm2; - OMX_U32 nCpiTiming1; - OMX_U32 nCpiTiming2; -} OMX_PARAM_CAMERARXTIMING_TYPE; -#endif -/* File EOF */ diff --git a/vc/include/IL/OMX_Component.h b/vc/include/IL/OMX_Component.h @@ -1,579 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** OMX_Component.h - OpenMax IL version 1.1.2 - * The OMX_Component header file contains the definitions used to define - * the public interface of a component. This header file is intended to - * be used by both the application and the component. - */ - -#ifndef OMX_Component_h -#define OMX_Component_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Audio.h" -#include "OMX_Video.h" -#include "OMX_Image.h" -#include "OMX_Other.h" - -/** @ingroup comp */ -typedef enum OMX_PORTDOMAINTYPE { - OMX_PortDomainAudio, - OMX_PortDomainVideo, - OMX_PortDomainImage, - OMX_PortDomainOther, - OMX_PortDomainKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_PortDomainVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_PortDomainMax = 0x7ffffff -} OMX_PORTDOMAINTYPE; - -/** @ingroup comp */ -typedef struct OMX_PARAM_PORTDEFINITIONTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port number the structure applies to */ - OMX_DIRTYPE eDir; /**< Direction (input or output) of this port */ - OMX_U32 nBufferCountActual; /**< The actual number of buffers allocated on this port */ - OMX_U32 nBufferCountMin; /**< The minimum number of buffers this port requires */ - OMX_U32 nBufferSize; /**< Size, in bytes, for buffers to be used for this channel */ - OMX_BOOL bEnabled; /**< Ports default to enabled and are enabled/disabled by - OMX_CommandPortEnable/OMX_CommandPortDisable. - When disabled a port is unpopulated. A disabled port - is not populated with buffers on a transition to IDLE. */ - OMX_BOOL bPopulated; /**< Port is populated with all of its buffers as indicated by - nBufferCountActual. A disabled port is always unpopulated. - An enabled port is populated on a transition to OMX_StateIdle - and unpopulated on a transition to loaded. */ - OMX_PORTDOMAINTYPE eDomain; /**< Domain of the port. Determines the contents of metadata below. */ - union { - OMX_AUDIO_PORTDEFINITIONTYPE audio; - OMX_VIDEO_PORTDEFINITIONTYPE video; - OMX_IMAGE_PORTDEFINITIONTYPE image; - OMX_OTHER_PORTDEFINITIONTYPE other; - } format; - OMX_BOOL bBuffersContiguous; - OMX_U32 nBufferAlignment; -} OMX_PARAM_PORTDEFINITIONTYPE; - -/** @ingroup comp */ -typedef struct OMX_PARAM_U32TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nU32; /**< U32 value */ -} OMX_PARAM_U32TYPE; - -/** @ingroup rpm */ -typedef enum OMX_SUSPENSIONPOLICYTYPE { - OMX_SuspensionDisabled, /**< No suspension; v1.0 behavior */ - OMX_SuspensionEnabled, /**< Suspension allowed */ - OMX_SuspensionPolicyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_SuspensionPolicyStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_SuspensionPolicyMax = 0x7fffffff -} OMX_SUSPENSIONPOLICYTYPE; - -/** @ingroup rpm */ -typedef struct OMX_PARAM_SUSPENSIONPOLICYTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_SUSPENSIONPOLICYTYPE ePolicy; -} OMX_PARAM_SUSPENSIONPOLICYTYPE; - -/** @ingroup rpm */ -typedef enum OMX_SUSPENSIONTYPE { - OMX_NotSuspended, /**< component is not suspended */ - OMX_Suspended, /**< component is suspended */ - OMX_SuspensionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_SuspensionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_SuspendMax = 0x7FFFFFFF -} OMX_SUSPENSIONTYPE; - -/** @ingroup rpm */ -typedef struct OMX_PARAM_SUSPENSIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_SUSPENSIONTYPE eType; -} OMX_PARAM_SUSPENSIONTYPE ; - -typedef struct OMX_CONFIG_BOOLEANTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnabled; -} OMX_CONFIG_BOOLEANTYPE; - -/* Parameter specifying the content uri to use. */ -/** @ingroup cp */ -typedef struct OMX_PARAM_CONTENTURITYPE -{ - OMX_U32 nSize; /**< size of the structure in bytes, including - actual URI name */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8 contentURI[1]; /**< The URI name */ -} OMX_PARAM_CONTENTURITYPE; - -/* Parameter specifying the pipe to use. */ -/** @ingroup cp */ -typedef struct OMX_PARAM_CONTENTPIPETYPE -{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_HANDLETYPE hPipe; /**< The pipe handle*/ -} OMX_PARAM_CONTENTPIPETYPE; - -/** @ingroup rpm */ -typedef struct OMX_RESOURCECONCEALMENTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_BOOL bResourceConcealmentForbidden; /**< disallow the use of resource concealment - methods (like degrading algorithm quality to - lower resource consumption or functional bypass) - on a component as a resolution to resource conflicts. */ -} OMX_RESOURCECONCEALMENTTYPE; - - -/** @ingroup metadata */ -typedef enum OMX_METADATACHARSETTYPE { - OMX_MetadataCharsetUnknown = 0, - OMX_MetadataCharsetASCII, - OMX_MetadataCharsetBinary, - OMX_MetadataCharsetCodePage1252, - OMX_MetadataCharsetUTF8, - OMX_MetadataCharsetJavaConformantUTF8, - OMX_MetadataCharsetUTF7, - OMX_MetadataCharsetImapUTF7, - OMX_MetadataCharsetUTF16LE, - OMX_MetadataCharsetUTF16BE, - OMX_MetadataCharsetGB12345, - OMX_MetadataCharsetHZGB2312, - OMX_MetadataCharsetGB2312, - OMX_MetadataCharsetGB18030, - OMX_MetadataCharsetGBK, - OMX_MetadataCharsetBig5, - OMX_MetadataCharsetISO88591, - OMX_MetadataCharsetISO88592, - OMX_MetadataCharsetISO88593, - OMX_MetadataCharsetISO88594, - OMX_MetadataCharsetISO88595, - OMX_MetadataCharsetISO88596, - OMX_MetadataCharsetISO88597, - OMX_MetadataCharsetISO88598, - OMX_MetadataCharsetISO88599, - OMX_MetadataCharsetISO885910, - OMX_MetadataCharsetISO885913, - OMX_MetadataCharsetISO885914, - OMX_MetadataCharsetISO885915, - OMX_MetadataCharsetShiftJIS, - OMX_MetadataCharsetISO2022JP, - OMX_MetadataCharsetISO2022JP1, - OMX_MetadataCharsetISOEUCJP, - OMX_MetadataCharsetSMS7Bit, - OMX_MetadataCharsetKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MetadataCharsetVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MetadataCharsetTypeMax= 0x7FFFFFFF -} OMX_METADATACHARSETTYPE; - -/** @ingroup metadata */ -typedef enum OMX_METADATASCOPETYPE -{ - OMX_MetadataScopeAllLevels, - OMX_MetadataScopeTopLevel, - OMX_MetadataScopePortLevel, - OMX_MetadataScopeNodeLevel, - OMX_MetadataScopeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MetadataScopeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MetadataScopeTypeMax = 0x7fffffff -} OMX_METADATASCOPETYPE; - -/** @ingroup metadata */ -typedef enum OMX_METADATASEARCHMODETYPE -{ - OMX_MetadataSearchValueSizeByIndex, - OMX_MetadataSearchItemByIndex, - OMX_MetadataSearchNextItemByKey, - OMX_MetadataSearchKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MetadataSearchVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MetadataSearchTypeMax = 0x7fffffff -} OMX_METADATASEARCHMODETYPE; -/** @ingroup metadata */ -typedef struct OMX_CONFIG_METADATAITEMCOUNTTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_METADATASCOPETYPE eScopeMode; - OMX_U32 nScopeSpecifier; - OMX_U32 nMetadataItemCount; -} OMX_CONFIG_METADATAITEMCOUNTTYPE; - -/** @ingroup metadata */ -typedef struct OMX_CONFIG_METADATAITEMTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_METADATASCOPETYPE eScopeMode; - OMX_U32 nScopeSpecifier; - OMX_U32 nMetadataItemIndex; - OMX_METADATASEARCHMODETYPE eSearchMode; - OMX_METADATACHARSETTYPE eKeyCharset; - OMX_U8 nKeySizeUsed; - OMX_U8 nKey[128]; - OMX_METADATACHARSETTYPE eValueCharset; - OMX_STRING sLanguageCountry; - OMX_U32 nValueMaxSize; - OMX_U32 nValueSizeUsed; - OMX_U8 nValue[1]; -} OMX_CONFIG_METADATAITEMTYPE; - -/* @ingroup metadata */ -typedef struct OMX_CONFIG_CONTAINERNODECOUNTTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bAllKeys; - OMX_U32 nParentNodeID; - OMX_U32 nNumNodes; -} OMX_CONFIG_CONTAINERNODECOUNTTYPE; - -/** @ingroup metadata */ -typedef struct OMX_CONFIG_CONTAINERNODEIDTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bAllKeys; - OMX_U32 nParentNodeID; - OMX_U32 nNodeIndex; - OMX_U32 nNodeID; - OMX_STRING cNodeName; - OMX_BOOL bIsLeafType; -} OMX_CONFIG_CONTAINERNODEIDTYPE; - -/** @ingroup metadata */ -typedef struct OMX_PARAM_METADATAFILTERTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bAllKeys; /* if true then this structure refers to all keys and - * the three key fields below are ignored */ - OMX_METADATACHARSETTYPE eKeyCharset; - OMX_U32 nKeySizeUsed; - OMX_U8 nKey [128]; - OMX_U32 nLanguageCountrySizeUsed; - OMX_U8 nLanguageCountry[128]; - OMX_BOOL bEnabled; /* if true then key is part of filter (e.g. - * retained for query later). If false then - * key is not part of filter */ -} OMX_PARAM_METADATAFILTERTYPE; - -/** The OMX_HANDLETYPE structure defines the component handle. The component - * handle is used to access all of the component's public methods and also - * contains pointers to the component's private data area. The component - * handle is initialized by the OMX core (with help from the component) - * during the process of loading the component. After the component is - * successfully loaded, the application can safely access any of the - * component's public functions (although some may return an error because - * the state is inappropriate for the access). - * - * @ingroup comp - */ -typedef struct OMX_COMPONENTTYPE -{ - /** The size of this structure, in bytes. It is the responsibility - of the allocator of this structure to fill in this value. Since - this structure is allocated by the GetHandle function, this - function will fill in this value. */ - OMX_U32 nSize; - - /** nVersion is the version of the OMX specification that the structure - is built against. It is the responsibility of the creator of this - structure to initialize this value and every user of this structure - should verify that it knows how to use the exact version of - this structure found herein. */ - OMX_VERSIONTYPE nVersion; - - /** pComponentPrivate is a pointer to the component private data area. - This member is allocated and initialized by the component when the - component is first loaded. The application should not access this - data area. */ - OMX_PTR pComponentPrivate; - - /** pApplicationPrivate is a pointer that is a parameter to the - OMX_GetHandle method, and contains an application private value - provided by the IL client. This application private data is - returned to the IL Client by OMX in all callbacks */ - OMX_PTR pApplicationPrivate; - - /** refer to OMX_GetComponentVersion in OMX_core.h or the OMX IL - specification for details on the GetComponentVersion method. - */ - OMX_ERRORTYPE (*GetComponentVersion)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_OUT OMX_STRING pComponentName, - OMX_OUT OMX_VERSIONTYPE* pComponentVersion, - OMX_OUT OMX_VERSIONTYPE* pSpecVersion, - OMX_OUT OMX_UUIDTYPE* pComponentUUID); - - /** refer to OMX_SendCommand in OMX_core.h or the OMX IL - specification for details on the SendCommand method. - */ - OMX_ERRORTYPE (*SendCommand)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_COMMANDTYPE Cmd, - OMX_IN OMX_U32 nParam1, - OMX_IN OMX_PTR pCmdData); - - /** refer to OMX_GetParameter in OMX_core.h or the OMX IL - specification for details on the GetParameter method. - */ - OMX_ERRORTYPE (*GetParameter)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nParamIndex, - OMX_INOUT OMX_PTR pComponentParameterStructure); - - - /** refer to OMX_SetParameter in OMX_core.h or the OMX IL - specification for details on the SetParameter method. - */ - OMX_ERRORTYPE (*SetParameter)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nIndex, - OMX_IN OMX_PTR pComponentParameterStructure); - - - /** refer to OMX_GetConfig in OMX_core.h or the OMX IL - specification for details on the GetConfig method. - */ - OMX_ERRORTYPE (*GetConfig)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nIndex, - OMX_INOUT OMX_PTR pComponentConfigStructure); - - - /** refer to OMX_SetConfig in OMX_core.h or the OMX IL - specification for details on the SetConfig method. - */ - OMX_ERRORTYPE (*SetConfig)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nIndex, - OMX_IN OMX_PTR pComponentConfigStructure); - - - /** refer to OMX_GetExtensionIndex in OMX_core.h or the OMX IL - specification for details on the GetExtensionIndex method. - */ - OMX_ERRORTYPE (*GetExtensionIndex)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_STRING cParameterName, - OMX_OUT OMX_INDEXTYPE* pIndexType); - - - /** refer to OMX_GetState in OMX_core.h or the OMX IL - specification for details on the GetState method. - */ - OMX_ERRORTYPE (*GetState)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_OUT OMX_STATETYPE* pState); - - - /** The ComponentTunnelRequest method will interact with another OMX - component to determine if tunneling is possible and to setup the - tunneling. The return codes for this method can be used to - determine if tunneling is not possible, or if tunneling is not - supported. - - Base profile components (i.e. non-interop) do not support this - method and should return OMX_ErrorNotImplemented - - The interop profile component MUST support tunneling to another - interop profile component with a compatible port parameters. - A component may also support proprietary communication. - - If proprietary communication is supported the negotiation of - proprietary communication is done outside of OMX in a vendor - specific way. It is only required that the proper result be - returned and the details of how the setup is done is left - to the component implementation. - - When this method is invoked when nPort in an output port, the - component will: - 1. Populate the pTunnelSetup structure with the output port's - requirements and constraints for the tunnel. - - When this method is invoked when nPort in an input port, the - component will: - 1. Query the necessary parameters from the output port to - determine if the ports are compatible for tunneling - 2. If the ports are compatible, the component should store - the tunnel step provided by the output port - 3. Determine which port (either input or output) is the buffer - supplier, and call OMX_SetParameter on the output port to - indicate this selection. - - The component will return from this call within 5 msec. - - @param [in] hComp - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle method. - @param [in] nPort - nPort is used to select the port on the component to be used - for tunneling. - @param [in] hTunneledComp - Handle of the component to tunnel with. This is the component - handle returned by the call to the OMX_GetHandle method. When - this parameter is 0x0 the component should setup the port for - communication with the application / IL Client. - @param [in] nPortOutput - nPortOutput is used indicate the port the component should - tunnel with. - @param [in] pTunnelSetup - Pointer to the tunnel setup structure. When nPort is an output port - the component should populate the fields of this structure. When - When nPort is an input port the component should review the setup - provided by the component with the output port. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup tun - */ - - OMX_ERRORTYPE (*ComponentTunnelRequest)( - OMX_IN OMX_HANDLETYPE hComp, - OMX_IN OMX_U32 nPort, - OMX_IN OMX_HANDLETYPE hTunneledComp, - OMX_IN OMX_U32 nTunneledPort, - OMX_INOUT OMX_TUNNELSETUPTYPE* pTunnelSetup); - - /** refer to OMX_UseBuffer in OMX_core.h or the OMX IL - specification for details on the UseBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*UseBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_PTR pAppPrivate, - OMX_IN OMX_U32 nSizeBytes, - OMX_IN OMX_U8* pBuffer); - - /** refer to OMX_AllocateBuffer in OMX_core.h or the OMX IL - specification for details on the AllocateBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*AllocateBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_INOUT OMX_BUFFERHEADERTYPE** ppBuffer, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_PTR pAppPrivate, - OMX_IN OMX_U32 nSizeBytes); - - /** refer to OMX_FreeBuffer in OMX_core.h or the OMX IL - specification for details on the FreeBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*FreeBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** refer to OMX_EmptyThisBuffer in OMX_core.h or the OMX IL - specification for details on the EmptyThisBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*EmptyThisBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** refer to OMX_FillThisBuffer in OMX_core.h or the OMX IL - specification for details on the FillThisBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*FillThisBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** The SetCallbacks method is used by the core to specify the callback - structure from the application to the component. This is a blocking - call. The component will return from this call within 5 msec. - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @param [in] pCallbacks - pointer to an OMX_CALLBACKTYPE structure used to provide the - callback information to the component - @param [in] pAppData - pointer to an application defined value. It is anticipated that - the application will pass a pointer to a data structure or a "this - pointer" in this area to allow the callback (in the application) - to determine the context of the call - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - */ - OMX_ERRORTYPE (*SetCallbacks)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_CALLBACKTYPE* pCallbacks, - OMX_IN OMX_PTR pAppData); - - /** ComponentDeInit method is used to deinitialize the component - providing a means to free any resources allocated at component - initialization. NOTE: After this call the component handle is - not valid for further use. - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - */ - OMX_ERRORTYPE (*ComponentDeInit)( - OMX_IN OMX_HANDLETYPE hComponent); - - /** @ingroup buf */ - OMX_ERRORTYPE (*UseEGLImage)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_PTR pAppPrivate, - OMX_IN void* eglImage); - - OMX_ERRORTYPE (*ComponentRoleEnum)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_OUT OMX_U8 *cRole, - OMX_IN OMX_U32 nIndex); - -} OMX_COMPONENTTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/IL/OMX_Core.h b/vc/include/IL/OMX_Core.h @@ -1,1456 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** OMX_Core.h - OpenMax IL version 1.1.2 - * The OMX_Core header file contains the definitions used by both the - * application and the component to access common items. - */ - -#ifndef OMX_Core_h -#define OMX_Core_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header shall include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Index.h" - - -/** The OMX_COMMANDTYPE enumeration is used to specify the action in the - * OMX_SendCommand macro. - * @ingroup core - */ -typedef enum OMX_COMMANDTYPE -{ - OMX_CommandStateSet, /**< Change the component state */ - OMX_CommandFlush, /**< Flush the data queue(s) of a component */ - OMX_CommandPortDisable, /**< Disable a port on a component. */ - OMX_CommandPortEnable, /**< Enable a port on a component. */ - OMX_CommandMarkBuffer, /**< Mark a component/buffer for observation */ - OMX_CommandKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CommandVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CommandMax = 0X7FFFFFFF -} OMX_COMMANDTYPE; - - - -/** The OMX_STATETYPE enumeration is used to indicate or change the component - * state. This enumeration reflects the current state of the component when - * used with the OMX_GetState macro or becomes the parameter in a state change - * command when used with the OMX_SendCommand macro. - * - * The component will be in the Loaded state after the component is initially - * loaded into memory. In the Loaded state, the component is not allowed to - * allocate or hold resources other than to build it's internal parameter - * and configuration tables. The application will send one or more - * SetParameters/GetParameters and SetConfig/GetConfig commands to the - * component and the component will record each of these parameter and - * configuration changes for use later. When the application sends the - * Idle command, the component will acquire the resources needed for the - * specified configuration and will transition to the idle state if the - * allocation is successful. If the component cannot successfully - * transition to the idle state for any reason, the state of the component - * shall be fully rolled back to the Loaded state (e.g. all allocated - * resources shall be released). When the component receives the command - * to go to the Executing state, it shall begin processing buffers by - * sending all input buffers it holds to the application. While - * the component is in the Idle state, the application may also send the - * Pause command. If the component receives the pause command while in the - * Idle state, the component shall send all input buffers it holds to the - * application, but shall not begin processing buffers. This will allow the - * application to prefill buffers. - * - * @ingroup comp - */ - -typedef enum OMX_STATETYPE -{ - OMX_StateInvalid, /**< component has detected that it's internal data - structures are corrupted to the point that - it cannot determine it's state properly */ - OMX_StateLoaded, /**< component has been loaded but has not completed - initialization. The OMX_SetParameter macro - and the OMX_GetParameter macro are the only - valid macros allowed to be sent to the - component in this state. */ - OMX_StateIdle, /**< component initialization has been completed - successfully and the component is ready to - to start. */ - OMX_StateExecuting, /**< component has accepted the start command and - is processing data (if data is available) */ - OMX_StatePause, /**< component has received pause command */ - OMX_StateWaitForResources, /**< component is waiting for resources, either after - preemption or before it gets the resources requested. - See specification for complete details. */ - OMX_StateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_StateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_StateMax = 0X7FFFFFFF -} OMX_STATETYPE; - -/** The OMX_ERRORTYPE enumeration defines the standard OMX Errors. These - * errors should cover most of the common failure cases. However, - * vendors are free to add additional error messages of their own as - * long as they follow these rules: - * 1. Vendor error messages shall be in the range of 0x90000000 to - * 0x9000FFFF. - * 2. Vendor error messages shall be defined in a header file provided - * with the component. No error messages are allowed that are - * not defined. - */ -typedef enum OMX_ERRORTYPE -{ - OMX_ErrorNone = 0, - - /** There were insufficient resources to perform the requested operation */ - OMX_ErrorInsufficientResources = (OMX_S32) 0x80001000, - - /** There was an error, but the cause of the error could not be determined */ - OMX_ErrorUndefined = (OMX_S32) 0x80001001, - - /** The component name string was not valid */ - OMX_ErrorInvalidComponentName = (OMX_S32) 0x80001002, - - /** No component with the specified name string was found */ - OMX_ErrorComponentNotFound = (OMX_S32) 0x80001003, - - /** The component specified did not have a "OMX_ComponentInit" or - "OMX_ComponentDeInit entry point */ - OMX_ErrorInvalidComponent = (OMX_S32) 0x80001004, - - /** One or more parameters were not valid */ - OMX_ErrorBadParameter = (OMX_S32) 0x80001005, - - /** The requested function is not implemented */ - OMX_ErrorNotImplemented = (OMX_S32) 0x80001006, - - /** The buffer was emptied before the next buffer was ready */ - OMX_ErrorUnderflow = (OMX_S32) 0x80001007, - - /** The buffer was not available when it was needed */ - OMX_ErrorOverflow = (OMX_S32) 0x80001008, - - /** The hardware failed to respond as expected */ - OMX_ErrorHardware = (OMX_S32) 0x80001009, - - /** The component is in the state OMX_StateInvalid */ - OMX_ErrorInvalidState = (OMX_S32) 0x8000100A, - - /** Stream is found to be corrupt */ - OMX_ErrorStreamCorrupt = (OMX_S32) 0x8000100B, - - /** Ports being connected are not compatible */ - OMX_ErrorPortsNotCompatible = (OMX_S32) 0x8000100C, - - /** Resources allocated to an idle component have been - lost resulting in the component returning to the loaded state */ - OMX_ErrorResourcesLost = (OMX_S32) 0x8000100D, - - /** No more indicies can be enumerated */ - OMX_ErrorNoMore = (OMX_S32) 0x8000100E, - - /** The component detected a version mismatch */ - OMX_ErrorVersionMismatch = (OMX_S32) 0x8000100F, - - /** The component is not ready to return data at this time */ - OMX_ErrorNotReady = (OMX_S32) 0x80001010, - - /** There was a timeout that occurred */ - OMX_ErrorTimeout = (OMX_S32) 0x80001011, - - /** This error occurs when trying to transition into the state you are already in */ - OMX_ErrorSameState = (OMX_S32) 0x80001012, - - /** Resources allocated to an executing or paused component have been - preempted, causing the component to return to the idle state */ - OMX_ErrorResourcesPreempted = (OMX_S32) 0x80001013, - - /** A non-supplier port sends this error to the IL client (via the EventHandler callback) - during the allocation of buffers (on a transition from the LOADED to the IDLE state or - on a port restart) when it deems that it has waited an unusually long time for the supplier - to send it an allocated buffer via a UseBuffer call. */ - OMX_ErrorPortUnresponsiveDuringAllocation = (OMX_S32) 0x80001014, - - /** A non-supplier port sends this error to the IL client (via the EventHandler callback) - during the deallocation of buffers (on a transition from the IDLE to LOADED state or - on a port stop) when it deems that it has waited an unusually long time for the supplier - to request the deallocation of a buffer header via a FreeBuffer call. */ - OMX_ErrorPortUnresponsiveDuringDeallocation = (OMX_S32) 0x80001015, - - /** A supplier port sends this error to the IL client (via the EventHandler callback) - during the stopping of a port (either on a transition from the IDLE to LOADED - state or a port stop) when it deems that it has waited an unusually long time for - the non-supplier to return a buffer via an EmptyThisBuffer or FillThisBuffer call. */ - OMX_ErrorPortUnresponsiveDuringStop = (OMX_S32) 0x80001016, - - /** Attempting a state transtion that is not allowed */ - OMX_ErrorIncorrectStateTransition = (OMX_S32) 0x80001017, - - /* Attempting a command that is not allowed during the present state. */ - OMX_ErrorIncorrectStateOperation = (OMX_S32) 0x80001018, - - /** The values encapsulated in the parameter or config structure are not supported. */ - OMX_ErrorUnsupportedSetting = (OMX_S32) 0x80001019, - - /** The parameter or config indicated by the given index is not supported. */ - OMX_ErrorUnsupportedIndex = (OMX_S32) 0x8000101A, - - /** The port index supplied is incorrect. */ - OMX_ErrorBadPortIndex = (OMX_S32) 0x8000101B, - - /** The port has lost one or more of its buffers and it thus unpopulated. */ - OMX_ErrorPortUnpopulated = (OMX_S32) 0x8000101C, - - /** Component suspended due to temporary loss of resources */ - OMX_ErrorComponentSuspended = (OMX_S32) 0x8000101D, - - /** Component suspended due to an inability to acquire dynamic resources */ - OMX_ErrorDynamicResourcesUnavailable = (OMX_S32) 0x8000101E, - - /** When the macroblock error reporting is enabled the component returns new error - for every frame that has errors */ - OMX_ErrorMbErrorsInFrame = (OMX_S32) 0x8000101F, - - /** A component reports this error when it cannot parse or determine the format of an input stream. */ - OMX_ErrorFormatNotDetected = (OMX_S32) 0x80001020, - - /** The content open operation failed. */ - OMX_ErrorContentPipeOpenFailed = (OMX_S32) 0x80001021, - - /** The content creation operation failed. */ - OMX_ErrorContentPipeCreationFailed = (OMX_S32) 0x80001022, - - /** Separate table information is being used */ - OMX_ErrorSeperateTablesUsed = (OMX_S32) 0x80001023, - - /** Tunneling is unsupported by the component*/ - OMX_ErrorTunnelingUnsupported = (OMX_S32) 0x80001024, - - OMX_ErrorKhronosExtensions = (OMX_S32)0x8F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ErrorVendorStartUnused = (OMX_S32)0x90000000, /**< Reserved region for introducing Vendor Extensions */ - - /** Disk Full error */ - OMX_ErrorDiskFull = (OMX_S32) 0x90000001, - - /** Max file size is reached */ - OMX_ErrorMaxFileSize = (OMX_S32) 0x90000002, - - /** Unauthorised to play a DRM protected file */ - OMX_ErrorDrmUnauthorised = (OMX_S32) 0x90000003, - - /** The DRM protected file has expired */ - OMX_ErrorDrmExpired = (OMX_S32) 0x90000004, - - /** Some other DRM library error */ - OMX_ErrorDrmGeneral = (OMX_S32) 0x90000005, - - OMX_ErrorMax = 0x7FFFFFFF -} OMX_ERRORTYPE; - -/** @ingroup core */ -typedef OMX_ERRORTYPE (* OMX_COMPONENTINITTYPE)(OMX_IN OMX_HANDLETYPE hComponent); - -/** @ingroup core */ -typedef struct OMX_COMPONENTREGISTERTYPE -{ - const char * pName; /* Component name, 128 byte limit (including '\0') applies */ - OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */ -} OMX_COMPONENTREGISTERTYPE; - -/** @ingroup core */ -extern OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[]; - -/** @ingroup rpm */ -typedef struct OMX_PRIORITYMGMTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nGroupPriority; /**< Priority of the component group */ - OMX_U32 nGroupID; /**< ID of the component group */ -} OMX_PRIORITYMGMTTYPE; - -/* Component name and Role names are limited to 128 characters including the terminating '\0'. */ -#define OMX_MAX_STRINGNAME_SIZE 128 - -/** @ingroup comp */ -typedef struct OMX_PARAM_COMPONENTROLETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8 cRole[OMX_MAX_STRINGNAME_SIZE]; /**< name of standard component which defines component role */ -} OMX_PARAM_COMPONENTROLETYPE; - -/** End of Stream Buffer Flag: - * - * A component sets EOS when it has no more data to emit on a particular - * output port. Thus an output port shall set EOS on the last buffer it - * emits. A component's determination of when an output port should - * cease sending data is implemenation specific. - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_EOS 0x00000001 - -/** Start Time Buffer Flag: - * - * The source of a stream (e.g. a demux component) sets the STARTTIME - * flag on the buffer that contains the starting timestamp for the - * stream. The starting timestamp corresponds to the first data that - * should be displayed at startup or after a seek. - * The first timestamp of the stream is not necessarily the start time. - * For instance, in the case of a seek to a particular video frame, - * the target frame may be an interframe. Thus the first buffer of - * the stream will be the intra-frame preceding the target frame and - * the starttime will occur with the target frame (with any other - * required frames required to reconstruct the target intervening). - * - * The STARTTIME flag is directly associated with the buffer's - * timestamp ' thus its association to buffer data and its - * propagation is identical to the timestamp's. - * - * When a Sync Component client receives a buffer with the - * STARTTIME flag it shall perform a SetConfig on its sync port - * using OMX_ConfigTimeClientStartTime and passing the buffer's - * timestamp. - * - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_STARTTIME 0x00000002 - - - -/** Decode Only Buffer Flag: - * - * The source of a stream (e.g. a demux component) sets the DECODEONLY - * flag on any buffer that should shall be decoded but should not be - * displayed. This flag is used, for instance, when a source seeks to - * a target interframe that requires the decode of frames preceding the - * target to facilitate the target's reconstruction. In this case the - * source would emit the frames preceding the target downstream - * but mark them as decode only. - * - * The DECODEONLY is associated with buffer data and propagated in a - * manner identical to the buffer timestamp. - * - * A component that renders data should ignore all buffers with - * the DECODEONLY flag set. - * - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_DECODEONLY 0x00000004 - - -/* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_DATACORRUPT 0x00000008 - -/* End of Frame: The buffer contains exactly one end of frame and no data - * occurs after the end of frame. This flag is an optional hint. The absence - * of this flag does not imply the absence of an end of frame within the buffer. - * @ingroup buf -*/ -#define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010 - -/* Sync Frame Flag: This flag is set when the buffer content contains a coded sync frame ' - * a frame that has no dependency on any other frame information - * @ingroup buf - */ -#define OMX_BUFFERFLAG_SYNCFRAME 0x00000020 - -/* Extra data present flag: there is extra data appended to the data stream - * residing in the buffer - * @ingroup buf - */ -#define OMX_BUFFERFLAG_EXTRADATA 0x00000040 - -/** Codec Config Buffer Flag: -* OMX_BUFFERFLAG_CODECCONFIG is an optional flag that is set by an -* output port when all bytes in the buffer form part or all of a set of -* codec specific configuration data. Examples include SPS/PPS nal units -* for OMX_VIDEO_CodingAVC or AudioSpecificConfig data for -* OMX_AUDIO_CodingAAC. Any component that for a given stream sets -* OMX_BUFFERFLAG_CODECCONFIG shall not mix codec configuration bytes -* with frame data in the same buffer, and shall send all buffers -* containing codec configuration bytes before any buffers containing -* frame data that those configurations bytes describe. -* If the stream format for a particular codec has a frame specific -* header at the start of each frame, for example OMX_AUDIO_CodingMP3 or -* OMX_AUDIO_CodingAAC in ADTS mode, then these shall be presented as -* normal without setting OMX_BUFFERFLAG_CODECCONFIG. - * @ingroup buf - */ -#define OMX_BUFFERFLAG_CODECCONFIG 0x00000080 - - - -/** @ingroup buf */ -typedef struct OMX_BUFFERHEADERTYPE -{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8* pBuffer; /**< Pointer to actual block of memory - that is acting as the buffer */ - OMX_U32 nAllocLen; /**< size of the buffer allocated, in bytes */ - OMX_U32 nFilledLen; /**< number of bytes currently in the - buffer */ - OMX_U32 nOffset; /**< start offset of valid data in bytes from - the start of the buffer */ - OMX_PTR pAppPrivate; /**< pointer to any data the application - wants to associate with this buffer */ - OMX_PTR pPlatformPrivate; /**< pointer to any data the platform - wants to associate with this buffer */ - OMX_PTR pInputPortPrivate; /**< pointer to any data the input port - wants to associate with this buffer */ - OMX_PTR pOutputPortPrivate; /**< pointer to any data the output port - wants to associate with this buffer */ - OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will generate a - mark event upon processing this buffer. */ - OMX_PTR pMarkData; /**< Application specific data associated with - the mark sent on a mark event to disambiguate - this mark from others. */ - OMX_U32 nTickCount; /**< Optional entry that the component and - application can update with a tick count - when they access the component. This - value should be in microseconds. Since - this is a value relative to an arbitrary - starting point, this value cannot be used - to determine absolute time. This is an - optional entry and not all components - will update it.*/ - OMX_TICKS nTimeStamp; /**< Timestamp corresponding to the sample - starting at the first logical sample - boundary in the buffer. Timestamps of - successive samples within the buffer may - be inferred by adding the duration of the - of the preceding buffer to the timestamp - of the preceding buffer.*/ - OMX_U32 nFlags; /**< buffer specific flags */ - OMX_U32 nOutputPortIndex; /**< The index of the output port (if any) using - this buffer */ - OMX_U32 nInputPortIndex; /**< The index of the input port (if any) using - this buffer */ -} OMX_BUFFERHEADERTYPE; - -/** The OMX_EXTRADATATYPE enumeration is used to define the - * possible extra data payload types. - * NB: this enum is binary backwards compatible with the previous - * OMX_EXTRADATA_QUANT define. This should be replaced with - * OMX_ExtraDataQuantization. - */ -typedef enum OMX_EXTRADATATYPE -{ - OMX_ExtraDataNone = 0, /**< Indicates that no more extra data sections follow */ - OMX_ExtraDataQuantization, /**< The data payload contains quantization data */ - OMX_ExtraDataKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ExtraDataVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_ExtraDataSequenceGap, /**< Indicates a gap in sequence numbers, data is uint32_t - saying how many frames were lost */ - OMX_ExtraDataDecodeOnlyUntil, /**< Indicates a timestamp until which all data should be - decoded only, and the first packets after should generate - a client start time flag. data is int32_t of seek time - in milliseconds */ - - OMX_ExtraDataMax = 0x7FFFFFFF -} OMX_EXTRADATATYPE; - - -typedef struct OMX_OTHER_EXTRADATATYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_EXTRADATATYPE eType; /* Extra Data type */ - OMX_U32 nDataSize; /* Size of the supporting data to follow */ - OMX_U8 data[1]; /* Supporting data hint */ -} OMX_OTHER_EXTRADATATYPE; - -/** @ingroup comp */ -typedef struct OMX_PORT_PARAM_TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPorts; /**< The number of ports for this component */ - OMX_U32 nStartPortNumber; /** first port number for this type of port */ -} OMX_PORT_PARAM_TYPE; - -/** @ingroup comp */ -typedef enum OMX_EVENTTYPE -{ - OMX_EventCmdComplete, /**< component has sucessfully completed a command */ - OMX_EventError, /**< component has detected an error condition */ - OMX_EventMark, /**< component has detected a buffer mark */ - OMX_EventPortSettingsChanged, /**< component is reported a port settings change */ - OMX_EventBufferFlag, /**< component has detected an EOS */ - OMX_EventResourcesAcquired, /**< component has been granted resources and is - automatically starting the state change from - OMX_StateWaitForResources to OMX_StateIdle. */ - OMX_EventComponentResumed, /**< Component resumed due to reacquisition of resources */ - OMX_EventDynamicResourcesAvailable, /**< Component has acquired previously unavailable dynamic resources */ - OMX_EventPortFormatDetected, /**< Component has detected a supported format. */ - OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_EventParamOrConfigChanged, /* Should be added to the main spec as part of IL416c */ - OMX_EventMax = 0x7FFFFFFF -} OMX_EVENTTYPE; - -typedef struct OMX_CALLBACKTYPE -{ - /** The EventHandler method is used to notify the application when an - event of interest occurs. Events are defined in the OMX_EVENTTYPE - enumeration. Please see that enumeration for details of what will - be returned for each type of event. Callbacks should not return - an error to the component, so if an error occurs, the application - shall handle it internally. This is a blocking call. - - The application should return from this call within 5 msec to avoid - blocking the component for an excessively long period of time. - - @param hComponent - handle of the component to access. This is the component - handle returned by the call to the GetHandle function. - @param pAppData - pointer to an application defined value that was provided in the - pAppData parameter to the OMX_GetHandle method for the component. - This application defined value is provided so that the application - can have a component specific context when receiving the callback. - @param eEvent - Event that the component wants to notify the application about. - @param nData1 - nData will be the OMX_ERRORTYPE for an error event and will be - an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event. - @param nData2 - nData2 will hold further information related to the event. Can be OMX_STATETYPE for - a OMX_CommandStateSet command or port index for a OMX_PortSettingsChanged event. - Default value is 0 if not used. ) - @param pEventData - Pointer to additional event-specific data (see spec for meaning). - */ - - OMX_ERRORTYPE (*EventHandler)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_EVENTTYPE eEvent, - OMX_IN OMX_U32 nData1, - OMX_IN OMX_U32 nData2, - OMX_IN OMX_PTR pEventData); - - /** The EmptyBufferDone method is used to return emptied buffers from an - input port back to the application for reuse. This is a blocking call - so the application should not attempt to refill the buffers during this - call, but should queue them and refill them in another thread. There - is no error return, so the application shall handle any errors generated - internally. - - The application should return from this call within 5 msec. - - @param hComponent - handle of the component to access. This is the component - handle returned by the call to the GetHandle function. - @param pAppData - pointer to an application defined value that was provided in the - pAppData parameter to the OMX_GetHandle method for the component. - This application defined value is provided so that the application - can have a component specific context when receiving the callback. - @param pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer indicating the buffer that was emptied. - @ingroup buf - */ - OMX_ERRORTYPE (*EmptyBufferDone)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** The FillBufferDone method is used to return filled buffers from an - output port back to the application for emptying and then reuse. - This is a blocking call so the application should not attempt to - empty the buffers during this call, but should queue the buffers - and empty them in another thread. There is no error return, so - the application shall handle any errors generated internally. The - application shall also update the buffer header to indicate the - number of bytes placed into the buffer. - - The application should return from this call within 5 msec. - - @param hComponent - handle of the component to access. This is the component - handle returned by the call to the GetHandle function. - @param pAppData - pointer to an application defined value that was provided in the - pAppData parameter to the OMX_GetHandle method for the component. - This application defined value is provided so that the application - can have a component specific context when receiving the callback. - @param pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer indicating the buffer that was filled. - @ingroup buf - */ - OMX_ERRORTYPE (*FillBufferDone)( - OMX_OUT OMX_HANDLETYPE hComponent, - OMX_OUT OMX_PTR pAppData, - OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); - -} OMX_CALLBACKTYPE; - -/** The OMX_BUFFERSUPPLIERTYPE enumeration is used to dictate port supplier - preference when tunneling between two ports. - @ingroup tun buf -*/ -typedef enum OMX_BUFFERSUPPLIERTYPE -{ - OMX_BufferSupplyUnspecified = 0x0, /**< port supplying the buffers is unspecified, - or don't care */ - OMX_BufferSupplyInput, /**< input port supplies the buffers */ - OMX_BufferSupplyOutput, /**< output port supplies the buffers */ - OMX_BufferSupplyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_BufferSupplyVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_BufferSupplyMax = 0x7FFFFFFF -} OMX_BUFFERSUPPLIERTYPE; - - -/** buffer supplier parameter - * @ingroup tun - */ -typedef struct OMX_PARAM_BUFFERSUPPLIERTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BUFFERSUPPLIERTYPE eBufferSupplier; /**< buffer supplier */ -} OMX_PARAM_BUFFERSUPPLIERTYPE; - - -/**< indicates that buffers received by an input port of a tunnel - may not modify the data in the buffers - @ingroup tun - */ -#define OMX_PORTTUNNELFLAG_READONLY 0x00000001 - - -/** The OMX_TUNNELSETUPTYPE structure is used to pass data from an output - port to an input port as part the two ComponentTunnelRequest calls - resulting from a OMX_SetupTunnel call from the IL Client. - @ingroup tun - */ -typedef struct OMX_TUNNELSETUPTYPE -{ - OMX_U32 nTunnelFlags; /**< bit flags for tunneling */ - OMX_BUFFERSUPPLIERTYPE eSupplier; /**< supplier preference */ -} OMX_TUNNELSETUPTYPE; - -/* OMX Component headers is included to enable the core to use - macros for functions into the component for OMX release 1.0. - Developers should not access any structures or data from within - the component header directly */ -/* TO BE REMOVED - #include <OMX_Component.h> */ - -/** GetComponentVersion will return information about the component. - This is a blocking call. This macro will go directly from the - application to the component (via a core macro). The - component will return from this call within 5 msec. - @param [in] hComponent - handle of component to execute the command - @param [out] pComponentName - pointer to an empty string of length 128 bytes. The component - will write its name into this string. The name will be - terminated by a single zero byte. The name of a component will - be 127 bytes or less to leave room for the trailing zero byte. - An example of a valid component name is "OMX.ABC.ChannelMixer\0". - @param [out] pComponentVersion - pointer to an OMX Version structure that the component will fill - in. The component will fill in a value that indicates the - component version. NOTE: the component version is NOT the same - as the OMX Specification version (found in all structures). The - component version is defined by the vendor of the component and - its value is entirely up to the component vendor. - @param [out] pSpecVersion - pointer to an OMX Version structure that the component will fill - in. The SpecVersion is the version of the specification that the - component was built against. Please note that this value may or - may not match the structure's version. For example, if the - component was built against the 2.0 specification, but the - application (which creates the structure is built against the - 1.0 specification the versions would be different. - @param [out] pComponentUUID - pointer to the UUID of the component which will be filled in by - the component. The UUID is a unique identifier that is set at - RUN time for the component and is unique to each instantion of - the component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetComponentVersion( \ - hComponent, \ - pComponentName, \ - pComponentVersion, \ - pSpecVersion, \ - pComponentUUID) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetComponentVersion( \ - hComponent, \ - pComponentName, \ - pComponentVersion, \ - pSpecVersion, \ - pComponentUUID) /* Macro End */ - - -/** Send a command to the component. This call is a non-blocking call. - The component should check the parameters and then queue the command - to the component thread to be executed. The component thread shall - send the EventHandler() callback at the conclusion of the command. - This macro will go directly from the application to the component (via - a core macro). The component will return from this call within 5 msec. - - When the command is "OMX_CommandStateSet" the component will queue a - state transition to the new state idenfied in nParam. - - When the command is "OMX_CommandFlush", to flush a port's buffer queues, - the command will force the component to return all buffers NOT CURRENTLY - BEING PROCESSED to the application, in the order in which the buffers - were received. - - When the command is "OMX_CommandPortDisable" or - "OMX_CommandPortEnable", the component's port (given by the value of - nParam) will be stopped or restarted. - - When the command "OMX_CommandMarkBuffer" is used to mark a buffer, the - pCmdData will point to a OMX_MARKTYPE structure containing the component - handle of the component to examine the buffer chain for the mark. nParam1 - contains the index of the port on which the buffer mark is applied. - - Specification text for more details. - - @param [in] hComponent - handle of component to execute the command - @param [in] Cmd - Command for the component to execute - @param [in] nParam - Parameter for the command to be executed. When Cmd has the value - OMX_CommandStateSet, value is a member of OMX_STATETYPE. When Cmd has - the value OMX_CommandFlush, value of nParam indicates which port(s) - to flush. -1 is used to flush all ports a single port index will - only flush that port. When Cmd has the value "OMX_CommandPortDisable" - or "OMX_CommandPortEnable", the component's port is given by - the value of nParam. When Cmd has the value "OMX_CommandMarkBuffer" - the components pot is given by the value of nParam. - @param [in] pCmdData - Parameter pointing to the OMX_MARKTYPE structure when Cmd has the value - "OMX_CommandMarkBuffer". - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_SendCommand( \ - hComponent, \ - Cmd, \ - nParam, \ - pCmdData) \ - ((OMX_COMPONENTTYPE*)hComponent)->SendCommand( \ - hComponent, \ - Cmd, \ - nParam, \ - pCmdData) /* Macro End */ - - -/** The OMX_GetParameter macro will get one of the current parameter - settings from the component. This macro cannot only be invoked when - the component is in the OMX_StateInvalid state. The nParamIndex - parameter is used to indicate which structure is being requested from - the component. The application shall allocate the correct structure - and shall fill in the structure size and version information before - invoking this macro. When the parameter applies to a port, the - caller shall fill in the appropriate nPortIndex value indicating the - port on which the parameter applies. If the component has not had - any settings changed, then the component should return a set of - valid DEFAULT parameters for the component. This is a blocking - call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nParamIndex - Index of the structure to be filled. This value is from the - OMX_INDEXTYPE enumeration. - @param [in,out] pComponentParameterStructure - Pointer to application allocated structure to be filled by the - component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) /* Macro End */ - - -/** The OMX_SetParameter macro will send an initialization parameter - structure to a component. Each structure shall be sent one at a time, - in a separate invocation of the macro. This macro can only be - invoked when the component is in the OMX_StateLoaded state, or the - port is disabled (when the parameter applies to a port). The - nParamIndex parameter is used to indicate which structure is being - passed to the component. The application shall allocate the - correct structure and shall fill in the structure size and version - information (as well as the actual data) before invoking this macro. - The application is free to dispose of this structure after the call - as the component is required to copy any data it shall retain. This - is a blocking call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nIndex - Index of the structure to be sent. This value is from the - OMX_INDEXTYPE enumeration. - @param [in] pComponentParameterStructure - pointer to application allocated structure to be used for - initialization by the component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_SetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->SetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) /* Macro End */ - - -/** The OMX_GetConfig macro will get one of the configuration structures - from a component. This macro can be invoked anytime after the - component has been loaded. The nParamIndex call parameter is used to - indicate which structure is being requested from the component. The - application shall allocate the correct structure and shall fill in the - structure size and version information before invoking this macro. - If the component has not had this configuration parameter sent before, - then the component should return a set of valid DEFAULT values for the - component. This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nIndex - Index of the structure to be filled. This value is from the - OMX_INDEXTYPE enumeration. - @param [in,out] pComponentConfigStructure - pointer to application allocated structure to be filled by the - component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp -*/ -#define OMX_GetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) /* Macro End */ - - -/** The OMX_SetConfig macro will send one of the configuration - structures to a component. Each structure shall be sent one at a time, - each in a separate invocation of the macro. This macro can be invoked - anytime after the component has been loaded. The application shall - allocate the correct structure and shall fill in the structure size - and version information (as well as the actual data) before invoking - this macro. The application is free to dispose of this structure after - the call as the component is required to copy any data it shall retain. - This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nConfigIndex - Index of the structure to be sent. This value is from the - OMX_INDEXTYPE enumeration above. - @param [in] pComponentConfigStructure - pointer to application allocated structure to be used for - initialization by the component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_SetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->SetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) /* Macro End */ - - -/** The OMX_GetExtensionIndex macro will invoke a component to translate - a vendor specific configuration or parameter string into an OMX - structure index. There is no requirement for the vendor to support - this command for the indexes already found in the OMX_INDEXTYPE - enumeration (this is done to save space in small components). The - component shall support all vendor supplied extension indexes not found - in the master OMX_INDEXTYPE enumeration. This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @param [in] cParameterName - OMX_STRING that shall be less than 128 characters long including - the trailing null byte. This is the string that will get - translated by the component into a configuration index. - @param [out] pIndexType - a pointer to a OMX_INDEXTYPE to receive the index value. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetExtensionIndex( \ - hComponent, \ - cParameterName, \ - pIndexType) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetExtensionIndex( \ - hComponent, \ - cParameterName, \ - pIndexType) /* Macro End */ - - -/** The OMX_GetState macro will invoke the component to get the current - state of the component and place the state value into the location - pointed to by pState. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] pState - pointer to the location to receive the state. The value returned - is one of the OMX_STATETYPE members - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetState( \ - hComponent, \ - pState) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetState( \ - hComponent, \ - pState) /* Macro End */ - - -/** The OMX_UseBuffer macro will request that the component use - a buffer (and allocate its own buffer header) already allocated - by another component, or by the IL Client. This is a blocking - call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] ppBuffer - pointer to an OMX_BUFFERHEADERTYPE structure used to receive the - pointer to the buffer header - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ - -#define OMX_UseBuffer( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->UseBuffer( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes, \ - pBuffer) - - -/** The OMX_AllocateBuffer macro will request that the component allocate - a new buffer and buffer header. The component will allocate the - buffer and the buffer header and return a pointer to the buffer - header. This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] ppBuffer - pointer to an OMX_BUFFERHEADERTYPE structure used to receive - the pointer to the buffer header - @param [in] nPortIndex - nPortIndex is used to select the port on the component the buffer will - be used with. The port can be found by using the nPortIndex - value as an index into the Port Definition array of the component. - @param [in] pAppPrivate - pAppPrivate is used to initialize the pAppPrivate member of the - buffer header structure. - @param [in] nSizeBytes - size of the buffer to allocate. Used when bAllocateNew is true. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_AllocateBuffer( \ - hComponent, \ - ppBuffer, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes) \ - ((OMX_COMPONENTTYPE*)hComponent)->AllocateBuffer( \ - hComponent, \ - ppBuffer, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes) /* Macro End */ - - -/** The OMX_FreeBuffer macro will release a buffer header from the component - which was allocated using either OMX_AllocateBuffer or OMX_UseBuffer. If - the component allocated the buffer (see the OMX_UseBuffer macro) then - the component shall free the buffer and buffer header. This is a - blocking call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nPortIndex - nPortIndex is used to select the port on the component the buffer will - be used with. - @param [in] pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_FreeBuffer( \ - hComponent, \ - nPortIndex, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->FreeBuffer( \ - hComponent, \ - nPortIndex, \ - pBuffer) /* Macro End */ - - -/** The OMX_EmptyThisBuffer macro will send a buffer full of data to an - input port of a component. The buffer will be emptied by the component - and returned to the application via the EmptyBufferDone call back. - This is a non-blocking call in that the component will record the buffer - and return immediately and then empty the buffer, later, at the proper - time. As expected, this macro may be invoked only while the component - is in the OMX_StateExecuting. If nPortIndex does not specify an input - port, the component shall return an error. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_EmptyThisBuffer( \ - hComponent, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->EmptyThisBuffer( \ - hComponent, \ - pBuffer) /* Macro End */ - - -/** The OMX_FillThisBuffer macro will send an empty buffer to an - output port of a component. The buffer will be filled by the component - and returned to the application via the FillBufferDone call back. - This is a non-blocking call in that the component will record the buffer - and return immediately and then fill the buffer, later, at the proper - time. As expected, this macro may be invoked only while the component - is in the OMX_ExecutingState. If nPortIndex does not specify an output - port, the component shall return an error. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_FillThisBuffer( \ - hComponent, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->FillThisBuffer( \ - hComponent, \ - pBuffer) /* Macro End */ - - - -/** The OMX_UseEGLImage macro will request that the component use - a EGLImage provided by EGL (and allocate its own buffer header) - This is a blocking call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] ppBuffer - pointer to an OMX_BUFFERHEADERTYPE structure used to receive the - pointer to the buffer header. Note that the memory location used - for this buffer is NOT visible to the IL Client. - @param [in] nPortIndex - nPortIndex is used to select the port on the component the buffer will - be used with. The port can be found by using the nPortIndex - value as an index into the Port Definition array of the component. - @param [in] pAppPrivate - pAppPrivate is used to initialize the pAppPrivate member of the - buffer header structure. - @param [in] eglImage - eglImage contains the handle of the EGLImage to use as a buffer on the - specified port. The component is expected to validate properties of - the EGLImage against the configuration of the port to ensure the component - can use the EGLImage as a buffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_UseEGLImage( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - eglImage) \ - ((OMX_COMPONENTTYPE*)hComponent)->UseEGLImage( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - eglImage) - -/** The OMX_Init method is used to initialize the OMX core. It shall be the - first call made into OMX and it should only be executed one time without - an interviening OMX_Deinit call. - - The core should return from this call within 20 msec. - - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void); - - -/** The OMX_Deinit method is used to deinitialize the OMX core. It shall be - the last call made into OMX. In the event that the core determines that - thare are components loaded when this call is made, the core may return - with an error rather than try to unload the components. - - The core should return from this call within 20 msec. - - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void); - - -/** The OMX_ComponentNameEnum method will enumerate through all the names of - recognised valid components in the system. This function is provided - as a means to detect all the components in the system run-time. There is - no strict ordering to the enumeration order of component names, although - each name will only be enumerated once. If the OMX core supports run-time - installation of new components, it is only requried to detect newly - installed components when the first call to enumerate component names - is made (i.e. when nIndex is 0x0). - - The core should return from this call in 20 msec. - - @param [out] cComponentName - pointer to a null terminated string with the component name. The - names of the components are strings less than 127 bytes in length - plus the trailing null for a maximum size of 128 bytes. An example - of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are - assigned by the vendor, but shall start with "OMX." and then have - the Vendor designation next. - @param [in] nNameLength - number of characters in the cComponentName string. With all - component name strings restricted to less than 128 characters - (including the trailing null) it is recomended that the caller - provide a input string for the cComponentName of 128 characters. - @param [in] nIndex - number containing the enumeration index for the component. - Multiple calls to OMX_ComponentNameEnum with increasing values - of nIndex will enumerate through the component names in the - system until OMX_ErrorNoMore is returned. The value of nIndex - is 0 to (N-1), where N is the number of valid installed components - in the system. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. When the value of nIndex exceeds the number of - components in the system minus 1, OMX_ErrorNoMore will be - returned. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( - OMX_OUT OMX_STRING cComponentName, - OMX_IN OMX_U32 nNameLength, - OMX_IN OMX_U32 nIndex); - - -/** The OMX_GetHandle method will locate the component specified by the - component name given, load that component into memory and then invoke - the component's methods to create an instance of the component. - - The core should return from this call within 20 msec. - - @param [out] pHandle - pointer to an OMX_HANDLETYPE pointer to be filled in by this method. - @param [in] cComponentName - pointer to a null terminated string with the component name. The - names of the components are strings less than 127 bytes in length - plus the trailing null for a maximum size of 128 bytes. An example - of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are - assigned by the vendor, but shall start with "OMX." and then have - the Vendor designation next. - @param [in] pAppData - pointer to an application defined value that will be returned - during callbacks so that the application can identify the source - of the callback. - @param [in] pCallBacks - pointer to a OMX_CALLBACKTYPE structure that will be passed to the - component to initialize it with. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( - OMX_OUT OMX_HANDLETYPE* pHandle, - OMX_IN OMX_STRING cComponentName, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_CALLBACKTYPE* pCallBacks); - - -/** The OMX_FreeHandle method will free a handle allocated by the OMX_GetHandle - method. If the component reference count goes to zero, the component will - be unloaded from memory. - - The core should return from this call within 20 msec when the component is - in the OMX_StateLoaded state. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( - OMX_IN OMX_HANDLETYPE hComponent); - - - -/** The OMX_SetupTunnel method will handle the necessary calls to the components - to setup the specified tunnel the two components. NOTE: This is - an actual method (not a #define macro). This method will make calls into - the component ComponentTunnelRequest method to do the actual tunnel - connection. - - The ComponentTunnelRequest method on both components will be called. - This method shall not be called unless the component is in the - OMX_StateLoaded state except when the ports used for the tunnel are - disabled. In this case, the component may be in the OMX_StateExecuting, - OMX_StatePause, or OMX_StateIdle states. - - The core should return from this call within 20 msec. - - @param [in] hOutput - Handle of the component to be accessed. Also this is the handle - of the component whose port, specified in the nPortOutput parameter - will be used the source for the tunnel. This is the component handle - returned by the call to the OMX_GetHandle function. There is a - requirement that hOutput be the source for the data when - tunelling (i.e. nPortOutput is an output port). If 0x0, the component - specified in hInput will have it's port specified in nPortInput - setup for communication with the application / IL client. - @param [in] nPortOutput - nPortOutput is used to select the source port on component to be - used in the tunnel. - @param [in] hInput - This is the component to setup the tunnel with. This is the handle - of the component whose port, specified in the nPortInput parameter - will be used the destination for the tunnel. This is the component handle - returned by the call to the OMX_GetHandle function. There is a - requirement that hInput be the destination for the data when - tunelling (i.e. nPortInut is an input port). If 0x0, the component - specified in hOutput will have it's port specified in nPortPOutput - setup for communication with the application / IL client. - @param [in] nPortInput - nPortInput is used to select the destination port on component to be - used in the tunnel. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - When OMX_ErrorNotImplemented is returned, one or both components is - a non-interop component and does not support tunneling. - - On failure, the ports of both components are setup for communication - with the application / IL Client. - @ingroup core tun - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( - OMX_IN OMX_HANDLETYPE hOutput, - OMX_IN OMX_U32 nPortOutput, - OMX_IN OMX_HANDLETYPE hInput, - OMX_IN OMX_U32 nPortInput); - -/** @ingroup cp */ -OMX_API OMX_ERRORTYPE OMX_GetContentPipe( - OMX_OUT OMX_HANDLETYPE *hPipe, - OMX_IN OMX_STRING szURI); - -/** The OMX_GetComponentsOfRole method will return the number of components that support the given - role and (if the compNames field is non-NULL) the names of those components. The call will fail if - an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the - client should: - * first call this function with the compNames field NULL to determine the number of component names - * second call this function with the compNames field pointing to an array of names allocated - according to the number returned by the first call. - - The core should return from this call within 5 msec. - - @param [in] role - This is generic standard component name consisting only of component class - name and the type within that class (e.g. 'audio_decoder.aac'). - @param [inout] pNumComps - This is used both as input and output. - - If compNames is NULL, the input is ignored and the output specifies how many components support - the given role. - - If compNames is not NULL, on input it bounds the size of the input structure and - on output, it specifies the number of components string names listed within the compNames parameter. - @param [inout] compNames - If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings which accepts - a list of the names of all physical components that implement the specified standard component name. - Each name is NULL terminated. numComps indicates the number of names. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole ( - OMX_IN OMX_STRING role, - OMX_INOUT OMX_U32 *pNumComps, - OMX_INOUT OMX_U8 **compNames); - -/** The OMX_GetRolesOfComponent method will return the number of roles supported by the given - component and (if the roles field is non-NULL) the names of those roles. The call will fail if - an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the - client should: - * first call this function with the roles field NULL to determine the number of role names - * second call this function with the roles field pointing to an array of names allocated - according to the number returned by the first call. - - The core should return from this call within 5 msec. - - @param [in] compName - This is the name of the component being queried about. - @param [inout] pNumRoles - This is used both as input and output. - - If roles is NULL, the input is ignored and the output specifies how many roles the component supports. - - If compNames is not NULL, on input it bounds the size of the input structure and - on output, it specifies the number of roles string names listed within the roles parameter. - @param [out] roles - If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings - which accepts a list of the names of all standard components roles implemented on the - specified component name. numComps indicates the number of names. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent ( - OMX_IN OMX_STRING compName, - OMX_INOUT OMX_U32 *pNumRoles, - OMX_OUT OMX_U8 **roles); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/IL/OMX_ILCS.h b/vc/include/IL/OMX_ILCS.h @@ -1,65 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenMAX IL - ILCS specific types - -#ifndef OMX_ILCS_h -#define OMX_ILCS_h - -typedef struct OMX_PARAM_PORTSUMMARYTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nNumPorts; /**< Total number of ports */ - OMX_U32 reqSet; /**< Which set of ports is details below, portIndex[0] is port reqSet*32 */ - OMX_U32 portDir; /**< Bitfield, 1 if output port, 0 if input port, max 256 ports */ - OMX_U32 portIndex[32]; /**< Port Indexes */ -} OMX_PARAM_PORTSUMMARYTYPE; - -typedef struct OMX_PARAM_MARKCOMPARISONTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_PTR mark; /**< Pointer to be used for mark comparisons */ -} OMX_PARAM_MARKCOMPARISONTYPE; - -typedef struct OMX_PARAM_BRCMRECURSIONUNSAFETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_S32 (*pRecursionUnsafe)(OMX_PTR param); - OMX_PTR param; -} OMX_PARAM_BRCMRECURSIONUNSAFETYPE; - -typedef struct OMX_PARAM_TUNNELSTATUSTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port being queried */ - OMX_U32 nIndex; /**< Query the nIndex'th port and fill in nPortIndex */ - OMX_BOOL bUseIndex; /**< If OMX_TRUE read nIndex, otherwise read nPortIndex */ - OMX_PTR hTunneledComponent; /**< Component currently tunnelling with */ - OMX_U32 nTunneledPort; /**< Port on tunnelled component */ -} OMX_PARAM_TUNNELSTATUSTYPE; - -#endif diff --git a/vc/include/IL/OMX_IVCommon.h b/vc/include/IL/OMX_IVCommon.h @@ -1,1096 +0,0 @@ -/** - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** - * @file OMX_IVCommon.h - OpenMax IL version 1.1.2 - * The structures needed by Video and Image components to exchange - * parameters and configuration data with the components. - */ -#ifndef OMX_IVCommon_h -#define OMX_IVCommon_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Each OMX header must include all required header files to allow the header - * to compile without errors. The includes below are required for this header - * file to compile successfully - */ - -#include "OMX_Core.h" - -/** @defgroup iv OpenMAX IL Imaging and Video Domain - * Common structures for OpenMAX IL Imaging and Video domains - * @{ - */ - - -/** - * Enumeration defining possible uncompressed image/video formats. - * - * ENUMS: - * Unused : Placeholder value when format is N/A - * Monochrome : black and white - * 8bitRGB332 : Red 7:5, Green 4:2, Blue 1:0 - * 12bitRGB444 : Red 11:8, Green 7:4, Blue 3:0 - * 16bitARGB4444 : Alpha 15:12, Red 11:8, Green 7:4, Blue 3:0 - * 16bitARGB1555 : Alpha 15, Red 14:10, Green 9:5, Blue 4:0 - * 16bitRGB565 : Red 15:11, Green 10:5, Blue 4:0 - * 16bitBGR565 : Blue 15:11, Green 10:5, Red 4:0 - * 18bitRGB666 : Red 17:12, Green 11:6, Blue 5:0 - * 18bitARGB1665 : Alpha 17, Red 16:11, Green 10:5, Blue 4:0 - * 19bitARGB1666 : Alpha 18, Red 17:12, Green 11:6, Blue 5:0 - * 24bitRGB888 : Red 24:16, Green 15:8, Blue 7:0 - * 24bitBGR888 : Blue 24:16, Green 15:8, Red 7:0 - * 24bitARGB1887 : Alpha 23, Red 22:15, Green 14:7, Blue 6:0 - * 25bitARGB1888 : Alpha 24, Red 23:16, Green 15:8, Blue 7:0 - * 32bitBGRA8888 : Blue 31:24, Green 23:16, Red 15:8, Alpha 7:0 - * 32bitARGB8888 : Alpha 31:24, Red 23:16, Green 15:8, Blue 7:0 - * YUV411Planar : U,Y are subsampled by a factor of 4 horizontally - * YUV411PackedPlanar : packed per payload in planar slices - * YUV420Planar : Three arrays Y,U,V. - * YUV420PackedPlanar : packed per payload in planar slices - * YUV420SemiPlanar : Two arrays, one is all Y, the other is U and V - * YUV422Planar : Three arrays Y,U,V. - * YUV422PackedPlanar : packed per payload in planar slices - * YUV422SemiPlanar : Two arrays, one is all Y, the other is U and V - * YCbYCr : Organized as 16bit YUYV (i.e. YCbYCr) - * YCrYCb : Organized as 16bit YVYU (i.e. YCrYCb) - * CbYCrY : Organized as 16bit UYVY (i.e. CbYCrY) - * CrYCbY : Organized as 16bit VYUY (i.e. CrYCbY) - * YUV444Interleaved : Each pixel contains equal parts YUV - * RawBayer8bit : SMIA camera output format - * RawBayer10bit : SMIA camera output format - * RawBayer8bitcompressed : SMIA camera output format - Vendor extensions - * 32bitABGR888 : Alpha 31:24, Blue 23:16, Green 15:8, Red 7:0 - */ -typedef enum OMX_COLOR_FORMATTYPE { - OMX_COLOR_FormatUnused, - OMX_COLOR_FormatMonochrome, - OMX_COLOR_Format8bitRGB332, - OMX_COLOR_Format12bitRGB444, - OMX_COLOR_Format16bitARGB4444, - OMX_COLOR_Format16bitARGB1555, - OMX_COLOR_Format16bitRGB565, - OMX_COLOR_Format16bitBGR565, - OMX_COLOR_Format18bitRGB666, - OMX_COLOR_Format18bitARGB1665, - OMX_COLOR_Format19bitARGB1666, - OMX_COLOR_Format24bitRGB888, - OMX_COLOR_Format24bitBGR888, - OMX_COLOR_Format24bitARGB1887, - OMX_COLOR_Format25bitARGB1888, - OMX_COLOR_Format32bitBGRA8888, - OMX_COLOR_Format32bitARGB8888, - OMX_COLOR_FormatYUV411Planar, - OMX_COLOR_FormatYUV411PackedPlanar, - OMX_COLOR_FormatYUV420Planar, - OMX_COLOR_FormatYUV420PackedPlanar, - OMX_COLOR_FormatYUV420SemiPlanar, - OMX_COLOR_FormatYUV422Planar, - OMX_COLOR_FormatYUV422PackedPlanar, - OMX_COLOR_FormatYUV422SemiPlanar, - OMX_COLOR_FormatYCbYCr, - OMX_COLOR_FormatYCrYCb, - OMX_COLOR_FormatCbYCrY, - OMX_COLOR_FormatCrYCbY, - OMX_COLOR_FormatYUV444Interleaved, - OMX_COLOR_FormatRawBayer8bit, - OMX_COLOR_FormatRawBayer10bit, - OMX_COLOR_FormatRawBayer8bitcompressed, - OMX_COLOR_FormatL2, - OMX_COLOR_FormatL4, - OMX_COLOR_FormatL8, - OMX_COLOR_FormatL16, - OMX_COLOR_FormatL24, - OMX_COLOR_FormatL32, - OMX_COLOR_FormatYUV420PackedSemiPlanar, - OMX_COLOR_FormatYUV422PackedSemiPlanar, - OMX_COLOR_Format18BitBGR666, - OMX_COLOR_Format24BitARGB6666, - OMX_COLOR_Format24BitABGR6666, - OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_COLOR_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_COLOR_Format32bitABGR8888, - OMX_COLOR_Format8bitPalette, - OMX_COLOR_FormatYUVUV128, - OMX_COLOR_FormatRawBayer12bit, - OMX_COLOR_FormatBRCMEGL, - OMX_COLOR_FormatBRCMOpaque, - OMX_COLOR_FormatYVU420PackedPlanar, - OMX_COLOR_FormatYVU420PackedSemiPlanar, - OMX_COLOR_FormatRawBayer16bit, - OMX_COLOR_FormatMax = 0x7FFFFFFF -} OMX_COLOR_FORMATTYPE; - - -/** - * Defines the matrix for conversion from RGB to YUV or vice versa. - * iColorMatrix should be initialized with the fixed point values - * used in converting between formats. - */ -typedef struct OMX_CONFIG_COLORCONVERSIONTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version info */ - OMX_U32 nPortIndex; /**< Port that this struct applies to */ - OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */ - OMX_S32 xColorOffset[4]; /**< Stored in signed Q16 format */ -}OMX_CONFIG_COLORCONVERSIONTYPE; - - -/** - * Structure defining percent to scale each frame dimension. For example: - * To make the width 50% larger, use fWidth = 1.5 and to make the width - * 1/2 the original size, use fWidth = 0.5 - */ -typedef struct OMX_CONFIG_SCALEFACTORTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version info */ - OMX_U32 nPortIndex; /**< Port that this struct applies to */ - OMX_S32 xWidth; /**< Fixed point value stored as Q16 */ - OMX_S32 xHeight; /**< Fixed point value stored as Q16 */ -}OMX_CONFIG_SCALEFACTORTYPE; - - -/** - * Enumeration of possible image filter types - */ -typedef enum OMX_IMAGEFILTERTYPE { - OMX_ImageFilterNone, - OMX_ImageFilterNoise, - OMX_ImageFilterEmboss, - OMX_ImageFilterNegative, - OMX_ImageFilterSketch, - OMX_ImageFilterOilPaint, - OMX_ImageFilterHatch, - OMX_ImageFilterGpen, - OMX_ImageFilterAntialias, - OMX_ImageFilterDeRing, - OMX_ImageFilterSolarize, - OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ImageFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - /* Broadcom specific image filters */ - OMX_ImageFilterWatercolor, - OMX_ImageFilterPastel, - OMX_ImageFilterSharpen, - OMX_ImageFilterFilm, - OMX_ImageFilterBlur, - OMX_ImageFilterSaturation, - - OMX_ImageFilterDeInterlaceLineDouble, - OMX_ImageFilterDeInterlaceAdvanced, - - OMX_ImageFilterColourSwap, - OMX_ImageFilterWashedOut, - OMX_ImageFilterColourPoint, - OMX_ImageFilterPosterise, - OMX_ImageFilterColourBalance, - OMX_ImageFilterCartoon, - - OMX_ImageFilterAnaglyph, - OMX_ImageFilterDeInterlaceFast, - OMX_ImageFilterMax = 0x7FFFFFFF -} OMX_IMAGEFILTERTYPE; - -typedef enum OMX_IMAGEFILTERANAGLYPHTYPE { - OMX_ImageFilterAnaglyphNone, - OMX_ImageFilterAnaglyphSBStoRedCyan, - OMX_ImageFilterAnaglyphSBStoCyanRed, - OMX_ImageFilterAnaglyphSBStoGreenMagenta, - OMX_ImageFilterAnaglyphSBStoMagentaGreen, - OMX_ImageFilterAnaglyphTABtoRedCyan, - OMX_ImageFilterAnaglyphTABtoCyanRed, - OMX_ImageFilterAnaglyphTABtoGreenMagenta, - OMX_ImageFilterAnaglyphTABtoMagentaGreen, -} OMX_IMAGEFILTERANAGLYPHTYPE; - -/** - * Image filter configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eImageFilter : Image filter type enumeration - */ -typedef struct OMX_CONFIG_IMAGEFILTERTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGEFILTERTYPE eImageFilter; -} OMX_CONFIG_IMAGEFILTERTYPE; - - -/** - * Customized U and V for color enhancement - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bColorEnhancement : Enable/disable color enhancement - * nCustomizedU : Practical values: 16-240, range: 0-255, value set for - * U component - * nCustomizedV : Practical values: 16-240, range: 0-255, value set for - * V component - */ -typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bColorEnhancement; - OMX_U8 nCustomizedU; - OMX_U8 nCustomizedV; -} OMX_CONFIG_COLORENHANCEMENTTYPE; - - -/** - * Define color key and color key mask - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nARGBColor : 32bit Alpha, Red, Green, Blue Color - * nARGBMask : 32bit Mask for Alpha, Red, Green, Blue channels - */ -typedef struct OMX_CONFIG_COLORKEYTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nARGBColor; - OMX_U32 nARGBMask; -} OMX_CONFIG_COLORKEYTYPE; - - -/** - * List of color blend types for pre/post processing - * - * ENUMS: - * None : No color blending present - * AlphaConstant : Function is (alpha_constant * src) + - * (1 - alpha_constant) * dst) - * AlphaPerPixel : Function is (alpha * src) + (1 - alpha) * dst) - * Alternate : Function is alternating pixels from src and dst - * And : Function is (src & dst) - * Or : Function is (src | dst) - * Invert : Function is ~src - */ -typedef enum OMX_COLORBLENDTYPE { - OMX_ColorBlendNone, - OMX_ColorBlendAlphaConstant, - OMX_ColorBlendAlphaPerPixel, - OMX_ColorBlendAlternate, - OMX_ColorBlendAnd, - OMX_ColorBlendOr, - OMX_ColorBlendInvert, - OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ColorBlendVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_ColorBlendMax = 0x7FFFFFFF -} OMX_COLORBLENDTYPE; - - -/** - * Color blend configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nRGBAlphaConstant : Constant global alpha values when global alpha is used - * eColorBlend : Color blend type enumeration - */ -typedef struct OMX_CONFIG_COLORBLENDTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nRGBAlphaConstant; - OMX_COLORBLENDTYPE eColorBlend; -} OMX_CONFIG_COLORBLENDTYPE; - - -/** - * Hold frame dimension - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nWidth : Frame width in pixels - * nHeight : Frame height in pixels - */ -typedef struct OMX_FRAMESIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nWidth; - OMX_U32 nHeight; -} OMX_FRAMESIZETYPE; - - -/** - * Rotation configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nRotation : +/- integer rotation value - */ -typedef struct OMX_CONFIG_ROTATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nRotation; -} OMX_CONFIG_ROTATIONTYPE; - - -/** - * Possible mirroring directions for pre/post processing - * - * ENUMS: - * None : No mirroring - * Vertical : Vertical mirroring, flip on X axis - * Horizontal : Horizontal mirroring, flip on Y axis - * Both : Both vertical and horizontal mirroring - */ -typedef enum OMX_MIRRORTYPE { - OMX_MirrorNone = 0, - OMX_MirrorVertical, - OMX_MirrorHorizontal, - OMX_MirrorBoth, - OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MirrorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MirrorMax = 0x7FFFFFFF -} OMX_MIRRORTYPE; - - -/** - * Mirroring configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eMirror : Mirror type enumeration - */ -typedef struct OMX_CONFIG_MIRRORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_MIRRORTYPE eMirror; -} OMX_CONFIG_MIRRORTYPE; - - -/** - * Position information only - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nX : X coordinate for the point - * nY : Y coordinate for the point - */ -typedef struct OMX_CONFIG_POINTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nX; - OMX_S32 nY; -} OMX_CONFIG_POINTTYPE; - - -/** - * Frame size plus position - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nLeft : X Coordinate of the top left corner of the rectangle - * nTop : Y Coordinate of the top left corner of the rectangle - * nWidth : Width of the rectangle - * nHeight : Height of the rectangle - */ -typedef struct OMX_CONFIG_RECTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nLeft; - OMX_S32 nTop; - OMX_U32 nWidth; - OMX_U32 nHeight; -} OMX_CONFIG_RECTTYPE; - - -/** - * Deblocking state; it is required to be set up before starting the codec - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bDeblocking : Enable/disable deblocking mode - */ -typedef struct OMX_PARAM_DEBLOCKINGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bDeblocking; -} OMX_PARAM_DEBLOCKINGTYPE; - - -/** - * Stabilization state - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bStab : Enable/disable frame stabilization state - */ -typedef struct OMX_CONFIG_FRAMESTABTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bStab; -} OMX_CONFIG_FRAMESTABTYPE; - - -/** - * White Balance control type - * - * STRUCT MEMBERS: - * SunLight : Referenced in JSR-234 - * Flash : Optimal for device's integrated flash - */ -typedef enum OMX_WHITEBALCONTROLTYPE { - OMX_WhiteBalControlOff = 0, - OMX_WhiteBalControlAuto, - OMX_WhiteBalControlSunLight, - OMX_WhiteBalControlCloudy, - OMX_WhiteBalControlShade, - OMX_WhiteBalControlTungsten, - OMX_WhiteBalControlFluorescent, - OMX_WhiteBalControlIncandescent, - OMX_WhiteBalControlFlash, - OMX_WhiteBalControlHorizon, - OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_WhiteBalControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_WhiteBalControlMax = 0x7FFFFFFF -} OMX_WHITEBALCONTROLTYPE; - - -/** - * White Balance control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eWhiteBalControl : White balance enumeration - */ -typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_WHITEBALCONTROLTYPE eWhiteBalControl; -} OMX_CONFIG_WHITEBALCONTROLTYPE; - - -/** - * Exposure control type - */ -typedef enum OMX_EXPOSURECONTROLTYPE { - OMX_ExposureControlOff = 0, - OMX_ExposureControlAuto, - OMX_ExposureControlNight, - OMX_ExposureControlBackLight, - OMX_ExposureControlSpotLight, - OMX_ExposureControlSports, - OMX_ExposureControlSnow, - OMX_ExposureControlBeach, - OMX_ExposureControlLargeAperture, - OMX_ExposureControlSmallAperture, - OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ExposureControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_ExposureControlVeryLong, - OMX_ExposureControlFixedFps, - OMX_ExposureControlNightWithPreview, - OMX_ExposureControlAntishake, - OMX_ExposureControlFireworks, - OMX_ExposureControlMax = 0x7FFFFFFF -} OMX_EXPOSURECONTROLTYPE; - - -/** - * White Balance control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eExposureControl : Exposure control enumeration - */ -typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_EXPOSURECONTROLTYPE eExposureControl; -} OMX_CONFIG_EXPOSURECONTROLTYPE; - - -/** - * Defines sensor supported mode. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nFrameRate : Single shot mode is indicated by a 0 - * bOneShot : Enable for single shot, disable for streaming - * sFrameSize : Framesize - */ -typedef struct OMX_PARAM_SENSORMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nFrameRate; - OMX_BOOL bOneShot; - OMX_FRAMESIZETYPE sFrameSize; -} OMX_PARAM_SENSORMODETYPE; - - -/** - * Defines contrast level - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nContrast : Values allowed for contrast -100 to 100, zero means no change - */ -typedef struct OMX_CONFIG_CONTRASTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nContrast; -} OMX_CONFIG_CONTRASTTYPE; - - -/** - * Defines brightness level - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nBrightness : 0-100% - */ -typedef struct OMX_CONFIG_BRIGHTNESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nBrightness; -} OMX_CONFIG_BRIGHTNESSTYPE; - - -/** - * Defines backlight level configuration for a video sink, e.g. LCD panel - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nBacklight : Values allowed for backlight 0-100% - * nTimeout : Number of milliseconds before backlight automatically turns - * off. A value of 0x0 disables backight timeout - */ -typedef struct OMX_CONFIG_BACKLIGHTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nBacklight; - OMX_U32 nTimeout; -} OMX_CONFIG_BACKLIGHTTYPE; - - -/** - * Defines setting for Gamma - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nGamma : Values allowed for gamma -100 to 100, zero means no change - */ -typedef struct OMX_CONFIG_GAMMATYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nGamma; -} OMX_CONFIG_GAMMATYPE; - - -/** - * Define for setting saturation - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nSaturation : Values allowed for saturation -100 to 100, zero means - * no change - */ -typedef struct OMX_CONFIG_SATURATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nSaturation; -} OMX_CONFIG_SATURATIONTYPE; - - -/** - * Define for setting Lightness - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nLightness : Values allowed for lightness -100 to 100, zero means no - * change - */ -typedef struct OMX_CONFIG_LIGHTNESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nLightness; -} OMX_CONFIG_LIGHTNESSTYPE; - - -/** - * Plane blend configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Index of input port associated with the plane. - * nDepth : Depth of the plane in relation to the screen. Higher - * numbered depths are "behind" lower number depths. - * This number defaults to the Port Index number. - * nAlpha : Transparency blending component for the entire plane. - * See blending modes for more detail. - */ -typedef struct OMX_CONFIG_PLANEBLENDTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nDepth; - OMX_U32 nAlpha; -} OMX_CONFIG_PLANEBLENDTYPE; - - -/** - * Define interlace type - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bEnable : Enable control variable for this functionality - * (see below) - * nInterleavePortIndex : Index of input or output port associated with - * the interleaved plane. - * pPlanarPortIndexes[4] : Index of input or output planar ports. - */ -typedef struct OMX_PARAM_INTERLEAVETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; - OMX_U32 nInterleavePortIndex; -} OMX_PARAM_INTERLEAVETYPE; - - -/** - * Defines the picture effect used for an input picture - */ -typedef enum OMX_TRANSITIONEFFECTTYPE { - OMX_EffectNone, - OMX_EffectFadeFromBlack, - OMX_EffectFadeToBlack, - OMX_EffectUnspecifiedThroughConstantColor, - OMX_EffectDissolve, - OMX_EffectWipe, - OMX_EffectUnspecifiedMixOfTwoScenes, - OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_EffectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_EffectReverseUnspecifiedMixOfTwoScenes, - -#ifndef __VIDEOCORE4__ - OMX_EffectDiagonalWipe, - OMX_EffectDiagonalWipeRotate, - OMX_EffectEllipticalWipe, - OMX_EffectEllipticalWipeRotate, - OMX_EffectInverseEllipticalWipe, - OMX_EffectInverseEllipticalWipeRotate, - OMX_EffectGlassWipe, - OMX_EffectGlassWipeRotate, - OMX_EffectWavyWipe, - OMX_EffectWavyWipeRotate, - OMX_EffectMunchingSquares, - OMX_EffectStripeWipe, - OMX_EffectStripeWipeRotate, - - OMX_EffectRotozoomUnmatched, - OMX_EffectRotozoomMatched, - OMX_EffectRotozoomGentle, -#endif - - OMX_EffectMunchRandom, - OMX_EffectMunchVRandom, - OMX_EffectMunchHRandom, - OMX_EffectMunchWipe, - OMX_EffectMunchMunch, - OMX_EffectMunchStripe, - OMX_EffectFadeRandom, - OMX_EffectFadeVRandom, - OMX_EffectFadeHRandom, - OMX_EffectFadeWipe, - OMX_EffectFadeMunch, - OMX_EffectFadeStripe, - OMX_EffectColourBlockRandom, - OMX_EffectColourBlockVRandom, - OMX_EffectColourBlockHRandom, - OMX_EffectColourBlockWipe, - OMX_EffectColourBlockMunch, - OMX_EffectColourBlockStripe, - OMX_EffectColourBlock2Random, - OMX_EffectColourBlock2VRandom, - OMX_EffectColourBlock2HRandom, - OMX_EffectColourBlock2Wipe, - OMX_EffectColourBlock2Munch, - OMX_EffectColourBlock2Stripe, - OMX_EffectShadeRandom, - OMX_EffectShadeVRandom, - OMX_EffectShadeHRandom, - OMX_EffectShadeWipe, - OMX_EffectShadeMunch, - OMX_EffectShadeStripe, - OMX_EffectBitmaskRandom, - OMX_EffectBitmaskVRandom, - OMX_EffectBitmaskHRandom, - OMX_EffectBitmaskWipe, - OMX_EffectBitmaskMunch, - OMX_EffectBitmaskStripe, - OMX_EffectBitmask2Random, - OMX_EffectBitmask2VRandom, - OMX_EffectBitmask2HRandom, - OMX_EffectBitmask2Wipe, - OMX_EffectBitmask2Munch, - OMX_EffectBitmask2Stripe, - OMX_EffectBitmask2ColourRandom, - OMX_EffectBitmask2ColourVRandom, - OMX_EffectBitmask2ColourHRandom, - OMX_EffectBitmask2ColourWipe, - OMX_EffectBitmask2ColourMunch, - OMX_EffectBitmask2ColourStripe, - - OMX_EffectPushRight, - OMX_EffectPushLeft, - OMX_EffectPushDown, - OMX_EffectPushUp, - OMX_EffectCoverRight, - OMX_EffectCoverLeft, - OMX_EffectCoverDown, - OMX_EffectCoverUp, - OMX_EffectRevealRight, - OMX_EffectRevealLeft, - OMX_EffectRevealDown, - OMX_EffectRevealUp, - OMX_EffectWipeRight, - OMX_EffectWipeLeft, - OMX_EffectWipeDown, - OMX_EffectWipeUp, - OMX_EffectSpeckle, - OMX_EffectCircle, - OMX_EffectSpiral, - OMX_EffectDiamond, - OMX_EffectVert, - OMX_EffectPlus, - OMX_EffectClock, - OMX_EffectPlasma, - OMX_EffectDisplace, - OMX_EffectGenie, - OMX_EffectSide, - OMX_EffectMaze, - OMX_EffectRipple, - OMX_EffectStar, - OMX_EffectAlpha, - OMX_EffectIntense, - OMX_EffectIntenseU, - OMX_EffectIntenseV, - OMX_EffectInverseIntense, - OMX_EffectInverseIntenseU, - OMX_EffectInverseIntenseV, - - OMX_EffectPageTurn, - - OMX_EffectFlipPlaneDown, - OMX_EffectFlipPlaneDownMid, - OMX_EffectFlipPlaneDownHigh, - OMX_EffectFlipPlaneLeft, - OMX_EffectFlipPlaneLeftMid, - OMX_EffectFlipPlaneLeftHigh, - OMX_EffectFlipCubeDown, - OMX_EffectFlipCubeDownMid, - OMX_EffectFlipCubeDownHigh, - OMX_EffectFlipCubeLeft, - OMX_EffectFlipCubeLeftMid, - OMX_EffectFlipCubeLeftHigh, - - OMX_EffectMax = 0x7FFFFFFF -} OMX_TRANSITIONEFFECTTYPE; - - -/** - * Structure used to configure current transition effect - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eEffect : Effect to enable - */ -typedef struct OMX_CONFIG_TRANSITIONEFFECTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_TRANSITIONEFFECTTYPE eEffect; -} OMX_CONFIG_TRANSITIONEFFECTTYPE; - - -/** - * Defines possible data unit types for encoded video data. The data unit - * types are used both for encoded video input for playback as well as - * encoded video output from recording. - */ -typedef enum OMX_DATAUNITTYPE { - OMX_DataUnitCodedPicture, - OMX_DataUnitVideoSegment, - OMX_DataUnitSeveralSegments, - OMX_DataUnitArbitraryStreamSection, - OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DataUnitVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DataUnitMax = 0x7FFFFFFF -} OMX_DATAUNITTYPE; - - -/** - * Defines possible encapsulation types for coded video data unit. The - * encapsulation information is used both for encoded video input for - * playback as well as encoded video output from recording. - */ -typedef enum OMX_DATAUNITENCAPSULATIONTYPE { - OMX_DataEncapsulationElementaryStream, - OMX_DataEncapsulationGenericPayload, - OMX_DataEncapsulationRtpPayload, - OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DataEncapsulationVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DataEncapsulationMax = 0x7FFFFFFF -} OMX_DATAUNITENCAPSULATIONTYPE; - - -/** - * Structure used to configure the type of being decoded/encoded - */ -typedef struct OMX_PARAM_DATAUNITTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_DATAUNITTYPE eUnitType; - OMX_DATAUNITENCAPSULATIONTYPE eEncapsulationType; -} OMX_PARAM_DATAUNITTYPE; - - -/** - * Defines dither types - */ -typedef enum OMX_DITHERTYPE { - OMX_DitherNone, - OMX_DitherOrdered, - OMX_DitherErrorDiffusion, - OMX_DitherOther, - OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DitherVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DitherMax = 0x7FFFFFFF -} OMX_DITHERTYPE; - - -/** - * Structure used to configure current type of dithering - */ -typedef struct OMX_CONFIG_DITHERTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_DITHERTYPE eDither; /**< Type of dithering to use */ -} OMX_CONFIG_DITHERTYPE; - -typedef struct OMX_CONFIG_CAPTUREMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_BOOL bContinuous; /**< If true then ignore frame rate and emit capture - * data as fast as possible (otherwise obey port's frame rate). */ - OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the - * specified number of frames (otherwise the port does not - * terminate the capture until instructed to do so by the client). - * Even if set, the client may manually terminate the capture prior - * to reaching the limit. */ - OMX_U32 nFrameLimit; /**< Limit on number of frames emitted during a capture (only - * valid if bFrameLimited is set). */ -} OMX_CONFIG_CAPTUREMODETYPE; - -typedef enum OMX_METERINGTYPE { - - OMX_MeteringModeAverage, /**< Center-weighted average metering. */ - OMX_MeteringModeSpot, /**< Spot (partial) metering. */ - OMX_MeteringModeMatrix, /**< Matrix or evaluative metering. */ - - OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MeteringVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MeteringModeBacklit, - OMX_EVModeMax = 0x7fffffff -} OMX_METERINGTYPE; - -typedef struct OMX_CONFIG_EXPOSUREVALUETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_METERINGTYPE eMetering; - OMX_S32 xEVCompensation; /**< Fixed point value stored as Q16 */ - OMX_U32 nApertureFNumber; /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */ - OMX_BOOL bAutoAperture; /**< Whether aperture number is defined automatically */ - OMX_U32 nShutterSpeedMsec; /**< Shutterspeed in milliseconds */ - OMX_BOOL bAutoShutterSpeed; /**< Whether shutter speed is defined automatically */ - OMX_U32 nSensitivity; /**< e.g. nSensitivity = 100 implies "ISO 100" */ - OMX_BOOL bAutoSensitivity; /**< Whether sensitivity is defined automatically */ -} OMX_CONFIG_EXPOSUREVALUETYPE; - -/** - * Focus region configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bCenter : Use center region as focus region of interest - * bLeft : Use left region as focus region of interest - * bRight : Use right region as focus region of interest - * bTop : Use top region as focus region of interest - * bBottom : Use bottom region as focus region of interest - * bTopLeft : Use top left region as focus region of interest - * bTopRight : Use top right region as focus region of interest - * bBottomLeft : Use bottom left region as focus region of interest - * bBottomRight : Use bottom right region as focus region of interest - */ -typedef struct OMX_CONFIG_FOCUSREGIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bCenter; - OMX_BOOL bLeft; - OMX_BOOL bRight; - OMX_BOOL bTop; - OMX_BOOL bBottom; - OMX_BOOL bTopLeft; - OMX_BOOL bTopRight; - OMX_BOOL bBottomLeft; - OMX_BOOL bBottomRight; -} OMX_CONFIG_FOCUSREGIONTYPE; - -/** - * Focus Status type - */ -typedef enum OMX_FOCUSSTATUSTYPE { - OMX_FocusStatusOff = 0, - OMX_FocusStatusRequest, - OMX_FocusStatusReached, - OMX_FocusStatusUnableToReach, - OMX_FocusStatusLost, - OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_FocusStatusVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_FocusStatusCafWatching, - OMX_FocusStatusCafSceneChanged, - OMX_FocusStatusMax = 0x7FFFFFFF -} OMX_FOCUSSTATUSTYPE; - -/** - * Focus status configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFocusStatus : Specifies the focus status - * bCenterStatus : Use center region as focus region of interest - * bLeftStatus : Use left region as focus region of interest - * bRightStatus : Use right region as focus region of interest - * bTopStatus : Use top region as focus region of interest - * bBottomStatus : Use bottom region as focus region of interest - * bTopLeftStatus : Use top left region as focus region of interest - * bTopRightStatus : Use top right region as focus region of interest - * bBottomLeftStatus : Use bottom left region as focus region of interest - * bBottomRightStatus : Use bottom right region as focus region of interest - */ -typedef struct OMX_PARAM_FOCUSSTATUSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_FOCUSSTATUSTYPE eFocusStatus; - OMX_BOOL bCenterStatus; - OMX_BOOL bLeftStatus; - OMX_BOOL bRightStatus; - OMX_BOOL bTopStatus; - OMX_BOOL bBottomStatus; - OMX_BOOL bTopLeftStatus; - OMX_BOOL bTopRightStatus; - OMX_BOOL bBottomLeftStatus; - OMX_BOOL bBottomRightStatus; -} OMX_PARAM_FOCUSSTATUSTYPE; - -/** @} */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/IL/OMX_Image.h b/vc/include/IL/OMX_Image.h @@ -1,347 +0,0 @@ -/** - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * @file OMX_Image.h - OpenMax IL version 1.1.2 - * The structures needed by Image components to exchange parameters and - * configuration data with the components. - */ -#ifndef OMX_Image_h -#define OMX_Image_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** - * Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_IVCommon.h" - -/** @defgroup imaging OpenMAX IL Imaging Domain - * @ingroup iv - * Structures for OpenMAX IL Imaging domain - * @{ - */ - -/** - * Enumeration used to define the possible image compression coding. - */ -typedef enum OMX_IMAGE_CODINGTYPE { - OMX_IMAGE_CodingUnused, /**< Value when format is N/A */ - OMX_IMAGE_CodingAutoDetect, /**< Auto detection of image format */ - OMX_IMAGE_CodingJPEG, /**< JPEG/JFIF image format */ - OMX_IMAGE_CodingJPEG2K, /**< JPEG 2000 image format */ - OMX_IMAGE_CodingEXIF, /**< EXIF image format */ - OMX_IMAGE_CodingTIFF, /**< TIFF image format */ - OMX_IMAGE_CodingGIF, /**< Graphics image format */ - OMX_IMAGE_CodingPNG, /**< PNG image format */ - OMX_IMAGE_CodingLZW, /**< LZW image format */ - OMX_IMAGE_CodingBMP, /**< Windows Bitmap format */ - OMX_IMAGE_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_IMAGE_CodingTGA, - OMX_IMAGE_CodingPPM, - - OMX_IMAGE_CodingMax = 0x7FFFFFFF -} OMX_IMAGE_CODINGTYPE; - - -/** - * Data structure used to define an image path. The number of image paths - * for input and output will vary by type of the image component. - * - * Input (aka Source) : Zero Inputs, one Output, - * Splitter : One Input, 2 or more Outputs, - * Processing Element : One Input, one output, - * Mixer : 2 or more inputs, one output, - * Output (aka Sink) : One Input, zero outputs. - * - * The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output - * image path. If additional vendor specific data is required, it should - * be transmitted to the component using the CustomCommand function. - * Compliant components will prepopulate this structure with optimal - * values during the OMX_GetParameter() command. - * - * STRUCT MEMBERS: - * cMIMEType : MIME type of data for the port - * pNativeRender : Platform specific reference for a display if a - * sync, otherwise this field is 0 - * nFrameWidth : Width of frame to be used on port if - * uncompressed format is used. Use 0 for - * unknown, don't care or variable - * nFrameHeight : Height of frame to be used on port if - * uncompressed format is used. Use 0 for - * unknown, don't care or variable - * nStride : Number of bytes per span of an image (i.e. - * indicates the number of bytes to get from - * span N to span N+1, where negative stride - * indicates the image is bottom up - * nSliceHeight : Height used when encoding in slices - * bFlagErrorConcealment : Turns on error concealment if it is supported by - * the OMX component - * eCompressionFormat : Compression format used in this instance of - * the component. When OMX_IMAGE_CodingUnused is - * specified, eColorFormat is valid - * eColorFormat : Decompressed format used by this component - * pNativeWindow : Platform specific reference for a window object if a - * display sink , otherwise this field is 0x0. - */ -typedef struct OMX_IMAGE_PORTDEFINITIONTYPE { - OMX_STRING cMIMEType; - OMX_NATIVE_DEVICETYPE pNativeRender; - OMX_U32 nFrameWidth; - OMX_U32 nFrameHeight; - OMX_S32 nStride; - OMX_U32 nSliceHeight; - OMX_BOOL bFlagErrorConcealment; - OMX_IMAGE_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_NATIVE_WINDOWTYPE pNativeWindow; -} OMX_IMAGE_PORTDEFINITIONTYPE; - - -/** - * Port format parameter. This structure is used to enumerate the various - * data input/output format supported by the port. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Indicates which port to set - * nIndex : Indicates the enumeration index for the format from - * 0x0 to N-1 - * eCompressionFormat : Compression format used in this instance of the - * component. When OMX_IMAGE_CodingUnused is specified, - * eColorFormat is valid - * eColorFormat : Decompressed format used by this component - */ -typedef struct OMX_IMAGE_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_IMAGE_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; -} OMX_IMAGE_PARAM_PORTFORMATTYPE; - - -/** - * Flash control type - * - * ENUMS - * Torch : Flash forced constantly on - */ -typedef enum OMX_IMAGE_FLASHCONTROLTYPE { - OMX_IMAGE_FlashControlOn = 0, - OMX_IMAGE_FlashControlOff, - OMX_IMAGE_FlashControlAuto, - OMX_IMAGE_FlashControlRedEyeReduction, - OMX_IMAGE_FlashControlFillin, - OMX_IMAGE_FlashControlTorch, - OMX_IMAGE_FlashControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_FlashControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_FlashControlMax = 0x7FFFFFFF -} OMX_IMAGE_FLASHCONTROLTYPE; - - -/** - * Flash control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFlashControl : Flash control type - */ -typedef struct OMX_IMAGE_PARAM_FLASHCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_FLASHCONTROLTYPE eFlashControl; -} OMX_IMAGE_PARAM_FLASHCONTROLTYPE; - - -/** - * Focus control type - */ -typedef enum OMX_IMAGE_FOCUSCONTROLTYPE { - OMX_IMAGE_FocusControlOn = 0, - OMX_IMAGE_FocusControlOff, - OMX_IMAGE_FocusControlAuto, - OMX_IMAGE_FocusControlAutoLock, - OMX_IMAGE_FocusControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_FocusControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_FocusControlHyperfocal, /* Focus at the hyperfocal point of the lens. */ - OMX_IMAGE_FocusControlAutoMacro, /* CF over a macro range (eg 0-50cm) */ - OMX_IMAGE_FocusControlAutoInfinity, /* CF over distant range (eg 50cm to infinity) */ - OMX_IMAGE_FocusControlAutoLockMacro, /* AF over a macro range (eg 0-50cm) */ - OMX_IMAGE_FocusControlAutoLockInfinity, /* AF over distant range (eg 50cm to infinity) */ - OMX_IMAGE_FocusControlNearFixed, /* Focus at a fixed near focus point - (50cm-1m) */ - OMX_IMAGE_FocusControlAutoNear, /* CF over a near range (eg 0-200cm) */ - OMX_IMAGE_FocusControlAutoLockNear, /* AF over a near range (eg 0-200cm) */ - OMX_IMAGE_FocusControlInfinityFixed, /* Focus at infinity */ - OMX_IMAGE_FocusControlMacroFixed, /* Focus at a macro distance */ - OMX_IMAGE_FocusControlAutoFast, /* CF over a full range with fast response */ - OMX_IMAGE_FocusControlAutoMacroFast, /* CF over a macro range (eg 0-50cm) with fast response */ - OMX_IMAGE_FocusControlAutoNearFast, /* CF over a near range (eg 0-200cm) */ - OMX_IMAGE_FocusControlAutoInfinityFast, /* CF over distant range (eg 50cm to infinity) with fast response */ - OMX_IMAGE_FocusControlCurrentFixed, /* Stop the lens at the current position */ - OMX_IMAGE_FocusControlMax = 0x7FFFFFFF -} OMX_IMAGE_FOCUSCONTROLTYPE; - - -/** - * Focus control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFocusControl : Focus control - * nFocusSteps : Focus can take on values from 0 mm to infinity. - * Interest is only in number of steps over this range. - * nFocusStepIndex : Current focus step index - */ -typedef struct OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_FOCUSCONTROLTYPE eFocusControl; - OMX_U32 nFocusSteps; - OMX_U32 nFocusStepIndex; -} OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE; - - -/** - * Q Factor for JPEG compression, which controls the tradeoff between image - * quality and size. Q Factor provides a more simple means of controlling - * JPEG compression quality, without directly programming Quantization - * tables for chroma and luma - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nQFactor : JPEG Q factor value in the range of 1-100. A factor of 1 - * produces the smallest, worst quality images, and a factor - * of 100 produces the largest, best quality images. A - * typical default is 75 for small good quality images - */ -typedef struct OMX_IMAGE_PARAM_QFACTORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nQFactor; -} OMX_IMAGE_PARAM_QFACTORTYPE; - -/** - * Quantization table type - */ - -typedef enum OMX_IMAGE_QUANTIZATIONTABLETYPE { - OMX_IMAGE_QuantizationTableLuma = 0, - OMX_IMAGE_QuantizationTableChroma, - OMX_IMAGE_QuantizationTableChromaCb, - OMX_IMAGE_QuantizationTableChromaCr, - OMX_IMAGE_QuantizationTableKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_QuantizationTableVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_QuantizationTableMax = 0x7FFFFFFF -} OMX_IMAGE_QUANTIZATIONTABLETYPE; - -/** - * JPEG quantization tables are used to determine DCT compression for - * YUV data, as an alternative to specifying Q factor, providing exact - * control of compression - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eQuantizationTable : Quantization table type - * nQuantizationMatrix[64] : JPEG quantization table of coefficients stored - * in increasing columns then by rows of data (i.e. - * row 1, ... row 8). Quantization values are in - * the range 0-255 and stored in linear order - * (i.e. the component will zig-zag the - * quantization table data if required internally) - */ -typedef struct OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_QUANTIZATIONTABLETYPE eQuantizationTable; - OMX_U8 nQuantizationMatrix[64]; -} OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE; - - -/** - * Huffman table type, the same Huffman table is applied for chroma and - * luma component - */ -typedef enum OMX_IMAGE_HUFFMANTABLETYPE { - OMX_IMAGE_HuffmanTableAC = 0, - OMX_IMAGE_HuffmanTableDC, - OMX_IMAGE_HuffmanTableACLuma, - OMX_IMAGE_HuffmanTableACChroma, - OMX_IMAGE_HuffmanTableDCLuma, - OMX_IMAGE_HuffmanTableDCChroma, - OMX_IMAGE_HuffmanTableKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_HuffmanTableVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_HuffmanTableMax = 0x7FFFFFFF -} OMX_IMAGE_HUFFMANTABLETYPE; - -/** - * JPEG Huffman table - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eHuffmanTable : Huffman table type - * nNumberOfHuffmanCodeOfLength[16] : 0-16, number of Huffman codes of each - * possible length - * nHuffmanTable[256] : 0-255, the size used for AC and DC - * HuffmanTable are 16 and 162 - */ -typedef struct OMX_IMAGE_PARAM_HUFFMANTTABLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_HUFFMANTABLETYPE eHuffmanTable; - OMX_U8 nNumberOfHuffmanCodeOfLength[16]; - OMX_U8 nHuffmanTable[256]; -}OMX_IMAGE_PARAM_HUFFMANTTABLETYPE; - -/** @} */ -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/IL/OMX_Index.h b/vc/include/IL/OMX_Index.h @@ -1,532 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** @file OMX_Index.h - OpenMax IL version 1.1.2 - * The OMX_Index header file contains the definitions for both applications - * and components . - */ - - -#ifndef OMX_Index_h -#define OMX_Index_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ -#include "OMX_Types.h" - - -/** The OMX_INDEXTYPE enumeration is used to select a structure when either - * getting or setting parameters and/or configuration data. Each entry in - * this enumeration maps to an OMX specified structure. When the - * OMX_GetParameter, OMX_SetParameter, OMX_GetConfig or OMX_SetConfig methods - * are used, the second parameter will always be an entry from this enumeration - * and the third entry will be the structure shown in the comments for the entry. - * For example, if the application is initializing a cropping function, the - * OMX_SetConfig command would have OMX_IndexConfigCommonInputCrop as the second parameter - * and would send a pointer to an initialized OMX_RECTTYPE structure as the - * third parameter. - * - * The enumeration entries named with the OMX_Config prefix are sent using - * the OMX_SetConfig command and the enumeration entries named with the - * OMX_PARAM_ prefix are sent using the OMX_SetParameter command. - */ -typedef enum OMX_INDEXTYPE { - - OMX_IndexComponentStartUnused = 0x01000000, - OMX_IndexParamPriorityMgmt, /**< reference: OMX_PRIORITYMGMTTYPE */ - OMX_IndexParamAudioInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamImageInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamVideoInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamOtherInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamNumAvailableStreams, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamActiveStream, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamSuspensionPolicy, /**< reference: OMX_PARAM_SUSPENSIONPOLICYTYPE */ - OMX_IndexParamComponentSuspended, /**< reference: OMX_PARAM_SUSPENSIONTYPE */ - OMX_IndexConfigCapturing, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCaptureMode, /**< reference: OMX_CONFIG_CAPTUREMODETYPE */ - OMX_IndexAutoPauseAfterCapture, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamContentURI, /**< reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexParamCustomContentPipe, /**< reference: OMX_PARAM_CONTENTPIPETYPE */ - OMX_IndexParamDisableResourceConcealment, /**< reference: OMX_RESOURCECONCEALMENTTYPE */ - OMX_IndexConfigMetadataItemCount, /**< reference: OMX_CONFIG_METADATAITEMCOUNTTYPE */ - OMX_IndexConfigContainerNodeCount, /**< reference: OMX_CONFIG_CONTAINERNODECOUNTTYPE */ - OMX_IndexConfigMetadataItem, /**< reference: OMX_CONFIG_METADATAITEMTYPE */ - OMX_IndexConfigCounterNodeID, /**< reference: OMX_CONFIG_CONTAINERNODEIDTYPE */ - OMX_IndexParamMetadataFilterType, /**< reference: OMX_PARAM_METADATAFILTERTYPE */ - OMX_IndexParamMetadataKeyFilter, /**< reference: OMX_PARAM_METADATAFILTERTYPE */ - OMX_IndexConfigPriorityMgmt, /**< reference: OMX_PRIORITYMGMTTYPE */ - OMX_IndexParamStandardComponentRole, /**< reference: OMX_PARAM_COMPONENTROLETYPE */ - - OMX_IndexPortStartUnused = 0x02000000, - OMX_IndexParamPortDefinition, /**< reference: OMX_PARAM_PORTDEFINITIONTYPE */ - OMX_IndexParamCompBufferSupplier, /**< reference: OMX_PARAM_BUFFERSUPPLIERTYPE */ - OMX_IndexReservedStartUnused = 0x03000000, - - /* Audio parameters and configurations */ - OMX_IndexAudioStartUnused = 0x04000000, - OMX_IndexParamAudioPortFormat, /**< reference: OMX_AUDIO_PARAM_PORTFORMATTYPE */ - OMX_IndexParamAudioPcm, /**< reference: OMX_AUDIO_PARAM_PCMMODETYPE */ - OMX_IndexParamAudioAac, /**< reference: OMX_AUDIO_PARAM_AACPROFILETYPE */ - OMX_IndexParamAudioRa, /**< reference: OMX_AUDIO_PARAM_RATYPE */ - OMX_IndexParamAudioMp3, /**< reference: OMX_AUDIO_PARAM_MP3TYPE */ - OMX_IndexParamAudioAdpcm, /**< reference: OMX_AUDIO_PARAM_ADPCMTYPE */ - OMX_IndexParamAudioG723, /**< reference: OMX_AUDIO_PARAM_G723TYPE */ - OMX_IndexParamAudioG729, /**< reference: OMX_AUDIO_PARAM_G729TYPE */ - OMX_IndexParamAudioAmr, /**< reference: OMX_AUDIO_PARAM_AMRTYPE */ - OMX_IndexParamAudioWma, /**< reference: OMX_AUDIO_PARAM_WMATYPE */ - OMX_IndexParamAudioSbc, /**< reference: OMX_AUDIO_PARAM_SBCTYPE */ - OMX_IndexParamAudioMidi, /**< reference: OMX_AUDIO_PARAM_MIDITYPE */ - OMX_IndexParamAudioGsm_FR, /**< reference: OMX_AUDIO_PARAM_GSMFRTYPE */ - OMX_IndexParamAudioMidiLoadUserSound, /**< reference: OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE */ - OMX_IndexParamAudioG726, /**< reference: OMX_AUDIO_PARAM_G726TYPE */ - OMX_IndexParamAudioGsm_EFR, /**< reference: OMX_AUDIO_PARAM_GSMEFRTYPE */ - OMX_IndexParamAudioGsm_HR, /**< reference: OMX_AUDIO_PARAM_GSMHRTYPE */ - OMX_IndexParamAudioPdc_FR, /**< reference: OMX_AUDIO_PARAM_PDCFRTYPE */ - OMX_IndexParamAudioPdc_EFR, /**< reference: OMX_AUDIO_PARAM_PDCEFRTYPE */ - OMX_IndexParamAudioPdc_HR, /**< reference: OMX_AUDIO_PARAM_PDCHRTYPE */ - OMX_IndexParamAudioTdma_FR, /**< reference: OMX_AUDIO_PARAM_TDMAFRTYPE */ - OMX_IndexParamAudioTdma_EFR, /**< reference: OMX_AUDIO_PARAM_TDMAEFRTYPE */ - OMX_IndexParamAudioQcelp8, /**< reference: OMX_AUDIO_PARAM_QCELP8TYPE */ - OMX_IndexParamAudioQcelp13, /**< reference: OMX_AUDIO_PARAM_QCELP13TYPE */ - OMX_IndexParamAudioEvrc, /**< reference: OMX_AUDIO_PARAM_EVRCTYPE */ - OMX_IndexParamAudioSmv, /**< reference: OMX_AUDIO_PARAM_SMVTYPE */ - OMX_IndexParamAudioVorbis, /**< reference: OMX_AUDIO_PARAM_VORBISTYPE */ - - OMX_IndexConfigAudioMidiImmediateEvent, /**< reference: OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE */ - OMX_IndexConfigAudioMidiControl, /**< reference: OMX_AUDIO_CONFIG_MIDICONTROLTYPE */ - OMX_IndexConfigAudioMidiSoundBankProgram, /**< reference: OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE */ - OMX_IndexConfigAudioMidiStatus, /**< reference: OMX_AUDIO_CONFIG_MIDISTATUSTYPE */ - OMX_IndexConfigAudioMidiMetaEvent, /**< reference: OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE */ - OMX_IndexConfigAudioMidiMetaEventData, /**< reference: OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE */ - OMX_IndexConfigAudioVolume, /**< reference: OMX_AUDIO_CONFIG_VOLUMETYPE */ - OMX_IndexConfigAudioBalance, /**< reference: OMX_AUDIO_CONFIG_BALANCETYPE */ - OMX_IndexConfigAudioChannelMute, /**< reference: OMX_AUDIO_CONFIG_CHANNELMUTETYPE */ - OMX_IndexConfigAudioMute, /**< reference: OMX_AUDIO_CONFIG_MUTETYPE */ - OMX_IndexConfigAudioLoudness, /**< reference: OMX_AUDIO_CONFIG_LOUDNESSTYPE */ - OMX_IndexConfigAudioEchoCancelation, /**< reference: OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE */ - OMX_IndexConfigAudioNoiseReduction, /**< reference: OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE */ - OMX_IndexConfigAudioBass, /**< reference: OMX_AUDIO_CONFIG_BASSTYPE */ - OMX_IndexConfigAudioTreble, /**< reference: OMX_AUDIO_CONFIG_TREBLETYPE */ - OMX_IndexConfigAudioStereoWidening, /**< reference: OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE */ - OMX_IndexConfigAudioChorus, /**< reference: OMX_AUDIO_CONFIG_CHORUSTYPE */ - OMX_IndexConfigAudioEqualizer, /**< reference: OMX_AUDIO_CONFIG_EQUALIZERTYPE */ - OMX_IndexConfigAudioReverberation, /**< reference: OMX_AUDIO_CONFIG_REVERBERATIONTYPE */ - OMX_IndexConfigAudioChannelVolume, /**< reference: OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE */ - - /* Image specific parameters and configurations */ - OMX_IndexImageStartUnused = 0x05000000, - OMX_IndexParamImagePortFormat, /**< reference: OMX_IMAGE_PARAM_PORTFORMATTYPE */ - OMX_IndexParamFlashControl, /**< reference: OMX_IMAGE_PARAM_FLASHCONTROLTYPE */ - OMX_IndexConfigFocusControl, /**< reference: OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE */ - OMX_IndexParamQFactor, /**< reference: OMX_IMAGE_PARAM_QFACTORTYPE */ - OMX_IndexParamQuantizationTable, /**< reference: OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE */ - OMX_IndexParamHuffmanTable, /**< reference: OMX_IMAGE_PARAM_HUFFMANTTABLETYPE */ - OMX_IndexConfigFlashControl, /**< reference: OMX_IMAGE_PARAM_FLASHCONTROLTYPE */ - - /* Video specific parameters and configurations */ - OMX_IndexVideoStartUnused = 0x06000000, - OMX_IndexParamVideoPortFormat, /**< reference: OMX_VIDEO_PARAM_PORTFORMATTYPE */ - OMX_IndexParamVideoQuantization, /**< reference: OMX_VIDEO_PARAM_QUANTIZATIONTYPE */ - OMX_IndexParamVideoFastUpdate, /**< reference: OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE */ - OMX_IndexParamVideoBitrate, /**< reference: OMX_VIDEO_PARAM_BITRATETYPE */ - OMX_IndexParamVideoMotionVector, /**< reference: OMX_VIDEO_PARAM_MOTIONVECTORTYPE */ - OMX_IndexParamVideoIntraRefresh, /**< reference: OMX_VIDEO_PARAM_INTRAREFRESHTYPE */ - OMX_IndexParamVideoErrorCorrection, /**< reference: OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE */ - OMX_IndexParamVideoVBSMC, /**< reference: OMX_VIDEO_PARAM_VBSMCTYPE */ - OMX_IndexParamVideoMpeg2, /**< reference: OMX_VIDEO_PARAM_MPEG2TYPE */ - OMX_IndexParamVideoMpeg4, /**< reference: OMX_VIDEO_PARAM_MPEG4TYPE */ - OMX_IndexParamVideoWmv, /**< reference: OMX_VIDEO_PARAM_WMVTYPE */ - OMX_IndexParamVideoRv, /**< reference: OMX_VIDEO_PARAM_RVTYPE */ - OMX_IndexParamVideoAvc, /**< reference: OMX_VIDEO_PARAM_AVCTYPE */ - OMX_IndexParamVideoH263, /**< reference: OMX_VIDEO_PARAM_H263TYPE */ - OMX_IndexParamVideoProfileLevelQuerySupported, /**< reference: OMX_VIDEO_PARAM_PROFILELEVELTYPE */ - OMX_IndexParamVideoProfileLevelCurrent, /**< reference: OMX_VIDEO_PARAM_PROFILELEVELTYPE */ - OMX_IndexConfigVideoBitrate, /**< reference: OMX_VIDEO_CONFIG_BITRATETYPE */ - OMX_IndexConfigVideoFramerate, /**< reference: OMX_CONFIG_FRAMERATETYPE */ - OMX_IndexConfigVideoIntraVOPRefresh, /**< reference: OMX_CONFIG_INTRAREFRESHVOPTYPE */ - OMX_IndexConfigVideoIntraMBRefresh, /**< reference: OMX_CONFIG_MACROBLOCKERRORMAPTYPE */ - OMX_IndexConfigVideoMBErrorReporting, /**< reference: OMX_CONFIG_MBERRORREPORTINGTYPE */ - OMX_IndexParamVideoMacroblocksPerFrame, /**< reference: OMX_PARAM_MACROBLOCKSTYPE */ - OMX_IndexConfigVideoMacroBlockErrorMap, /**< reference: OMX_CONFIG_MACROBLOCKERRORMAPTYPE */ - OMX_IndexParamVideoSliceFMO, /**< reference: OMX_VIDEO_PARAM_AVCSLICEFMO */ - OMX_IndexConfigVideoAVCIntraPeriod, /**< reference: OMX_VIDEO_CONFIG_AVCINTRAPERIOD */ - OMX_IndexConfigVideoNalSize, /**< reference: OMX_VIDEO_CONFIG_NALSIZE */ - - /* Image & Video common Configurations */ - OMX_IndexCommonStartUnused = 0x07000000, - OMX_IndexParamCommonDeblocking, /**< reference: OMX_PARAM_DEBLOCKINGTYPE */ - OMX_IndexParamCommonSensorMode, /**< reference: OMX_PARAM_SENSORMODETYPE */ - OMX_IndexParamCommonInterleave, /**< reference: OMX_PARAM_INTERLEAVETYPE */ - OMX_IndexConfigCommonColorFormatConversion, /**< reference: OMX_CONFIG_COLORCONVERSIONTYPE */ - OMX_IndexConfigCommonScale, /**< reference: OMX_CONFIG_SCALEFACTORTYPE */ - OMX_IndexConfigCommonImageFilter, /**< reference: OMX_CONFIG_IMAGEFILTERTYPE */ - OMX_IndexConfigCommonColorEnhancement, /**< reference: OMX_CONFIG_COLORENHANCEMENTTYPE */ - OMX_IndexConfigCommonColorKey, /**< reference: OMX_CONFIG_COLORKEYTYPE */ - OMX_IndexConfigCommonColorBlend, /**< reference: OMX_CONFIG_COLORBLENDTYPE */ - OMX_IndexConfigCommonFrameStabilisation,/**< reference: OMX_CONFIG_FRAMESTABTYPE */ - OMX_IndexConfigCommonRotate, /**< reference: OMX_CONFIG_ROTATIONTYPE */ - OMX_IndexConfigCommonMirror, /**< reference: OMX_CONFIG_MIRRORTYPE */ - OMX_IndexConfigCommonOutputPosition, /**< reference: OMX_CONFIG_POINTTYPE */ - OMX_IndexConfigCommonInputCrop, /**< reference: OMX_CONFIG_RECTTYPE */ - OMX_IndexConfigCommonOutputCrop, /**< reference: OMX_CONFIG_RECTTYPE */ - OMX_IndexConfigCommonDigitalZoom, /**< reference: OMX_CONFIG_SCALEFACTORTYPE */ - OMX_IndexConfigCommonOpticalZoom, /**< reference: OMX_CONFIG_SCALEFACTORTYPE*/ - OMX_IndexConfigCommonWhiteBalance, /**< reference: OMX_CONFIG_WHITEBALCONTROLTYPE */ - OMX_IndexConfigCommonExposure, /**< reference: OMX_CONFIG_EXPOSURECONTROLTYPE */ - OMX_IndexConfigCommonContrast, /**< reference: OMX_CONFIG_CONTRASTTYPE */ - OMX_IndexConfigCommonBrightness, /**< reference: OMX_CONFIG_BRIGHTNESSTYPE */ - OMX_IndexConfigCommonBacklight, /**< reference: OMX_CONFIG_BACKLIGHTTYPE */ - OMX_IndexConfigCommonGamma, /**< reference: OMX_CONFIG_GAMMATYPE */ - OMX_IndexConfigCommonSaturation, /**< reference: OMX_CONFIG_SATURATIONTYPE */ - OMX_IndexConfigCommonLightness, /**< reference: OMX_CONFIG_LIGHTNESSTYPE */ - OMX_IndexConfigCommonExclusionRect, /**< reference: OMX_CONFIG_RECTTYPE */ - OMX_IndexConfigCommonDithering, /**< reference: OMX_CONFIG_DITHERTYPE */ - OMX_IndexConfigCommonPlaneBlend, /**< reference: OMX_CONFIG_PLANEBLENDTYPE */ - OMX_IndexConfigCommonExposureValue, /**< reference: OMX_CONFIG_EXPOSUREVALUETYPE */ - OMX_IndexConfigCommonOutputSize, /**< reference: OMX_FRAMESIZETYPE */ - OMX_IndexParamCommonExtraQuantData, /**< reference: OMX_OTHER_EXTRADATATYPE */ - OMX_IndexConfigCommonFocusRegion, /**< reference: OMX_CONFIG_FOCUSREGIONTYPE */ - OMX_IndexConfigCommonFocusStatus, /**< reference: OMX_PARAM_FOCUSSTATUSTYPE */ - OMX_IndexConfigCommonTransitionEffect, /**< reference: OMX_CONFIG_TRANSITIONEFFECTTYPE */ - - /* Reserved Configuration range */ - OMX_IndexOtherStartUnused = 0x08000000, - OMX_IndexParamOtherPortFormat, /**< reference: OMX_OTHER_PARAM_PORTFORMATTYPE */ - OMX_IndexConfigOtherPower, /**< reference: OMX_OTHER_CONFIG_POWERTYPE */ - OMX_IndexConfigOtherStats, /**< reference: OMX_OTHER_CONFIG_STATSTYPE */ - - - /* Reserved Time range */ - OMX_IndexTimeStartUnused = 0x09000000, - OMX_IndexConfigTimeScale, /**< reference: OMX_TIME_CONFIG_SCALETYPE */ - OMX_IndexConfigTimeClockState, /**< reference: OMX_TIME_CONFIG_CLOCKSTATETYPE */ - OMX_IndexConfigTimeActiveRefClock, /**< reference: OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE */ - OMX_IndexConfigTimeCurrentMediaTime, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (read only) */ - OMX_IndexConfigTimeCurrentWallTime, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (read only) */ - OMX_IndexConfigTimeCurrentAudioReference, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (write only) */ - OMX_IndexConfigTimeCurrentVideoReference, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (write only) */ - OMX_IndexConfigTimeMediaTimeRequest, /**< reference: OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE (write only) */ - OMX_IndexConfigTimeClientStartTime, /**<reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (write only) */ - OMX_IndexConfigTimePosition, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexConfigTimeSeekMode, /**< reference: OMX_TIME_CONFIG_SEEKMODETYPE */ - - - OMX_IndexKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - /* Vendor specific area */ - OMX_IndexVendorStartUnused = 0x7F000000, - /* Vendor specific structures should be in the range of 0x7F000000 - to 0x7FFFFFFE. This range is not broken out by vendor, so - private indexes are not guaranteed unique and therefore should - only be sent to the appropriate component. */ - - /* used for ilcs-top communication */ - OMX_IndexParamMarkComparison, /**< reference: OMX_PARAM_MARKCOMPARISONTYPE */ - OMX_IndexParamPortSummary, /**< reference: OMX_PARAM_PORTSUMMARYTYPE */ - OMX_IndexParamTunnelStatus, /**< reference : OMX_PARAM_TUNNELSTATUSTYPE */ - OMX_IndexParamBrcmRecursionUnsafe, /**< reference: OMX_PARAM_BRCMRECURSIONUNSAFETYPE */ - - /* used for top-ril communication */ - OMX_IndexParamBufferAddress, /**< reference : OMX_PARAM_BUFFERADDRESSTYPE */ - OMX_IndexParamTunnelSetup, /**< reference : OMX_PARAM_TUNNELSETUPTYPE */ - OMX_IndexParamBrcmPortEGL, /**< reference : OMX_PARAM_BRCMPORTEGLTYPE */ - OMX_IndexParamIdleResourceCount, /**< reference : OMX_PARAM_U32TYPE */ - - /* used for ril-ril communication */ - OMX_IndexParamImagePoolDisplayFunction, /**<reference : OMX_PARAM_IMAGEDISPLAYFUNCTIONTYPE */ - OMX_IndexParamBrcmDataUnit, /**<reference: OMX_PARAM_DATAUNITTYPE */ - OMX_IndexParamCodecConfig, /**<reference: OMX_PARAM_CODECCONFIGTYPE */ - OMX_IndexParamCameraPoolToEncoderFunction, /**<reference : OMX_PARAM_CAMERAPOOLTOENCODERFUNCTIONTYPE */ - OMX_IndexParamCameraStripeFunction, /**<reference : OMX_PARAM_CAMERASTRIPEFUNCTIONTYPE */ - OMX_IndexParamCameraCaptureEventFunction, /**<reference : OMX_PARAM_CAMERACAPTUREEVENTFUNCTIONTYPE */ - - /* used for client-ril communication */ - OMX_IndexParamTestInterface, /**< reference : OMX_PARAM_TESTINTERFACETYPE */ - - // 0x7f000010 - OMX_IndexConfigDisplayRegion, /**< reference : OMX_CONFIG_DISPLAYREGIONTYPE */ - OMX_IndexParamSource, /**< reference : OMX_PARAM_SOURCETYPE */ - OMX_IndexParamSourceSeed, /**< reference : OMX_PARAM_SOURCESEEDTYPE */ - OMX_IndexParamResize, /**< reference : OMX_PARAM_RESIZETYPE */ - OMX_IndexConfigVisualisation, /**< reference : OMX_CONFIG_VISUALISATIONTYPE */ - OMX_IndexConfigSingleStep, /**<reference : OMX_PARAM_U32TYPE */ - OMX_IndexConfigPlayMode, /**<reference: OMX_CONFIG_PLAYMODETYPE */ - OMX_IndexParamCameraCamplusId, /**<reference : OMX_PARAM_U32TYPE */ - OMX_IndexConfigCommonImageFilterParameters, /**<reference : OMX_CONFIG_IMAGEFILTERPARAMSTYPE */ - OMX_IndexConfigTransitionControl, /**<reference : OMX_CONFIG_TRANSITIONCONTROLTYPE */ - OMX_IndexConfigPresentationOffset, /**<reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexParamSourceFunctions, /**<reference: OMX_PARAM_STILLSFUNCTIONTYPE */ - OMX_IndexConfigAudioMonoTrackControl, /**<reference : OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE */ - OMX_IndexParamCameraImagePool, /**<reference : OMX_PARAM_CAMERAIMAGEPOOLTYPE */ - OMX_IndexConfigCameraISPOutputPoolHeight,/**<reference : OMX_PARAM_U32TYPE */ - OMX_IndexParamImagePoolSize, /**<reference: OMX_PARAM_IMAGEPOOLSIZETYPE */ - - // 0x7f000020 - OMX_IndexParamImagePoolExternal, /**<reference: OMX_PARAM_IMAGEPOOLEXTERNALTYPE */ - OMX_IndexParamRUTILFifoInfo, /**<reference: OMX_PARAM_RUTILFIFOINFOTYPE*/ - OMX_IndexParamILFifoConfig, /**<reference: OMX_PARAM_ILFIFOCONFIG */ - OMX_IndexConfigCameraSensorModes, /**<reference : OMX_CONFIG_CAMERASENSORMODETYPE */ - OMX_IndexConfigBrcmPortStats, /**<reference : OMX_CONFIG_BRCMPORTSTATSTYPE */ - OMX_IndexConfigBrcmPortBufferStats, /**<reference : OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE */ - OMX_IndexConfigBrcmCameraStats, /**<reference : OMX_CONFIG_BRCMCAMERASTATSTYPE */ - OMX_IndexConfigBrcmIOPerfStats, /**<reference : OMX_CONFIG_BRCMIOPERFSTATSTYPE */ - OMX_IndexConfigCommonSharpness, /**<reference : OMX_CONFIG_SHARPNESSTYPE */ - OMX_IndexConfigCommonFlickerCancellation, /**reference : OMX_CONFIG_FLICKERCANCELTYPE */ - OMX_IndexParamCameraSwapImagePools, /**<reference : OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraSingleBufferCaptureInput, /**<reference : OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCommonRedEyeRemoval, /**<reference : OMX_CONFIG_REDEYEREMOVALTYPE */ - OMX_IndexConfigCommonFaceDetectionControl, /**<reference : OMX_CONFIG_FACEDETECTIONCONTROLTYPE */ - OMX_IndexConfigCommonFaceDetectionRegion, /**<reference : OMX_CONFIG_FACEDETECTIONREGIONTYPE */ - OMX_IndexConfigCommonInterlace, /**<reference: OMX_CONFIG_INTERLACETYPE */ - - // 0x7f000030 - OMX_IndexParamISPTunerName, /**<reference: OMX_PARAM_CAMERAISPTUNERTYPE */ - OMX_IndexParamCameraDeviceNumber, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraDevicesPresent, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraInputFrame, /**<reference: OMX_CONFIG_IMAGEPTRTYPE */ - OMX_IndexConfigStillColourDenoiseEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigVideoColourDenoiseEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigAFAssistLight, /**<reference: OMX_CONFIG_AFASSISTTYPE */ - OMX_IndexConfigSmartShakeReductionEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigInputCropPercentages, /**<reference: OMX_CONFIG_INPUTCROPTYPE */ - OMX_IndexConfigStillsAntiShakeEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigWaitForFocusBeforeCapture,/**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigAudioRenderingLatency, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigDrawBoxAroundFaces, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCodecRequirements, /**<reference: OMX_PARAM_CODECREQUIREMENTSTYPE */ - OMX_IndexConfigBrcmEGLImageMemHandle, /**<reference: OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE */ - OMX_IndexConfigPrivacyIndicator, /**<reference: OMX_CONFIG_PRIVACYINDICATORTYPE */ - - // 0x7f000040 - OMX_IndexParamCameraFlashType, /**<reference: OMX_PARAM_CAMERAFLASHTYPE */ - OMX_IndexConfigCameraEnableStatsPass, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCameraFlashConfig, /**<reference: OMX_CONFIG_CAMERAFLASHCONFIGTYPE */ - OMX_IndexConfigCaptureRawImageURI, /**<reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexConfigCameraStripeFuncMinLines, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraAlgorithmVersionDeprecated, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraIsoReferenceValue, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraCaptureAbortsAutoFocus, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmClockMissCount, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFlashChargeLevel, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoEncodedSliceSize, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmAudioTrackGaplessPlayback, /**< reference: OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE */ - OMX_IndexConfigBrcmAudioTrackChangeControl, /**< reference: OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE */ - OMX_IndexParamBrcmPixelAspectRatio, /**< reference: OMX_CONFIG_POINTTYPE */ - OMX_IndexParamBrcmPixelValueRange, /**< reference: OMX_PARAM_BRCMPIXELVALUERANGETYPE */ - OMX_IndexParamCameraDisableAlgorithm, /**< reference: OMX_PARAM_CAMERADISABLEALGORITHMTYPE */ - - // 0x7f000050 - OMX_IndexConfigBrcmVideoIntraPeriodTime, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoIntraPeriod, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmAudioEffectControl, /**< reference: OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE */ - OMX_IndexConfigBrcmMinimumProcessingLatency, /**< reference: OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY */ - OMX_IndexParamBrcmVideoAVCSEIEnable, /**< reference: OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE */ - OMX_IndexParamBrcmAllowMemChange, /**< reference: OMX_PARAM_BRCMALLOWMEMCHANGETYPE */ - OMX_IndexConfigBrcmVideoEncoderMBRowsPerSlice, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraAFAssistDeviceNumber_Deprecated, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraPrivacyIndicatorDeviceNumber_Deprecated, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraUseCase, /**< reference: OMX_CONFIG_CAMERAUSECASETYPE */ - OMX_IndexParamBrcmDisableProprietaryTunnels, /**< reference: OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE */ - OMX_IndexParamBrcmOutputBufferSize, /**< reference: OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE */ - OMX_IndexParamBrcmRetainMemory, /**< reference: OMX_PARAM_BRCMRETAINMEMORYTYPE */ - OMX_IndexConfigCanFocus_Deprecated, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmImmutableInput, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamDynamicParameterFile, /**< reference: OMX_PARAM_CONTENTURITYPE */ - - // 0x7f000060 - OMX_IndexParamUseDynamicParameterFile, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCameraInfo, /**< reference: OMX_CONFIG_CAMERAINFOTYPE */ - OMX_IndexConfigCameraFeatures, /**< reference: OMX_CONFIG_CAMERAFEATURESTYPE */ - OMX_IndexConfigRequestCallback, /**< reference: OMX_CONFIG_REQUESTCALLBACKTYPE */ //Should be added to the spec as part of IL416c - OMX_IndexConfigBrcmOutputBufferFullCount, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCommonFocusRegionXY, /**< reference: OMX_CONFIG_FOCUSREGIONXYTYPE */ - OMX_IndexParamBrcmDisableEXIF, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigUserSettingsId, /**< reference: OMX_CONFIG_U8TYPE */ - OMX_IndexConfigCameraSettings, /**< reference: OMX_CONFIG_CAMERASETTINGSTYPE */ - OMX_IndexConfigDrawBoxLineParams, /**< reference: OMX_CONFIG_DRAWBOXLINEPARAMS */ - OMX_IndexParamCameraRmiControl_Deprecated, /**< reference: OMX_PARAM_CAMERARMITYPE */ - OMX_IndexConfigBurstCapture, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmEnableIJGTableScaling, /**< reference: OMX_PARAM_IJGSCALINGTYPE */ - OMX_IndexConfigPowerDown, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmSyncOutput, /**< reference: OMX_CONFIG_BRCMSYNCOUTPUTTYPE */ - OMX_IndexParamBrcmFlushCallback, /**< reference: OMX_PARAM_BRCMFLUSHCALLBACK */ - - // 0x7f000070 - OMX_IndexConfigBrcmVideoRequestIFrame, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmNALSSeparate, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigConfirmView, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigDrmView, /**< reference: OMX_CONFIG_DRMVIEWTYPE */ - OMX_IndexConfigBrcmVideoIntraRefresh, /**< reference: OMX_VIDEO_PARAM_INTRAREFRESHTYPE */ - OMX_IndexParamBrcmMaxFileSize, /**< reference: OMX_PARAM_BRCMU64TYPE */ - OMX_IndexParamBrcmCRCEnable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmCRC, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraRmiInUse_Deprecated, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmAudioSource, /**<reference: OMX_CONFIG_BRCMAUDIOSOURCETYPE */ - OMX_IndexConfigBrcmAudioDestination, /**< reference: OMX_CONFIG_BRCMAUDIODESTINATIONTYPE */ - OMX_IndexParamAudioDdp, /**< reference: OMX_AUDIO_PARAM_DDPTYPE */ - OMX_IndexParamBrcmThumbnail, /**< reference: OMX_PARAM_BRCMTHUMBNAILTYPE */ - OMX_IndexParamBrcmDisableLegacyBlocks_Deprecated, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmCameraInputAspectRatio, /**< reference: OMX_PARAM_BRCMASPECTRATIOTYPE */ - OMX_IndexParamDynamicParameterFileFailFatal,/**< reference: OMX_CONFIG_BOOLEANTYPE */ - - // 0x7f000080 - OMX_IndexParamBrcmVideoDecodeErrorConcealment, /**< reference: OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE */ - OMX_IndexParamBrcmInterpolateMissingTimestamps, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmSetCodecPerformanceMonitoring, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFlashInfo, /**< reference: OMX_CONFIG_FLASHINFOTYPE */ - OMX_IndexParamBrcmMaxFrameSkips, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigDynamicRangeExpansion, /**< reference: OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE */ - OMX_IndexParamBrcmFlushCallbackId, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmTransposeBufferCount, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFaceRecognitionControl, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigFaceRecognitionSaveFace, /**< reference: OMX_PARAM_BRCMU64TYPE */ - OMX_IndexConfigFaceRecognitionDatabaseUri, /**< reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexConfigClockAdjustment, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexParamBrcmThreadAffinity, /**< reference: OMX_PARAM_BRCMTHREADAFFINITYTYPE */ - OMX_IndexParamAsynchronousOutput, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigAsynchronousFailureURI, /**< reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexConfigCommonFaceBeautification, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - - // 0x7f000090 - OMX_IndexConfigCommonSceneDetectionControl,/**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCommonSceneDetected, /**< reference: OMX_CONFIG_SCENEDETECTTYPE */ - OMX_IndexParamDisableVllPool, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamVideoMvc, /**< reference: OMX_VIDEO_PARAM_MVCTYPE */ - OMX_IndexConfigBrcmDrawStaticBox, /**< reference: OMX_CONFIG_STATICBOXTYPE */ - OMX_IndexConfigBrcmClockReferenceSource, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamPassBufferMarks, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigPortCapturing, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexConfigBrcmDecoderPassThrough, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmDecoderPassThrough=OMX_IndexConfigBrcmDecoderPassThrough, /* deprecated */ - OMX_IndexParamBrcmMaxCorruptMBs, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmGlobalAudioMute, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraCaptureMode, /**< reference: OMX_PARAM_CAMERACAPTUREMODETYPE */ - OMX_IndexParamBrcmDrmEncryption, /**< reference: OMX_PARAM_BRCMDRMENCRYPTIONTYPE */ - OMX_IndexConfigBrcmCameraRnDPreprocess, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmCameraRnDPostprocess, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmAudioTrackChangeCount, /**< reference: OMX_PARAM_U32TYPE */ - - // 0x7f0000a0 - OMX_IndexParamCommonUseStcTimestamps, /**< reference: OMX_PARAM_TIMESTAMPMODETYPE */ - OMX_IndexConfigBufferStall, /**< reference: OMX_CONFIG_BUFFERSTALLTYPE */ - OMX_IndexConfigRefreshCodec, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCaptureStatus, /**< reference: OMX_PARAM_CAPTURESTATETYPE */ - OMX_IndexConfigTimeInvalidStartTime, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexConfigLatencyTarget, /**< reference: OMX_CONFIG_LATENCYTARGETTYPE */ - OMX_IndexConfigMinimiseFragmentation, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmUseProprietaryCallback, /**< reference: OMX_CONFIG_BRCMUSEPROPRIETARYTUNNELTYPE */ - OMX_IndexParamPortMaxFrameSize, /**< reference: OMX_FRAMESIZETYPE */ - OMX_IndexParamComponentName, /**< reference: OMX_PARAM_COMPONENTROLETYPE */ - OMX_IndexConfigEncLevelExtension, /**< reference: OMX_VIDEO_CONFIG_LEVEL_EXTEND */ - OMX_IndexConfigTemporalDenoiseEnable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmLazyImagePoolDestroy, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmEEDEEnable, /**< reference: OMX_VIDEO_EEDE_ENABLE */ - OMX_IndexParamBrcmEEDELossRate, /**< reference: OMX_VIDEO_EEDE_LOSSRATE */ - OMX_IndexParamAudioDts, /**< reference: OMX_AUDIO_PARAM_DTSTYPE */ - - // 0x7f0000b0 - OMX_IndexParamNumOutputChannels, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmHighDynamicRange, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmPoolMemAllocSize, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmBufferFlagFilter, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoEncodeMinQuant, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoEncodeMaxQuant, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamRateControlModel, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmExtraBuffers, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFieldOfView, /**< reference: OMX_CONFIG_BRCMFOVTYPE */ - OMX_IndexParamBrcmAlignHoriz, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmAlignVert, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamColorSpace, /**< reference: OMX_PARAM_COLORSPACETYPE */ - OMX_IndexParamBrcmDroppablePFrames, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoInitialQuant, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoEncodeQpP, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoRCSliceDQuant, /**< reference: OMX_PARAM_U32TYPE */ - - // 0x7f0000c0 - OMX_IndexParamBrcmVideoFrameLimitBits, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoPeakRate, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoH264DisableCABAC, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmVideoH264LowLatency, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmVideoH264AUDelimiters, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmVideoH264DeblockIDC, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoH264IntraMBMode, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigContrastEnhance, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraCustomSensorConfig, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmHeaderOnOpen, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmUseRegisterFile, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmRegisterFileFailFatal, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmConfigFileRegisters, /**< reference: OMX_PARAM_BRCMCONFIGFILETYPE */ - OMX_IndexParamBrcmConfigFileChunkRegisters,/**< reference: OMX_PARAM_BRCMCONFIGFILECHUNKTYPE */ - OMX_IndexParamBrcmAttachLog, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraZeroShutterLag, /**< reference: OMX_CONFIG_ZEROSHUTTERLAGTYPE */ - - // 0x7f0000d0 - OMX_IndexParamBrcmFpsRange, /**< reference: OMX_PARAM_BRCMFRAMERATERANGETYPE */ - OMX_IndexParamCaptureExposureCompensation, /**< reference: OMX_PARAM_S32TYPE */ - OMX_IndexParamBrcmVideoPrecodeForQP, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoTimestampFifo, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamSWSharpenDisable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmFlashRequired, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoDrmProtectBuffer, /**< reference: OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE */ - OMX_IndexParamSWSaturationDisable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoDecodeConfigVD3, /**< reference: OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE */ - OMX_IndexConfigBrcmPowerMonitor, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmZeroCopy, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexParamBrcmVideoEGLRenderDiscardMode, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexParamBrcmVideoAVC_VCLHRDEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoAVC_LowDelayHRDEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoCroppingDisable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoAVCInlineHeaderEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - - // 0x7f0000f0 - OMX_IndexConfigBrcmAudioDownmixCoefficients = 0x7f0000f0, /**< reference: OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS */ - OMX_IndexConfigBrcmAudioDownmixCoefficients8x8, /**< reference: OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8 */ - OMX_IndexConfigBrcmAudioMaxSample, /**< reference: OMX_CONFIG_BRCMAUDIOMAXSAMPLE */ - OMX_IndexConfigCustomAwbGains, /**< reference: OMX_CONFIG_CUSTOMAWBGAINSTYPE */ - OMX_IndexParamRemoveImagePadding, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoAVCInlineVectorsEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexConfigBrcmRenderStats, /**< reference: OMX_CONFIG_BRCMRENDERSTATSTYPE */ - OMX_IndexConfigBrcmCameraAnnotate, /**< reference: OMX_CONFIG_BRCMANNOTATETYPE */ - OMX_IndexParamBrcmStereoscopicMode, /**< reference :OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE */ - OMX_IndexParamBrcmLockStepEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexParamBrcmTimeScale, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraInterface, /**< reference: OMX_PARAM_CAMERAINTERFACETYPE */ - OMX_IndexParamCameraClockingMode, /**< reference: OMX_PARAM_CAMERACLOCKINGMODETYPE */ - OMX_IndexParamCameraRxConfig, /**< reference: OMX_PARAM_CAMERARXCONFIG_TYPE */ - OMX_IndexParamCameraRxTiming, /**< reference: OMX_PARAM_CAMERARXTIMING_TYPE */ - OMX_IndexMax = 0x7FFFFFFF -} OMX_INDEXTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/IL/OMX_Other.h b/vc/include/IL/OMX_Other.h @@ -1,347 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** @file OMX_Other.h - OpenMax IL version 1.1.2 - * The structures needed by Other components to exchange - * parameters and configuration data with the components. - */ - -#ifndef OMX_Other_h -#define OMX_Other_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Core.h" - - -/** - * Enumeration of possible data types which match to multiple domains or no - * domain at all. For types which are vendor specific, a value above - * OMX_OTHER_VENDORTSTART should be used. - */ -typedef enum OMX_OTHER_FORMATTYPE { - OMX_OTHER_FormatTime = 0, /**< Transmission of various timestamps, elapsed time, - time deltas, etc */ - OMX_OTHER_FormatPower, /**< Perhaps used for enabling/disabling power - management, setting clocks? */ - OMX_OTHER_FormatStats, /**< Could be things such as frame rate, frames - dropped, etc */ - OMX_OTHER_FormatBinary, /**< Arbitrary binary data */ - OMX_OTHER_FormatVendorReserved = 1000, /**< Starting value for vendor specific - formats */ - - OMX_OTHER_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_OTHER_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_OTHER_FormatText, - OMX_OTHER_FormatTextSKM2, - OMX_OTHER_FormatText3GP5, - - OMX_OTHER_FormatMax = 0x7FFFFFFF -} OMX_OTHER_FORMATTYPE; - -/** - * Enumeration of seek modes. - */ -typedef enum OMX_TIME_SEEKMODETYPE { - OMX_TIME_SeekModeFast = 0, /**< Prefer seeking to an approximation - * of the requested seek position over - * the actual seek position if it - * results in a faster seek. */ - OMX_TIME_SeekModeAccurate, /**< Prefer seeking to the actual seek - * position over an approximation - * of the requested seek position even - * if it results in a slower seek. */ - OMX_TIME_SeekModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_SeekModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_TIME_SeekModeDirectional, /**< Similar to Fast, but if seeking backwards will - * try and seek to a previous sync position from the - * current media time. */ - - OMX_TIME_SeekModeMax = 0x7FFFFFFF -} OMX_TIME_SEEKMODETYPE; - -/* Structure representing the seekmode of the component */ -typedef struct OMX_TIME_CONFIG_SEEKMODETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_TIME_SEEKMODETYPE eType; /**< The seek mode */ -} OMX_TIME_CONFIG_SEEKMODETYPE; - -/** Structure representing a time stamp used with the following configs - * on the Clock Component (CC): - * - * OMX_IndexConfigTimeCurrentWallTime: query of the CC’s current wall - * time - * OMX_IndexConfigTimeCurrentMediaTime: query of the CC’s current media - * time - * OMX_IndexConfigTimeCurrentAudioReference and - * OMX_IndexConfigTimeCurrentVideoReference: audio/video reference - * clock sending SC its reference time - * OMX_IndexConfigTimeClientStartTime: a Clock Component client sends - * this structure to the Clock Component via a SetConfig on its - * client port when it receives a buffer with - * OMX_BUFFERFLAG_STARTTIME set. It must use the timestamp - * specified by that buffer for nStartTimestamp. - * - * It’s also used with the following config on components in general: - * - * OMX_IndexConfigTimePosition: IL client querying component position - * (GetConfig) or commanding a component to seek to the given location - * (SetConfig) - */ -typedef struct OMX_TIME_CONFIG_TIMESTAMPTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version - * information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_TICKS nTimestamp; /**< timestamp .*/ -} OMX_TIME_CONFIG_TIMESTAMPTYPE; - -/** Enumeration of possible reference clocks to the media time. */ -typedef enum OMX_TIME_UPDATETYPE { - OMX_TIME_UpdateRequestFulfillment, /**< Update is the fulfillment of a media time request. */ - OMX_TIME_UpdateScaleChanged, /**< Update was generated because the scale chagned. */ - OMX_TIME_UpdateClockStateChanged, /**< Update was generated because the clock state changed. */ - OMX_TIME_UpdateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_UpdateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TIME_UpdateMax = 0x7FFFFFFF -} OMX_TIME_UPDATETYPE; - -/** Enumeration of possible reference clocks to the media time. */ -typedef enum OMX_TIME_REFCLOCKTYPE { - OMX_TIME_RefClockNone, /**< Use no references. */ - OMX_TIME_RefClockAudio, /**< Use references sent through OMX_IndexConfigTimeCurrentAudioReference */ - OMX_TIME_RefClockVideo, /**< Use references sent through OMX_IndexConfigTimeCurrentVideoReference */ - OMX_TIME_RefClockKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_RefClockVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TIME_RefClockMax = 0x7FFFFFFF -} OMX_TIME_REFCLOCKTYPE; - -/** Enumeration of clock states. */ -typedef enum OMX_TIME_CLOCKSTATE { - OMX_TIME_ClockStateRunning, /**< Clock running. */ - OMX_TIME_ClockStateWaitingForStartTime, /**< Clock waiting until the - * prescribed clients emit their - * start time. */ - OMX_TIME_ClockStateStopped, /**< Clock stopped. */ - OMX_TIME_ClockStateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_ClockStateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TIME_ClockStateMax = 0x7FFFFFFF -} OMX_TIME_CLOCKSTATE; - -/** Structure representing a media time request to the clock component. - * - * A client component sends this structure to the Clock Component via a SetConfig - * on its client port to specify a media timestamp the Clock Component - * should emit. The Clock Component should fulfill the request by sending a - * OMX_TIME_MEDIATIMETYPE when its media clock matches the requested - * timestamp. - * - * The client may require a media time request be fulfilled slightly - * earlier than the media time specified. In this case the client specifies - * an offset which is equal to the difference between wall time corresponding - * to the requested media time and the wall time when it will be - * fulfilled. - * - * A client component may uses these requests and the OMX_TIME_MEDIATIMETYPE to - * time events according to timestamps. If a client must perform an operation O at - * a time T (e.g. deliver a video frame at its corresponding timestamp), it makes a - * media time request at T (perhaps specifying an offset to ensure the request fulfillment - * is a little early). When the clock component passes the resulting OMX_TIME_MEDIATIMETYPE - * structure back to the client component, the client may perform operation O (perhaps having - * to wait a slight amount more time itself as specified by the return values). - */ - -typedef struct OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_PTR pClientPrivate; /**< Client private data to disabiguate this media time - * from others (e.g. the number of the frame to deliver). - * Duplicated in the media time structure that fulfills - * this request. A value of zero is reserved for time scale - * updates. */ - OMX_TICKS nMediaTimestamp; /**< Media timestamp requested.*/ - OMX_TICKS nOffset; /**< Amount of wall clock time by which this - * request should be fulfilled early */ -} OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE; - -/**< Structure sent from the clock component client either when fulfilling - * a media time request or when the time scale has changed. - * - * In the former case the Clock Component fills this structure and times its emission - * to a client component (via the client port) according to the corresponding media - * time request sent by the client. The Clock Component should time the emission to occur - * when the requested timestamp matches the Clock Component's media time but also the - * prescribed offset early. - * - * Upon scale changes the clock component clears the nClientPrivate data, sends the current - * media time and sets the nScale to the new scale via the client port. It emits a - * OMX_TIME_MEDIATIMETYPE to all clients independent of any requests. This allows clients to - * alter processing to accomodate scaling. For instance a video component might skip inter-frames - * in the case of extreme fastforward. Likewise an audio component might add or remove samples - * from an audio frame to scale audio data. - * - * It is expected that some clock components may not be able to fulfill requests - * at exactly the prescribed time. This is acceptable so long as the request is - * fulfilled at least as early as described and not later. This structure provides - * fields the client may use to wait for the remaining time. - * - * The client may use either the nOffset or nWallTimeAtMedia fields to determine the - * wall time until the nMediaTimestamp actually occurs. In the latter case the - * client can get a more accurate value for offset by getting the current wall - * from the cloc component and subtracting it from nWallTimeAtMedia. - */ - -typedef struct OMX_TIME_MEDIATIMETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nClientPrivate; /**< Client private data to disabiguate this media time - * from others. Copied from the media time request. - * A value of zero is reserved for time scale updates. */ - OMX_TIME_UPDATETYPE eUpdateType; /**< Reason for the update */ - OMX_TICKS nMediaTimestamp; /**< Media time requested. If no media time was - * requested then this is the current media time. */ - OMX_TICKS nOffset; /**< Amount of wall clock time by which this - * request was actually fulfilled early */ - - OMX_TICKS nWallTimeAtMediaTime; /**< Wall time corresponding to nMediaTimeStamp. - * A client may compare this value to current - * media time obtained from the Clock Component to determine - * the wall time until the media timestamp is really - * current. */ - OMX_S32 xScale; /**< Current media time scale in Q16 format. */ - OMX_TIME_CLOCKSTATE eState; /* Seeking Change. Added 7/12.*/ - /**< State of the media time. */ -} OMX_TIME_MEDIATIMETYPE; - -/** Structure representing the current media time scale factor. Applicable only to clock - * component, other components see scale changes via OMX_TIME_MEDIATIMETYPE buffers sent via - * the clock component client ports. Upon recieving this config the clock component changes - * the rate by which the media time increases or decreases effectively implementing trick modes. - */ -typedef struct OMX_TIME_CONFIG_SCALETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_S32 xScale; /**< This is a value in Q16 format which is used for - * scaling the media time */ -} OMX_TIME_CONFIG_SCALETYPE; - -/** Bits used to identify a clock port. Used in OMX_TIME_CONFIG_CLOCKSTATETYPE’s nWaitMask field */ -#define OMX_CLOCKPORT0 0x00000001 -#define OMX_CLOCKPORT1 0x00000002 -#define OMX_CLOCKPORT2 0x00000004 -#define OMX_CLOCKPORT3 0x00000008 -#define OMX_CLOCKPORT4 0x00000010 -#define OMX_CLOCKPORT5 0x00000020 -#define OMX_CLOCKPORT6 0x00000040 -#define OMX_CLOCKPORT7 0x00000080 - -/** Structure representing the current mode of the media clock. - * IL Client uses this config to change or query the mode of the - * media clock of the clock component. Applicable only to clock - * component. - * - * On a SetConfig if eState is OMX_TIME_ClockStateRunning media time - * starts immediately at the prescribed start time. If - * OMX_TIME_ClockStateWaitingForStartTime the Clock Component ignores - * the given nStartTime and waits for all clients specified in the - * nWaitMask to send starttimes (via - * OMX_IndexConfigTimeClientStartTime). The Clock Component then starts - * the media clock using the earliest start time supplied. */ -typedef struct OMX_TIME_CONFIG_CLOCKSTATETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version - * information */ - OMX_TIME_CLOCKSTATE eState; /**< State of the media time. */ - OMX_TICKS nStartTime; /**< Start time of the media time. */ - OMX_TICKS nOffset; /**< Time to offset the media time by - * (e.g. preroll). Media time will be - * reported to be nOffset ticks earlier. - */ - OMX_U32 nWaitMask; /**< Mask of OMX_CLOCKPORT values. */ -} OMX_TIME_CONFIG_CLOCKSTATETYPE; - -/** Structure representing the reference clock currently being used to - * compute media time. IL client uses this config to change or query the - * clock component's active reference clock */ -typedef struct OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_TIME_REFCLOCKTYPE eClock; /**< Reference clock used to compute media time */ -} OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE; - -/** Descriptor for setting specifics of power type. - * Note: this structure is listed for backwards compatibility. */ -typedef struct OMX_OTHER_CONFIG_POWERTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_BOOL bEnablePM; /**< Flag to enable Power Management */ -} OMX_OTHER_CONFIG_POWERTYPE; - - -/** Descriptor for setting specifics of stats type. - * Note: this structure is listed for backwards compatibility. */ -typedef struct OMX_OTHER_CONFIG_STATSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - /* what goes here */ -} OMX_OTHER_CONFIG_STATSTYPE; - - -/** - * The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output other - * path. - */ -typedef struct OMX_OTHER_PORTDEFINITIONTYPE { - OMX_OTHER_FORMATTYPE eFormat; /**< Type of data expected for this channel */ -} OMX_OTHER_PORTDEFINITIONTYPE; - -/** Port format parameter. This structure is used to enumerate - * the various data input/output format supported by the port. - */ -typedef struct OMX_OTHER_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Indicates which port to set */ - OMX_U32 nIndex; /**< Indicates the enumeration index for the format from 0x0 to N-1 */ - OMX_OTHER_FORMATTYPE eFormat; /**< Type of data expected for this channel */ -} OMX_OTHER_PARAM_PORTFORMATTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/IL/OMX_Types.h b/vc/include/IL/OMX_Types.h @@ -1,372 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** OMX_Types.h - OpenMax IL version 1.1.2 - * The OMX_Types header file contains the primitive type definitions used by - * the core, the application and the component. This file may need to be - * modified to be used on systems that do not have "char" set to 8 bits, - * "short" set to 16 bits and "long" set to 32 bits. - */ - -#ifndef OMX_Types_h -#define OMX_Types_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** The OMX_API and OMX_APIENTRY are platform specific definitions used - * to declare OMX function prototypes. They are modified to meet the - * requirements for a particular platform */ -#ifdef __SYMBIAN32__ -# ifdef __OMX_EXPORTS -# define OMX_API __declspec(dllexport) -# else -# ifdef _WIN32 -# define OMX_API __declspec(dllexport) -# else -# define OMX_API __declspec(dllimport) -# endif -# endif -#else -# if defined(_WIN32) && !defined(__MINGW32__) -# ifdef __OMX_EXPORTS -# define OMX_API __declspec(dllexport) -# else -# define OMX_API __declspec(dllimport) -# endif -# else -# ifdef __OMX_EXPORTS -# define OMX_API -# else -# define OMX_API extern -# endif -# endif -#endif - -#ifndef OMX_APIENTRY -#define OMX_APIENTRY -#endif - -/** OMX_IN is used to identify inputs to an OMX function. This designation - will also be used in the case of a pointer that points to a parameter - that is used as an output. */ -#ifndef OMX_IN -#define OMX_IN -#endif - -/** OMX_OUT is used to identify outputs from an OMX function. This - designation will also be used in the case of a pointer that points - to a parameter that is used as an input. */ -#ifndef OMX_OUT -#define OMX_OUT -#endif - - -/** OMX_INOUT is used to identify parameters that may be either inputs or - outputs from an OMX function at the same time. This designation will - also be used in the case of a pointer that points to a parameter that - is used both as an input and an output. */ -#ifndef OMX_INOUT -#define OMX_INOUT -#endif - -/** OMX_ALL is used to as a wildcard to select all entities of the same type - * when specifying the index, or referring to a object by an index. (i.e. - * use OMX_ALL to indicate all N channels). When used as a port index - * for a config or parameter this OMX_ALL denotes that the config or - * parameter applies to the entire component not just one port. */ -#define OMX_ALL 0xFFFFFFFF - -/** In the following we define groups that help building doxygen documentation */ - -/** @defgroup core OpenMAX IL core - * Functions and structure related to the OMX IL core - */ - - /** @defgroup comp OpenMAX IL component - * Functions and structure related to the OMX IL component - */ - -/** @defgroup rpm Resource and Policy Management - * Structures for resource and policy management of components - */ - -/** @defgroup buf Buffer Management - * Buffer handling functions and structures - */ - -/** @defgroup tun Tunneling - * @ingroup core comp - * Structures and functions to manage tunnels among component ports - */ - -/** @defgroup cp Content Pipes - * @ingroup core - */ - - /** @defgroup metadata Metadata handling - * - */ - -#if defined(__GNUC__) -#include <stdint.h> -#define STDINT_H_AVAILABLE -#endif - -/** OMX_U8 is an 8 bit unsigned quantity that is byte aligned */ -typedef unsigned char OMX_U8; - -/** OMX_S8 is an 8 bit signed quantity that is byte aligned */ -typedef signed char OMX_S8; - -/** OMX_U16 is a 16 bit unsigned quantity that is 16 bit word aligned */ -typedef unsigned short OMX_U16; - -/** OMX_S16 is a 16 bit signed quantity that is 16 bit word aligned */ -typedef signed short OMX_S16; - -/** OMX_U32 is a 32 bit unsigned quantity that is 32 bit word aligned */ -#ifdef STDINT_H_AVAILABLE -typedef uint32_t OMX_U32; -#else -typedef unsigned long OMX_U32; -#endif - -/** OMX_S32 is a 32 bit signed quantity that is 32 bit word aligned */ -#ifdef STDINT_H_AVAILABLE -typedef int32_t OMX_S32; -#else -typedef signed long OMX_S32; -#endif - - -/* Users with compilers that cannot accept the "long long" designation should - define the OMX_SKIP64BIT macro. It should be noted that this may cause - some components to fail to compile if the component was written to require - 64 bit integral types. However, these components would NOT compile anyway - since the compiler does not support the way the component was written. -*/ -#ifndef OMX_SKIP64BIT -#ifdef __SYMBIAN32__ -/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ -typedef unsigned long long OMX_U64; - -/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ -typedef signed long long OMX_S64; - -#elif defined(WIN32) - -/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ -typedef unsigned __int64 OMX_U64; - -/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ -typedef signed __int64 OMX_S64; - -#else /* WIN32 */ - -/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ -typedef unsigned long long OMX_U64; - -/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ -typedef signed long long OMX_S64; - -#endif /* WIN32 */ -#endif - - -/** The OMX_BOOL type is intended to be used to represent a true or a false - value when passing parameters to and from the OMX core and components. The - OMX_BOOL is a 32 bit quantity and is aligned on a 32 bit word boundary. - */ -typedef enum OMX_BOOL { - OMX_FALSE = 0, - OMX_TRUE = !OMX_FALSE, - OMX_BOOL_MAX = 0x7FFFFFFF -} OMX_BOOL; - -/** The OMX_PTR type is intended to be used to pass pointers between the OMX - applications and the OMX Core and components. This is a 32 bit pointer and - is aligned on a 32 bit boundary. - */ -typedef void* OMX_PTR; - -/** The OMX_STRING type is intended to be used to pass "C" type strings between - the application and the core and component. The OMX_STRING type is a 32 - bit pointer to a zero terminated string. The pointer is word aligned and - the string is byte aligned. - */ -typedef char* OMX_STRING; - -/** The OMX_BYTE type is intended to be used to pass arrays of bytes such as - buffers between the application and the component and core. The OMX_BYTE - type is a 32 bit pointer to a zero terminated string. The pointer is word - aligned and the string is byte aligned. - */ -typedef unsigned char* OMX_BYTE; - -/** OMX_UUIDTYPE is a very long unique identifier to uniquely identify - at runtime. This identifier should be generated by a component in a way - that guarantees that every instance of the identifier running on the system - is unique. */ -typedef unsigned char OMX_UUIDTYPE[128]; - -/** The OMX_DIRTYPE enumeration is used to indicate if a port is an input or - an output port. This enumeration is common across all component types. - */ -typedef enum OMX_DIRTYPE -{ - OMX_DirInput, /**< Port is an input port */ - OMX_DirOutput, /**< Port is an output port */ - OMX_DirMax = 0x7FFFFFFF -} OMX_DIRTYPE; - -/** The OMX_ENDIANTYPE enumeration is used to indicate the bit ordering - for numerical data (i.e. big endian, or little endian). - */ -typedef enum OMX_ENDIANTYPE -{ - OMX_EndianBig, /**< big endian */ - OMX_EndianLittle, /**< little endian */ - OMX_EndianMax = 0x7FFFFFFF -} OMX_ENDIANTYPE; - - -/** The OMX_NUMERICALDATATYPE enumeration is used to indicate if data - is signed or unsigned - */ -typedef enum OMX_NUMERICALDATATYPE -{ - OMX_NumericalDataSigned, /**< signed data */ - OMX_NumericalDataUnsigned, /**< unsigned data */ - OMX_NumercialDataMax = 0x7FFFFFFF -} OMX_NUMERICALDATATYPE; - - -/** Unsigned bounded value type */ -typedef struct OMX_BU32 { - OMX_U32 nValue; /**< actual value */ - OMX_U32 nMin; /**< minimum for value (i.e. nValue >= nMin) */ - OMX_U32 nMax; /**< maximum for value (i.e. nValue <= nMax) */ -} OMX_BU32; - - -/** Signed bounded value type */ -typedef struct OMX_BS32 { - OMX_S32 nValue; /**< actual value */ - OMX_S32 nMin; /**< minimum for value (i.e. nValue >= nMin) */ - OMX_S32 nMax; /**< maximum for value (i.e. nValue <= nMax) */ -} OMX_BS32; - - -/** Structure representing some time or duration in microseconds. This structure - * must be interpreted as a signed 64 bit value. The quantity is signed to accommodate - * negative deltas and preroll scenarios. The quantity is represented in microseconds - * to accomodate high resolution timestamps (e.g. DVD presentation timestamps based - * on a 90kHz clock) and to allow more accurate and synchronized delivery (e.g. - * individual audio samples delivered at 192 kHz). The quantity is 64 bit to - * accommodate a large dynamic range (signed 32 bit values would allow only for plus - * or minus 35 minutes). - * - * Implementations with limited precision may convert the signed 64 bit value to - * a signed 32 bit value internally but risk loss of precision. - */ -#ifndef OMX_SKIP64BIT -typedef OMX_S64 OMX_TICKS; -#else -typedef struct OMX_TICKS -{ - OMX_U32 nLowPart; /** low bits of the signed 64 bit tick value */ - OMX_U32 nHighPart; /** high bits of the signed 64 bit tick value */ -} OMX_TICKS; -#endif -#define OMX_TICKS_PER_SECOND 1000000 - -/** Define the public interface for the OMX Handle. The core will not use - this value internally, but the application should only use this value. - */ -typedef void* OMX_HANDLETYPE; - -typedef struct OMX_MARKTYPE -{ - OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will - generate a mark event upon - processing the mark. */ - OMX_PTR pMarkData; /**< Application specific data associated with - the mark sent on a mark event to disambiguate - this mark from others. */ -} OMX_MARKTYPE; - - -/** OMX_NATIVE_DEVICETYPE is used to map a OMX video port to the - * platform & operating specific object used to reference the display - * or can be used by a audio port for native audio rendering */ -typedef void* OMX_NATIVE_DEVICETYPE; - -/** OMX_NATIVE_WINDOWTYPE is used to map a OMX video port to the - * platform & operating specific object used to reference the window */ -typedef void* OMX_NATIVE_WINDOWTYPE; - - -/** Define the OMX IL version that corresponds to this set of header files. - * We also define a combined version that can be used to write or compare - * values of the 32bit nVersion field, assuming a little endian architecture */ -#define OMX_VERSION_MAJOR 1 -#define OMX_VERSION_MINOR 1 -#define OMX_VERSION_REVISION 2 -#define OMX_VERSION_STEP 0 - -#define OMX_VERSION ((OMX_VERSION_STEP<<24) | (OMX_VERSION_REVISION<<16) | (OMX_VERSION_MINOR<<8) | OMX_VERSION_MAJOR) - - -/** The OMX_VERSIONTYPE union is used to specify the version for - a structure or component. For a component, the version is entirely - specified by the component vendor. Components doing the same function - from different vendors may or may not have the same version. For - structures, the version shall be set by the entity that allocates the - structure. For structures specified in the OMX 1.1 specification, the - value of the version shall be set to 1.1.0.0 in all cases. Access to the - OMX_VERSIONTYPE can be by a single 32 bit access (e.g. by nVersion) or - by accessing one of the structure elements to, for example, check only - the Major revision. - */ -typedef union OMX_VERSIONTYPE -{ - struct - { - OMX_U8 nVersionMajor; /**< Major version accessor element */ - OMX_U8 nVersionMinor; /**< Minor version accessor element */ - OMX_U8 nRevision; /**< Revision version accessor element */ - OMX_U8 nStep; /**< Step version accessor element */ - } s; - OMX_U32 nVersion; /**< 32 bit value to make accessing the - version easily done in a single word - size copy/compare operation */ -} OMX_VERSIONTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/IL/OMX_Video.h b/vc/include/IL/OMX_Video.h @@ -1,1082 +0,0 @@ -/** - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** - * @file OMX_Video.h - OpenMax IL version 1.1.2 - * The structures is needed by Video components to exchange parameters - * and configuration data with OMX components. - */ -#ifndef OMX_Video_h -#define OMX_Video_h - -/** @defgroup video OpenMAX IL Video Domain - * @ingroup iv - * Structures for OpenMAX IL Video domain - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** - * Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_IVCommon.h" - - -/** - * Enumeration used to define the possible video compression codings. - * NOTE: This essentially refers to file extensions. If the coding is - * being used to specify the ENCODE type, then additional work - * must be done to configure the exact flavor of the compression - * to be used. For decode cases where the user application can - * not differentiate between MPEG-4 and H.264 bit streams, it is - * up to the codec to handle this. - */ -typedef enum OMX_VIDEO_CODINGTYPE { - OMX_VIDEO_CodingUnused, /**< Value when coding is N/A */ - OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */ - OMX_VIDEO_CodingMPEG2, /**< AKA: H.262 */ - OMX_VIDEO_CodingH263, /**< H.263 */ - OMX_VIDEO_CodingMPEG4, /**< MPEG-4 */ - OMX_VIDEO_CodingWMV, /**< all versions of Windows Media Video */ - OMX_VIDEO_CodingRV, /**< all versions of Real Video */ - OMX_VIDEO_CodingAVC, /**< H.264/AVC */ - OMX_VIDEO_CodingMJPEG, /**< Motion JPEG */ - OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - -#define OMX_AUDIO_CodingVP6_Supported 1 - OMX_VIDEO_CodingVP6, /**< On2 VP6 */ -#define OMX_AUDIO_CodingVP7_Supported 1 - OMX_VIDEO_CodingVP7, /**< On2 VP7 */ -#define OMX_AUDIO_CodingVP8_Supported 1 - OMX_VIDEO_CodingVP8, /**< On2 VP8 */ -#define OMX_AUDIO_CodingYUV_Supported 1 - OMX_VIDEO_CodingYUV, /* raw YUV video */ -#define OMX_AUDIO_CodingSorenson_Supported 1 - OMX_VIDEO_CodingSorenson, /**< Sorenson */ -#define OMX_AUDIO_CodingTheora_Supported 1 - OMX_VIDEO_CodingTheora, /**< Theora */ -#define OMX_AUDIO_CodingMVC_Supported 1 - OMX_VIDEO_CodingMVC, /**< H.264/MVC */ - - OMX_VIDEO_CodingMax = 0x7FFFFFFF -} OMX_VIDEO_CODINGTYPE; - - -/** - * Data structure used to define a video path. The number of Video paths for - * input and output will vary by type of the Video component. - * - * Input (aka Source) : zero Inputs, one Output, - * Splitter : one Input, 2 or more Outputs, - * Processing Element : one Input, one output, - * Mixer : 2 or more inputs, one output, - * Output (aka Sink) : one Input, zero outputs. - * - * The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output video - * path. If additional vendor specific data is required, it should be - * transmitted to the component using the CustomCommand function. Compliant - * components will prepopulate this structure with optimal values during the - * GetDefaultInitParams command. - * - * STRUCT MEMBERS: - * cMIMEType : MIME type of data for the port - * pNativeRender : Platform specific reference for a display if a - * sync, otherwise this field is 0 - * nFrameWidth : Width of frame to be used on channel if - * uncompressed format is used. Use 0 for unknown, - * don't care or variable - * nFrameHeight : Height of frame to be used on channel if - * uncompressed format is used. Use 0 for unknown, - * don't care or variable - * nStride : Number of bytes per span of an image - * (i.e. indicates the number of bytes to get - * from span N to span N+1, where negative stride - * indicates the image is bottom up - * nSliceHeight : Height used when encoding in slices - * nBitrate : Bit rate of frame to be used on channel if - * compressed format is used. Use 0 for unknown, - * don't care or variable - * xFramerate : Frame rate to be used on channel if uncompressed - * format is used. Use 0 for unknown, don't care or - * variable. Units are Q16 frames per second. - * bFlagErrorConcealment : Turns on error concealment if it is supported by - * the OMX component - * eCompressionFormat : Compression format used in this instance of the - * component. When OMX_VIDEO_CodingUnused is - * specified, eColorFormat is used - * eColorFormat : Decompressed format used by this component - * pNativeWindow : Platform specific reference for a window object if a - * display sink , otherwise this field is 0x0. - */ -typedef struct OMX_VIDEO_PORTDEFINITIONTYPE { - OMX_STRING cMIMEType; - OMX_NATIVE_DEVICETYPE pNativeRender; - OMX_U32 nFrameWidth; - OMX_U32 nFrameHeight; - OMX_S32 nStride; - OMX_U32 nSliceHeight; - OMX_U32 nBitrate; - OMX_U32 xFramerate; - OMX_BOOL bFlagErrorConcealment; - OMX_VIDEO_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_NATIVE_WINDOWTYPE pNativeWindow; -} OMX_VIDEO_PORTDEFINITIONTYPE; - -/** - * Port format parameter. This structure is used to enumerate the various - * data input/output format supported by the port. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Indicates which port to set - * nIndex : Indicates the enumeration index for the format from - * 0x0 to N-1 - * eCompressionFormat : Compression format used in this instance of the - * component. When OMX_VIDEO_CodingUnused is specified, - * eColorFormat is used - * eColorFormat : Decompressed format used by this component - * xFrameRate : Indicates the video frame rate in Q16 format - */ -typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_VIDEO_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_U32 xFramerate; -} OMX_VIDEO_PARAM_PORTFORMATTYPE; - - -/** - * This is a structure for configuring video compression quantization - * parameter values. Codecs may support different QP values for different - * frame types. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version info - * nPortIndex : Port that this structure applies to - * nQpI : QP value to use for index frames - * nQpP : QP value to use for P frames - * nQpB : QP values to use for bidirectional frames - */ -typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nQpI; - OMX_U32 nQpP; - OMX_U32 nQpB; -} OMX_VIDEO_PARAM_QUANTIZATIONTYPE; - - -/** - * Structure for configuration of video fast update parameters. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version info - * nPortIndex : Port that this structure applies to - * bEnableVFU : Enable/Disable video fast update - * nFirstGOB : Specifies the number of the first macroblock row - * nFirstMB : specifies the first MB relative to the specified first GOB - * nNumMBs : Specifies the number of MBs to be refreshed from nFirstGOB - * and nFirstMB - */ -typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnableVFU; - OMX_U32 nFirstGOB; - OMX_U32 nFirstMB; - OMX_U32 nNumMBs; -} OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE; - - -/** - * Enumeration of possible bitrate control types - */ -typedef enum OMX_VIDEO_CONTROLRATETYPE { - OMX_Video_ControlRateDisable, - OMX_Video_ControlRateVariable, - OMX_Video_ControlRateConstant, - OMX_Video_ControlRateVariableSkipFrames, - OMX_Video_ControlRateConstantSkipFrames, - OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_Video_ControlRateMax = 0x7FFFFFFF -} OMX_VIDEO_CONTROLRATETYPE; - - -/** - * Structure for configuring bitrate mode of a codec. - * - * STRUCT MEMBERS: - * nSize : Size of the struct in bytes - * nVersion : OMX spec version info - * nPortIndex : Port that this struct applies to - * eControlRate : Control rate type enum - * nTargetBitrate : Target bitrate to encode with - */ -typedef struct OMX_VIDEO_PARAM_BITRATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_CONTROLRATETYPE eControlRate; - OMX_U32 nTargetBitrate; -} OMX_VIDEO_PARAM_BITRATETYPE; - - -/** - * Enumeration of possible motion vector (MV) types - */ -typedef enum OMX_VIDEO_MOTIONVECTORTYPE { - OMX_Video_MotionVectorPixel, - OMX_Video_MotionVectorHalfPel, - OMX_Video_MotionVectorQuarterPel, - OMX_Video_MotionVectorEighthPel, - OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_Video_MotionVectorMax = 0x7FFFFFFF -} OMX_VIDEO_MOTIONVECTORTYPE; - - -/** - * Structure for configuring the number of motion vectors used as well - * as their accuracy. - * - * STRUCT MEMBERS: - * nSize : Size of the struct in bytes - * nVersion : OMX spec version info - * nPortIndex : port that this structure applies to - * eAccuracy : Enumerated MV accuracy - * bUnrestrictedMVs : Allow unrestricted MVs - * bFourMV : Allow use of 4 MVs - * sXSearchRange : Search range in horizontal direction for MVs - * sYSearchRange : Search range in vertical direction for MVs - */ -typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_MOTIONVECTORTYPE eAccuracy; - OMX_BOOL bUnrestrictedMVs; - OMX_BOOL bFourMV; - OMX_S32 sXSearchRange; - OMX_S32 sYSearchRange; -} OMX_VIDEO_PARAM_MOTIONVECTORTYPE; - - -/** - * Enumeration of possible methods to use for Intra Refresh - */ -typedef enum OMX_VIDEO_INTRAREFRESHTYPE { - OMX_VIDEO_IntraRefreshCyclic, /**< Cyclic intra refresh, bit 0 is set*/ - OMX_VIDEO_IntraRefreshAdaptive, /**< Adaptive intra refresh, bit 1 is set*/ - OMX_VIDEO_IntraRefreshBoth, /**< Cyclic + Adaptive intra refresh (no mrows since bit 2 is off)*/ - OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_IntraRefreshCyclicMrows, /**< Cyclic intra refresh, multiple rows at a time bits 0 and 2 are set*/ - OMX_VIDEO_IntraRefreshPseudoRand, /**< Psuedo random intra refresh, uses bit 3*/ - OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF -} OMX_VIDEO_INTRAREFRESHTYPE; - - -/** - * Structure for configuring intra refresh mode - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eRefreshMode : Cyclic, Adaptive, or Both - * nAirMBs : Number of intra macroblocks to refresh in a frame when - * AIR is enabled - * nAirRef : Number of times a motion marked macroblock has to be - * intra coded - * nCirMBs : Number of consecutive macroblocks to be coded as "intra" - * when CIR is enabled - */ -typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode; - OMX_U32 nAirMBs; - OMX_U32 nAirRef; - OMX_U32 nCirMBs; - OMX_U32 nPirMBs; -} OMX_VIDEO_PARAM_INTRAREFRESHTYPE; - - -/** - * Structure for enabling various error correction methods for video - * compression. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bEnableHEC : Enable/disable header extension codes (HEC) - * bEnableResync : Enable/disable resynchronization markers - * nResynchMarkerSpacing : Resynch markers interval (in bits) to be - * applied in the stream - * bEnableDataPartitioning : Enable/disable data partitioning - * bEnableRVLC : Enable/disable reversible variable length - * coding - */ -typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnableHEC; - OMX_BOOL bEnableResync; - OMX_U32 nResynchMarkerSpacing; - OMX_BOOL bEnableDataPartitioning; - OMX_BOOL bEnableRVLC; -} OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE; - - -/** - * Configuration of variable block-size motion compensation (VBSMC) - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * b16x16 : Enable inter block search 16x16 - * b16x8 : Enable inter block search 16x8 - * b8x16 : Enable inter block search 8x16 - * b8x8 : Enable inter block search 8x8 - * b8x4 : Enable inter block search 8x4 - * b4x8 : Enable inter block search 4x8 - * b4x4 : Enable inter block search 4x4 - */ -typedef struct OMX_VIDEO_PARAM_VBSMCTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL b16x16; - OMX_BOOL b16x8; - OMX_BOOL b8x16; - OMX_BOOL b8x8; - OMX_BOOL b8x4; - OMX_BOOL b4x8; - OMX_BOOL b4x4; -} OMX_VIDEO_PARAM_VBSMCTYPE; - - -/** - * H.263 profile types, each profile indicates support for various - * performance bounds and different annexes. - * - * ENUMS: - * Baseline : Baseline Profile: H.263 (V1), no optional modes - * H320 Coding : H.320 Coding Efficiency Backward Compatibility - * Profile: H.263+ (V2), includes annexes I, J, L.4 - * and T - * BackwardCompatible : Backward Compatibility Profile: H.263 (V1), - * includes annex F - * ISWV2 : Interactive Streaming Wireless Profile: H.263+ - * (V2), includes annexes I, J, K and T - * ISWV3 : Interactive Streaming Wireless Profile: H.263++ - * (V3), includes profile 3 and annexes V and W.6.3.8 - * HighCompression : Conversational High Compression Profile: H.263++ - * (V3), includes profiles 1 & 2 and annexes D and U - * Internet : Conversational Internet Profile: H.263++ (V3), - * includes profile 5 and annex K - * Interlace : Conversational Interlace Profile: H.263++ (V3), - * includes profile 5 and annex W.6.3.11 - * HighLatency : High Latency Profile: H.263++ (V3), includes - * profile 6 and annexes O.1 and P.5 - */ -typedef enum OMX_VIDEO_H263PROFILETYPE { - OMX_VIDEO_H263ProfileBaseline = 0x01, - OMX_VIDEO_H263ProfileH320Coding = 0x02, - OMX_VIDEO_H263ProfileBackwardCompatible = 0x04, - OMX_VIDEO_H263ProfileISWV2 = 0x08, - OMX_VIDEO_H263ProfileISWV3 = 0x10, - OMX_VIDEO_H263ProfileHighCompression = 0x20, - OMX_VIDEO_H263ProfileInternet = 0x40, - OMX_VIDEO_H263ProfileInterlace = 0x80, - OMX_VIDEO_H263ProfileHighLatency = 0x100, - OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_H263ProfileMax = 0x7FFFFFFF -} OMX_VIDEO_H263PROFILETYPE; - - -/** - * H.263 level types, each level indicates support for various frame sizes, - * bit rates, decoder frame rates. - */ -typedef enum OMX_VIDEO_H263LEVELTYPE { - OMX_VIDEO_H263Level10 = 0x01, - OMX_VIDEO_H263Level20 = 0x02, - OMX_VIDEO_H263Level30 = 0x04, - OMX_VIDEO_H263Level40 = 0x08, - OMX_VIDEO_H263Level45 = 0x10, - OMX_VIDEO_H263Level50 = 0x20, - OMX_VIDEO_H263Level60 = 0x40, - OMX_VIDEO_H263Level70 = 0x80, - OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_H263LevelMax = 0x7FFFFFFF -} OMX_VIDEO_H263LEVELTYPE; - - -/** - * Specifies the picture type. These values should be OR'd to signal all - * pictures types which are allowed. - * - * ENUMS: - * Generic Picture Types: I, P and B - * H.263 Specific Picture Types: SI and SP - * H.264 Specific Picture Types: EI and EP - * MPEG-4 Specific Picture Types: S - */ -typedef enum OMX_VIDEO_PICTURETYPE { - OMX_VIDEO_PictureTypeI = 0x01, - OMX_VIDEO_PictureTypeP = 0x02, - OMX_VIDEO_PictureTypeB = 0x04, - OMX_VIDEO_PictureTypeSI = 0x08, - OMX_VIDEO_PictureTypeSP = 0x10, - OMX_VIDEO_PictureTypeEI = 0x11, - OMX_VIDEO_PictureTypeEP = 0x12, - OMX_VIDEO_PictureTypeS = 0x14, - OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF -} OMX_VIDEO_PICTURETYPE; - - -/** - * H.263 Params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nPFrames : Number of P frames between each I frame - * nBFrames : Number of B frames between each I frame - * eProfile : H.263 profile(s) to use - * eLevel : H.263 level(s) to use - * bPLUSPTYPEAllowed : Indicating that it is allowed to use PLUSPTYPE - * (specified in the 1998 version of H.263) to - * indicate custom picture sizes or clock - * frequencies - * nAllowedPictureTypes : Specifies the picture types allowed in the - * bitstream - * bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is - * not constrained. It is recommended to change - * the value of the RTYPE bit for each reference - * picture in error-free communication - * nPictureHeaderRepetition : Specifies the frequency of picture header - * repetition - * nGOBHeaderInterval : Specifies the interval of non-empty GOB - * headers in units of GOBs - */ -typedef struct OMX_VIDEO_PARAM_H263TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_VIDEO_H263PROFILETYPE eProfile; - OMX_VIDEO_H263LEVELTYPE eLevel; - OMX_BOOL bPLUSPTYPEAllowed; - OMX_U32 nAllowedPictureTypes; - OMX_BOOL bForceRoundingTypeToZero; - OMX_U32 nPictureHeaderRepetition; - OMX_U32 nGOBHeaderInterval; -} OMX_VIDEO_PARAM_H263TYPE; - - -/** - * MPEG-2 profile types, each profile indicates support for various - * performance bounds and different annexes. - */ -typedef enum OMX_VIDEO_MPEG2PROFILETYPE { - OMX_VIDEO_MPEG2ProfileSimple = 0, /**< Simple Profile */ - OMX_VIDEO_MPEG2ProfileMain, /**< Main Profile */ - OMX_VIDEO_MPEG2Profile422, /**< 4:2:2 Profile */ - OMX_VIDEO_MPEG2ProfileSNR, /**< SNR Profile */ - OMX_VIDEO_MPEG2ProfileSpatial, /**< Spatial Profile */ - OMX_VIDEO_MPEG2ProfileHigh, /**< High Profile */ - OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG2PROFILETYPE; - - -/** - * MPEG-2 level types, each level indicates support for various frame - * sizes, bit rates, decoder frame rates. No need - */ -typedef enum OMX_VIDEO_MPEG2LEVELTYPE { - OMX_VIDEO_MPEG2LevelLL = 0, /**< Low Level */ - OMX_VIDEO_MPEG2LevelML, /**< Main Level */ - OMX_VIDEO_MPEG2LevelH14, /**< High 1440 */ - OMX_VIDEO_MPEG2LevelHL, /**< High Level */ - OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG2LEVELTYPE; - - -/** - * MPEG-2 params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nPFrames : Number of P frames between each I frame - * nBFrames : Number of B frames between each I frame - * eProfile : MPEG-2 profile(s) to use - * eLevel : MPEG-2 levels(s) to use - */ -typedef struct OMX_VIDEO_PARAM_MPEG2TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_VIDEO_MPEG2PROFILETYPE eProfile; - OMX_VIDEO_MPEG2LEVELTYPE eLevel; -} OMX_VIDEO_PARAM_MPEG2TYPE; - - -/** - * MPEG-4 profile types, each profile indicates support for various - * performance bounds and different annexes. - * - * ENUMS: - * - Simple Profile, Levels 1-3 - * - Simple Scalable Profile, Levels 1-2 - * - Core Profile, Levels 1-2 - * - Main Profile, Levels 2-4 - * - N-bit Profile, Level 2 - * - Scalable Texture Profile, Level 1 - * - Simple Face Animation Profile, Levels 1-2 - * - Simple Face and Body Animation (FBA) Profile, Levels 1-2 - * - Basic Animated Texture Profile, Levels 1-2 - * - Hybrid Profile, Levels 1-2 - * - Advanced Real Time Simple Profiles, Levels 1-4 - * - Core Scalable Profile, Levels 1-3 - * - Advanced Coding Efficiency Profile, Levels 1-4 - * - Advanced Core Profile, Levels 1-2 - * - Advanced Scalable Texture, Levels 2-3 - */ -typedef enum OMX_VIDEO_MPEG4PROFILETYPE { - OMX_VIDEO_MPEG4ProfileSimple = 0x01, - OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02, - OMX_VIDEO_MPEG4ProfileCore = 0x04, - OMX_VIDEO_MPEG4ProfileMain = 0x08, - OMX_VIDEO_MPEG4ProfileNbit = 0x10, - OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20, - OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40, - OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80, - OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100, - OMX_VIDEO_MPEG4ProfileHybrid = 0x200, - OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400, - OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800, - OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000, - OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000, - OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000, - OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000, - OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG4PROFILETYPE; - - -/** - * MPEG-4 level types, each level indicates support for various frame - * sizes, bit rates, decoder frame rates. No need - */ -typedef enum OMX_VIDEO_MPEG4LEVELTYPE { - OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */ - OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */ - OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */ - OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */ - OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */ - OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */ - OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */ - OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */ - OMX_VIDEO_MPEG4Level6 = 0x100, /**< Level 5 */ - OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG4LEVELTYPE; - - -/** - * MPEG-4 configuration. This structure handles configuration options - * which are specific to MPEG4 algorithms - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+ - * Annex K). Put zero if not used - * bSVH : Enable Short Video Header mode - * bGov : Flag to enable GOV - * nPFrames : Number of P frames between each I frame (also called - * GOV period) - * nBFrames : Number of B frames between each I frame - * nIDCVLCThreshold : Value of intra DC VLC threshold - * bACPred : Flag to use ac prediction - * nMaxPacketSize : Maximum size of packet in bytes. - * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4. - * Interpreted as described in MPEG4 standard. - * eProfile : MPEG-4 profile(s) to use. - * eLevel : MPEG-4 level(s) to use. - * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream - * nHeaderExtension : Specifies the number of consecutive video packet - * headers within a VOP - * bReversibleVLC : Specifies whether reversible variable length coding - * is in use - */ -typedef struct OMX_VIDEO_PARAM_MPEG4TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nSliceHeaderSpacing; - OMX_BOOL bSVH; - OMX_BOOL bGov; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_U32 nIDCVLCThreshold; - OMX_BOOL bACPred; - OMX_U32 nMaxPacketSize; - OMX_U32 nTimeIncRes; - OMX_VIDEO_MPEG4PROFILETYPE eProfile; - OMX_VIDEO_MPEG4LEVELTYPE eLevel; - OMX_U32 nAllowedPictureTypes; - OMX_U32 nHeaderExtension; - OMX_BOOL bReversibleVLC; -} OMX_VIDEO_PARAM_MPEG4TYPE; - - -/** - * WMV Versions - */ -typedef enum OMX_VIDEO_WMVFORMATTYPE { - OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */ - OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */ - OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */ - OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */ - OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF -} OMX_VIDEO_WMVFORMATTYPE; - - -/** - * WMV Params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFormat : Version of WMV stream / data - */ -typedef struct OMX_VIDEO_PARAM_WMVTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_WMVFORMATTYPE eFormat; -} OMX_VIDEO_PARAM_WMVTYPE; - - -/** - * Real Video Version - */ -typedef enum OMX_VIDEO_RVFORMATTYPE { - OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */ - OMX_VIDEO_RVFormat8, /**< Real Video format 8 */ - OMX_VIDEO_RVFormat9, /**< Real Video format 9 */ - OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */ - OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_RVFormatMax = 0x7FFFFFFF -} OMX_VIDEO_RVFORMATTYPE; - - -/** - * Real Video Params - * - * STUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFormat : Version of RV stream / data - * nBitsPerPixel : Bits per pixel coded in the frame - * nPaddedWidth : Padded width in pixel of a video frame - * nPaddedHeight : Padded Height in pixels of a video frame - * nFrameRate : Rate of video in frames per second - * nBitstreamFlags : Flags which internal information about the bitstream - * nBitstreamVersion : Bitstream version - * nMaxEncodeFrameSize: Max encoded frame size - * bEnablePostFilter : Turn on/off post filter - * bEnableTemporalInterpolation : Turn on/off temporal interpolation - * bEnableLatencyMode : When enabled, the decoder does not display a decoded - * frame until it has detected that no enhancement layer - * frames or dependent B frames will be coming. This - * detection usually occurs when a subsequent non-B - * frame is encountered - */ -typedef struct OMX_VIDEO_PARAM_RVTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_RVFORMATTYPE eFormat; - OMX_U16 nBitsPerPixel; - OMX_U16 nPaddedWidth; - OMX_U16 nPaddedHeight; - OMX_U32 nFrameRate; - OMX_U32 nBitstreamFlags; - OMX_U32 nBitstreamVersion; - OMX_U32 nMaxEncodeFrameSize; - OMX_BOOL bEnablePostFilter; - OMX_BOOL bEnableTemporalInterpolation; - OMX_BOOL bEnableLatencyMode; -} OMX_VIDEO_PARAM_RVTYPE; - - -/** - * AVC profile types, each profile indicates support for various - * performance bounds and different annexes. - */ -typedef enum OMX_VIDEO_AVCPROFILETYPE { - OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */ - OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */ - OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */ - OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */ - OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */ - OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */ - OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */ - OMX_VIDEO_AVCProfileConstrainedBaseline = 0x80, /**< Constrained Baseline Profile */ - OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF -} OMX_VIDEO_AVCPROFILETYPE; - - -/** - * AVC level types, each level indicates support for various frame sizes, - * bit rates, decoder frame rates. No need - */ -typedef enum OMX_VIDEO_AVCLEVELTYPE { - OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */ - OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */ - OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */ - OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */ - OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */ - OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */ - OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */ - OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */ - OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */ - OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */ - OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */ - OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */ - OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */ - OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */ - OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */ - OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */ - OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF -} OMX_VIDEO_AVCLEVELTYPE; - - -/** - * AVC loop filter modes - * - * OMX_VIDEO_AVCLoopFilterEnable : Enable - * OMX_VIDEO_AVCLoopFilterDisable : Disable - * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries - */ -typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE { - OMX_VIDEO_AVCLoopFilterEnable = 0, - OMX_VIDEO_AVCLoopFilterDisable, - OMX_VIDEO_AVCLoopFilterDisableSliceBoundary, - OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF -} OMX_VIDEO_AVCLOOPFILTERTYPE; - - -/** - * AVC params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nSliceHeaderSpacing : Number of macroblocks between slice header, put - * zero if not used - * nPFrames : Number of P frames between each I frame - * nBFrames : Number of B frames between each I frame - * bUseHadamard : Enable/disable Hadamard transform - * nRefFrames : Max number of reference frames to use for inter - * motion search (1-16) - * nRefIdxTrailing : Pic param set ref frame index (index into ref - * frame buffer of trailing frames list), B frame - * support - * nRefIdxForward : Pic param set ref frame index (index into ref - * frame buffer of forward frames list), B frame - * support - * bEnableUEP : Enable/disable unequal error protection. This - * is only valid of data partitioning is enabled. - * bEnableFMO : Enable/disable flexible macroblock ordering - * bEnableASO : Enable/disable arbitrary slice ordering - * bEnableRS : Enable/disable sending of redundant slices - * eProfile : AVC profile(s) to use - * eLevel : AVC level(s) to use - * nAllowedPictureTypes : Specifies the picture types allowed in the - * bitstream - * bFrameMBsOnly : specifies that every coded picture of the - * coded video sequence is a coded frame - * containing only frame macroblocks - * bMBAFF : Enable/disable switching between frame and - * field macroblocks within a picture - * bEntropyCodingCABAC : Entropy decoding method to be applied for the - * syntax elements for which two descriptors appear - * in the syntax tables - * bWeightedPPrediction : Enable/disable weighted prediction shall not - * be applied to P and SP slices - * nWeightedBipredicitonMode : Default weighted prediction is applied to B - * slices - * bconstIpred : Enable/disable intra prediction - * bDirect8x8Inference : Specifies the method used in the derivation - * process for luma motion vectors for B_Skip, - * B_Direct_16x16 and B_Direct_8x8 as specified - * in subclause 8.4.1.2 of the AVC spec - * bDirectSpatialTemporal : Flag indicating spatial or temporal direct - * mode used in B slice coding (related to - * bDirect8x8Inference) . Spatial direct mode is - * more common and should be the default. - * nCabacInitIdx : Index used to init CABAC contexts - * eLoopFilterMode : Enable/disable loop filter - */ -typedef struct OMX_VIDEO_PARAM_AVCTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nSliceHeaderSpacing; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_BOOL bUseHadamard; - OMX_U32 nRefFrames; - OMX_U32 nRefIdx10ActiveMinus1; - OMX_U32 nRefIdx11ActiveMinus1; - OMX_BOOL bEnableUEP; - OMX_BOOL bEnableFMO; - OMX_BOOL bEnableASO; - OMX_BOOL bEnableRS; - OMX_VIDEO_AVCPROFILETYPE eProfile; - OMX_VIDEO_AVCLEVELTYPE eLevel; - OMX_U32 nAllowedPictureTypes; - OMX_BOOL bFrameMBsOnly; - OMX_BOOL bMBAFF; - OMX_BOOL bEntropyCodingCABAC; - OMX_BOOL bWeightedPPrediction; - OMX_U32 nWeightedBipredicitonMode; - OMX_BOOL bconstIpred ; - OMX_BOOL bDirect8x8Inference; - OMX_BOOL bDirectSpatialTemporal; - OMX_U32 nCabacInitIdc; - OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode; -} OMX_VIDEO_PARAM_AVCTYPE; - -typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE, - or OMX_VIDEO_MPEG4PROFILETYPE depending on context */ - OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE, - or OMX_VIDEO_MPEG4PROFILETYPE depending on context */ - OMX_U32 nProfileIndex; /**< Used to query for individual profile support information, - This parameter is valid only for - OMX_IndexParamVideoProfileLevelQuerySupported index, - For all other indices this parameter is to be ignored. */ -} OMX_VIDEO_PARAM_PROFILELEVELTYPE; - -/** - * Structure for dynamically configuring bitrate mode of a codec. - * - * STRUCT MEMBERS: - * nSize : Size of the struct in bytes - * nVersion : OMX spec version info - * nPortIndex : Port that this struct applies to - * nEncodeBitrate : Target average bitrate to be generated in bps - */ -typedef struct OMX_VIDEO_CONFIG_BITRATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nEncodeBitrate; -} OMX_VIDEO_CONFIG_BITRATETYPE; - -/** - * Defines Encoder Frame Rate setting - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * xEncodeFramerate : Encoding framerate represented in Q16 format - */ -typedef struct OMX_CONFIG_FRAMERATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 xEncodeFramerate; /* Q16 format */ -} OMX_CONFIG_FRAMERATETYPE; - -typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL IntraRefreshVOP; -} OMX_CONFIG_INTRAREFRESHVOPTYPE; - -typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */ - OMX_U8 ErrMap[1]; /* Error map hint */ -} OMX_CONFIG_MACROBLOCKERRORMAPTYPE; - -typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; -} OMX_CONFIG_MBERRORREPORTINGTYPE; - -typedef struct OMX_PARAM_MACROBLOCKSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nMacroblocks; -} OMX_PARAM_MACROBLOCKSTYPE; - -/** - * AVC Slice Mode modes - * - * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame - * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame - * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame - */ -typedef enum OMX_VIDEO_AVCSLICEMODETYPE { - OMX_VIDEO_SLICEMODE_AVCDefault = 0, - OMX_VIDEO_SLICEMODE_AVCMBSlice, - OMX_VIDEO_SLICEMODE_AVCByteSlice, - OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF -} OMX_VIDEO_AVCSLICEMODETYPE; - -/** - * AVC FMO Slice Mode Params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nNumSliceGroups : Specifies the number of slice groups - * nSliceGroupMapType : Specifies the type of slice groups - * eSliceMode : Specifies the type of slice - */ -typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U8 nNumSliceGroups; - OMX_U8 nSliceGroupMapType; - OMX_VIDEO_AVCSLICEMODETYPE eSliceMode; -} OMX_VIDEO_PARAM_AVCSLICEFMO; - -/** - * AVC IDR Period Configs - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nIDRPeriod : Specifies periodicity of IDR frames - * nPFrames : Specifies internal of coding Intra frames - */ -typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIDRPeriod; - OMX_U32 nPFrames; -} OMX_VIDEO_CONFIG_AVCINTRAPERIOD; - -/** - * AVC NAL Size Configs - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nNaluBytes : Specifies the NAL unit size - */ -typedef struct OMX_VIDEO_CONFIG_NALSIZE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nNaluBytes; -} OMX_VIDEO_CONFIG_NALSIZE; - - -/** @} */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/KHR/khrplatform.h b/vc/include/KHR/khrplatform.h @@ -1,295 +0,0 @@ -#ifndef __khrplatform_h_ -#define __khrplatform_h_ - -/* -** Copyright (c) 2008-2009 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -/* Khronos platform-specific types and definitions. - * - * $Revision: 23298 $ on $Date: 2013-09-30 17:07:13 -0700 (Mon, 30 Sep 2013) $ - * - * Adopters may modify this file to suit their platform. Adopters are - * encouraged to submit platform specific modifications to the Khronos - * group so that they can be included in future versions of this file. - * Please submit changes by sending them to the public Khronos Bugzilla - * (http://khronos.org/bugzilla) by filing a bug against product - * "Khronos (general)" component "Registry". - * - * A predefined template which fills in some of the bug fields can be - * reached using http://tinyurl.com/khrplatform-h-bugreport, but you - * must create a Bugzilla login first. - * - * - * See the Implementer's Guidelines for information about where this file - * should be located on your system and for more details of its use: - * http://www.khronos.org/registry/implementers_guide.pdf - * - * This file should be included as - * #include <KHR/khrplatform.h> - * by Khronos client API header files that use its types and defines. - * - * The types in khrplatform.h should only be used to define API-specific types. - * - * Types defined in khrplatform.h: - * khronos_int8_t signed 8 bit - * khronos_uint8_t unsigned 8 bit - * khronos_int16_t signed 16 bit - * khronos_uint16_t unsigned 16 bit - * khronos_int32_t signed 32 bit - * khronos_uint32_t unsigned 32 bit - * khronos_int64_t signed 64 bit - * khronos_uint64_t unsigned 64 bit - * khronos_intptr_t signed same number of bits as a pointer - * khronos_uintptr_t unsigned same number of bits as a pointer - * khronos_ssize_t signed size - * khronos_usize_t unsigned size - * khronos_float_t signed 32 bit floating point - * khronos_time_ns_t unsigned 64 bit time in nanoseconds - * khronos_utime_nanoseconds_t unsigned time interval or absolute time in - * nanoseconds - * khronos_stime_nanoseconds_t signed time interval in nanoseconds - * khronos_boolean_enum_t enumerated boolean type. This should - * only be used as a base type when a client API's boolean type is - * an enum. Client APIs which use an integer or other type for - * booleans cannot use this as the base type for their boolean. - * - * Tokens defined in khrplatform.h: - * - * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. - * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * - * Calling convention macros defined in this file: - * KHRONOS_APICALL - * KHRONOS_APIENTRY - * KHRONOS_APIATTRIBUTES - * - * These may be used in function prototypes as: - * - * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( - * int arg1, - * int arg2) KHRONOS_APIATTRIBUTES; - */ - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APICALL - *------------------------------------------------------------------------- - * This precedes the return type of the function in the function prototype. - */ -#if defined(_WIN32) && !defined(__SCITECH_SNAP__) -# define KHRONOS_APICALL __declspec(dllimport) -#elif defined (__SYMBIAN32__) -# define KHRONOS_APICALL IMPORT_C -#else -# define KHRONOS_APICALL -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIENTRY - *------------------------------------------------------------------------- - * This follows the return type of the function and precedes the function - * name in the function prototype. - */ -#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) - /* Win32 but not WinCE */ -# define KHRONOS_APIENTRY __stdcall -#else -# define KHRONOS_APIENTRY -#endif - -/*------------------------------------------------------------------------- - * Definition of KHRONOS_APIATTRIBUTES - *------------------------------------------------------------------------- - * This follows the closing parenthesis of the function prototype arguments. - */ -#if defined (__ARMCC_2__) -#define KHRONOS_APIATTRIBUTES __softfp -#else -#define KHRONOS_APIATTRIBUTES -#endif - -/*------------------------------------------------------------------------- - * basic type definitions - *-----------------------------------------------------------------------*/ -#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) - - -/* - * Using <stdint.h> - */ -#include <stdint.h> -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__VMS ) || defined(__sgi) - -/* - * Using <inttypes.h> - */ -#include <inttypes.h> -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) - -/* - * Win32 - */ -typedef __int32 khronos_int32_t; -typedef unsigned __int32 khronos_uint32_t; -typedef __int64 khronos_int64_t; -typedef unsigned __int64 khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(__sun__) || defined(__digital__) - -/* - * Sun or Digital - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#if defined(__arch64__) || defined(_LP64) -typedef long int khronos_int64_t; -typedef unsigned long int khronos_uint64_t; -#else -typedef long long int khronos_int64_t; -typedef unsigned long long int khronos_uint64_t; -#endif /* __arch64__ */ -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif defined(_VIDEOCORE) - -/* - * VideoCore with Metaware compiler - */ -#include <vcinclude/common.h> -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#elif 0 - -/* - * Hypothetical platform with no float or int64 support - */ -typedef int khronos_int32_t; -typedef unsigned int khronos_uint32_t; -#define KHRONOS_SUPPORT_INT64 0 -#define KHRONOS_SUPPORT_FLOAT 0 - -#else - -/* - * Generic fallback - */ -#include <stdint.h> -typedef int32_t khronos_int32_t; -typedef uint32_t khronos_uint32_t; -typedef int64_t khronos_int64_t; -typedef uint64_t khronos_uint64_t; -#define KHRONOS_SUPPORT_INT64 1 -#define KHRONOS_SUPPORT_FLOAT 1 - -#endif - - -/* - * Types that are (so far) the same on all platforms - */ -typedef signed char khronos_int8_t; -typedef unsigned char khronos_uint8_t; -typedef signed short int khronos_int16_t; -typedef unsigned short int khronos_uint16_t; - -/* - * Types that differ between LLP64 and LP64 architectures - in LLP64, - * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears - * to be the only LLP64 architecture in current use. - */ -#ifdef _WIN64 -typedef signed long long int khronos_intptr_t; -typedef unsigned long long int khronos_uintptr_t; -typedef signed long long int khronos_ssize_t; -typedef unsigned long long int khronos_usize_t; -#else -typedef signed long int khronos_intptr_t; -typedef unsigned long int khronos_uintptr_t; -typedef signed long int khronos_ssize_t; -typedef unsigned long int khronos_usize_t; -#endif - -#if KHRONOS_SUPPORT_FLOAT -/* - * Float type - */ -typedef float khronos_float_t; -#endif - -#if KHRONOS_SUPPORT_INT64 -/* Time types - * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals - * may be either signed or unsigned. - */ -typedef khronos_uint64_t khronos_utime_nanoseconds_t; -typedef khronos_int64_t khronos_stime_nanoseconds_t; -#endif - -/* - * Dummy value used to pad enum types to 32 bits. - */ -#ifndef KHRONOS_MAX_ENUM -#define KHRONOS_MAX_ENUM 0x7FFFFFFF -#endif - -/* - * Enumerated boolean type - * - * Values other than zero should be considered to be true. Therefore - * comparisons should not be made against KHRONOS_TRUE. - */ -typedef enum { - KHRONOS_FALSE = 0, - KHRONOS_TRUE = 1, - KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM -} khronos_boolean_enum_t; - -#endif /* __khrplatform_h_ */ diff --git a/vc/include/VG/openvg.h b/vc/include/VG/openvg.h @@ -1,745 +0,0 @@ -/* $Revision: 6838 $ on $Date:: 2008-11-04 11:46:08 +0000 #$ */ - -/*------------------------------------------------------------------------ - * - * OpenVG 1.1 Reference Implementation - * ------------------------------------- - * - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief OpenVG 1.1 API. - *//*-------------------------------------------------------------------*/ - -#ifndef _OPENVG_H -#define _OPENVG_H - -#include "vgplatform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define OPENVG_VERSION_1_0 1 -#define OPENVG_VERSION_1_0_1 1 -#define OPENVG_VERSION_1_1 2 - -#ifndef VG_MAXSHORT -#define VG_MAXSHORT 0x7FFF -#endif - -#ifndef VG_MAXINT -#define VG_MAXINT 0x7FFFFFFF -#endif - -#ifndef VG_MAX_ENUM -#define VG_MAX_ENUM 0x7FFFFFFF -#endif - -typedef VGuint VGHandle; - -typedef VGHandle VGPath; -typedef VGHandle VGImage; -typedef VGHandle VGMaskLayer; -typedef VGHandle VGFont; -typedef VGHandle VGPaint; - -#define VG_INVALID_HANDLE ((VGHandle)0) - -typedef VGuint VGboolean; -#define VG_FALSE 0 -#define VG_TRUE 1 - -typedef enum { - VG_NO_ERROR = 0, - VG_BAD_HANDLE_ERROR = 0x1000, - VG_ILLEGAL_ARGUMENT_ERROR = 0x1001, - VG_OUT_OF_MEMORY_ERROR = 0x1002, - VG_PATH_CAPABILITY_ERROR = 0x1003, - VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004, - VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005, - VG_IMAGE_IN_USE_ERROR = 0x1006, - VG_NO_CONTEXT_ERROR = 0x1007, - - VG_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM -} VGErrorCode; - -typedef enum { - /* Mode settings */ - VG_MATRIX_MODE = 0x1100, - VG_FILL_RULE = 0x1101, - VG_IMAGE_QUALITY = 0x1102, - VG_RENDERING_QUALITY = 0x1103, - VG_BLEND_MODE = 0x1104, - VG_IMAGE_MODE = 0x1105, - - /* Scissoring rectangles */ - VG_SCISSOR_RECTS = 0x1106, - - /* Color Transformation */ - VG_COLOR_TRANSFORM = 0x1170, - VG_COLOR_TRANSFORM_VALUES = 0x1171, - - /* Stroke parameters */ - VG_STROKE_LINE_WIDTH = 0x1110, - VG_STROKE_CAP_STYLE = 0x1111, - VG_STROKE_JOIN_STYLE = 0x1112, - VG_STROKE_MITER_LIMIT = 0x1113, - VG_STROKE_DASH_PATTERN = 0x1114, - VG_STROKE_DASH_PHASE = 0x1115, - VG_STROKE_DASH_PHASE_RESET = 0x1116, - - /* Edge fill color for VG_TILE_FILL tiling mode */ - VG_TILE_FILL_COLOR = 0x1120, - - /* Color for vgClear */ - VG_CLEAR_COLOR = 0x1121, - - /* Glyph origin */ - VG_GLYPH_ORIGIN = 0x1122, - - /* Enable/disable alpha masking and scissoring */ - VG_MASKING = 0x1130, - VG_SCISSORING = 0x1131, - - /* Pixel layout information */ - VG_PIXEL_LAYOUT = 0x1140, - VG_SCREEN_LAYOUT = 0x1141, - - /* Source format selection for image filters */ - VG_FILTER_FORMAT_LINEAR = 0x1150, - VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151, - - /* Destination write enable mask for image filters */ - VG_FILTER_CHANNEL_MASK = 0x1152, - - /* Implementation limits (read-only) */ - VG_MAX_SCISSOR_RECTS = 0x1160, - VG_MAX_DASH_COUNT = 0x1161, - VG_MAX_KERNEL_SIZE = 0x1162, - VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163, - VG_MAX_COLOR_RAMP_STOPS = 0x1164, - VG_MAX_IMAGE_WIDTH = 0x1165, - VG_MAX_IMAGE_HEIGHT = 0x1166, - VG_MAX_IMAGE_PIXELS = 0x1167, - VG_MAX_IMAGE_BYTES = 0x1168, - VG_MAX_FLOAT = 0x1169, - VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A, - - VG_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGParamType; - -typedef enum { - VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200, - VG_RENDERING_QUALITY_FASTER = 0x1201, - VG_RENDERING_QUALITY_BETTER = 0x1202, /* Default */ - - VG_RENDERING_QUALITY_FORCE_SIZE = VG_MAX_ENUM -} VGRenderingQuality; - -typedef enum { - VG_PIXEL_LAYOUT_UNKNOWN = 0x1300, - VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301, - VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302, - VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303, - VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304, - - VG_PIXEL_LAYOUT_FORCE_SIZE = VG_MAX_ENUM -} VGPixelLayout; - -typedef enum { - VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400, - VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401, - VG_MATRIX_FILL_PAINT_TO_USER = 0x1402, - VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403, - VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404, - - VG_MATRIX_MODE_FORCE_SIZE = VG_MAX_ENUM -} VGMatrixMode; - -typedef enum { - VG_CLEAR_MASK = 0x1500, - VG_FILL_MASK = 0x1501, - VG_SET_MASK = 0x1502, - VG_UNION_MASK = 0x1503, - VG_INTERSECT_MASK = 0x1504, - VG_SUBTRACT_MASK = 0x1505, - - VG_MASK_OPERATION_FORCE_SIZE = VG_MAX_ENUM -} VGMaskOperation; - -#define VG_PATH_FORMAT_STANDARD 0 - -typedef enum { - VG_PATH_DATATYPE_S_8 = 0, - VG_PATH_DATATYPE_S_16 = 1, - VG_PATH_DATATYPE_S_32 = 2, - VG_PATH_DATATYPE_F = 3, - - VG_PATH_DATATYPE_FORCE_SIZE = VG_MAX_ENUM -} VGPathDatatype; - -typedef enum { - VG_ABSOLUTE = 0, - VG_RELATIVE = 1, - - VG_PATH_ABS_REL_FORCE_SIZE = VG_MAX_ENUM -} VGPathAbsRel; - -typedef enum { - VG_CLOSE_PATH = ( 0 << 1), - VG_MOVE_TO = ( 1 << 1), - VG_LINE_TO = ( 2 << 1), - VG_HLINE_TO = ( 3 << 1), - VG_VLINE_TO = ( 4 << 1), - VG_QUAD_TO = ( 5 << 1), - VG_CUBIC_TO = ( 6 << 1), - VG_SQUAD_TO = ( 7 << 1), - VG_SCUBIC_TO = ( 8 << 1), - VG_SCCWARC_TO = ( 9 << 1), - VG_SCWARC_TO = (10 << 1), - VG_LCCWARC_TO = (11 << 1), - VG_LCWARC_TO = (12 << 1), - - VG_SEGMENT_MASK = 0xf << 1, - - VG_PATH_SEGMENT_FORCE_SIZE = VG_MAX_ENUM -} VGPathSegment; - -typedef enum { - VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE, - VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE, - VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE, - VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE, - VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE, - VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE, - VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE, - VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE, - VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE, - VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE, - VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE, - VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE, - VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE, - VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE, - VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE, - VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE, - VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE, - VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE, - VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE, - VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE, - VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE, - VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE, - VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE, - VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE, - - VG_PATH_COMMAND_FORCE_SIZE = VG_MAX_ENUM -} VGPathCommand; - -typedef enum { - VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0), - VG_PATH_CAPABILITY_APPEND_TO = (1 << 1), - VG_PATH_CAPABILITY_MODIFY = (1 << 2), - VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3), - VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4), - VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5), - VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6), - VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7), - VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8), - VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9), - VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10), - VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11), - VG_PATH_CAPABILITY_ALL = (1 << 12) - 1, - - VG_PATH_CAPABILITIES_FORCE_SIZE = VG_MAX_ENUM -} VGPathCapabilities; - -typedef enum { - VG_PATH_FORMAT = 0x1600, - VG_PATH_DATATYPE = 0x1601, - VG_PATH_SCALE = 0x1602, - VG_PATH_BIAS = 0x1603, - VG_PATH_NUM_SEGMENTS = 0x1604, - VG_PATH_NUM_COORDS = 0x1605, - - VG_PATH_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGPathParamType; - -typedef enum { - VG_CAP_BUTT = 0x1700, - VG_CAP_ROUND = 0x1701, - VG_CAP_SQUARE = 0x1702, - - VG_CAP_STYLE_FORCE_SIZE = VG_MAX_ENUM -} VGCapStyle; - -typedef enum { - VG_JOIN_MITER = 0x1800, - VG_JOIN_ROUND = 0x1801, - VG_JOIN_BEVEL = 0x1802, - - VG_JOIN_STYLE_FORCE_SIZE = VG_MAX_ENUM -} VGJoinStyle; - -typedef enum { - VG_EVEN_ODD = 0x1900, - VG_NON_ZERO = 0x1901, - - VG_FILL_RULE_FORCE_SIZE = VG_MAX_ENUM -} VGFillRule; - -typedef enum { - VG_STROKE_PATH = (1 << 0), - VG_FILL_PATH = (1 << 1), - - VG_PAINT_MODE_FORCE_SIZE = VG_MAX_ENUM -} VGPaintMode; - -typedef enum { - /* Color paint parameters */ - VG_PAINT_TYPE = 0x1A00, - VG_PAINT_COLOR = 0x1A01, - VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02, - VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07, - VG_PAINT_COLOR_RAMP_STOPS = 0x1A03, - - /* Linear gradient paint parameters */ - VG_PAINT_LINEAR_GRADIENT = 0x1A04, - - /* Radial gradient paint parameters */ - VG_PAINT_RADIAL_GRADIENT = 0x1A05, - - /* Pattern paint parameters */ - VG_PAINT_PATTERN_TILING_MODE = 0x1A06, - - VG_PAINT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGPaintParamType; - -typedef enum { - VG_PAINT_TYPE_COLOR = 0x1B00, - VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01, - VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02, - VG_PAINT_TYPE_PATTERN = 0x1B03, - - VG_PAINT_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGPaintType; - -typedef enum { - VG_COLOR_RAMP_SPREAD_PAD = 0x1C00, - VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01, - VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02, - - VG_COLOR_RAMP_SPREAD_MODE_FORCE_SIZE = VG_MAX_ENUM -} VGColorRampSpreadMode; - -typedef enum { - VG_TILE_FILL = 0x1D00, - VG_TILE_PAD = 0x1D01, - VG_TILE_REPEAT = 0x1D02, - VG_TILE_REFLECT = 0x1D03, - - VG_TILING_MODE_FORCE_SIZE = VG_MAX_ENUM -} VGTilingMode; - -typedef enum { - /* RGB{A,X} channel ordering */ - VG_sRGBX_8888 = 0, - VG_sRGBA_8888 = 1, - VG_sRGBA_8888_PRE = 2, - VG_sRGB_565 = 3, - VG_sRGBA_5551 = 4, - VG_sRGBA_4444 = 5, - VG_sL_8 = 6, - VG_lRGBX_8888 = 7, - VG_lRGBA_8888 = 8, - VG_lRGBA_8888_PRE = 9, - VG_lL_8 = 10, - VG_A_8 = 11, - VG_BW_1 = 12, - VG_A_1 = 13, - VG_A_4 = 14, - - /* {A,X}RGB channel ordering */ - VG_sXRGB_8888 = 0 | (1 << 6), - VG_sARGB_8888 = 1 | (1 << 6), - VG_sARGB_8888_PRE = 2 | (1 << 6), - VG_sARGB_1555 = 4 | (1 << 6), - VG_sARGB_4444 = 5 | (1 << 6), - VG_lXRGB_8888 = 7 | (1 << 6), - VG_lARGB_8888 = 8 | (1 << 6), - VG_lARGB_8888_PRE = 9 | (1 << 6), - - /* BGR{A,X} channel ordering */ - VG_sBGRX_8888 = 0 | (1 << 7), - VG_sBGRA_8888 = 1 | (1 << 7), - VG_sBGRA_8888_PRE = 2 | (1 << 7), - VG_sBGR_565 = 3 | (1 << 7), - VG_sBGRA_5551 = 4 | (1 << 7), - VG_sBGRA_4444 = 5 | (1 << 7), - VG_lBGRX_8888 = 7 | (1 << 7), - VG_lBGRA_8888 = 8 | (1 << 7), - VG_lBGRA_8888_PRE = 9 | (1 << 7), - - /* {A,X}BGR channel ordering */ - VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7), - VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7), - VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7), - VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7), - VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7), - VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7), - VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7), - VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7), - - VG_IMAGE_FORMAT_FORCE_SIZE = VG_MAX_ENUM -} VGImageFormat; - -typedef enum { - VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0), - VG_IMAGE_QUALITY_FASTER = (1 << 1), - VG_IMAGE_QUALITY_BETTER = (1 << 2), - - VG_IMAGE_QUALITY_FORCE_SIZE = VG_MAX_ENUM -} VGImageQuality; - -typedef enum { - VG_IMAGE_FORMAT = 0x1E00, - VG_IMAGE_WIDTH = 0x1E01, - VG_IMAGE_HEIGHT = 0x1E02, - - VG_IMAGE_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGImageParamType; - -typedef enum { - VG_DRAW_IMAGE_NORMAL = 0x1F00, - VG_DRAW_IMAGE_MULTIPLY = 0x1F01, - VG_DRAW_IMAGE_STENCIL = 0x1F02, - - VG_IMAGE_MODE_FORCE_SIZE = VG_MAX_ENUM -} VGImageMode; - -typedef enum { - VG_RED = (1 << 3), - VG_GREEN = (1 << 2), - VG_BLUE = (1 << 1), - VG_ALPHA = (1 << 0), - - VG_IMAGE_CHANNEL_FORCE_SIZE = VG_MAX_ENUM -} VGImageChannel; - -typedef enum { - VG_BLEND_SRC = 0x2000, - VG_BLEND_SRC_OVER = 0x2001, - VG_BLEND_DST_OVER = 0x2002, - VG_BLEND_SRC_IN = 0x2003, - VG_BLEND_DST_IN = 0x2004, - VG_BLEND_MULTIPLY = 0x2005, - VG_BLEND_SCREEN = 0x2006, - VG_BLEND_DARKEN = 0x2007, - VG_BLEND_LIGHTEN = 0x2008, - VG_BLEND_ADDITIVE = 0x2009, - - VG_BLEND_MODE_FORCE_SIZE = VG_MAX_ENUM -} VGBlendMode; - -typedef enum { - VG_FONT_NUM_GLYPHS = 0x2F00, - - VG_FONT_PARAM_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGFontParamType; - -typedef enum { - VG_IMAGE_FORMAT_QUERY = 0x2100, - VG_PATH_DATATYPE_QUERY = 0x2101, - - VG_HARDWARE_QUERY_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGHardwareQueryType; - -typedef enum { - VG_HARDWARE_ACCELERATED = 0x2200, - VG_HARDWARE_UNACCELERATED = 0x2201, - - VG_HARDWARE_QUERY_RESULT_FORCE_SIZE = VG_MAX_ENUM -} VGHardwareQueryResult; - -typedef enum { - VG_VENDOR = 0x2300, - VG_RENDERER = 0x2301, - VG_VERSION = 0x2302, - VG_EXTENSIONS = 0x2303, - - VG_STRING_ID_FORCE_SIZE = VG_MAX_ENUM -} VGStringID; - -/* Function Prototypes */ - -#ifndef VG_API_CALL -# error VG_API_CALL must be defined -#endif - -#ifndef VG_API_ENTRY -# error VG_API_ENTRY must be defined -#endif - -#ifndef VG_API_EXIT -# error VG_API_EXIT must be defined -#endif - -VG_API_CALL VGErrorCode VG_API_ENTRY vgGetError(void) VG_API_EXIT; - -VG_API_CALL void VG_API_ENTRY vgFlush(void) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgFinish(void) VG_API_EXIT; - -/* Getters and Setters */ -VG_API_CALL void VG_API_ENTRY vgSetf (VGParamType type, VGfloat value) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSeti (VGParamType type, VGint value) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetfv(VGParamType type, VGint count, - const VGfloat * values) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetiv(VGParamType type, VGint count, - const VGint * values) VG_API_EXIT; - -VG_API_CALL VGfloat VG_API_ENTRY vgGetf(VGParamType type) VG_API_EXIT; -VG_API_CALL VGint VG_API_ENTRY vgGeti(VGParamType type) VG_API_EXIT; -VG_API_CALL VGint VG_API_ENTRY vgGetVectorSize(VGParamType type) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGetfv(VGParamType type, VGint count, VGfloat * values) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGetiv(VGParamType type, VGint count, VGint * values) VG_API_EXIT; - -VG_API_CALL void VG_API_ENTRY vgSetParameterf(VGHandle object, - VGint paramType, - VGfloat value) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetParameteri(VGHandle object, - VGint paramType, - VGint value) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetParameterfv(VGHandle object, - VGint paramType, - VGint count, const VGfloat * values) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetParameteriv(VGHandle object, - VGint paramType, - VGint count, const VGint * values) VG_API_EXIT; - -VG_API_CALL VGfloat VG_API_ENTRY vgGetParameterf(VGHandle object, - VGint paramType) VG_API_EXIT; -VG_API_CALL VGint VG_API_ENTRY vgGetParameteri(VGHandle object, - VGint paramType); -VG_API_CALL VGint VG_API_ENTRY vgGetParameterVectorSize(VGHandle object, - VGint paramType) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGetParameterfv(VGHandle object, - VGint paramType, - VGint count, VGfloat * values) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGetParameteriv(VGHandle object, - VGint paramType, - VGint count, VGint * values) VG_API_EXIT; - -/* Matrix Manipulation */ -VG_API_CALL void VG_API_ENTRY vgLoadIdentity(void) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgLoadMatrix(const VGfloat * m) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGetMatrix(VGfloat * m) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgMultMatrix(const VGfloat * m) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgTranslate(VGfloat tx, VGfloat ty) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgScale(VGfloat sx, VGfloat sy) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgShear(VGfloat shx, VGfloat shy) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgRotate(VGfloat angle) VG_API_EXIT; - -/* Masking and Clearing */ -VG_API_CALL void VG_API_ENTRY vgMask(VGHandle mask, VGMaskOperation operation, - VGint x, VGint y, - VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgRenderToMask(VGPath path, - VGbitfield paintModes, - VGMaskOperation operation) VG_API_EXIT; -VG_API_CALL VGMaskLayer VG_API_ENTRY vgCreateMaskLayer(VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgFillMaskLayer(VGMaskLayer maskLayer, - VGint x, VGint y, - VGint width, VGint height, - VGfloat value) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgCopyMask(VGMaskLayer maskLayer, - VGint dx, VGint dy, - VGint sx, VGint sy, - VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgClear(VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; - -/* Paths */ -VG_API_CALL VGPath VG_API_ENTRY vgCreatePath(VGint pathFormat, - VGPathDatatype datatype, - VGfloat scale, VGfloat bias, - VGint segmentCapacityHint, - VGint coordCapacityHint, - VGbitfield capabilities) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgClearPath(VGPath path, VGbitfield capabilities) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDestroyPath(VGPath path) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgRemovePathCapabilities(VGPath path, - VGbitfield capabilities) VG_API_EXIT; -VG_API_CALL VGbitfield VG_API_ENTRY vgGetPathCapabilities(VGPath path) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgAppendPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgAppendPathData(VGPath dstPath, - VGint numSegments, - const VGubyte * pathSegments, - const void * pathData) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgModifyPathCoords(VGPath dstPath, VGint startIndex, - VGint numSegments, - const void * pathData) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgTransformPath(VGPath dstPath, VGPath srcPath) VG_API_EXIT; -VG_API_CALL VGboolean VG_API_ENTRY vgInterpolatePath(VGPath dstPath, - VGPath startPath, - VGPath endPath, - VGfloat amount) VG_API_EXIT; -VG_API_CALL VGfloat VG_API_ENTRY vgPathLength(VGPath path, - VGint startSegment, VGint numSegments) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgPointAlongPath(VGPath path, - VGint startSegment, VGint numSegments, - VGfloat distance, - VGfloat * x, VGfloat * y, - VGfloat * tangentX, VGfloat * tangentY) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgPathBounds(VGPath path, - VGfloat * minX, VGfloat * minY, - VGfloat * width, VGfloat * height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgPathTransformedBounds(VGPath path, - VGfloat * minX, VGfloat * minY, - VGfloat * width, VGfloat * height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDrawPath(VGPath path, VGbitfield paintModes) VG_API_EXIT; - -/* Paint */ -VG_API_CALL VGPaint VG_API_ENTRY vgCreatePaint(void) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDestroyPaint(VGPaint paint) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_API_EXIT; -VG_API_CALL VGPaint VG_API_ENTRY vgGetPaint(VGPaintMode paintMode) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetColor(VGPaint paint, VGuint rgba) VG_API_EXIT; -VG_API_CALL VGuint VG_API_ENTRY vgGetColor(VGPaint paint) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgPaintPattern(VGPaint paint, VGImage pattern) VG_API_EXIT; - -/* Images */ -VG_API_CALL VGImage VG_API_ENTRY vgCreateImage(VGImageFormat format, - VGint width, VGint height, - VGbitfield allowedQuality) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDestroyImage(VGImage image) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgClearImage(VGImage image, - VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgImageSubData(VGImage image, - const void * data, VGint dataStride, - VGImageFormat dataFormat, - VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGetImageSubData(VGImage image, - void * data, VGint dataStride, - VGImageFormat dataFormat, - VGint x, VGint y, - VGint width, VGint height) VG_API_EXIT; -VG_API_CALL VGImage VG_API_ENTRY vgChildImage(VGImage parent, - VGint x, VGint y, VGint width, VGint height) VG_API_EXIT; -VG_API_CALL VGImage VG_API_ENTRY vgGetParent(VGImage image) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgCopyImage(VGImage dst, VGint dx, VGint dy, - VGImage src, VGint sx, VGint sy, - VGint width, VGint height, - VGboolean dither) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDrawImage(VGImage image) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetPixels(VGint dx, VGint dy, - VGImage src, VGint sx, VGint sy, - VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgWritePixels(const void * data, VGint dataStride, - VGImageFormat dataFormat, - VGint dx, VGint dy, - VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGetPixels(VGImage dst, VGint dx, VGint dy, - VGint sx, VGint sy, - VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgReadPixels(void * data, VGint dataStride, - VGImageFormat dataFormat, - VGint sx, VGint sy, - VGint width, VGint height) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgCopyPixels(VGint dx, VGint dy, - VGint sx, VGint sy, - VGint width, VGint height) VG_API_EXIT; - -/* Text */ -VG_API_CALL VGFont VG_API_ENTRY vgCreateFont(VGint glyphCapacityHint) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDestroyFont(VGFont font) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetGlyphToPath(VGFont font, - VGuint glyphIndex, - VGPath path, - VGboolean isHinted, - VGfloat glyphOrigin [2], - VGfloat escapement[2]) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSetGlyphToImage(VGFont font, - VGuint glyphIndex, - VGImage image, - VGfloat glyphOrigin [2], - VGfloat escapement[2]) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgClearGlyph(VGFont font,VGuint glyphIndex) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDrawGlyph(VGFont font, - VGuint glyphIndex, - VGbitfield paintModes, - VGboolean allowAutoHinting) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgDrawGlyphs(VGFont font, - VGint glyphCount, - const VGuint *glyphIndices, - const VGfloat *adjustments_x, - const VGfloat *adjustments_y, - VGbitfield paintModes, - VGboolean allowAutoHinting) VG_API_EXIT; - -/* Image Filters */ -VG_API_CALL void VG_API_ENTRY vgColorMatrix(VGImage dst, VGImage src, - const VGfloat * matrix) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgConvolve(VGImage dst, VGImage src, - VGint kernelWidth, VGint kernelHeight, - VGint shiftX, VGint shiftY, - const VGshort * kernel, - VGfloat scale, - VGfloat bias, - VGTilingMode tilingMode) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgSeparableConvolve(VGImage dst, VGImage src, - VGint kernelWidth, - VGint kernelHeight, - VGint shiftX, VGint shiftY, - const VGshort * kernelX, - const VGshort * kernelY, - VGfloat scale, - VGfloat bias, - VGTilingMode tilingMode) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgGaussianBlur(VGImage dst, VGImage src, - VGfloat stdDeviationX, - VGfloat stdDeviationY, - VGTilingMode tilingMode) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgLookup(VGImage dst, VGImage src, - const VGubyte * redLUT, - const VGubyte * greenLUT, - const VGubyte * blueLUT, - const VGubyte * alphaLUT, - VGboolean outputLinear, - VGboolean outputPremultiplied) VG_API_EXIT; -VG_API_CALL void VG_API_ENTRY vgLookupSingle(VGImage dst, VGImage src, - const VGuint * lookupTable, - VGImageChannel sourceChannel, - VGboolean outputLinear, - VGboolean outputPremultiplied) VG_API_EXIT; - -/* Hardware Queries */ -VG_API_CALL VGHardwareQueryResult VG_API_ENTRY vgHardwareQuery(VGHardwareQueryType key, - VGint setting) VG_API_EXIT; - -/* Renderer and Extension Information */ -VG_API_CALL const VGubyte * VG_API_ENTRY vgGetString(VGStringID name) VG_API_EXIT; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _OPENVG_H */ diff --git a/vc/include/VG/vgext.h b/vc/include/VG/vgext.h @@ -1,233 +0,0 @@ -/* $Revision: 6810 $ on $Date:: 2008-10-29 14:31:37 +0000 #$ */ - -/*------------------------------------------------------------------------ - * - * VG extensions Reference Implementation - * ------------------------------------- - * - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief VG extensions - *//*-------------------------------------------------------------------*/ - - - -#ifndef _VGEXT_H -#define _VGEXT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "openvg.h" -#include "vgu.h" - -#ifndef VG_API_ENTRYP -# define VG_API_ENTRYP VG_API_ENTRY* -#endif - -#ifndef VGU_API_ENTRYP -# define VGU_API_ENTRYP VGU_API_ENTRY* -#endif - -/*------------------------------------------------------------------------------- - * KHR extensions - *------------------------------------------------------------------------------*/ - -typedef enum { - -#ifndef VG_KHR_iterative_average_blur - VG_MAX_AVERAGE_BLUR_DIMENSION_KHR = 0x116B, - VG_AVERAGE_BLUR_DIMENSION_RESOLUTION_KHR = 0x116C, - VG_MAX_AVERAGE_BLUR_ITERATIONS_KHR = 0x116D, -#endif - - VG_PARAM_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM -} VGParamTypeKHR; - -#ifndef VG_KHR_EGL_image -#define VG_KHR_EGL_image 1 -/* VGEGLImageKHR is an opaque handle to an EGLImage */ -typedef void* VGeglImageKHR; - -#ifdef VG_VGEXT_PROTOTYPES -VG_API_CALL VGImage VG_API_ENTRY vgCreateEGLImageTargetKHR(VGeglImageKHR image); -#endif -typedef VGImage (VG_API_ENTRYP PFNVGCREATEEGLIMAGETARGETKHRPROC) (VGeglImageKHR image); - -#endif - - -#ifndef VG_KHR_iterative_average_blur -#define VG_KHR_iterative_average_blur 1 - -#ifdef VG_VGEXT_PROTOTYPES -VG_API_CALL void vgIterativeAverageBlurKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode); -#endif -typedef void (VG_API_ENTRYP PFNVGITERATIVEAVERAGEBLURKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGTilingMode tilingMode); - -#endif - - -#ifndef VG_KHR_advanced_blending -#define VG_KHR_advanced_blending 1 - -typedef enum { - VG_BLEND_OVERLAY_KHR = 0x2010, - VG_BLEND_HARDLIGHT_KHR = 0x2011, - VG_BLEND_SOFTLIGHT_SVG_KHR = 0x2012, - VG_BLEND_SOFTLIGHT_KHR = 0x2013, - VG_BLEND_COLORDODGE_KHR = 0x2014, - VG_BLEND_COLORBURN_KHR = 0x2015, - VG_BLEND_DIFFERENCE_KHR = 0x2016, - VG_BLEND_SUBTRACT_KHR = 0x2017, - VG_BLEND_INVERT_KHR = 0x2018, - VG_BLEND_EXCLUSION_KHR = 0x2019, - VG_BLEND_LINEARDODGE_KHR = 0x201a, - VG_BLEND_LINEARBURN_KHR = 0x201b, - VG_BLEND_VIVIDLIGHT_KHR = 0x201c, - VG_BLEND_LINEARLIGHT_KHR = 0x201d, - VG_BLEND_PINLIGHT_KHR = 0x201e, - VG_BLEND_HARDMIX_KHR = 0x201f, - VG_BLEND_CLEAR_KHR = 0x2020, - VG_BLEND_DST_KHR = 0x2021, - VG_BLEND_SRC_OUT_KHR = 0x2022, - VG_BLEND_DST_OUT_KHR = 0x2023, - VG_BLEND_SRC_ATOP_KHR = 0x2024, - VG_BLEND_DST_ATOP_KHR = 0x2025, - VG_BLEND_XOR_KHR = 0x2026, - - VG_BLEND_MODE_KHR_FORCE_SIZE= VG_MAX_ENUM -} VGBlendModeKHR; -#endif - -#ifndef VG_KHR_parametric_filter -#define VG_KHR_parametric_filter 1 - -typedef enum { - VG_PF_OBJECT_VISIBLE_FLAG_KHR = (1 << 0), - VG_PF_KNOCKOUT_FLAG_KHR = (1 << 1), - VG_PF_OUTER_FLAG_KHR = (1 << 2), - VG_PF_INNER_FLAG_KHR = (1 << 3), - - VG_PF_TYPE_KHR_FORCE_SIZE = VG_MAX_ENUM -} VGPfTypeKHR; - -typedef enum { - VGU_IMAGE_IN_USE_ERROR = 0xF010, - - VGU_ERROR_CODE_KHR_FORCE_SIZE = VG_MAX_ENUM -} VGUErrorCodeKHR; - -#ifdef VG_VGEXT_PROTOTYPES -VG_API_CALL void VG_API_ENTRY vgParametricFilterKHR(VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint); -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguDropShadowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA); -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA) ; -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA); -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientGlowKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops); -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguGradientBevelKHR(VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops); -#endif -typedef void (VG_API_ENTRYP PFNVGPARAMETRICFILTERKHRPROC) (VGImage dst,VGImage src,VGImage blur,VGfloat strength,VGfloat offsetX,VGfloat offsetY,VGbitfield filterFlags,VGPaint highlightPaint,VGPaint shadowPaint); -typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUDROPSHADOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint shadowColorRGBA); -typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint glowColorRGBA); -typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint highlightColorRGBA,VGuint shadowColorRGBA); -typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTGLOWKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* glowColorRampStops); -typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUGRADIENTBEVELKHRPROC) (VGImage dst,VGImage src,VGfloat dimX,VGfloat dimY,VGuint iterative,VGfloat strength,VGfloat distance,VGfloat angle,VGbitfield filterFlags,VGbitfield allowedQuality,VGuint stopsCount,const VGfloat* bevelColorRampStops); - -#endif - - -/*------------------------------------------------------------------------------- - * NDS extensions - *------------------------------------------------------------------------------*/ - -#ifndef VG_NDS_paint_generation -#define VG_NDS_paint_generation 1 - -typedef enum { - VG_PAINT_COLOR_RAMP_LINEAR_NDS = 0x1A10, - VG_COLOR_MATRIX_NDS = 0x1A11, - VG_PAINT_COLOR_TRANSFORM_LINEAR_NDS = 0x1A12, - - VG_PAINT_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM -} VGPaintParamTypeNds; - -typedef enum { - VG_DRAW_IMAGE_COLOR_MATRIX_NDS = 0x1F10, - - VG_IMAGE_MODE_NDS_FORCE_SIZE = VG_MAX_ENUM -} VGImageModeNds; -#endif - - -#ifndef VG_NDS_projective_geometry -#define VG_NDS_projective_geometry 1 - -typedef enum { - VG_CLIP_MODE_NDS = 0x1180, - VG_CLIP_LINES_NDS = 0x1181, - VG_MAX_CLIP_LINES_NDS = 0x1182, - - VG_PARAM_TYPE_NDS_FORCE_SIZE = VG_MAX_ENUM -} VGParamTypeNds; - -typedef enum { - VG_CLIPMODE_NONE_NDS = 0x3000, - VG_CLIPMODE_CLIP_CLOSED_NDS = 0x3001, - VG_CLIPMODE_CLIP_OPEN_NDS = 0x3002, - VG_CLIPMODE_CULL_NDS = 0x3003, - - VG_CLIPMODE_NDS_FORCE_SIZE = VG_MAX_ENUM -} VGClipModeNds; - -typedef enum { - VG_RQUAD_TO_NDS = ( 13 << 1 ), - VG_RCUBIC_TO_NDS = ( 14 << 1 ), - - VG_PATH_SEGMENT_NDS_FORCE_SIZE = VG_MAX_ENUM -} VGPathSegmentNds; - -typedef enum { - VG_RQUAD_TO_ABS_NDS = (VG_RQUAD_TO_NDS | VG_ABSOLUTE), - VG_RQUAD_TO_REL_NDS = (VG_RQUAD_TO_NDS | VG_RELATIVE), - VG_RCUBIC_TO_ABS_NDS = (VG_RCUBIC_TO_NDS | VG_ABSOLUTE), - VG_RCUBIC_TO_REL_NDS = (VG_RCUBIC_TO_NDS | VG_RELATIVE), - - VG_PATH_COMMAND_NDS_FORCE_SIZE = VG_MAX_ENUM -} VGPathCommandNds; - -#ifdef VG_VGEXT_PROTOTYPES -VG_API_CALL void VG_API_ENTRY vgProjectiveMatrixNDS(VGboolean enable) ; -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguTransformClipLineNDS(const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout); -#endif -typedef void (VG_API_ENTRYP PFNVGPROJECTIVEMATRIXNDSPROC) (VGboolean enable) ; -typedef VGUErrorCode (VGU_API_ENTRYP PFNVGUTRANSFORMCLIPLINENDSPROC) (const VGfloat Ain,const VGfloat Bin,const VGfloat Cin,const VGfloat* matrix,const VGboolean inverse,VGfloat* Aout,VGfloat* Bout,VGfloat* Cout); - -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _VGEXT_H */ diff --git a/vc/include/VG/vgplatform.h b/vc/include/VG/vgplatform.h @@ -1,86 +0,0 @@ -/* $Revision: 6810 $ on $Date:: 2008-10-29 14:31:37 +0000 #$ */ - -/*------------------------------------------------------------------------ - * - * VG platform specific header Reference Implementation - * ---------------------------------------------------- - * - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief VG platform specific header - *//*-------------------------------------------------------------------*/ - -#ifndef _VGPLATFORM_H -#define _VGPLATFORM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef VG_API_CALL - #ifdef KHAPI - #define VG_API_CALL KHAPI - #else - #define VG_API_CALL extern - #endif -#endif - -#ifndef VGU_API_CALL - #define VGU_API_CALL VG_API_CALL -#endif - -#ifndef VG_API_ENTRY -#define VG_API_ENTRY -#endif - -#ifndef VG_API_EXIT -#define VG_API_EXIT -#endif - -#ifndef VGU_API_ENTRY -#define VGU_API_ENTRY -#endif - -#ifndef VGU_API_EXIT -#define VGU_API_EXIT -#endif - -#include "../KHR/khrplatform.h" -typedef khronos_float_t VGfloat; -typedef khronos_int8_t VGbyte; -typedef khronos_uint8_t VGubyte; -typedef khronos_int16_t VGshort; -typedef khronos_int32_t VGint; -typedef khronos_uint32_t VGuint; -typedef khronos_uint32_t VGbitfield; - -#ifndef VG_VGEXT_PROTOTYPES -#define VG_VGEXT_PROTOTYPES -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* _VGPLATFORM_H */ diff --git a/vc/include/VG/vgu.h b/vc/include/VG/vgu.h @@ -1,131 +0,0 @@ -/* $Revision: 6810 $ on $Date:: 2008-10-29 14:31:37 +0000 #$ */ - -/*------------------------------------------------------------------------ - * - * VGU 1.1 Reference Implementation - * ------------------------------------- - * - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief VGU 1.1 API. - *//*-------------------------------------------------------------------*/ - -#ifndef _VGU_H -#define _VGU_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "openvg.h" - -#define VGU_VERSION_1_0 1 -#define VGU_VERSION_1_1 2 - -#ifndef VGU_API_CALL -# error VGU_API_CALL must be defined -#endif - -#ifndef VGU_API_ENTRY -# error VGU_API_ENTRY must be defined -#endif - -#ifndef VGU_API_EXIT -# error VGU_API_EXIT must be defined -#endif - - -typedef enum { - VGU_NO_ERROR = 0, - VGU_BAD_HANDLE_ERROR = 0xF000, - VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001, - VGU_OUT_OF_MEMORY_ERROR = 0xF002, - VGU_PATH_CAPABILITY_ERROR = 0xF003, - VGU_BAD_WARP_ERROR = 0xF004, - - VGU_ERROR_CODE_FORCE_SIZE = VG_MAX_ENUM -} VGUErrorCode; - -typedef enum { - VGU_ARC_OPEN = 0xF100, - VGU_ARC_CHORD = 0xF101, - VGU_ARC_PIE = 0xF102, - - VGU_ARC_TYPE_FORCE_SIZE = VG_MAX_ENUM -} VGUArcType; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguLine(VGPath path, - VGfloat x0, VGfloat y0, - VGfloat x1, VGfloat y1) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguPolygon(VGPath path, - const VGfloat * points, VGint count, - VGboolean closed) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRect(VGPath path, - VGfloat x, VGfloat y, - VGfloat width, VGfloat height) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguRoundRect(VGPath path, - VGfloat x, VGfloat y, - VGfloat width, VGfloat height, - VGfloat arcWidth, VGfloat arcHeight) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguEllipse(VGPath path, - VGfloat cx, VGfloat cy, - VGfloat width, VGfloat height) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguArc(VGPath path, - VGfloat x, VGfloat y, - VGfloat width, VGfloat height, - VGfloat startAngle, VGfloat angleExtent, - VGUArcType arcType) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0, - VGfloat sx1, VGfloat sy1, - VGfloat sx2, VGfloat sy2, - VGfloat sx3, VGfloat sy3, - VGfloat * matrix) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0, - VGfloat dx1, VGfloat dy1, - VGfloat dx2, VGfloat dy2, - VGfloat dx3, VGfloat dy3, - VGfloat * matrix) VGU_API_EXIT; - -VGU_API_CALL VGUErrorCode VGU_API_ENTRY vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0, - VGfloat dx1, VGfloat dy1, - VGfloat dx2, VGfloat dy2, - VGfloat dx3, VGfloat dy3, - VGfloat sx0, VGfloat sy0, - VGfloat sx1, VGfloat sy1, - VGfloat sx2, VGfloat sy2, - VGfloat sx3, VGfloat sy3, - VGfloat * matrix) VGU_API_EXIT; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* #ifndef _VGU_H */ diff --git a/vc/include/WF/wfc.h b/vc/include/WF/wfc.h @@ -1,275 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef _WFC_H_ -#define _WFC_H_ - -#include "wfcplatform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define OPENWFC_VERSION_1_0 (1) - -#define WFC_NONE (0) - -#define WFC_INVALID_HANDLE ((WFCHandle)0) - -#define WFC_DEFAULT_DEVICE_ID (0) - -#define WFC_MAX_INT ((WFCint)16777216) -#define WFC_MAX_FLOAT ((WFCfloat)16777216) - -typedef WFCHandle WFCDevice; -typedef WFCHandle WFCContext; -typedef WFCHandle WFCSource; -typedef WFCHandle WFCMask; -typedef WFCHandle WFCElement; - -typedef enum { - WFC_ERROR_NONE = 0, - WFC_ERROR_OUT_OF_MEMORY = 0x7001, - WFC_ERROR_ILLEGAL_ARGUMENT = 0x7002, - WFC_ERROR_UNSUPPORTED = 0x7003, - WFC_ERROR_BAD_ATTRIBUTE = 0x7004, - WFC_ERROR_IN_USE = 0x7005, - WFC_ERROR_BUSY = 0x7006, - WFC_ERROR_BAD_DEVICE = 0x7007, - WFC_ERROR_BAD_HANDLE = 0x7008, - WFC_ERROR_INCONSISTENCY = 0x7009, - WFC_ERROR_FORCE_32BIT = 0x7FFFFFFF -} WFCErrorCode; - -typedef enum { - WFC_DEVICE_FILTER_SCREEN_NUMBER = 0x7020, - WFC_DEVICE_FILTER_FORCE_32BIT = 0x7FFFFFFF -} WFCDeviceFilter; - -typedef enum { - /* Read-only */ - WFC_DEVICE_CLASS = 0x7030, - WFC_DEVICE_ID = 0x7031, - WFC_DEVICE_FORCE_32BIT = 0x7FFFFFFF -} WFCDeviceAttrib; - -typedef enum { - WFC_DEVICE_CLASS_FULLY_CAPABLE = 0x7040, - WFC_DEVICE_CLASS_OFF_SCREEN_ONLY = 0x7041, - WFC_DEVICE_CLASS_FORCE_32BIT = 0x7FFFFFFF -} WFCDeviceClass; - -typedef enum { - /* Read-only */ - WFC_CONTEXT_TYPE = 0x7051, - WFC_CONTEXT_TARGET_HEIGHT = 0x7052, - WFC_CONTEXT_TARGET_WIDTH = 0x7053, - WFC_CONTEXT_LOWEST_ELEMENT = 0x7054, - - /* Read-write */ - WFC_CONTEXT_ROTATION = 0x7061, - WFC_CONTEXT_BG_COLOR = 0x7062, - WFC_CONTEXT_FORCE_32BIT = 0x7FFFFFFF -} WFCContextAttrib; - -typedef enum { - WFC_CONTEXT_TYPE_ON_SCREEN = 0x7071, - WFC_CONTEXT_TYPE_OFF_SCREEN = 0x7072, - WFC_CONTEXT_TYPE_FORCE_32BIT = 0x7FFFFFFF -} WFCContextType; - -typedef enum { - /* Clockwise rotation */ - WFC_ROTATION_0 = 0x7081, /* default */ - WFC_ROTATION_90 = 0x7082, - WFC_ROTATION_180 = 0x7083, - WFC_ROTATION_270 = 0x7084, - WFC_ROTATION_FORCE_32BIT = 0x7FFFFFFF -} WFCRotation; - -typedef enum { - WFC_ELEMENT_DESTINATION_RECTANGLE = 0x7101, - WFC_ELEMENT_SOURCE = 0x7102, - WFC_ELEMENT_SOURCE_RECTANGLE = 0x7103, - WFC_ELEMENT_SOURCE_FLIP = 0x7104, - WFC_ELEMENT_SOURCE_ROTATION = 0x7105, - WFC_ELEMENT_SOURCE_SCALE_FILTER = 0x7106, - WFC_ELEMENT_TRANSPARENCY_TYPES = 0x7107, - WFC_ELEMENT_GLOBAL_ALPHA = 0x7108, - WFC_ELEMENT_MASK = 0x7109, - WFC_ELEMENT_FORCE_32BIT = 0x7FFFFFFF -} WFCElementAttrib; - -typedef enum { - WFC_SCALE_FILTER_NONE = 0x7151, /* default */ - WFC_SCALE_FILTER_FASTER = 0x7152, - WFC_SCALE_FILTER_BETTER = 0x7153, - WFC_SCALE_FILTER_FORCE_32BIT = 0x7FFFFFFF -} WFCScaleFilter; - -typedef enum { - WFC_TRANSPARENCY_NONE = 0, /* default */ - WFC_TRANSPARENCY_ELEMENT_GLOBAL_ALPHA = (1 << 0), - WFC_TRANSPARENCY_SOURCE = (1 << 1), - WFC_TRANSPARENCY_MASK = (1 << 2), - WFC_TRANSPARENCY_FORCE_32BIT = 0x7FFFFFFF -} WFCTransparencyType; - -typedef enum { - WFC_VENDOR = 0x7200, - WFC_RENDERER = 0x7201, - WFC_VERSION = 0x7202, - WFC_EXTENSIONS = 0x7203, - WFC_STRINGID_FORCE_32BIT = 0x7FFFFFFF -} WFCStringID; - - -/* Function Prototypes */ - -/* Device */ -WFC_API_CALL WFCint WFC_APIENTRY - wfcEnumerateDevices(WFCint *deviceIds, WFCint deviceIdsCount, - const WFCint *filterList) WFC_APIEXIT; -WFC_API_CALL WFCDevice WFC_APIENTRY - wfcCreateDevice(WFCint deviceId, const WFCint *attribList) WFC_APIEXIT; -WFC_API_CALL WFCErrorCode WFC_APIENTRY - wfcGetError(WFCDevice dev) WFC_APIEXIT; -WFC_API_CALL WFCint WFC_APIENTRY - wfcGetDeviceAttribi(WFCDevice dev, WFCDeviceAttrib attrib) WFC_APIEXIT; -WFC_API_CALL WFCErrorCode WFC_APIENTRY - wfcDestroyDevice(WFCDevice dev) WFC_APIEXIT; - -/* Context */ -WFC_API_CALL WFCContext WFC_APIENTRY - wfcCreateOnScreenContext(WFCDevice dev, - WFCint screenNumber, - const WFCint *attribList) WFC_APIEXIT; -WFC_API_CALL WFCContext WFC_APIENTRY - wfcCreateOffScreenContext(WFCDevice dev, - WFCNativeStreamType stream, - const WFCint *attribList) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcCommit(WFCDevice dev, WFCContext ctx, WFCboolean wait) WFC_APIEXIT; -WFC_API_CALL WFCint WFC_APIENTRY - wfcGetContextAttribi(WFCDevice dev, WFCContext ctx, - WFCContextAttrib attrib) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcGetContextAttribfv(WFCDevice dev, WFCContext ctx, - WFCContextAttrib attrib, WFCint count, WFCfloat *values) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcSetContextAttribi(WFCDevice dev, WFCContext ctx, - WFCContextAttrib attrib, WFCint value) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcSetContextAttribfv(WFCDevice dev, WFCContext ctx, - WFCContextAttrib attrib, - WFCint count, const WFCfloat *values) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcDestroyContext(WFCDevice dev, WFCContext ctx) WFC_APIEXIT; - -/* Source */ -WFC_API_CALL WFCSource WFC_APIENTRY - wfcCreateSourceFromStream(WFCDevice dev, WFCContext ctx, - WFCNativeStreamType stream, - const WFCint *attribList) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcDestroySource(WFCDevice dev, WFCSource src) WFC_APIEXIT; - -/* Mask */ -WFC_API_CALL WFCMask WFC_APIENTRY - wfcCreateMaskFromStream(WFCDevice dev, WFCContext ctx, - WFCNativeStreamType stream, - const WFCint *attribList) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcDestroyMask(WFCDevice dev, WFCMask mask) WFC_APIEXIT; - -/* Element */ -WFC_API_CALL WFCElement WFC_APIENTRY - wfcCreateElement(WFCDevice dev, WFCContext ctx, - const WFCint *attribList) WFC_APIEXIT; -WFC_API_CALL WFCint WFC_APIENTRY - wfcGetElementAttribi(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib) WFC_APIEXIT; -WFC_API_CALL WFCfloat WFC_APIENTRY - wfcGetElementAttribf(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcGetElementAttribiv(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib, WFCint count, WFCint *values) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcGetElementAttribfv(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib, WFCint count, WFCfloat *values) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcSetElementAttribi(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib, WFCint value) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcSetElementAttribf(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib, WFCfloat value) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcSetElementAttribiv(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib, - WFCint count, const WFCint *values) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcSetElementAttribfv(WFCDevice dev, WFCElement element, - WFCElementAttrib attrib, - WFCint count, const WFCfloat *values) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcInsertElement(WFCDevice dev, WFCElement element, - WFCElement subordinate) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcRemoveElement(WFCDevice dev, WFCElement element) WFC_APIEXIT; -WFC_API_CALL WFCElement WFC_APIENTRY - wfcGetElementAbove(WFCDevice dev, WFCElement element) WFC_APIEXIT; -WFC_API_CALL WFCElement WFC_APIENTRY - wfcGetElementBelow(WFCDevice dev, WFCElement element) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcDestroyElement(WFCDevice dev, WFCElement element) WFC_APIEXIT; - -/* Rendering */ -WFC_API_CALL void WFC_APIENTRY - wfcActivate(WFCDevice dev, WFCContext ctx) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcDeactivate(WFCDevice dev, WFCContext ctx) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcCompose(WFCDevice dev, WFCContext ctx, WFCboolean wait) WFC_APIEXIT; -WFC_API_CALL void WFC_APIENTRY - wfcFence(WFCDevice dev, WFCContext ctx, WFCEGLDisplay dpy, - WFCEGLSync sync) WFC_APIEXIT; - -/* Renderer and extension information */ -WFC_API_CALL WFCint WFC_APIENTRY - wfcGetStrings(WFCDevice dev, - WFCStringID name, - const char **strings, - WFCint stringsCount) WFC_APIEXIT; -WFC_API_CALL WFCboolean WFC_APIENTRY - wfcIsExtensionSupported(WFCDevice dev, const char *string) WFC_APIEXIT; - -#ifdef __cplusplus -} -#endif - -#endif /* _WFC_H_ */ diff --git a/vc/include/WF/wfcplatform.h b/vc/include/WF/wfcplatform.h @@ -1,71 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef _WFCPLATFORM_H_ -#define _WFCPLATFORM_H_ - -#include "../KHR/khrplatform.h" -#include "../EGL/egl.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef WFC_API_CALL -#define WFC_API_CALL KHRONOS_APICALL -#endif -#ifndef WFC_APIENTRY -#define WFC_APIENTRY KHRONOS_APIENTRY -#endif -#ifndef WFC_APIEXIT -#define WFC_APIEXIT KHRONOS_APIATTRIBUTES -#endif - -#ifndef WFC_DEFAULT_SCREEN_NUMBER -#define WFC_DEFAULT_SCREEN_NUMBER (0) -#endif - -typedef enum { - WFC_FALSE = 0, - WFC_TRUE = 1, - WFC_BOOLEAN_FORCE_32BIT = 0x7FFFFFFF -} WFCboolean; - -typedef khronos_int32_t WFCint; -typedef khronos_float_t WFCfloat; -typedef khronos_uint32_t WFCbitfield; -typedef khronos_uint32_t WFCHandle; - -typedef EGLDisplay WFCEGLDisplay; -typedef void *WFCEGLSync; /* An opaque handle to an EGLSyncKHR */ -typedef WFCHandle WFCNativeStreamType; - -#ifdef __cplusplus -} -#endif - -#endif /* _WFCPLATFORM_H_ */ diff --git a/vc/include/bcm_host.h b/vc/include/bcm_host.h @@ -1,61 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Header file with useful bits from other headers - -#ifndef BCM_HOST_H -#define BCM_HOST_H - -#include <stdint.h> - -#ifdef __cplusplus -extern "C" { -#endif - -void bcm_host_init(void); -void bcm_host_deinit(void); - -int32_t graphics_get_display_size( const uint16_t display_number, - uint32_t *width, - uint32_t *height); - -unsigned bcm_host_get_peripheral_address(void); -unsigned bcm_host_get_peripheral_size(void); -unsigned bcm_host_get_sdram_address(void); - -#include "interface/vmcs_host/vc_dispmanx.h" -#include "interface/vmcs_host/vc_tvservice.h" -#include "interface/vmcs_host/vc_cec.h" -#include "interface/vmcs_host/vc_cecservice.h" -#include "interface/vmcs_host/vcgencmd.h" - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/vc/include/interface/mmal/core/mmal_buffer_private.h b/vc/include/interface/mmal/core/mmal_buffer_private.h @@ -1,86 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_BUFFER_PRIVATE_H -#define MMAL_BUFFER_PRIVATE_H - -/** Typedef for the private area the framework reserves for the driver / communication layer */ -typedef struct MMAL_DRIVER_BUFFER_T MMAL_DRIVER_BUFFER_T; - -/** Size of the private area the framework reserves for the driver / communication layer */ -#define MMAL_DRIVER_BUFFER_SIZE 32 - -/** Typedef for the framework's private area in the buffer header */ -typedef struct MMAL_BUFFER_HEADER_PRIVATE_T -{ - /** Callback invoked just prior to actually releasing the buffer header. Returns TRUE if - * release should be delayed. */ - MMAL_BH_PRE_RELEASE_CB_T pf_pre_release; - void *pre_release_userdata; - - /** Callback used to release / recycle the buffer header. This needs to be set by - * whoever allocates the buffer header. */ - void (*pf_release)(struct MMAL_BUFFER_HEADER_T *header); - void *owner; /**< Context set by the allocator of the buffer header and passed - during the release callback */ - - int32_t refcount; /**< Reference count of the buffer header. When it reaches 0, - the release callback will be called. */ - - MMAL_BUFFER_HEADER_T *reference; /**< Reference to another acquired buffer header. */ - - /** Callback used to free the payload associated with this buffer header. This is only - * used if the buffer header was created by MMAL with a payload associated with it. */ - void (*pf_payload_free)(void *payload_context, void *payload); - void *payload; /**< Pointer / handle to the allocated payload buffer */ - void *payload_context; /**< Pointer to the context of the payload allocator */ - uint32_t payload_size; /**< Allocated size in bytes of payload buffer */ - - void *component_data; /**< Field reserved for use by the component */ - void *payload_handle; /**< Field reserved for mmal_buffer_header_mem_lock */ - - uint8_t driver_area[MMAL_DRIVER_BUFFER_SIZE]; - -} MMAL_BUFFER_HEADER_PRIVATE_T; - -/** Get the size in bytes of a fully initialised MMAL_BUFFER_HEADER_T */ -unsigned int mmal_buffer_header_size(MMAL_BUFFER_HEADER_T *header); - -/** Initialise a MMAL_BUFFER_HEADER_T */ -MMAL_BUFFER_HEADER_T *mmal_buffer_header_initialise(void *mem, unsigned int length); - -/** Return a pointer to the area reserved for the driver. - */ -MMAL_DRIVER_BUFFER_T *mmal_buffer_header_driver_data(MMAL_BUFFER_HEADER_T *); - -/** Return a pointer to a referenced buffer header. - * It is the caller's responsibility to ensure that the reference is still - * valid when using it. - */ -MMAL_BUFFER_HEADER_T *mmal_buffer_header_reference(MMAL_BUFFER_HEADER_T *header); - -#endif /* MMAL_BUFFER_PRIVATE_H */ diff --git a/vc/include/interface/mmal/core/mmal_clock_private.h b/vc/include/interface/mmal/core/mmal_clock_private.h @@ -1,204 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_CLOCK_PRIVATE_H -#define MMAL_CLOCK_PRIVATE_H - -#include "interface/mmal/mmal.h" -#include "interface/mmal/mmal_clock.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/** Handle to a clock. */ -typedef struct MMAL_CLOCK_T -{ - void *user_data; /**< Client-supplied data (not used by the clock). */ -} MMAL_CLOCK_T; - -/** Create a new instance of a clock. - * - * @param clock Returned clock - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_create(MMAL_CLOCK_T **clock); - -/** Destroy a previously created clock. - * - * @param clock The clock to destroy - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_destroy(MMAL_CLOCK_T *clock); - -/** Definition of a clock request callback. - * This is invoked when the media-time requested by the client is reached. - * - * @param clock The clock which serviced the request - * @param media_time The current media-time - * @param cb_data Client-supplied data - * @param priv Function pointer used by the framework - */ -typedef void (*MMAL_CLOCK_VOID_FP)(void); -typedef void (*MMAL_CLOCK_REQUEST_CB)(MMAL_CLOCK_T *clock, int64_t media_time, void *cb_data, MMAL_CLOCK_VOID_FP priv); - -/** Register a request with the clock. - * When the specified media-time is reached, the clock will invoke the supplied callback. - * - * @param clock The clock - * @param media_time The media-time at which the callback should be invoked (microseconds) - * @param cb Callback to invoke - * @param cb_data Client-supplied callback data - * @param priv Function pointer used by the framework - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_request_add(MMAL_CLOCK_T *clock, int64_t media_time, - MMAL_CLOCK_REQUEST_CB cb, void *cb_data, MMAL_CLOCK_VOID_FP priv); - -/** Remove all previously registered clock requests. - * - * @param clock The clock - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_request_flush(MMAL_CLOCK_T *clock); - -/** Update the clock's media-time. - * - * @param clock The clock to update - * @param media_time New media-time to be applied (microseconds) - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_media_time_set(MMAL_CLOCK_T *clock, int64_t media_time); - -/** Set the clock's scale. - * - * @param clock The clock - * @param scale Scale factor - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_scale_set(MMAL_CLOCK_T *clock, MMAL_RATIONAL_T scale); - -/** Set the clock state. - * - * @param clock The clock - * @param active TRUE -> clock is active and media-time is advancing - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_active_set(MMAL_CLOCK_T *clock, MMAL_BOOL_T active); - -/** Get the clock's scale. - * - * @param clock The clock - * - * @return Current clock scale - */ -MMAL_RATIONAL_T mmal_clock_scale_get(MMAL_CLOCK_T *clock); - -/** Get the clock's current media-time. - * This takes the clock scale and media-time offset into account. - * - * @param clock The clock to query - * - * @return Current media-time in microseconds - */ -int64_t mmal_clock_media_time_get(MMAL_CLOCK_T *clock); - -/** Get the clock's state. - * - * @param clock The clock to query - * - * @return TRUE if clock is running (i.e. local media-time is advancing) - */ -MMAL_BOOL_T mmal_clock_is_active(MMAL_CLOCK_T *clock); - -/** Get the clock's media-time update threshold values. - * - * @param clock The clock - * @param update_threshold Pointer to clock update threshold values to fill - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_update_threshold_get(MMAL_CLOCK_T *clock, MMAL_CLOCK_UPDATE_THRESHOLD_T *update_threshold); - -/** Set the clock's media-time update threshold values. - * - * @param clock The clock - * @param update_threshold Pointer to new clock update threshold values - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_update_threshold_set(MMAL_CLOCK_T *clock, const MMAL_CLOCK_UPDATE_THRESHOLD_T *update_threshold); - -/** Get the clock's discontinuity threshold values. - * - * @param clock The clock - * @param discont Pointer to clock discontinuity threshold values to fill - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_discont_threshold_get(MMAL_CLOCK_T *clock, MMAL_CLOCK_DISCONT_THRESHOLD_T *discont); - -/** Set the clock's discontinuity threshold values. - * - * @param clock The clock - * @param discont Pointer to new clock discontinuity threshold values - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_discont_threshold_set(MMAL_CLOCK_T *clock, const MMAL_CLOCK_DISCONT_THRESHOLD_T *discont); - -/** Get the clock's request threshold values. - * - * @param clock The clock - * @param future Pointer to clock request threshold values to fill - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_request_threshold_get(MMAL_CLOCK_T *clock, MMAL_CLOCK_REQUEST_THRESHOLD_T *req); - -/** Set the clock's request threshold values. - * - * @param clock The clock - * @param discont Pointer to new clock request threshold values - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_clock_request_threshold_set(MMAL_CLOCK_T *clock, const MMAL_CLOCK_REQUEST_THRESHOLD_T *req); - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_CLOCK_PRIVATE_H */ diff --git a/vc/include/interface/mmal/core/mmal_component_private.h b/vc/include/interface/mmal/core/mmal_component_private.h @@ -1,169 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_COMPONENT_PRIVATE_H -#define MMAL_COMPONENT_PRIVATE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#define MMAL_VIDEO_DECODE "video_decode" -#define MMAL_VIDEO_ENCODE "video_encode" -#define MMAL_VIDEO_RENDER "video_render" -#define MMAL_AUDIO_DECODE "audio_decode" -#define MMAL_AUDIO_ENCODE "audio_encode" -#define MMAL_AUDIO_RENDER "audio_render" -#define MMAL_CAMERA "camera" - -#if defined(__GNUC__) && (__GNUC__ > 2) -# define MMAL_CONSTRUCTOR(func) void __attribute__((constructor,used)) func(void) -# define MMAL_DESTRUCTOR(func) void __attribute__((destructor,used)) func(void) -#else -# define MMAL_CONSTRUCTOR(func) void func(void) -# define MMAL_DESTRUCTOR(func) void func(void) -#endif - -#include "mmal.h" -#include "mmal_component.h" - -/** Definition of a component. */ -struct MMAL_COMPONENT_PRIVATE_T -{ - /** Pointer to the private data of the component module in use */ - struct MMAL_COMPONENT_MODULE_T *module; - - MMAL_STATUS_T (*pf_enable)(MMAL_COMPONENT_T *component); - MMAL_STATUS_T (*pf_disable)(MMAL_COMPONENT_T *component); - MMAL_STATUS_T (*pf_destroy)(MMAL_COMPONENT_T *component); - - /** Pool of event buffer headers, for sending events from component to client. */ - MMAL_POOL_T *event_pool; - - /** Reference counting of the component */ - int refcount; - /** Reference counting of the ports. Component won't be destroyed until this - * goes to 0 */ - int refcount_ports; - - /** Priority associated with the 'action thread' for this component, when - * such action thread is applicable. */ - int priority; -}; - -/** Set a generic component control parameter. - * - * @param control_port control port of component on which to set the parameter. - * @param param parameter to be set. - * @return MMAL_SUCCESS or another status on error. - */ -MMAL_STATUS_T mmal_component_parameter_set(MMAL_PORT_T *control_port, - const MMAL_PARAMETER_HEADER_T *param); - -/** Get a generic component control parameter. - * - * @param contorl_port control port of component from which to get the parameter. - * @param param parameter to be retrieved. - * @return MMAL_SUCCESS or another status on error. - */ -MMAL_STATUS_T mmal_component_parameter_get(MMAL_PORT_T *control_port, - MMAL_PARAMETER_HEADER_T *param); - -/** Registers an action with the core. - * The MMAL core allows components to register an action which will be run - * from a separate thread context when the action is explicitly triggered by - * the component. - * - * @param component component registering the action. - * @param action action to register. - * @return MMAL_SUCCESS or another status on error. - */ -MMAL_STATUS_T mmal_component_action_register(MMAL_COMPONENT_T *component, - void (*pf_action)(MMAL_COMPONENT_T *)); - -/** De-registers the current action registered with the core. - * - * @param component component de-registering the action. - * @return MMAL_SUCCESS or another status on error. - */ -MMAL_STATUS_T mmal_component_action_deregister(MMAL_COMPONENT_T *component); - -/** Triggers a registered action. - * Explicitly triggers an action registered by a component. - * - * @param component component on which to trigger the action. - * @return MMAL_SUCCESS or another status on error. - */ -MMAL_STATUS_T mmal_component_action_trigger(MMAL_COMPONENT_T *component); - -/** Lock an action to prevent it from running. - * Allows a component to make sure no action is running while the lock is taken. - * - * @param component component. - * @return MMAL_SUCCESS or another status on error. - */ -MMAL_STATUS_T mmal_component_action_lock(MMAL_COMPONENT_T *component); - -/** Unlock an action to allow it to run again. - * - * @param component component. - * @return MMAL_SUCCESS or another status on error. - */ -MMAL_STATUS_T mmal_component_action_unlock(MMAL_COMPONENT_T *component); - -/** Prototype used by components to register themselves to the supplier. */ -typedef MMAL_STATUS_T (*MMAL_COMPONENT_SUPPLIER_FUNCTION_T)(const char *name, - MMAL_COMPONENT_T *component); - -/** Create an instance of a component given a constructor for the component. - * This allows the creation of client-side components which haven't been registered with the core. - * See \ref mmal_component_create for the public interface used to create components. - * - * @param name name assigned to the component by the client - * @param constructor constructor function for the component - * @param constructor_private private data for the constructor - * @param component returned component - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_component_create_with_constructor(const char *name, - MMAL_STATUS_T (*constructor)(const char *name, MMAL_COMPONENT_T *), - struct MMAL_COMPONENT_MODULE_T *constructor_private, - MMAL_COMPONENT_T **component); - -/** Register a component with the mmal component supplier. - * - * @param prefix prefix for this supplier, e.g. "VC" - * @param create_fn function which will instantiate a component given a name. - */ -void mmal_component_supplier_register(const char *prefix, - MMAL_COMPONENT_SUPPLIER_FUNCTION_T create_fn); - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_COMPONENT_PRIVATE_H */ diff --git a/vc/include/interface/mmal/core/mmal_core_private.h b/vc/include/interface/mmal/core/mmal_core_private.h @@ -1,40 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_CORE_PRIVATE_H -#define MMAL_CORE_PRIVATE_H - -/** Initialise the logging system. - */ -void mmal_logging_init(void); - -/** Deinitialise the logging system. - */ -void mmal_logging_deinit(void); - -#endif /* MMAL_CORE_PRIVATE_H */ - diff --git a/vc/include/interface/mmal/core/mmal_events_private.h b/vc/include/interface/mmal/core/mmal_events_private.h @@ -1,67 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_EVENTS_PRIVATE_H -#define MMAL_EVENTS_PRIVATE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "mmal_events.h" - -/** Send an error event through the component's control port. - * The error event data will be the MMAL_STATUS_T passed in. - * - * @param component component to receive the error event. - * @param status the error status to be sent. - * @return MMAL_SUCCESS or an error if the event could not be sent. - */ -MMAL_STATUS_T mmal_event_error_send(MMAL_COMPONENT_T *component, MMAL_STATUS_T status); - -/** Send an eos event through a specific port. - * - * @param port port to receive the error event. - * @return MMAL_SUCCESS or an error if the event could not be sent. - */ -MMAL_STATUS_T mmal_event_eos_send(MMAL_PORT_T *port); - -/** Forward an event onto an output port. - * This will allocate a new event buffer on the output port, make a copy - * of the event buffer which will then be forwarded. - * - * @event event to forward. - * @param port port to forward event to. - * @return MMAL_SUCCESS or an error if the event could not be forwarded. - */ -MMAL_STATUS_T mmal_event_forward(MMAL_BUFFER_HEADER_T *event, MMAL_PORT_T *port); - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_EVENTS_PRIVATE_H */ diff --git a/vc/include/interface/mmal/core/mmal_port_private.h b/vc/include/interface/mmal/core/mmal_port_private.h @@ -1,213 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_PORT_PRIVATE_H -#define MMAL_PORT_PRIVATE_H - -#include "interface/mmal/mmal.h" -#include "interface/mmal/mmal_clock.h" -#include "interface/mmal/core/mmal_events_private.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** Definition of a port. */ -typedef struct MMAL_PORT_PRIVATE_T -{ - /** Pointer to the private data of the core */ - struct MMAL_PORT_PRIVATE_CORE_T *core; - /** Pointer to the private data of the module in use */ - struct MMAL_PORT_MODULE_T *module; - /** Pointer to the private data used by clock ports */ - struct MMAL_PORT_CLOCK_T *clock; - - MMAL_STATUS_T (*pf_set_format)(MMAL_PORT_T *port); - MMAL_STATUS_T (*pf_enable)(MMAL_PORT_T *port, MMAL_PORT_BH_CB_T); - MMAL_STATUS_T (*pf_disable)(MMAL_PORT_T *port); - MMAL_STATUS_T (*pf_send)(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *); - MMAL_STATUS_T (*pf_flush)(MMAL_PORT_T *port); - MMAL_STATUS_T (*pf_parameter_set)(MMAL_PORT_T *port, const MMAL_PARAMETER_HEADER_T *param); - MMAL_STATUS_T (*pf_parameter_get)(MMAL_PORT_T *port, MMAL_PARAMETER_HEADER_T *param); - MMAL_STATUS_T (*pf_connect)(MMAL_PORT_T *port, MMAL_PORT_T *other_port); - - uint8_t *(*pf_payload_alloc)(MMAL_PORT_T *port, uint32_t payload_size); - void (*pf_payload_free)(MMAL_PORT_T *port, uint8_t *payload); - -} MMAL_PORT_PRIVATE_T; - -/** Callback called by components when a \ref MMAL_BUFFER_HEADER_T needs to be sent back to the - * user */ -void mmal_port_buffer_header_callback(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); - -/** Callback called by components when an event \ref MMAL_BUFFER_HEADER_T needs to be sent to the - * user. Events differ from ordinary buffer headers because they originate from the component - * and do not return data from the client to the component. */ -void mmal_port_event_send(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); - -/** Allocate a port structure */ -MMAL_PORT_T *mmal_port_alloc(MMAL_COMPONENT_T *, MMAL_PORT_TYPE_T type, unsigned int extra_size); -/** Free a port structure */ -void mmal_port_free(MMAL_PORT_T *port); -/** Allocate an array of ports */ -MMAL_PORT_T **mmal_ports_alloc(MMAL_COMPONENT_T *, unsigned int ports_num, MMAL_PORT_TYPE_T type, - unsigned int extra_size); -/** Free an array of ports */ -void mmal_ports_free(MMAL_PORT_T **ports, unsigned int ports_num); - -/** Acquire a reference on a port */ -void mmal_port_acquire(MMAL_PORT_T *port); - -/** Release a reference on a port */ -MMAL_STATUS_T mmal_port_release(MMAL_PORT_T *port); - -/** Pause processing on a port */ -MMAL_STATUS_T mmal_port_pause(MMAL_PORT_T *port, MMAL_BOOL_T pause); - -/** Returns whether a port is connected or not */ -MMAL_BOOL_T mmal_port_is_connected(MMAL_PORT_T *port); - -/***************************************************************************** - * Clock Port API - *****************************************************************************/ -/** Definition of a clock port event callback. - * Used to inform the client of a clock event that has occurred. - * - * @param port The clock port where the event occurred - * @param event The event that has occurred - */ -typedef void (*MMAL_PORT_CLOCK_EVENT_CB)(MMAL_PORT_T *port, const MMAL_CLOCK_EVENT_T *event); - -/** Allocate a clock port. - * - * @param component The component requesting the alloc - * @param extra_size Size of the port module - * @param event_cb Clock event callback - * - * @return Pointer to new clock port or NULL on failure. - */ -MMAL_PORT_T* mmal_port_clock_alloc(MMAL_COMPONENT_T *component, unsigned int extra_size, - MMAL_PORT_CLOCK_EVENT_CB event_cb); - -/** Free a clock port. - * - * @param port The clock port to free - */ -void mmal_port_clock_free(MMAL_PORT_T *port); - -/** Allocate an array of clock ports. - * - * @param component The component requesting the alloc - * @param ports_num Number of ports to allocate - * @param extra_size Size of the port module - * @param event_cb Clock event callback - * - * @return Pointer to a new array of clock ports or NULL on failure. - */ -MMAL_PORT_T **mmal_ports_clock_alloc(MMAL_COMPONENT_T *component, unsigned int ports_num, - unsigned int extra_size, MMAL_PORT_CLOCK_EVENT_CB event_cb); - -/** Free an array of clock ports. - * - * @param ports The clock ports to free - * @param ports_num Number of ports to free - */ -void mmal_ports_clock_free(MMAL_PORT_T **ports, unsigned int ports_num); - -/** Definition of a clock port request callback. - * This is invoked when the media-time requested by the client is reached. - * - * @param port The clock port which serviced the request - * @param media_time The current media-time - * @param cb_data Client-supplied data - */ -typedef void (*MMAL_PORT_CLOCK_REQUEST_CB)(MMAL_PORT_T *port, int64_t media_time, void *cb_data); - -/** Register a request with the clock port. - * When the specified media-time is reached, the clock port will invoke the supplied callback. - * - * @param port The clock port - * @param media_time The media-time at which the callback should be invoked (microseconds) - * @param cb Callback to invoke - * @param cb_data Client-supplied callback data - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_clock_request_add(MMAL_PORT_T *port, int64_t media_time, - MMAL_PORT_CLOCK_REQUEST_CB cb, void *cb_data); - -/** Remove all previously registered clock port requests. - * - * @param port The clock port - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_clock_request_flush(MMAL_PORT_T *port); - -/** Get/set the clock port's reference state */ -MMAL_STATUS_T mmal_port_clock_reference_set(MMAL_PORT_T *port, MMAL_BOOL_T reference); -MMAL_BOOL_T mmal_port_clock_reference_get(MMAL_PORT_T *port); - -/** Get/set the clock port's active state */ -MMAL_STATUS_T mmal_port_clock_active_set(MMAL_PORT_T *port, MMAL_BOOL_T active); -MMAL_BOOL_T mmal_port_clock_active_get(MMAL_PORT_T *port); - -/** Get/set the clock port's scale */ -MMAL_STATUS_T mmal_port_clock_scale_set(MMAL_PORT_T *port, MMAL_RATIONAL_T scale); -MMAL_RATIONAL_T mmal_port_clock_scale_get(MMAL_PORT_T *port); - -/** Get/set the clock port's media-time */ -MMAL_STATUS_T mmal_port_clock_media_time_set(MMAL_PORT_T *port, int64_t media_time); -int64_t mmal_port_clock_media_time_get(MMAL_PORT_T *port); - -/** Get/set the clock port's update threshold */ -MMAL_STATUS_T mmal_port_clock_update_threshold_set(MMAL_PORT_T *port, - const MMAL_CLOCK_UPDATE_THRESHOLD_T *threshold); -MMAL_STATUS_T mmal_port_clock_update_threshold_get(MMAL_PORT_T *port, - MMAL_CLOCK_UPDATE_THRESHOLD_T *threshold); - -/** Get/set the clock port's discontinuity threshold */ -MMAL_STATUS_T mmal_port_clock_discont_threshold_set(MMAL_PORT_T *port, - const MMAL_CLOCK_DISCONT_THRESHOLD_T *threshold); -MMAL_STATUS_T mmal_port_clock_discont_threshold_get(MMAL_PORT_T *port, - MMAL_CLOCK_DISCONT_THRESHOLD_T *threshold); - -/** Get/set the clock port's request threshold */ -MMAL_STATUS_T mmal_port_clock_request_threshold_set(MMAL_PORT_T *port, - const MMAL_CLOCK_REQUEST_THRESHOLD_T *threshold); -MMAL_STATUS_T mmal_port_clock_request_threshold_get(MMAL_PORT_T *port, - MMAL_CLOCK_REQUEST_THRESHOLD_T *threshold); - -/** Provide information regarding a buffer received on the component's input/output port */ -void mmal_port_clock_input_buffer_info(MMAL_PORT_T *port, const MMAL_CLOCK_BUFFER_INFO_T *info); -void mmal_port_clock_output_buffer_info(MMAL_PORT_T *port, const MMAL_CLOCK_BUFFER_INFO_T *info); - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_PORT_PRIVATE_H */ diff --git a/vc/include/interface/mmal/mmal.h b/vc/include/interface/mmal/mmal.h @@ -1,390 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** \file - * Multi-Media Abstraction Layer API - */ - -#ifndef MMAL_H -#define MMAL_H - -/** - * - * \mainpage Multi-Media Abstraction Layer (MMAL). Draft Version 0.1. - * - * \par Contents - * - \ref intro_sec - * - \ref features - * - \ref concepts - * - \ref comp - * - \ref create - * - \ref port - * - \ref buf - * - \ref metadata - * - \ref queue - * - \ref pool - * - \ref param - * - \ref events - * - \ref version - * - \ref example - * - * \section intro_sec Introduction - * - * MMAL (Multi-Media Abstraction Layer) is a framework which is used to provide a host-side, - * simple and relatively low-level interface to multimedia components running on VideoCore. - * It also provides a component interface so that new components can be easily created and - * integrated into the framework. - * - * There is no requirement that all the components be running on VideoCore as MMAL doesn't - * put any restriction on where components live. The current implementation for instance - * provides some components which can be run on both host-side or VideoCore (e.g. the splitter - * component). - * - * \section features Features - * - * The MMAL API has been designed to support all the following features: - * - Sufficiently generic to support different kinds of multimedia component. - * - Simple to use from client side (mostly synchronous except where it matters). - * - Straightforward API for designing components (e.g. avoids multiple data paths, as found in RIL). - * - Allows for fully-optimised implementation of components (e.g. zero-copy buffer passing). - * - Portability (API is self-contained). - * - Supports multiple instances (e.g. of VideoCore). - * - Extensible without breaking source or binary backward compatibility. - * - * \section concepts API concepts - * - * The MMAL API is based on the concept of components, ports and buffer headers. - * Clients create MMAL components which expose ports for each individual - * elementary stream of data they support (e.g. audio/video). Components expose - * input ports to receive data from the client, and expose output ports - * to return data to the client. - * - * Data sent to or received from the component needs to be attached to a buffer header. - * Buffer headers are necessary because they contain buffer specific ancillary data which is - * necessary for the component and client to do their processing (e.g timestamps). - * - * \section comp Components - * - * MMAL lets clients create multi-media components (video encoders, - * video decoders, camera, and so-on) using a common API. Clients exchange - * data with components using buffer headers. A buffer header - * has a pointer to the payload data and optional metadata. - * Buffer headers are sent to and received from ports that are provided by components. - * - * A typical decoder component would have a single input port and a - * single output port, but the same architecture could also be used - * for components with different layouts (e.g. a camera with a - * capture and preview port, or a debugging component with just an input port). - * - * \subsection create Component Creation - * - * Each component is identified by a unique name. To create a specific component - * the client needs to call \ref mmal_component_create with the desired component's - * name as an argument. - * This call will return a context (\ref MMAL_COMPONENT_T) to the component. This - * context will expose the input and output ports (\ref MMAL_PORT_T) supported - * by this specific component. - * - * \note All VideoCore components have a name starting with the "vc." prefix (this prefix - * is used to distinguish when a creation request needs to be forwarded to VideoCore). - * - * \section port Component Ports - * - * A port (\ref MMAL_PORT_T) is the entity which exposes an elementary stream - * (\ref MMAL_ES_FORMAT_T) on a component. It is also the entity to which buffer headers - * (\ref MMAL_BUFFER_HEADER_T) are sent or from which they are received. - * - * Clients do not need to create ports. They are created automatically by - * the component when this one is created but the format of a port might need to - * be set by the client depending on the type of component the client is using. - * - * For example, for a video decoding component, one input port and one output port - * will be available. The format of the input port must be set by the - * client (using \ref mmal_port_format_commit) while the format of the output port - * will be automatically set by the component once the component has enough information - * to find out what its format should be. - * - * If the input port format contains enough information for the component to determine - * the format of the output port straight away, then the output port will be set to the proper - * format when \ref mmal_port_format_commit returns. Otherwise the output format will be set to - * \ref MMAL_ENCODING_UNKNOWN until the component is fed enough data to determine the format - * of the output port. - * When this happens, the client will receive an event on the output port, signalling - * that its format has changed. - * - * \section buf Buffer Headers - * - * Buffer headers (\ref MMAL_BUFFER_HEADER_T) are used to exchange data with components. - * They do not contain the data directly but instead contain a pointer to the data being - * transferred. - * - * Separating the buffer headers from the payload means that the memory for the data can - * be allocated outside of MMAL (e.g. if it is supplied by an external library) while still - * providing a consistent way to exchange data between clients and components. - * - * Buffer headers are allocated from pools and are reference counted. The refcount - * will drop when \ref mmal_buffer_header_release is called and the buffer header - * will be recycled to its pool when it reaches zero. - * The client can be notified when the buffer header is recycled so that it can recycle the - * associated payload memory as well. - * - * A pool of buffer headers should be created after committing the format of the port. When - * the format is changed, the minimum and recommended size and number of buffers may change. - * - * \note The current number of buffers and their size (\ref MMAL_PORT_T::buffer_num and \ref - * MMAL_PORT_T::buffer_size) are not modified by MMAL, and must be updated by the client as - * required after changes to a port's format. - * - * \subsection metadata Buffer Metadata - * - * The API provides a way for clients or components to associate metadata with buffer headers. - * A camera component could for example store information like exposure time or focal length - * as metadata within the buffer header containing the frame just captured. - * \note This area needs more work - * - * \subsection queue Queues of Buffer Headers - * - * Queues (\ref MMAL_QUEUE_T) are a facility that allows thread-safe processing of buffer headers - * from the client. Callbacks triggered by a MMAL component when it sends a buffer header to the - * client can simply put the buffer in a queue and let the main processing thread of the client - * get its data from the queue. - * - * \subsection pool Pools of Buffer Headers - * - * Pools (\ref MMAL_POOL_T) let clients allocate a fixed number of buffer headers, and - * a queue (\ref MMAL_QUEUE_T). They are used for buffer header allocation. - * Optionally a pool can also allocate the payload memory for the client. - * - * Pools can also be resized after creation, for example, if the port format is changed leading - * to a new number or size of buffers being required. - * - * \section param Port Parameters - * - * Components support setting and getting component specific parameters using - * \ref mmal_port_parameter_set and \ref mmal_port_parameter_get. Parameters - * are identified using an integer index; parameter data is binary. See the \ref MMAL_PARAMETER_IDS - * "Pre-defined MMAL parameter IDs" page for more information on the pre-defined parameters. - * - * \section events Port Events - * - * Components can generate events on their ports. Events are sent to clients - * as buffer headers and thus when the client receives a buffer header on one - * of the component's port it should check if the buffer header is an event - * and in which case process it and then release it (\ref mmal_buffer_header_release). - * The reason for transmitting events in-band with the actual data is that it - * is often very valuable to know exactly when the event happens relative to the - * the actual data (e.g. with a focus event, from which video frame are we in focus).\n - * Buffer headers used to transmit events are allocated internally by the framework - * so it is important to release the buffer headers with \ref mmal_buffer_header_release - * so the buffer headers make it back to their actual owner. - * - * Event buffer headers are allocated when the component is created, based on the - * minimum number and size of control port buffers set by the component. Component - * wide events (not port specific) are sent to the control port callback when that - * port is enabled. Port events are sent to the port callback, the same as data - * buffers, but the 'cmd' field is non-zero. - * - * \section version Versioning - * - * The API requires that the MMAL core be the same or more recent version - * as the components and clients. Clients and components can be older and - * the API will still work both at compile-time and run-time. - * - * \section example Example Code - * - * The following code is a simple example on how to do video decoding using MMAL. Note that - * the code is intended to be clear and illustrate how to use MMAL at its most fundamental - * level, not necessarily the most efficient way to achieve the same result. Use of opaque - * images, tunneling and zero-copy inter-processor buffers can all improve the performance - * or reduce the load. - * - * The \ref MmalConnectionUtility "Port Connection Utility" functions can also be used to - * replace much of the common "boilerplate" code, especially when a pipeline of several - * components needs to be processed. - * - * \code - * #include <mmal.h> - * ... - * static void input_callback(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) - * { - * // The decoder is done with the data, just recycle the buffer header into its pool - * mmal_buffer_header_release(buffer); - * } - * static void output_callback(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer) - * { - * MMAL_QUEUE_T *queue = (MMAL_QUEUE_T *)port->userdata; - * mmal_queue_put(queue, buffer); // Queue the decoded video frame - * } - * ... - * - * MMAL_COMPONENT_T *decoder = 0; - * MMAL_STATUS_T status; - * - * // Create the video decoder component on VideoCore - * status = mmal_component_create("vc.ril.video_decoder", &decoder); - * ABORT_IF_ERROR(status); - * - * // Set format of video decoder input port - * MMAL_ES_FORMAT_T *format_in = decoder->input[0]->format; - * format_in->type = MMAL_ES_TYPE_VIDEO; - * format_in->encoding = MMAL_ENCODING_H264; - * format_in->es->video.width = 1280; - * format_in->es->video.height = 720; - * format_in->es->video.frame_rate.num = 30; - * format_in->es->video.frame_rate.den = 1; - * format_in->es->video.par.num = 1; - * format_in->es->video.par.den = 1; - * format_in->flags = MMAL_ES_FORMAT_FLAG_FRAMED; - * status = mmal_format_extradata_alloc(format_in, YOUR_H264_CODEC_HEADER_BYTES_SIZE); - * ABORT_IF_ERROR(status); - * format_in->extradata_size = YOUR_H264_CODEC_HEADER_BYTES_SIZE; - * memcpy(format_in->extradata, YOUR_H264_CODEC_HEADER_BYTES, format_in->extradata_size); - * - * status = mmal_port_format_commit(decoder->input[0]); - * ABORT_IF_ERROR(status); - * - * // Once the call to mmal_port_format_commit() on the input port returns, the decoder will - * // have set the format of the output port. - * // If the decoder still doesn t have enough information to determine the format of the - * // output port, the encoding will be set to unknown. As soon as the decoder receives - * // enough stream data to determine the format of the output port it will send an event - * // to the client to signal that the format of the port has changed. - * // However, for the sake of simplicity this example assumes that the decoder was given - * // all the necessary information right at the start (i.e. video format and codec header bytes) - * MMAL_FORMAT_T *format_out = decoder->output[0]->format; - * if (format_out->encoding == MMAL_ENCODING_UNKNOWN) - * ABORT(); - * - * // Now we know the format of both ports and the requirements of the decoder, we can create - * // our buffer headers and their associated memory buffers. We use the buffer pool API for this. - * decoder->input[0]->buffer_num = decoder->input[0]->buffer_num_min; - * decoder->input[0]->buffer_size = decoder->input[0]->buffer_size_min; - * MMAL_POOL_T *pool_in = mmal_pool_create(decoder->input[0]->buffer_num, - * decoder->input[0]->buffer_size); - * decoder->output[0]->buffer_num = decoder->output[0]->buffer_num_min; - * decoder->output[0]->buffer_size = decoder->output[0]->buffer_size_min; - * MMAL_POOL_T *pool_out = mmal_pool_create(decoder->output[0]->buffer_num, - * decoder->output[0]->buffer_size); - * - * // Create a queue to store our decoded video frames. The callback we will get when - * // a frame has been decoded will put the frame into this queue. - * MMAL_QUEUE_T *queue_decoded_frames = mmal_queue_create(); - * decoder->output[0]->userdata = (void)queue_decoded_frames; - * - * // Enable all the input port and the output port. - * // The callback specified here is the function which will be called when the buffer header - * // we sent to the component has been processed. - * status = mmal_port_enable(decoder->input[0], input_callback); - * ABORT_IF_ERROR(status); - * status = mmal_port_enable(decoder->output[0], output_callback); - * ABORT_IF_ERROR(status); - * - * // Enable the component. Components will only process data when they are enabled. - * status = mmal_component_enable(decoder); - * ABORT_IF_ERROR(status); - * - * // Data processing loop - * while (1) - * { - * MMAL_BUFFER_HEADER_T *header; - * - * // The client needs to implement its own blocking code. - * // (e.g. a semaphore which is posted when a buffer header is put in one of the queues) - * WAIT_FOR_QUEUES_TO_HAVE_BUFFERS(); - * - * // Send empty buffers to the output port of the decoder to allow the decoder to start - * // producing frames as soon as it gets input data - * while ((buffer = mmal_queue_get(pool_out->queue)) != NULL) - * { - * status = mmal_port_send_buffer(decoder->output[0], buffer); - * ABORT_IF_ERROR(status); - * } - * - * // Send data to decode to the input port of the video decoder - * if ((buffer = mmal_queue_get(pool_in->queue)) != NULL) - * { - * READ_DATA_INTO_BUFFER(buffer); - * - * status = mmal_port_send_buffer(decoder->input[0], buffer); - * ABORT_IF_ERROR(status); - * } - * - * // Get our decoded frames. We also need to cope with events - * // generated from the component here. - * while ((buffer = mmal_queue_get(queue_decoded_frames)) != NULL) - * { - * if (buffer->cmd) - * { - * // This is an event. Do something with it and release the buffer. - * mmal_buffer_header_release(buffer); - * continue; - * } - * - * // We have a frame, do something with it (why not display it for instance?). - * // Once we're done with it, we release it. It will magically go back - * // to its original pool so it can be reused for a new video frame. - * mmal_buffer_header_release(buffer); - * } - * } - * - * // Cleanup everything - * mmal_component_destroy(decoder); - * mmal_pool_destroy(pool_in); - * mmal_pool_destroy(pool_out); - * mmal_queue_destroy(queue_decode_frames); - * - * \endcode - */ - -#include "mmal_common.h" -#include "mmal_types.h" -#include "mmal_port.h" -#include "mmal_component.h" -#include "mmal_parameters.h" -#include "mmal_metadata.h" -#include "mmal_queue.h" -#include "mmal_pool.h" -#include "mmal_events.h" - -/**/ -/** \name API Version - * The following define the version number of the API */ -/* @{ */ -/** Major version number. - * This changes when the API breaks in a way which is not backward compatible. */ -#define MMAL_VERSION_MAJOR 0 -/** Minor version number. - * This changes each time the API is extended in a way which is still source and - * binary compatible. */ -#define MMAL_VERSION_MINOR 1 - -#define MMAL_VERSION (MMAL_VERSION_MAJOR << 16 | MMAL_VERSION_MINOR) -#define MMAL_VERSION_TO_MAJOR(a) (a >> 16) -#define MMAL_VERSION_TO_MINOR(a) (a & 0xFFFF) -/* @} */ - -#endif /* MMAL_H */ diff --git a/vc/include/interface/mmal/mmal_buffer.h b/vc/include/interface/mmal/mmal_buffer.h @@ -1,250 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_BUFFER_H -#define MMAL_BUFFER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalBufferHeader Buffer headers - * Definition of a buffer header and its associated API. - * Buffer headers are the basic element used to pass data and information between different - * parts of the system. They are passed to components via ports and sent back to the client - * using a callback mechanism. - */ -/* @{ */ - -/** Specific data associated with video frames */ -typedef struct { - uint32_t planes; /**< Number of planes composing the video frame */ - uint32_t offset[4]; /**< Offsets to the different planes. These must point within the - payload buffer */ - uint32_t pitch[4]; /**< Pitch (size in bytes of a line of a plane) of the different - planes */ - uint32_t flags; /**< Flags describing video specific properties of a buffer header - (see \ref videobufferheaderflags "Video buffer header flags") */ - /* TBD stereoscopic support */ -} MMAL_BUFFER_HEADER_VIDEO_SPECIFIC_T; - -/** Type specific data that's associated with a payload buffer */ -typedef union -{ - /** Specific data associated with video frames */ - MMAL_BUFFER_HEADER_VIDEO_SPECIFIC_T video; - -} MMAL_BUFFER_HEADER_TYPE_SPECIFIC_T; - -/** Definition of the buffer header structure. - * A buffer header does not directly carry the data to be passed to a component but instead - * it references the actual data using a pointer (and an associated length). - * It also contains an internal area which can be used to store command or metadata to be - * associated with the external data. - */ -typedef struct MMAL_BUFFER_HEADER_T -{ - struct MMAL_BUFFER_HEADER_T *next; /**< Used to link several buffer headers together */ - - struct MMAL_BUFFER_HEADER_PRIVATE_T *priv; /**< Data private to the framework */ - - uint32_t cmd; /**< Defines what the buffer header contains. This is a FourCC - with 0 as a special value meaning stream data */ - - uint8_t *data; /**< Pointer to the start of the payload buffer (should not be - changed by component) */ - uint32_t alloc_size; /**< Allocated size in bytes of payload buffer */ - uint32_t length; /**< Number of bytes currently used in the payload buffer (starting - from offset) */ - uint32_t offset; /**< Offset in bytes to the start of valid data in the payload buffer */ - - uint32_t flags; /**< Flags describing properties of a buffer header (see - \ref bufferheaderflags "Buffer header flags") */ - - int64_t pts; /**< Presentation timestamp in microseconds. \ref MMAL_TIME_UNKNOWN - is used when the pts is unknown. */ - int64_t dts; /**< Decode timestamp in microseconds (dts = pts, except in the case - of video streams with B frames). \ref MMAL_TIME_UNKNOWN - is used when the dts is unknown. */ - - /** Type specific data that's associated with a payload buffer */ - MMAL_BUFFER_HEADER_TYPE_SPECIFIC_T *type; - - void *user_data; /**< Field reserved for use by the client */ - -} MMAL_BUFFER_HEADER_T; - -/** \name Buffer header flags - * \anchor bufferheaderflags - * The following flags describe properties of a buffer header */ -/* @{ */ -/** Signals that the current payload is the end of the stream of data */ -#define MMAL_BUFFER_HEADER_FLAG_EOS (1<<0) -/** Signals that the start of the current payload starts a frame */ -#define MMAL_BUFFER_HEADER_FLAG_FRAME_START (1<<1) -/** Signals that the end of the current payload ends a frame */ -#define MMAL_BUFFER_HEADER_FLAG_FRAME_END (1<<2) -/** Signals that the current payload contains only complete frames (1 or more) */ -#define MMAL_BUFFER_HEADER_FLAG_FRAME (MMAL_BUFFER_HEADER_FLAG_FRAME_START|MMAL_BUFFER_HEADER_FLAG_FRAME_END) -/** Signals that the current payload is a keyframe (i.e. self decodable) */ -#define MMAL_BUFFER_HEADER_FLAG_KEYFRAME (1<<3) -/** Signals a discontinuity in the stream of data (e.g. after a seek). - * Can be used for instance by a decoder to reset its state */ -#define MMAL_BUFFER_HEADER_FLAG_DISCONTINUITY (1<<4) -/** Signals a buffer containing some kind of config data for the component - * (e.g. codec config data) */ -#define MMAL_BUFFER_HEADER_FLAG_CONFIG (1<<5) -/** Signals an encrypted payload */ -#define MMAL_BUFFER_HEADER_FLAG_ENCRYPTED (1<<6) -/** Signals a buffer containing side information */ -#define MMAL_BUFFER_HEADER_FLAG_CODECSIDEINFO (1<<7) -/** Signals a buffer which is the snapshot/postview image from a stills capture */ -#define MMAL_BUFFER_HEADER_FLAGS_SNAPSHOT (1<<8) -/** Signals a buffer which contains data known to be corrupted */ -#define MMAL_BUFFER_HEADER_FLAG_CORRUPTED (1<<9) -/** Signals that a buffer failed to be transmitted */ -#define MMAL_BUFFER_HEADER_FLAG_TRANSMISSION_FAILED (1<<10) -/** Signals the output buffer won't be used, just update reference frames */ -#define MMAL_BUFFER_HEADER_FLAG_DECODEONLY (1<<11) -/** User flags - can be passed in and will get returned */ -#define MMAL_BUFFER_HEADER_FLAG_USER0 (1<<28) -#define MMAL_BUFFER_HEADER_FLAG_USER1 (1<<29) -#define MMAL_BUFFER_HEADER_FLAG_USER2 (1<<30) -#define MMAL_BUFFER_HEADER_FLAG_USER3 (1<<31) -/* @} */ - -/** \name Video buffer header flags - * \anchor videobufferheaderflags - * The following flags describe properties of a video buffer header */ -/* @{ */ -/** Signals an interlaced video frame */ -#define MMAL_BUFFER_HEADER_VIDEO_FLAG_INTERLACED (1<<0) -/** Signals that the top field of the current interlaced frame should be displayed first */ -#define MMAL_BUFFER_HEADER_VIDEO_FLAG_TOP_FIELD_FIRST (1<<2) -/** Signals that the buffer should be displayed on external display if attached. */ -#define MMAL_BUFFER_HEADER_VIDEO_FLAG_DISPLAY_EXTERNAL (1<<3) -/** Signals that contents of the buffer requires copy protection. */ -#define MMAL_BUFFER_HEADER_VIDEO_FLAG_PROTECTED (1<<4) -/* @} */ - -/** Acquire a buffer header. - * Acquiring a buffer header increases a reference counter on it and makes sure that the - * buffer header won't be recycled until all the references to it are gone. - * This is useful for instance if a component needs to return a buffer header but still needs - * access to it for some internal processing (e.g. reference frames in video codecs). - * - * @param header buffer header to acquire - */ -void mmal_buffer_header_acquire(MMAL_BUFFER_HEADER_T *header); - -/** Reset a buffer header. - * Resets all header variables to default values. - * - * @param header buffer header to reset - */ -void mmal_buffer_header_reset(MMAL_BUFFER_HEADER_T *header); - -/** Release a buffer header. - * Releasing a buffer header will decrease its reference counter and when no more references - * are left, the buffer header will be recycled by calling its 'release' callback function. - * - * If a pre-release callback is set (\ref MMAL_BH_PRE_RELEASE_CB_T), this will be invoked - * before calling the buffer's release callback and potentially postpone buffer recycling. - * Once pre-release is complete the buffer header is recycled with - * \ref mmal_buffer_header_release_continue. - * - * @param header buffer header to release - */ -void mmal_buffer_header_release(MMAL_BUFFER_HEADER_T *header); - -/** Continue the buffer header release process. - * This should be called to complete buffer header recycling once all pre-release activity - * has been completed. - * - * @param header buffer header to release - */ -void mmal_buffer_header_release_continue(MMAL_BUFFER_HEADER_T *header); - -/** Buffer header pre-release callback. - * The callback is invoked just before a buffer is released back into a - * pool. This is used by clients who need to trigger additional actions - * before the buffer can finally be released (e.g. wait for a bulk transfer - * to complete). - * - * The callback should return TRUE if the buffer release need to be post-poned. - * - * @param header buffer header about to be released - * @param userdata user-specific data - * - * @return TRUE if the buffer should not be released - */ -typedef MMAL_BOOL_T (*MMAL_BH_PRE_RELEASE_CB_T)(MMAL_BUFFER_HEADER_T *header, void *userdata); - -/** Set a buffer header pre-release callback. - * If the callback is NULL, the buffer will be released back into the pool - * immediately as usual. - * - * @param header buffer header to associate callback with - * @param cb pre-release callback to invoke - * @param userdata user-specific data - */ -void mmal_buffer_header_pre_release_cb_set(MMAL_BUFFER_HEADER_T *header, MMAL_BH_PRE_RELEASE_CB_T cb, void *userdata); - -/** Replicate a buffer header into another one. - * Replicating a buffer header will not only do an exact copy of all the public fields of the - * buffer header (including data and alloc_size), but it will also acquire a reference to the - * source buffer header which will only be released once the replicate has been released. - * - * @param dest buffer header into which to replicate - * @param src buffer header to use as the source for the replication - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_buffer_header_replicate(MMAL_BUFFER_HEADER_T *dest, MMAL_BUFFER_HEADER_T *src); - -/** Lock the data buffer contained in the buffer header in memory. - * This call does nothing on all platforms except VideoCore where it is needed to pin a - * buffer in memory before any access to it. - * - * @param header buffer header to lock - */ -MMAL_STATUS_T mmal_buffer_header_mem_lock(MMAL_BUFFER_HEADER_T *header); - -/** Unlock the data buffer contained in the buffer header. - * This call does nothing on all platforms except VideoCore where it is needed to un-pin a - * buffer in memory after any access to it. - * - * @param header buffer header to unlock - */ -void mmal_buffer_header_mem_unlock(MMAL_BUFFER_HEADER_T *header); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_BUFFER_H */ diff --git a/vc/include/interface/mmal/mmal_clock.h b/vc/include/interface/mmal/mmal_clock.h @@ -1,202 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -#ifndef MMAL_CLOCK_H -#define MMAL_CLOCK_H - -#include "interface/vcos/vcos.h" -#include "mmal_types.h" -#include "mmal_common.h" - -/** \defgroup MmalClock Clock Framework - * The MMAL clock framework provides scheduling facilities to the rest of - * MMAL. - * - * The framework consists mainly of clock ports and a clock module. Client - * applications and components interact directly with clock ports, while - * the clock module is only used internally by clock ports. - * - * Clock ports ensure that the local media-time for each component is - * synchronised across all components. This is done by passing buffers between - * clock ports which contain clock-specific data. - * - * One clock port will normally act as the reference clock for the rest of the - * system. This is usually chosen to be the clock port of the audio render - * component, but is configurable by the client and could potentially be any - * other clock port (or even the client application itself). - * - * Components that are responsible for timed delivery of frames, do so by - * registering callback requests for a particular time-stamp with the clock - * port. These requests are scheduled using the clock module which maintains - * an internal media-time. - * - * The clock framework also provides the ability to perform playback at different - * speeds. This is achieved with a clock scale factor which determines the speed - * at which the media-time advances relative to real-time, with: - * scale = 1.0 -> normal playback speed - * scale = 0 -> playback paused - * scale > 1.0 -> fast-forward - * scale < 1.0 -> slow motion - */ - -/** Clock event magic */ -#define MMAL_CLOCK_EVENT_MAGIC MMAL_FOURCC('C','K','L','M') - -/** Clock reference update */ -#define MMAL_CLOCK_EVENT_REFERENCE MMAL_FOURCC('C','R','E','F') - -/** Clock state update */ -#define MMAL_CLOCK_EVENT_ACTIVE MMAL_FOURCC('C','A','C','T') - -/** Clock scale update */ -#define MMAL_CLOCK_EVENT_SCALE MMAL_FOURCC('C','S','C','A') - -/** Clock media-time update */ -#define MMAL_CLOCK_EVENT_TIME MMAL_FOURCC('C','T','I','M') - -/** Clock update threshold */ -#define MMAL_CLOCK_EVENT_UPDATE_THRESHOLD MMAL_FOURCC('C','U','T','H') - -/** Clock discontinuity threshold */ -#define MMAL_CLOCK_EVENT_DISCONT_THRESHOLD MMAL_FOURCC('C','D','T','H') - -/** Clock request threshold */ -#define MMAL_CLOCK_EVENT_REQUEST_THRESHOLD MMAL_FOURCC('C','R','T','H') - -/** Buffer statistics */ -#define MMAL_CLOCK_EVENT_INPUT_BUFFER_INFO MMAL_FOURCC('C','I','B','I') -#define MMAL_CLOCK_EVENT_OUTPUT_BUFFER_INFO MMAL_FOURCC('C','O','B','I') - -/** Clock latency setting */ -#define MMAL_CLOCK_EVENT_LATENCY MMAL_FOURCC('C','L','A','T') - -/** Clock event not valid */ -#define MMAL_CLOCK_EVENT_INVALID 0 - - -/** Thresholds used when updating a clock's media-time */ -typedef struct MMAL_CLOCK_UPDATE_THRESHOLD_T -{ - /** Time differences below this threshold are ignored (microseconds) */ - int64_t threshold_lower; - - /** Time differences above this threshold reset media-time (microseconds) */ - int64_t threshold_upper; -} MMAL_CLOCK_UPDATE_THRESHOLD_T; - -/** Threshold for detecting a discontinuity in media-time */ -typedef struct MMAL_CLOCK_DISCONT_THRESHOLD_T -{ - /** Threshold after which backward jumps in media-time are treated as a - * discontinuity (microseconds) */ - int64_t threshold; - - /** Duration in microseconds for which a discontinuity applies (wall-time) */ - int64_t duration; -} MMAL_CLOCK_DISCONT_THRESHOLD_T; - -/** Threshold applied to client callback requests */ -typedef struct MMAL_CLOCK_REQUEST_THRESHOLD_T -{ - /** Frames with a media-time difference (compared to current media-time) - * above this threshold are dropped (microseconds) */ - int64_t threshold; - - /** Enable/disable the request threshold */ - MMAL_BOOL_T threshold_enable; -} MMAL_CLOCK_REQUEST_THRESHOLD_T; - -/** Structure for passing buffer information to a clock port */ -typedef struct MMAL_CLOCK_BUFFER_INFO_T -{ - int64_t time_stamp; - uint32_t arrival_time; -} MMAL_CLOCK_BUFFER_INFO_T; - -/** Clock latency settings used by the clock component */ -typedef struct MMAL_CLOCK_LATENCY_T -{ - int64_t target; /**< target latency (microseconds) */ - int64_t attack_period; /**< duration of one attack period (microseconds) */ - int64_t attack_rate; /**< amount by which media-time will be adjusted - every attack_period (microseconds) */ -} MMAL_CLOCK_LATENCY_T; - -/** Clock event used to pass data between clock ports and a client. */ -typedef struct MMAL_CLOCK_EVENT_T -{ - /** 4cc event id */ - uint32_t id; - - /** 4cc event magic */ - uint32_t magic; - - /** buffer associated with this event (can be NULL) */ - struct MMAL_BUFFER_HEADER_T *buffer; - - /** pad to 64-bit boundary */ - uint32_t padding0; - - /** additional event data (type-specific) */ - union - { - /** used either for clock reference or clock state */ - MMAL_BOOL_T enable; - - /** new clock scale */ - MMAL_RATIONAL_T scale; - - /** new media-time */ - int64_t media_time; - - /** media-time update threshold */ - MMAL_CLOCK_UPDATE_THRESHOLD_T update_threshold; - - /** media-time discontinuity threshold */ - MMAL_CLOCK_DISCONT_THRESHOLD_T discont_threshold; - - /** client callback request threshold */ - MMAL_CLOCK_REQUEST_THRESHOLD_T request_threshold; - - /** input/output buffer information */ - MMAL_CLOCK_BUFFER_INFO_T buffer; - - /** clock latency setting */ - MMAL_CLOCK_LATENCY_T latency; - } data; - - /** pad to 64-bit boundary */ - uint64_t padding1; -} MMAL_CLOCK_EVENT_T; - -/* Make sure MMAL_CLOCK_EVENT_T will preserve 64-bit alignment */ -vcos_static_assert(!(sizeof(MMAL_CLOCK_EVENT_T) & 0x7)); - -#define MMAL_CLOCK_EVENT_INIT(id) { id, MMAL_CLOCK_EVENT_MAGIC, NULL, 0, {0}, 0 } - -#endif /* MMAL_CLOCK_H */ diff --git a/vc/include/interface/mmal/mmal_common.h b/vc/include/interface/mmal/mmal_common.h @@ -1,83 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** \file mmal_common.h - * Multi-Media Abstraction Layer - Common definitions - */ - -#ifndef MMAL_COMMON_H -#define MMAL_COMMON_H - -#include <stdlib.h> -#include <string.h> -#include <stddef.h> -#include <assert.h> - -#include <interface/vcos/vcos.h> - -/* C99 64bits integers */ -#ifndef INT64_C -# define INT64_C(value) value##LL -# define UINT64_C(value) value##ULL -#endif - -#define MMAL_TSRING(s) #s -#define MMAL_TO_STRING(s) MMAL_TSRING(s) - -#define MMAL_COUNTOF(x) (sizeof((x))/sizeof((x)[0])) -#define MMAL_MIN(a,b) ((a)<(b)?(a):(b)) -#define MMAL_MAX(a,b) ((a)<(b)?(b):(a)) - -/* FIXME: should be different for big endian */ -#define MMAL_FOURCC(a,b,c,d) ((a) | (b << 8) | (c << 16) | (d << 24)) -#define MMAL_PARAM_UNUSED(a) (void)(a) -#define MMAL_MAGIC MMAL_FOURCC('m','m','a','l') - -typedef int32_t MMAL_BOOL_T; -#define MMAL_FALSE 0 -#define MMAL_TRUE 1 - -typedef struct MMAL_CORE_STATISTICS_T -{ - uint32_t buffer_count; /**< Total buffer count on this port */ - uint32_t first_buffer_time; /**< Time (us) of first buffer seen on this port */ - uint32_t last_buffer_time; /**< Time (us) of most recently buffer on this port */ - uint32_t max_delay; /**< Max delay (us) between buffers, ignoring first few frames */ -} MMAL_CORE_STATISTICS_T; - -/** Statistics collected by the core on all ports, if enabled in the build. - */ -typedef struct MMAL_CORE_PORT_STATISTICS_T -{ - MMAL_CORE_STATISTICS_T rx; - MMAL_CORE_STATISTICS_T tx; -} MMAL_CORE_PORT_STATISTICS_T; - -/** Unsigned 16.16 fixed point value, also known as Q16.16 */ -typedef uint32_t MMAL_FIXED_16_16_T; - -#endif /* MMAL_COMMON_H */ diff --git a/vc/include/interface/mmal/mmal_component.h b/vc/include/interface/mmal/mmal_component.h @@ -1,148 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_COMPONENT_H -#define MMAL_COMPONENT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalComponent Components - * Definition of a MMAL component and its associated API. A component will always expose ports - * which it uses to send and receive data in the form of buffer headers - * (\ref MMAL_BUFFER_HEADER_T) */ -/* @{ */ - -#include "mmal_types.h" -#include "mmal_port.h" - -struct MMAL_COMPONENT_PRIVATE_T; -typedef struct MMAL_COMPONENT_PRIVATE_T MMAL_COMPONENT_PRIVATE_T; - -/** Definition of a component. */ -typedef struct MMAL_COMPONENT_T -{ - /** Pointer to the private data of the module in use */ - struct MMAL_COMPONENT_PRIVATE_T *priv; - - /** Pointer to private data of the client */ - struct MMAL_COMPONENT_USERDATA_T *userdata; - - /** Component name */ - const char *name; - - /** Specifies whether the component is enabled or not */ - uint32_t is_enabled; - - /** All components expose a control port. - * The control port is used by clients to set / get parameters that are global to the - * component. It is also used to receive events, which again are global to the component. - * To be able to receive events, the client needs to enable and register a callback on the - * control port. */ - MMAL_PORT_T *control; - - uint32_t input_num; /**< Number of input ports */ - MMAL_PORT_T **input; /**< Array of input ports */ - - uint32_t output_num; /**< Number of output ports */ - MMAL_PORT_T **output; /**< Array of output ports */ - - uint32_t clock_num; /**< Number of clock ports */ - MMAL_PORT_T **clock; /**< Array of clock ports */ - - uint32_t port_num; /**< Total number of ports */ - MMAL_PORT_T **port; /**< Array of all the ports (control/input/output/clock) */ - - /** Uniquely identifies the component's instance within the MMAL - * context / process. For debugging. */ - uint32_t id; - -} MMAL_COMPONENT_T; - -/** Create an instance of a component. - * The newly created component will expose ports to the client. All the exposed ports are - * disabled by default. - * Note that components are reference counted and creating a component automatically - * acquires a reference to it (released when \ref mmal_component_destroy is called). - * - * @param name name of the component to create, e.g. "video_decode" - * @param component returned component - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_component_create(const char *name, - MMAL_COMPONENT_T **component); - -/** Acquire a reference on a component. - * Acquiring a reference on a component will prevent a component from being destroyed until - * the acquired reference is released (by a call to \ref mmal_component_destroy). - * References are internally counted so all acquired references need a matching call to - * release them. - * - * @param component component to acquire - */ -void mmal_component_acquire(MMAL_COMPONENT_T *component); - -/** Release a reference on a component - * Release an acquired reference on a component. Triggers the destruction of the component when - * the last reference is being released. - * \note This is in fact an alias of \ref mmal_component_destroy which is added to make client - * code clearer. - * - * @param component component to release - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_component_release(MMAL_COMPONENT_T *component); - -/** Destroy a previously created component - * Release an acquired reference on a component. Only actually destroys the component when - * the last reference is being released. - * - * @param component component to destroy - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_component_destroy(MMAL_COMPONENT_T *component); - -/** Enable processing on a component - * @param component component to enable - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_component_enable(MMAL_COMPONENT_T *component); - -/** Disable processing on a component - * @param component component to disable - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_component_disable(MMAL_COMPONENT_T *component); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_COMPONENT_H */ diff --git a/vc/include/interface/mmal/mmal_encodings.h b/vc/include/interface/mmal/mmal_encodings.h @@ -1,234 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_ENCODINGS_H -#define MMAL_ENCODINGS_H - -#include "mmal_common.h" - -/** \defgroup MmalEncodings List of pre-defined encodings - * This defines a list of common encodings. This list isn't exhaustive and is only - * provided as a convenience to avoid clients having to use FourCC codes directly. - * However components are allowed to define and use their own FourCC codes. */ -/* @{ */ - -/** \name Pre-defined video encodings */ -/* @{ */ -#define MMAL_ENCODING_H264 MMAL_FOURCC('H','2','6','4') -#define MMAL_ENCODING_MVC MMAL_FOURCC('M','V','C',' ') -#define MMAL_ENCODING_H263 MMAL_FOURCC('H','2','6','3') -#define MMAL_ENCODING_MP4V MMAL_FOURCC('M','P','4','V') -#define MMAL_ENCODING_MP2V MMAL_FOURCC('M','P','2','V') -#define MMAL_ENCODING_MP1V MMAL_FOURCC('M','P','1','V') -#define MMAL_ENCODING_WMV3 MMAL_FOURCC('W','M','V','3') -#define MMAL_ENCODING_WMV2 MMAL_FOURCC('W','M','V','2') -#define MMAL_ENCODING_WMV1 MMAL_FOURCC('W','M','V','1') -#define MMAL_ENCODING_WVC1 MMAL_FOURCC('W','V','C','1') -#define MMAL_ENCODING_VP8 MMAL_FOURCC('V','P','8',' ') -#define MMAL_ENCODING_VP7 MMAL_FOURCC('V','P','7',' ') -#define MMAL_ENCODING_VP6 MMAL_FOURCC('V','P','6',' ') -#define MMAL_ENCODING_THEORA MMAL_FOURCC('T','H','E','O') -#define MMAL_ENCODING_SPARK MMAL_FOURCC('S','P','R','K') -#define MMAL_ENCODING_MJPEG MMAL_FOURCC('M','J','P','G') - -#define MMAL_ENCODING_JPEG MMAL_FOURCC('J','P','E','G') -#define MMAL_ENCODING_GIF MMAL_FOURCC('G','I','F',' ') -#define MMAL_ENCODING_PNG MMAL_FOURCC('P','N','G',' ') -#define MMAL_ENCODING_PPM MMAL_FOURCC('P','P','M',' ') -#define MMAL_ENCODING_TGA MMAL_FOURCC('T','G','A',' ') -#define MMAL_ENCODING_BMP MMAL_FOURCC('B','M','P',' ') - -#define MMAL_ENCODING_I420 MMAL_FOURCC('I','4','2','0') -#define MMAL_ENCODING_I420_SLICE MMAL_FOURCC('S','4','2','0') -#define MMAL_ENCODING_YV12 MMAL_FOURCC('Y','V','1','2') -#define MMAL_ENCODING_I422 MMAL_FOURCC('I','4','2','2') -#define MMAL_ENCODING_I422_SLICE MMAL_FOURCC('S','4','2','2') -#define MMAL_ENCODING_YUYV MMAL_FOURCC('Y','U','Y','V') -#define MMAL_ENCODING_YVYU MMAL_FOURCC('Y','V','Y','U') -#define MMAL_ENCODING_UYVY MMAL_FOURCC('U','Y','V','Y') -#define MMAL_ENCODING_VYUY MMAL_FOURCC('V','Y','U','Y') -#define MMAL_ENCODING_NV12 MMAL_FOURCC('N','V','1','2') -#define MMAL_ENCODING_NV21 MMAL_FOURCC('N','V','2','1') -#define MMAL_ENCODING_ARGB MMAL_FOURCC('A','R','G','B') -#define MMAL_ENCODING_RGBA MMAL_FOURCC('R','G','B','A') -#define MMAL_ENCODING_ABGR MMAL_FOURCC('A','B','G','R') -#define MMAL_ENCODING_BGRA MMAL_FOURCC('B','G','R','A') -#define MMAL_ENCODING_RGB16 MMAL_FOURCC('R','G','B','2') -#define MMAL_ENCODING_RGB24 MMAL_FOURCC('R','G','B','3') -#define MMAL_ENCODING_RGB32 MMAL_FOURCC('R','G','B','4') -#define MMAL_ENCODING_BGR16 MMAL_FOURCC('B','G','R','2') -#define MMAL_ENCODING_BGR24 MMAL_FOURCC('B','G','R','3') -#define MMAL_ENCODING_BGR32 MMAL_FOURCC('B','G','R','4') -//Bayer formats -//FourCC values copied from V4L2 -//10 bit per pixel packed Bayer formats. -#define MMAL_ENCODING_BAYER_SBGGR10P MMAL_FOURCC('p','B','A','A') //BGGR -//#define MMAL_ENCODING_BAYER_SGRBG10P MMAL_FOURCC('p','g','A','A') //GRBG -//#define MMAL_ENCODING_BAYER_SGBRG10P MMAL_FOURCC('p','G','A','A') //GBRG -//#define MMAL_ENCODING_BAYER_SRGGB10P MMAL_FOURCC('p','R','A','A') //RGGB - -//8 bit per pixel Bayer formats. -#define MMAL_ENCODING_BAYER_SBGGR8 MMAL_FOURCC('B','A','8','1') //BGGR -//#define MMAL_ENCODING_BAYER_SGBRG8 MMAL_FOURCC('G','B','R','G') //GBRG -//#define MMAL_ENCODING_BAYER_SGRBG8 MMAL_FOURCC('G','R','B','G') //GRBG -//#define MMAL_ENCODING_BAYER_SRGGB8 MMAL_FOURCC('R','G','G','B') //RGGB - -//12 bit per pixel Bayer formats - not defined in V4L2, only 12bit expanded to 16. -#define MMAL_ENCODING_BAYER_SBGGR12P MMAL_FOURCC('B','Y','1','2') //BGGR - -//16 bit per pixel Bayer formats. -#define MMAL_ENCODING_BAYER_SBGGR16 MMAL_FOURCC('B','Y','R','2') //BGGR - -//10 bit per pixel DPCM compressed to 8bits Bayer formats. -#define MMAL_ENCODING_BAYER_SBGGR10DPCM8 MMAL_FOURCC('b','B','A','8') //BGGR -//#define MMAL_ENCODING_BAYER_SGBRG10DPCM8 MMAL_FOURCC('b','G','A','8') //GBRG -//#define MMAL_ENCODING_BAYER_SGRBG10DPCM8 MMAL_FOURCC('b','D','A','8') //GRBG -//#define MMAL_ENCODING_BAYER_SRGGB10DPCM8 MMAL_FOURCC('b','R','A','8') //RGGB - -/** SAND Video (YUVUV128) format, native format understood by VideoCore. - * This format is *not* opaque - if requested you will receive full frames - * of YUV_UV video. - */ -#define MMAL_ENCODING_YUVUV128 MMAL_FOURCC('S','A','N','D') - -/** VideoCore opaque image format, image handles are returned to - * the host but not the actual image data. - */ -#define MMAL_ENCODING_OPAQUE MMAL_FOURCC('O','P','Q','V') - -/** An EGL image handle - */ -#define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E','G','L','I') - -/* }@ */ - -/** \name Pre-defined audio encodings */ -/* @{ */ -#define MMAL_ENCODING_PCM_UNSIGNED_BE MMAL_FOURCC('P','C','M','U') -#define MMAL_ENCODING_PCM_UNSIGNED_LE MMAL_FOURCC('p','c','m','u') -#define MMAL_ENCODING_PCM_SIGNED_BE MMAL_FOURCC('P','C','M','S') -#define MMAL_ENCODING_PCM_SIGNED_LE MMAL_FOURCC('p','c','m','s') -#define MMAL_ENCODING_PCM_FLOAT_BE MMAL_FOURCC('P','C','M','F') -#define MMAL_ENCODING_PCM_FLOAT_LE MMAL_FOURCC('p','c','m','f') -/* Defines for native endianness */ -#ifdef MMAL_IS_BIG_ENDIAN -#define MMAL_ENCODING_PCM_UNSIGNED MMAL_ENCODING_PCM_UNSIGNED_BE -#define MMAL_ENCODING_PCM_SIGNED MMAL_ENCODING_PCM_SIGNED_BE -#define MMAL_ENCODING_PCM_FLOAT MMAL_ENCODING_PCM_FLOAT_BE -#else -#define MMAL_ENCODING_PCM_UNSIGNED MMAL_ENCODING_PCM_UNSIGNED_LE -#define MMAL_ENCODING_PCM_SIGNED MMAL_ENCODING_PCM_SIGNED_LE -#define MMAL_ENCODING_PCM_FLOAT MMAL_ENCODING_PCM_FLOAT_LE -#endif - -#define MMAL_ENCODING_MP4A MMAL_FOURCC('M','P','4','A') -#define MMAL_ENCODING_MPGA MMAL_FOURCC('M','P','G','A') -#define MMAL_ENCODING_ALAW MMAL_FOURCC('A','L','A','W') -#define MMAL_ENCODING_MULAW MMAL_FOURCC('U','L','A','W') -#define MMAL_ENCODING_ADPCM_MS MMAL_FOURCC('M','S',0x0,0x2) -#define MMAL_ENCODING_ADPCM_IMA_MS MMAL_FOURCC('M','S',0x0,0x1) -#define MMAL_ENCODING_ADPCM_SWF MMAL_FOURCC('A','S','W','F') -#define MMAL_ENCODING_WMA1 MMAL_FOURCC('W','M','A','1') -#define MMAL_ENCODING_WMA2 MMAL_FOURCC('W','M','A','2') -#define MMAL_ENCODING_WMAP MMAL_FOURCC('W','M','A','P') -#define MMAL_ENCODING_WMAL MMAL_FOURCC('W','M','A','L') -#define MMAL_ENCODING_WMAV MMAL_FOURCC('W','M','A','V') -#define MMAL_ENCODING_AMRNB MMAL_FOURCC('A','M','R','N') -#define MMAL_ENCODING_AMRWB MMAL_FOURCC('A','M','R','W') -#define MMAL_ENCODING_AMRWBP MMAL_FOURCC('A','M','R','P') -#define MMAL_ENCODING_AC3 MMAL_FOURCC('A','C','3',' ') -#define MMAL_ENCODING_EAC3 MMAL_FOURCC('E','A','C','3') -#define MMAL_ENCODING_DTS MMAL_FOURCC('D','T','S',' ') -#define MMAL_ENCODING_MLP MMAL_FOURCC('M','L','P',' ') -#define MMAL_ENCODING_FLAC MMAL_FOURCC('F','L','A','C') -#define MMAL_ENCODING_VORBIS MMAL_FOURCC('V','O','R','B') -#define MMAL_ENCODING_SPEEX MMAL_FOURCC('S','P','X',' ') -#define MMAL_ENCODING_ATRAC3 MMAL_FOURCC('A','T','R','3') -#define MMAL_ENCODING_ATRACX MMAL_FOURCC('A','T','R','X') -#define MMAL_ENCODING_ATRACL MMAL_FOURCC('A','T','R','L') -#define MMAL_ENCODING_MIDI MMAL_FOURCC('M','I','D','I') -#define MMAL_ENCODING_EVRC MMAL_FOURCC('E','V','R','C') -#define MMAL_ENCODING_NELLYMOSER MMAL_FOURCC('N','E','L','Y') -#define MMAL_ENCODING_QCELP MMAL_FOURCC('Q','C','E','L') -#define MMAL_ENCODING_MP4V_DIVX_DRM MMAL_FOURCC('M','4','V','D') -/* @} */ - -/* @} MmalEncodings List */ - -/** \defgroup MmalEncodingVariants List of pre-defined encoding variants - * This defines a list of common encoding variants. This list isn't exhaustive and is only - * provided as a convenience to avoid clients having to use FourCC codes directly. - * However components are allowed to define and use their own FourCC codes. */ -/* @{ */ - -/** \name Pre-defined H264 encoding variants */ -/* @{ */ -/** ISO 14496-10 Annex B byte stream format */ -#define MMAL_ENCODING_VARIANT_H264_DEFAULT 0 -/** ISO 14496-15 AVC stream format */ -#define MMAL_ENCODING_VARIANT_H264_AVC1 MMAL_FOURCC('A','V','C','1') -/** Implicitly delineated NAL units without emulation prevention */ -#define MMAL_ENCODING_VARIANT_H264_RAW MMAL_FOURCC('R','A','W',' ') -/* @} */ - -/** \name Pre-defined MPEG4 audio encoding variants */ -/* @{ */ -/** Raw stream format */ -#define MMAL_ENCODING_VARIANT_MP4A_DEFAULT 0 -/** ADTS stream format */ -#define MMAL_ENCODING_VARIANT_MP4A_ADTS MMAL_FOURCC('A','D','T','S') -/* @} */ - -/* @} MmalEncodingVariants List */ - -/** \defgroup MmalColorSpace List of pre-defined video color spaces - * This defines a list of common color spaces. This list isn't exhaustive and is only - * provided as a convenience to avoid clients having to use FourCC codes directly. - * However components are allowed to define and use their own FourCC codes. */ -/* @{ */ - -/** Unknown color space */ -#define MMAL_COLOR_SPACE_UNKNOWN 0 -/** ITU-R BT.601-5 [SDTV] */ -#define MMAL_COLOR_SPACE_ITUR_BT601 MMAL_FOURCC('Y','6','0','1') -/** ITU-R BT.709-3 [HDTV] */ -#define MMAL_COLOR_SPACE_ITUR_BT709 MMAL_FOURCC('Y','7','0','9') -/** JPEG JFIF */ -#define MMAL_COLOR_SPACE_JPEG_JFIF MMAL_FOURCC('Y','J','F','I') -/** Title 47 Code of Federal Regulations (2003) 73.682 (a) (20) */ -#define MMAL_COLOR_SPACE_FCC MMAL_FOURCC('Y','F','C','C') -/** Society of Motion Picture and Television Engineers 240M (1999) */ -#define MMAL_COLOR_SPACE_SMPTE240M MMAL_FOURCC('Y','2','4','0') -/** ITU-R BT.470-2 System M */ -#define MMAL_COLOR_SPACE_BT470_2_M MMAL_FOURCC('Y','_','_','M') -/** ITU-R BT.470-2 System BG */ -#define MMAL_COLOR_SPACE_BT470_2_BG MMAL_FOURCC('Y','_','B','G') -/** JPEG JFIF, but with 16..255 luma */ -#define MMAL_COLOR_SPACE_JFIF_Y16_255 MMAL_FOURCC('Y','Y','1','6') -/* @} MmalColorSpace List */ - -#endif /* MMAL_ENCODINGS_H */ diff --git a/vc/include/interface/mmal/mmal_events.h b/vc/include/interface/mmal/mmal_events.h @@ -1,109 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_EVENTS_H -#define MMAL_EVENTS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "mmal_common.h" -#include "mmal_parameters.h" -#include "mmal_port.h" - -/** \defgroup MmalEvents List of pre-defined event types - * This defines a list of standard event types. Components can still define proprietary - * event types by using their own FourCC and defining their own event structures. */ -/* @{ */ - -/** \name Pre-defined event FourCCs */ -/* @{ */ - -/** Error event. Data contains a \ref MMAL_STATUS_T */ -#define MMAL_EVENT_ERROR MMAL_FOURCC('E','R','R','O') - -/** End-of-stream event. Data contains a \ref MMAL_EVENT_END_OF_STREAM_T */ -#define MMAL_EVENT_EOS MMAL_FOURCC('E','E','O','S') - -/** Format changed event. Data contains a \ref MMAL_EVENT_FORMAT_CHANGED_T */ -#define MMAL_EVENT_FORMAT_CHANGED MMAL_FOURCC('E','F','C','H') - -/** Parameter changed event. Data contains the new parameter value, see - * \ref MMAL_EVENT_PARAMETER_CHANGED_T - */ -#define MMAL_EVENT_PARAMETER_CHANGED MMAL_FOURCC('E','P','C','H') - -/* @} */ - - -/** End-of-stream event. */ -typedef struct MMAL_EVENT_END_OF_STREAM_T -{ - MMAL_PORT_TYPE_T port_type; /**< Type of port that received the end of stream */ - uint32_t port_index; /**< Index of port that received the end of stream */ -} MMAL_EVENT_END_OF_STREAM_T; - -/** Format changed event data. */ -typedef struct MMAL_EVENT_FORMAT_CHANGED_T -{ - uint32_t buffer_size_min; /**< Minimum size of buffers the port requires */ - uint32_t buffer_num_min; /**< Minimum number of buffers the port requires */ - uint32_t buffer_size_recommended; /**< Size of buffers the port recommends for optimal performance. - A value of zero means no special recommendation. */ - uint32_t buffer_num_recommended; /**< Number of buffers the port recommends for optimal - performance. A value of zero means no special recommendation. */ - - MMAL_ES_FORMAT_T *format; /**< New elementary stream format */ -} MMAL_EVENT_FORMAT_CHANGED_T; - -/** Parameter changed event data. - * This is a variable sized event. The full parameter is included in the event - * data, not just the header. Use the \ref MMAL_PARAMETER_HEADER_T::id field to determine how to - * cast the structure. The \ref MMAL_PARAMETER_HEADER_T::size field can be used to check validity. - */ -typedef struct MMAL_EVENT_PARAMETER_CHANGED_T -{ - MMAL_PARAMETER_HEADER_T hdr; -} MMAL_EVENT_PARAMETER_CHANGED_T; - -/** Get a pointer to the \ref MMAL_EVENT_FORMAT_CHANGED_T structure contained in the buffer header. - * Note that the pointer will point inside the data contained in the buffer header - * so doesn't need to be freed explicitly. - * - * @param buffer buffer header containing the MMAL_EVENT_FORMAT_CHANGED event. - * @return pointer to a MMAL_EVENT_FORMAT_CHANGED_T structure. - */ -MMAL_EVENT_FORMAT_CHANGED_T *mmal_event_format_changed_get(MMAL_BUFFER_HEADER_T *buffer); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_EVENTS_H */ diff --git a/vc/include/interface/mmal/mmal_format.h b/vc/include/interface/mmal/mmal_format.h @@ -1,223 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_FORMAT_H -#define MMAL_FORMAT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalFormat Elementary stream format - * Definition of an elementary stream format and its associated API */ -/* @{ */ - -#include "mmal_types.h" -#include "mmal_encodings.h" - -/** Enumeration of the different types of elementary streams. - * This divides elementary streams into 4 big categories, plus an invalid type. */ -typedef enum { - MMAL_ES_TYPE_UNKNOWN, /**< Unknown elementary stream type */ - MMAL_ES_TYPE_CONTROL, /**< Elementary stream of control commands */ - MMAL_ES_TYPE_AUDIO, /**< Audio elementary stream */ - MMAL_ES_TYPE_VIDEO, /**< Video elementary stream */ - MMAL_ES_TYPE_SUBPICTURE /**< Sub-picture elementary stream (e.g. subtitles, overlays) */ -} MMAL_ES_TYPE_T; - -/** Definition of a video format. - * This describes the properties specific to a video stream */ -typedef struct -{ - uint32_t width; /**< Width of frame in pixels */ - uint32_t height; /**< Height of frame in rows of pixels */ - MMAL_RECT_T crop; /**< Visible region of the frame */ - MMAL_RATIONAL_T frame_rate; /**< Frame rate */ - MMAL_RATIONAL_T par; /**< Pixel aspect ratio */ - - MMAL_FOURCC_T color_space; /**< FourCC specifying the color space of the - * video stream. See the \ref MmalColorSpace - * "pre-defined color spaces" for some examples. - */ - -} MMAL_VIDEO_FORMAT_T; - -/** Definition of an audio format. - * This describes the properties specific to an audio stream */ -typedef struct MMAL_AUDIO_FORMAT_T -{ - uint32_t channels; /**< Number of audio channels */ - uint32_t sample_rate; /**< Sample rate */ - - uint32_t bits_per_sample; /**< Bits per sample */ - uint32_t block_align; /**< Size of a block of data */ - - /** \todo add channel mapping, gapless and replay-gain support */ - -} MMAL_AUDIO_FORMAT_T; - -/** Definition of a subpicture format. - * This describes the properties specific to a subpicture stream */ -typedef struct -{ - uint32_t x_offset; /**< Width offset to the start of the subpicture */ - uint32_t y_offset; /**< Height offset to the start of the subpicture */ - - /** \todo surely more things are needed here */ - -} MMAL_SUBPICTURE_FORMAT_T; - -/** Definition of the type specific format. - * This describes the type specific information of the elementary stream. */ -typedef union -{ - MMAL_AUDIO_FORMAT_T audio; /**< Audio specific information */ - MMAL_VIDEO_FORMAT_T video; /**< Video specific information */ - MMAL_SUBPICTURE_FORMAT_T subpicture; /**< Subpicture specific information */ -} MMAL_ES_SPECIFIC_FORMAT_T; - -/** \name Elementary stream flags - * \anchor elementarystreamflags - * The following flags describe properties of an elementary stream */ -/* @{ */ -#define MMAL_ES_FORMAT_FLAG_FRAMED 0x1 /**< The elementary stream will already be framed */ -/* @} */ - -/** \name Undefined encoding value. - * This value indicates an unknown encoding - */ -/* @{ */ -#define MMAL_ENCODING_UNKNOWN 0 -/* @} */ - -/** \name Default encoding variant value. - * This value indicates the default encoding variant is used - */ -/* @{ */ -#define MMAL_ENCODING_VARIANT_DEFAULT 0 -/* @} */ - -/** Definition of an elementary stream format */ -typedef struct MMAL_ES_FORMAT_T -{ - MMAL_ES_TYPE_T type; /**< Type of the elementary stream */ - - MMAL_FOURCC_T encoding; /**< FourCC specifying the encoding of the elementary stream. - * See the \ref MmalEncodings "pre-defined encodings" for some - * examples. - */ - MMAL_FOURCC_T encoding_variant;/**< FourCC specifying the specific encoding variant of - * the elementary stream. See the \ref MmalEncodingVariants - * "pre-defined encoding variants" for some examples. - */ - - MMAL_ES_SPECIFIC_FORMAT_T *es; /**< Type specific information for the elementary stream */ - - uint32_t bitrate; /**< Bitrate in bits per second */ - uint32_t flags; /**< Flags describing properties of the elementary stream. - * See \ref elementarystreamflags "Elementary stream flags". - */ - - uint32_t extradata_size; /**< Size of the codec specific data */ - uint8_t *extradata; /**< Codec specific data */ - -} MMAL_ES_FORMAT_T; - -/** Allocate and initialise a \ref MMAL_ES_FORMAT_T structure. - * - * @return a \ref MMAL_ES_FORMAT_T structure - */ -MMAL_ES_FORMAT_T *mmal_format_alloc(void); - -/** Free a \ref MMAL_ES_FORMAT_T structure allocated by \ref mmal_format_alloc. - * - * @param format the \ref MMAL_ES_FORMAT_T structure to free - */ -void mmal_format_free(MMAL_ES_FORMAT_T *format); - -/** Allocate the extradata buffer in \ref MMAL_ES_FORMAT_T. - * This buffer will be freed automatically when the format is destroyed or - * another allocation is done. - * - * @param format format structure for which the extradata buffer will be allocated - * @param size size of the extradata buffer to allocate - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_format_extradata_alloc(MMAL_ES_FORMAT_T *format, unsigned int size); - -/** Shallow copy a format structure. - * It is worth noting that the extradata buffer will not be copied in the new format. - * - * @param format_dest destination \ref MMAL_ES_FORMAT_T for the copy - * @param format_src source \ref MMAL_ES_FORMAT_T for the copy - */ -void mmal_format_copy(MMAL_ES_FORMAT_T *format_dest, MMAL_ES_FORMAT_T *format_src); - -/** Fully copy a format structure, including the extradata buffer. - * - * @param format_dest destination \ref MMAL_ES_FORMAT_T for the copy - * @param format_src source \ref MMAL_ES_FORMAT_T for the copy - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_format_full_copy(MMAL_ES_FORMAT_T *format_dest, MMAL_ES_FORMAT_T *format_src); - -/** \name Comparison flags - * \anchor comparisonflags - * The following flags describe the differences between 2 format structures */ -/* @{ */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_TYPE 0x01 /**< The type is different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_ENCODING 0x02 /**< The encoding is different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_BITRATE 0x04 /**< The bitrate is different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_FLAGS 0x08 /**< The flags are different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_EXTRADATA 0x10 /**< The extradata is different */ - -#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_RESOLUTION 0x0100 /**< The video resolution is different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_CROPPING 0x0200 /**< The video cropping is different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_FRAME_RATE 0x0400 /**< The video frame rate is different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_ASPECT_RATIO 0x0800 /**< The video aspect ratio is different */ -#define MMAL_ES_FORMAT_COMPARE_FLAG_VIDEO_COLOR_SPACE 0x1000 /**< The video color space is different */ - -#define MMAL_ES_FORMAT_COMPARE_FLAG_ES_OTHER 0x10000000 /**< Other ES specific parameters are different */ -/* @} */ - -/** Compare 2 format structures and returns a set of flags describing the differences. - * The result will be zero if the structures are the same, or a combination of - * one or more of the \ref comparisonflags "Comparison flags" if different. - * - * @param format_1 first \ref MMAL_ES_FORMAT_T to compare - * @param format_2 second \ref MMAL_ES_FORMAT_T to compare - * @return set of flags describing the differences - */ -uint32_t mmal_format_compare(MMAL_ES_FORMAT_T *format_1, MMAL_ES_FORMAT_T *format_2); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_FORMAT_H */ diff --git a/vc/include/interface/mmal/mmal_logging.h b/vc/include/interface/mmal/mmal_logging.h @@ -1,71 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_LOGGING_H -#define MMAL_LOGGING_H - -#include "mmal_common.h" -#include "interface/vcos/vcos_logging.h" - -#ifndef VCOS_LOG_CATEGORY -#define VCOS_LOG_CATEGORY (&mmal_log_category) -extern VCOS_LOG_CAT_T mmal_log_category; -#endif - -#if defined(__GNUC__) && (( __GNUC__ > 2 ) || (( __GNUC__ == 2 ) && ( __GNUC_MINOR__ >= 3 ))) -#define mmal_log_error(s, ...) vcos_log_error("%s: " s, VCOS_FUNCTION, ## __VA_ARGS__) -#define mmal_log_info(s, ...) vcos_log_info("%s: " s, VCOS_FUNCTION, ## __VA_ARGS__) -#define mmal_log_warn(s, ...) vcos_log_warn("%s: " s, VCOS_FUNCTION, ## __VA_ARGS__) -#define mmal_log_debug(s, ...) vcos_log_info("%s: " s, VCOS_FUNCTION, ## __VA_ARGS__) -#define mmal_log_trace(s, ...) vcos_log_trace("%s: " s, VCOS_FUNCTION, ## __VA_ARGS__) -#elif defined(_MSC_VER) -#define mmal_log_error(s, ...) vcos_log_error("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_info(s, ...) vcos_log_info("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_warn(s, ...) vcos_log_warn("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_debug(s, ...) vcos_log_info("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_trace(s, ...) vcos_log_trace("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#else -#define mmal_log_error_fun(s, ...) vcos_log_error("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_info_fun(s, ...) vcos_log_info("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_warn_fun(s, ...) vcos_log_warn("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_debug_fun(s, ...) vcos_log_info("%s: " s, VCOS_FUNCTION, __VA_ARGS__) -#define mmal_log_trace_fun(s, ...) vcos_log_trace("%s: " s, VCOS_FUNCTION, __VA_ARGS__) - -#define mmal_log_error(s...) mmal_log_error_fun(s, 0) -#define mmal_log_info(s...) mmal_log_info_fun(s, 0) -#define mmal_log_warn(s...) mmal_log_warn_fun(s, 0) -#define mmal_log_debug(s...) mmal_log_debug_fun(s, 0) -#define mmal_log_trace(s...) mmal_log_trace_fun(s, 0) -#endif - -#define LOG_ERROR mmal_log_error -#define LOG_INFO mmal_log_info -#define LOG_WARN mmal_log_warn -#define LOG_DEBUG mmal_log_debug -#define LOG_TRACE mmal_log_trace - -#endif /* MMAL_LOGGING_H */ diff --git a/vc/include/interface/mmal/mmal_metadata.h b/vc/include/interface/mmal/mmal_metadata.h @@ -1,84 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_METADATA_H -#define MMAL_METADATA_H - -#include "mmal_common.h" - -/** \defgroup MmalMetadata List of pre-defined metadata types - * This defines a list of standard metadata types. Components can still define proprietary - * metadata types by using their own FourCC and defining their own metadata structures. */ -/* @{ */ - -/** \name Pre-defined metadata FourCCs */ -/* @{ */ -#define MMAL_METADATA_HELLO_WORLD MMAL_FOURCC('H','E','L','O') -/* @} */ - -/** Generic metadata type. All metadata structures need to begin with these fields. */ -typedef struct MMAL_METATDATA_T -{ - uint32_t id; /**< Metadata id. This is a FourCC */ - uint32_t size; /**< Size in bytes of the following metadata (not including id and size) */ -} MMAL_METADATA_T; - -/** Hello World metadata. */ -typedef struct MMAL_METATDATA_HELLO_WORLD_T -{ - uint32_t id; /**< Metadata id. This is a FourCC */ - uint32_t size; /**< Size in bytes of the following metadata (not including id and size) */ - - uint32_t myvalue; /**< Metadata value */ -} MMAL_METADATA_HELLO_WORLD_T; - -/** Get metadata item from buffer header. - * This will search through all the metadata in the buffer header and return a pointer to the - * first instance of the requested metadata id. - * - * @param header buffer header containing the metadata - * @param id requested metadata id - * - * @return Pointer to metadata requested or NULL if not found. - */ -MMAL_METADATA_T *mmal_metadata_get(MMAL_BUFFER_HEADER_T *header, uint32_t id); - -/** Set metadata item in buffer header. - * This will store the metadata item into the buffer header. This operation can fail if not - * enough memory is available in the data section of the buffer header. - * - * @param header buffer header to store the metadata into - * @param metadata metadata item to store in buffer header - * - * @return MMAL_SUCCESS on success or MMAL_ENOMEM if not enough memory is available for storing - * the metadata - */ -MMAL_STATUS_T mmal_metadata_set(MMAL_BUFFER_HEADER_T *header, MMAL_METADATA_T *metadata); - -/* @} */ - -#endif /* MMAL_METADATA_H */ diff --git a/vc/include/interface/mmal/mmal_parameters.h b/vc/include/interface/mmal/mmal_parameters.h @@ -1,194 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_PARAMETERS_H -#define MMAL_PARAMETERS_H - -#include "mmal_common.h" -#include "mmal_parameters_camera.h" -#include "mmal_parameters_video.h" -#include "mmal_parameters_audio.h" -#include "mmal_parameters_clock.h" - -/** \defgroup MmalParameters List of pre-defined parameters - * This defines a list of standard parameters. Components can define proprietary - * parameters by creating a new group and defining their own structures. */ -/* @{ */ - -/** Generic unsigned 64-bit integer parameter type. */ -typedef struct MMAL_PARAMETER_UINT64_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint64_t value; /**< Parameter value */ -} MMAL_PARAMETER_UINT64_T; - -/** Generic signed 64-bit integer parameter type. */ -typedef struct MMAL_PARAMETER_INT64_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - int64_t value; /**< Parameter value */ -} MMAL_PARAMETER_INT64_T; - -/** Generic unsigned 32-bit integer parameter type. */ -typedef struct MMAL_PARAMETER_UINT32_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t value; /**< Parameter value */ -} MMAL_PARAMETER_UINT32_T; - -/** Generic signed 32-bit integer parameter type. */ -typedef struct MMAL_PARAMETER_INT32_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - int32_t value; /**< Parameter value */ -} MMAL_PARAMETER_INT32_T; - -/** Generic rational parameter type. */ -typedef struct MMAL_PARAMETER_RATIONAL_T { - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_RATIONAL_T value; /**< Parameter value */ -} MMAL_PARAMETER_RATIONAL_T; - -/** Generic boolean parameter type. */ -typedef struct MMAL_PARAMETER_BOOLEAN_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_BOOL_T enable; /**< Parameter value */ -} MMAL_PARAMETER_BOOLEAN_T; - -/** Generic string parameter type. */ -typedef struct MMAL_PARAMETER_STRING_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - char str[1]; /**< Null-terminated string */ -} MMAL_PARAMETER_STRING_T; - -/** Generic array of bytes parameter type. */ -typedef struct MMAL_PARAMETER_BYTES_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint8_t data[1]; /**< Array of bytes */ -} MMAL_PARAMETER_BYTES_T; - -/** The value 1 in 16.16 fixed point form */ -#define MMAL_FIXED_16_16_ONE (1 << 16) - -/** Generic two-dimensional scaling factor type. */ -typedef struct MMAL_PARAMETER_SCALEFACTOR_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_FIXED_16_16_T scale_x; /**< Scaling factor in X-axis */ - MMAL_FIXED_16_16_T scale_y; /**< Scaling factor in Y-axis */ -} MMAL_PARAMETER_SCALEFACTOR_T; - -/** Valid mirror modes */ -typedef enum MMAL_PARAM_MIRROR_T -{ - MMAL_PARAM_MIRROR_NONE, - MMAL_PARAM_MIRROR_VERTICAL, - MMAL_PARAM_MIRROR_HORIZONTAL, - MMAL_PARAM_MIRROR_BOTH, -} MMAL_PARAM_MIRROR_T; - -/** Generic mirror parameter type */ -typedef struct MMAL_PARAMETER_MIRROR_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_MIRROR_T value; /**< Mirror mode */ -} MMAL_PARAMETER_MIRROR_T; - -/** URI parameter type. - * The parameter may hold an arbitrary length, nul-terminated string as long - * as the size is set appropriately. - */ -typedef struct MMAL_PARAMETER_URI_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - char uri[1]; /**< URI string (null-terminated) */ -} MMAL_PARAMETER_URI_T; - -/** Generic encoding parameter type. - * The parameter may hold more than one encoding by overriding the size to - * include a bigger array. - */ -typedef struct MMAL_PARAMETER_ENCODING_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t encoding[1]; /**< Array of FourCC encodings, see \ref MmalEncodings */ -} MMAL_PARAMETER_ENCODING_T; - -/** Generic frame-rate parameter type. - * Frame rates are specified as a rational number, using a pair of integers. - * Since there can be many valid pairs for the same ratio, a frame-rate may - * not contain exactly the same pairs of values when read back as it was - * when set. - */ -typedef struct MMAL_PARAMETER_FRAME_RATE_T { - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_RATIONAL_T frame_rate; /**< Frame-rate value */ -} MMAL_PARAMETER_FRAME_RATE_T; - -/** Generic configuration-file setup type. - * Configuration files are transferred in small chunks. The component can - * save all the chunks into a buffer, then process the entire file later. - * This parameter initialises a config file to have the given size. - */ -typedef struct MMAL_PARAMETER_CONFIGFILE_T { - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t file_size; /**< Size of complete file data */ -} MMAL_PARAMETER_CONFIGFILE_T; - -/** Generic configuration-file chunk data type. - * Once a config file has been initialised, this parameter can be used to - * write an arbitrary chunk of the file data (limited by the maximum MMAL - * message size). - */ -typedef struct MMAL_PARAMETER_CONFIGFILE_CHUNK_T { - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t size; /**< Number of bytes being transferred in this chunk */ - uint32_t offset; /**< Offset of this chunk in the file */ - char data[1]; /**< Chunk data */ -} MMAL_PARAMETER_CONFIGFILE_CHUNK_T; - -/* @} */ - -#endif /* MMAL_PARAMETERS_H */ diff --git a/vc/include/interface/mmal/mmal_parameters_audio.h b/vc/include/interface/mmal/mmal_parameters_audio.h @@ -1,66 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_PARAMETERS_AUDIO_H -#define MMAL_PARAMETERS_AUDIO_H - -#include "mmal_parameters_common.h" - -/************************************************* - * ALWAYS ADD NEW ENUMS AT THE END OF THIS LIST! * - ************************************************/ - -/** Audio-specific MMAL parameter IDs. - * @ingroup MMAL_PARAMETER_IDS - */ -enum -{ - MMAL_PARAMETER_AUDIO_DESTINATION /**< Takes a MMAL_PARAMETER_STRING_T */ - = MMAL_PARAMETER_GROUP_AUDIO, - MMAL_PARAMETER_AUDIO_LATENCY_TARGET, /**< Takes a MMAL_PARAMETER_AUDIO_LATENCY_TARGET_T */ - MMAL_PARAMETER_AUDIO_SOURCE, - MMAL_PARAMETER_AUDIO_PASSTHROUGH, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ -}; - -/** Audio latency target to maintain. - * These settings are used to adjust the clock speed in order - * to match the measured audio latency to a specified value. */ -typedef struct MMAL_PARAMETER_AUDIO_LATENCY_TARGET_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_BOOL_T enable; /**< whether this mode is enabled */ - uint32_t filter; /**< number of latency samples to filter on, good value: 1 */ - uint32_t target; /**< target latency (microseconds) */ - uint32_t shift; /**< shift for storing latency values, good value: 7 */ - int32_t speed_factor; /**< multiplier for speed changes, in 24.8 format, good value: 256-512 */ - int32_t inter_factor; /**< divider for comparing latency versus gradiant, good value: 300 */ - int32_t adj_cap; /**< limit for speed change before nSpeedFactor is applied, good value: 100 */ -} MMAL_PARAMETER_AUDIO_LATENCY_TARGET_T; - -#endif /* MMAL_PARAMETERS_AUDIO_H */ - diff --git a/vc/include/interface/mmal/mmal_parameters_camera.h b/vc/include/interface/mmal/mmal_parameters_camera.h @@ -1,889 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -Copyright (c) 2011 Broadcom Europe Limited. -All rights reserved. -=============================================================================*/ -/** \file - * Multi-Media Abstraction Layer - Definition of some standard parameters. - */ - -#ifndef MMAL_PARAMETERS_CAMERA_H -#define MMAL_PARAMETERS_CAMERA_H - -#include "mmal_parameters_common.h" - -/************************************************* - * ALWAYS ADD NEW ENUMS AT THE END OF THIS LIST! * - ************************************************/ - -/** Camera-specific MMAL parameter IDs. - * @ingroup MMAL_PARAMETER_IDS - */ -enum { - /* 0 */ - MMAL_PARAMETER_THUMBNAIL_CONFIGURATION /**< Takes a @ref MMAL_PARAMETER_THUMBNAIL_CONFIG_T */ - = MMAL_PARAMETER_GROUP_CAMERA, - MMAL_PARAMETER_CAPTURE_QUALITY, /**< Unused? */ - MMAL_PARAMETER_ROTATION, /**< Takes a @ref MMAL_PARAMETER_INT32_T */ - MMAL_PARAMETER_EXIF_DISABLE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_EXIF, /**< Takes a @ref MMAL_PARAMETER_EXIF_T */ - MMAL_PARAMETER_AWB_MODE, /**< Takes a @ref MMAL_PARAM_AWBMODE_T */ - MMAL_PARAMETER_IMAGE_EFFECT, /**< Takes a @ref MMAL_PARAMETER_IMAGEFX_T */ - MMAL_PARAMETER_COLOUR_EFFECT, /**< Takes a @ref MMAL_PARAMETER_COLOURFX_T */ - MMAL_PARAMETER_FLICKER_AVOID, /**< Takes a @ref MMAL_PARAMETER_FLICKERAVOID_T */ - MMAL_PARAMETER_FLASH, /**< Takes a @ref MMAL_PARAMETER_FLASH_T */ - MMAL_PARAMETER_REDEYE, /**< Takes a @ref MMAL_PARAMETER_REDEYE_T */ - MMAL_PARAMETER_FOCUS, /**< Takes a @ref MMAL_PARAMETER_FOCUS_T */ - MMAL_PARAMETER_FOCAL_LENGTHS, /**< Unused? */ - MMAL_PARAMETER_EXPOSURE_COMP, /**< Takes a @ref MMAL_PARAMETER_INT32_T or MMAL_PARAMETER_RATIONAL_T */ - MMAL_PARAMETER_ZOOM, /**< Takes a @ref MMAL_PARAMETER_SCALEFACTOR_T */ - MMAL_PARAMETER_MIRROR, /**< Takes a @ref MMAL_PARAMETER_MIRROR_T */ - - /* 0x10 */ - MMAL_PARAMETER_CAMERA_NUM, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_CAPTURE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_EXPOSURE_MODE, /**< Takes a @ref MMAL_PARAMETER_EXPOSUREMODE_T */ - MMAL_PARAMETER_EXP_METERING_MODE, /**< Takes a @ref MMAL_PARAMETER_EXPOSUREMETERINGMODE_T */ - MMAL_PARAMETER_FOCUS_STATUS, /**< Takes a @ref MMAL_PARAMETER_FOCUS_STATUS_T */ - MMAL_PARAMETER_CAMERA_CONFIG, /**< Takes a @ref MMAL_PARAMETER_CAMERA_CONFIG_T */ - MMAL_PARAMETER_CAPTURE_STATUS, /**< Takes a @ref MMAL_PARAMETER_CAPTURE_STATUS_T */ - MMAL_PARAMETER_FACE_TRACK, /**< Takes a @ref MMAL_PARAMETER_FACE_TRACK_T */ - MMAL_PARAMETER_DRAW_BOX_FACES_AND_FOCUS, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_JPEG_Q_FACTOR, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_FRAME_RATE, /**< Takes a @ref MMAL_PARAMETER_FRAME_RATE_T */ - MMAL_PARAMETER_USE_STC, /**< Takes a @ref MMAL_PARAMETER_CAMERA_STC_MODE_T */ - MMAL_PARAMETER_CAMERA_INFO, /**< Takes a @ref MMAL_PARAMETER_CAMERA_INFO_T */ - MMAL_PARAMETER_VIDEO_STABILISATION, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_FACE_TRACK_RESULTS, /**< Takes a @ref MMAL_PARAMETER_FACE_TRACK_RESULTS_T */ - MMAL_PARAMETER_ENABLE_RAW_CAPTURE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - - /* 0x20 */ - MMAL_PARAMETER_DPF_FILE, /**< Takes a @ref MMAL_PARAMETER_URI_T */ - MMAL_PARAMETER_ENABLE_DPF_FILE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_DPF_FAIL_IS_FATAL, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_CAPTURE_MODE, /**< Takes a @ref MMAL_PARAMETER_CAPTUREMODE_T */ - MMAL_PARAMETER_FOCUS_REGIONS, /**< Takes a @ref MMAL_PARAMETER_FOCUS_REGIONS_T */ - MMAL_PARAMETER_INPUT_CROP, /**< Takes a @ref MMAL_PARAMETER_INPUT_CROP_T */ - MMAL_PARAMETER_SENSOR_INFORMATION, /**< Takes a @ref MMAL_PARAMETER_SENSOR_INFORMATION_T */ - MMAL_PARAMETER_FLASH_SELECT, /**< Takes a @ref MMAL_PARAMETER_FLASH_SELECT_T */ - MMAL_PARAMETER_FIELD_OF_VIEW, /**< Takes a @ref MMAL_PARAMETER_FIELD_OF_VIEW_T */ - MMAL_PARAMETER_HIGH_DYNAMIC_RANGE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_DYNAMIC_RANGE_COMPRESSION, /**< Takes a @ref MMAL_PARAMETER_DRC_T */ - MMAL_PARAMETER_ALGORITHM_CONTROL, /**< Takes a @ref MMAL_PARAMETER_ALGORITHM_CONTROL_T */ - MMAL_PARAMETER_SHARPNESS, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */ - MMAL_PARAMETER_CONTRAST, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */ - MMAL_PARAMETER_BRIGHTNESS, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */ - MMAL_PARAMETER_SATURATION, /**< Takes a @ref MMAL_PARAMETER_RATIONAL_T */ - - /* 0x30 */ - MMAL_PARAMETER_ISO, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_ANTISHAKE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_IMAGE_EFFECT_PARAMETERS, /**< Takes a @ref MMAL_PARAMETER_IMAGEFX_PARAMETERS_T */ - MMAL_PARAMETER_CAMERA_BURST_CAPTURE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_CAMERA_MIN_ISO, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_CAMERA_USE_CASE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_USE_CASE_T */ - MMAL_PARAMETER_CAPTURE_STATS_PASS, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_CAMERA_CUSTOM_SENSOR_CONFIG, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_ENABLE_REGISTER_FILE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_REGISTER_FAIL_IS_FATAL, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_CONFIGFILE_REGISTERS, /**< Takes a @ref MMAL_PARAMETER_CONFIGFILE_T */ - MMAL_PARAMETER_CONFIGFILE_CHUNK_REGISTERS,/**< Takes a @ref MMAL_PARAMETER_CONFIGFILE_CHUNK_T */ - MMAL_PARAMETER_JPEG_ATTACH_LOG, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_ZERO_SHUTTER_LAG, /**< Takes a @ref MMAL_PARAMETER_ZEROSHUTTERLAG_T */ - MMAL_PARAMETER_FPS_RANGE, /**< Takes a @ref MMAL_PARAMETER_FPS_RANGE_T */ - MMAL_PARAMETER_CAPTURE_EXPOSURE_COMP, /**< Takes a @ref MMAL_PARAMETER_INT32_T */ - - /* 0x40 */ - MMAL_PARAMETER_SW_SHARPEN_DISABLE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_FLASH_REQUIRED, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_SW_SATURATION_DISABLE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_SHUTTER_SPEED, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_CUSTOM_AWB_GAINS, /**< Takes a @ref MMAL_PARAMETER_AWB_GAINS_T */ - MMAL_PARAMETER_CAMERA_SETTINGS, /**< Takes a @ref MMAL_PARAMETER_CAMERA_SETTINGS_T */ - MMAL_PARAMETER_PRIVACY_INDICATOR, /**< Takes a @ref MMAL_PARAMETER_PRIVACY_INDICATOR_T */ - MMAL_PARAMETER_VIDEO_DENOISE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_STILLS_DENOISE, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_ANNOTATE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_ANNOTATE_T */ - MMAL_PARAMETER_STEREOSCOPIC_MODE, /**< Takes a @ref MMAL_PARAMETER_STEREOSCOPIC_MODE_T */ - MMAL_PARAMETER_CAMERA_INTERFACE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_INTERFACE_T */ - MMAL_PARAMETER_CAMERA_CLOCKING_MODE, /**< Takes a @ref MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T */ - MMAL_PARAMETER_CAMERA_RX_CONFIG, /**< Takes a @ref MMAL_PARAMETER_CAMERA_RX_CONFIG_T */ - MMAL_PARAMETER_CAMERA_RX_TIMING, /**< Takes a @ref MMAL_PARAMETER_CAMERA_RX_TIMING_T */ -}; - -/** Thumbnail configuration parameter type */ -typedef struct MMAL_PARAMETER_THUMBNAIL_CONFIG_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t enable; /**< Enable generation of thumbnails during still capture */ - uint32_t width; /**< Desired width of the thumbnail */ - uint32_t height; /**< Desired height of the thumbnail */ - uint32_t quality; /**< Desired compression quality of the thumbnail */ -} MMAL_PARAMETER_THUMBNAIL_CONFIG_T; - -/** EXIF parameter type. */ -typedef struct MMAL_PARAMETER_EXIF_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t keylen; /**< If 0, assume key is terminated by '=', otherwise length of key and treat data as binary */ - uint32_t value_offset; /**< Offset within data buffer of the start of the value. If 0, look for a "key=value" string */ - uint32_t valuelen; /**< If 0, assume value is null-terminated, otherwise length of value and treat data as binary */ - uint8_t data[1]; /**< EXIF key/value string. Variable length */ -} MMAL_PARAMETER_EXIF_T; - -/** Exposure modes. */ -typedef enum -{ - MMAL_PARAM_EXPOSUREMODE_OFF, - MMAL_PARAM_EXPOSUREMODE_AUTO, - MMAL_PARAM_EXPOSUREMODE_NIGHT, - MMAL_PARAM_EXPOSUREMODE_NIGHTPREVIEW, - MMAL_PARAM_EXPOSUREMODE_BACKLIGHT, - MMAL_PARAM_EXPOSUREMODE_SPOTLIGHT, - MMAL_PARAM_EXPOSUREMODE_SPORTS, - MMAL_PARAM_EXPOSUREMODE_SNOW, - MMAL_PARAM_EXPOSUREMODE_BEACH, - MMAL_PARAM_EXPOSUREMODE_VERYLONG, - MMAL_PARAM_EXPOSUREMODE_FIXEDFPS, - MMAL_PARAM_EXPOSUREMODE_ANTISHAKE, - MMAL_PARAM_EXPOSUREMODE_FIREWORKS, - MMAL_PARAM_EXPOSUREMODE_MAX = 0x7fffffff -} MMAL_PARAM_EXPOSUREMODE_T; - -typedef struct MMAL_PARAMETER_EXPOSUREMODE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_EXPOSUREMODE_T value; /**< exposure mode */ -} MMAL_PARAMETER_EXPOSUREMODE_T; - -typedef enum -{ - MMAL_PARAM_EXPOSUREMETERINGMODE_AVERAGE, - MMAL_PARAM_EXPOSUREMETERINGMODE_SPOT, - MMAL_PARAM_EXPOSUREMETERINGMODE_BACKLIT, - MMAL_PARAM_EXPOSUREMETERINGMODE_MATRIX, - MMAL_PARAM_EXPOSUREMETERINGMODE_MAX = 0x7fffffff -} MMAL_PARAM_EXPOSUREMETERINGMODE_T; - -typedef struct MMAL_PARAMETER_EXPOSUREMETERINGMODE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_EXPOSUREMETERINGMODE_T value; /**< metering mode */ -} MMAL_PARAMETER_EXPOSUREMETERINGMODE_T; - -/** AWB parameter modes. */ -typedef enum MMAL_PARAM_AWBMODE_T -{ - MMAL_PARAM_AWBMODE_OFF, - MMAL_PARAM_AWBMODE_AUTO, - MMAL_PARAM_AWBMODE_SUNLIGHT, - MMAL_PARAM_AWBMODE_CLOUDY, - MMAL_PARAM_AWBMODE_SHADE, - MMAL_PARAM_AWBMODE_TUNGSTEN, - MMAL_PARAM_AWBMODE_FLUORESCENT, - MMAL_PARAM_AWBMODE_INCANDESCENT, - MMAL_PARAM_AWBMODE_FLASH, - MMAL_PARAM_AWBMODE_HORIZON, - MMAL_PARAM_AWBMODE_MAX = 0x7fffffff -} MMAL_PARAM_AWBMODE_T; - -/** AWB parameter type. */ -typedef struct MMAL_PARAMETER_AWBMODE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_AWBMODE_T value; /**< AWB mode */ -} MMAL_PARAMETER_AWBMODE_T; - -/** Image effect */ -typedef enum MMAL_PARAM_IMAGEFX_T -{ - MMAL_PARAM_IMAGEFX_NONE, - MMAL_PARAM_IMAGEFX_NEGATIVE, - MMAL_PARAM_IMAGEFX_SOLARIZE, - MMAL_PARAM_IMAGEFX_POSTERIZE, - MMAL_PARAM_IMAGEFX_WHITEBOARD, - MMAL_PARAM_IMAGEFX_BLACKBOARD, - MMAL_PARAM_IMAGEFX_SKETCH, - MMAL_PARAM_IMAGEFX_DENOISE, - MMAL_PARAM_IMAGEFX_EMBOSS, - MMAL_PARAM_IMAGEFX_OILPAINT, - MMAL_PARAM_IMAGEFX_HATCH, - MMAL_PARAM_IMAGEFX_GPEN, - MMAL_PARAM_IMAGEFX_PASTEL, - MMAL_PARAM_IMAGEFX_WATERCOLOUR, - MMAL_PARAM_IMAGEFX_FILM, - MMAL_PARAM_IMAGEFX_BLUR, - MMAL_PARAM_IMAGEFX_SATURATION, - MMAL_PARAM_IMAGEFX_COLOURSWAP, - MMAL_PARAM_IMAGEFX_WASHEDOUT, - MMAL_PARAM_IMAGEFX_POSTERISE, - MMAL_PARAM_IMAGEFX_COLOURPOINT, - MMAL_PARAM_IMAGEFX_COLOURBALANCE, - MMAL_PARAM_IMAGEFX_CARTOON, - MMAL_PARAM_IMAGEFX_DEINTERLACE_DOUBLE, - MMAL_PARAM_IMAGEFX_DEINTERLACE_ADV, - MMAL_PARAM_IMAGEFX_DEINTERLACE_FAST, - MMAL_PARAM_IMAGEFX_MAX = 0x7fffffff -} MMAL_PARAM_IMAGEFX_T; - -typedef struct MMAL_PARAMETER_IMAGEFX_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_IMAGEFX_T value; /**< Image effect mode */ -} MMAL_PARAMETER_IMAGEFX_T; - -#define MMAL_MAX_IMAGEFX_PARAMETERS 6 /* Image effects library currently uses a maximum of 5 parameters per effect */ - -typedef struct MMAL_PARAMETER_IMAGEFX_PARAMETERS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_IMAGEFX_T effect; /**< Image effect mode */ - uint32_t num_effect_params; /**< Number of used elements in */ - uint32_t effect_parameter[MMAL_MAX_IMAGEFX_PARAMETERS]; /**< Array of parameters */ -} MMAL_PARAMETER_IMAGEFX_PARAMETERS_T; - -/** Colour effect parameter type*/ -typedef struct MMAL_PARAMETER_COLOURFX_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - int32_t enable; - uint32_t u; - uint32_t v; -} MMAL_PARAMETER_COLOURFX_T; - -typedef enum MMAL_CAMERA_STC_MODE_T -{ - MMAL_PARAM_STC_MODE_OFF, /**< Frames do not have STCs, as needed in OpenMAX/IL */ - MMAL_PARAM_STC_MODE_RAW, /**< Use raw clock STC, needed for true pause/resume support */ - MMAL_PARAM_STC_MODE_COOKED, /**< Start the STC from the start of capture, only for quick demo code */ - MMAL_PARAM_STC_MODE_MAX = 0x7fffffff -} MMAL_CAMERA_STC_MODE_T; - -typedef struct MMAL_PARAMETER_CAMERA_STC_MODE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_CAMERA_STC_MODE_T value; -} MMAL_PARAMETER_CAMERA_STC_MODE_T; - -typedef enum MMAL_PARAM_FLICKERAVOID_T -{ - MMAL_PARAM_FLICKERAVOID_OFF, - MMAL_PARAM_FLICKERAVOID_AUTO, - MMAL_PARAM_FLICKERAVOID_50HZ, - MMAL_PARAM_FLICKERAVOID_60HZ, - MMAL_PARAM_FLICKERAVOID_MAX = 0x7FFFFFFF -} MMAL_PARAM_FLICKERAVOID_T; - -typedef struct MMAL_PARAMETER_FLICKERAVOID_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_FLICKERAVOID_T value; /**< Flicker avoidance mode */ -} MMAL_PARAMETER_FLICKERAVOID_T; - -typedef enum MMAL_PARAM_FLASH_T -{ - MMAL_PARAM_FLASH_OFF, - MMAL_PARAM_FLASH_AUTO, - MMAL_PARAM_FLASH_ON, - MMAL_PARAM_FLASH_REDEYE, - MMAL_PARAM_FLASH_FILLIN, - MMAL_PARAM_FLASH_TORCH, - MMAL_PARAM_FLASH_MAX = 0x7FFFFFFF -} MMAL_PARAM_FLASH_T; - -typedef struct MMAL_PARAMETER_FLASH_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_FLASH_T value; /**< Flash mode */ -} MMAL_PARAMETER_FLASH_T; - -typedef enum MMAL_PARAM_REDEYE_T -{ - MMAL_PARAM_REDEYE_OFF, - MMAL_PARAM_REDEYE_ON, - MMAL_PARAM_REDEYE_SIMPLE, - MMAL_PARAM_REDEYE_MAX = 0x7FFFFFFF -} MMAL_PARAM_REDEYE_T; - -typedef struct MMAL_PARAMETER_REDEYE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_REDEYE_T value; /**< Red eye reduction mode */ -} MMAL_PARAMETER_REDEYE_T; - -typedef enum MMAL_PARAM_FOCUS_T -{ - MMAL_PARAM_FOCUS_AUTO, - MMAL_PARAM_FOCUS_AUTO_NEAR, - MMAL_PARAM_FOCUS_AUTO_MACRO, - MMAL_PARAM_FOCUS_CAF, - MMAL_PARAM_FOCUS_CAF_NEAR, - MMAL_PARAM_FOCUS_FIXED_INFINITY, - MMAL_PARAM_FOCUS_FIXED_HYPERFOCAL, - MMAL_PARAM_FOCUS_FIXED_NEAR, - MMAL_PARAM_FOCUS_FIXED_MACRO, - MMAL_PARAM_FOCUS_EDOF, - MMAL_PARAM_FOCUS_CAF_MACRO, - MMAL_PARAM_FOCUS_CAF_FAST, - MMAL_PARAM_FOCUS_CAF_NEAR_FAST, - MMAL_PARAM_FOCUS_CAF_MACRO_FAST, - MMAL_PARAM_FOCUS_FIXED_CURRENT, - MMAL_PARAM_FOCUS_MAX = 0x7FFFFFFF -} MMAL_PARAM_FOCUS_T; - -typedef struct MMAL_PARAMETER_FOCUS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_FOCUS_T value; /**< Focus mode */ -} MMAL_PARAMETER_FOCUS_T; - -typedef enum MMAL_PARAM_CAPTURE_STATUS_T -{ - MMAL_PARAM_CAPTURE_STATUS_NOT_CAPTURING, - MMAL_PARAM_CAPTURE_STATUS_CAPTURE_STARTED, - MMAL_PARAM_CAPTURE_STATUS_CAPTURE_ENDED, - - MMAL_PARAM_CAPTURE_STATUS_MAX = 0x7FFFFFFF -} MMAL_PARAM_CAPTURE_STATUS_T; - -typedef struct MMAL_PARAMETER_CAPTURE_STATUS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_CAPTURE_STATUS_T status; /**< Capture status */ -} MMAL_PARAMETER_CAPTURE_STATUS_T; - -typedef enum MMAL_PARAM_FOCUS_STATUS_T -{ - MMAL_PARAM_FOCUS_STATUS_OFF, - MMAL_PARAM_FOCUS_STATUS_REQUEST, - MMAL_PARAM_FOCUS_STATUS_REACHED, - MMAL_PARAM_FOCUS_STATUS_UNABLE_TO_REACH, - MMAL_PARAM_FOCUS_STATUS_LOST, - MMAL_PARAM_FOCUS_STATUS_CAF_MOVING, - MMAL_PARAM_FOCUS_STATUS_CAF_SUCCESS, - MMAL_PARAM_FOCUS_STATUS_CAF_FAILED, - MMAL_PARAM_FOCUS_STATUS_MANUAL_MOVING, - MMAL_PARAM_FOCUS_STATUS_MANUAL_REACHED, - MMAL_PARAM_FOCUS_STATUS_CAF_WATCHING, - MMAL_PARAM_FOCUS_STATUS_CAF_SCENE_CHANGED, - - MMAL_PARAM_FOCUS_STATUS_MAX = 0x7FFFFFFF -} MMAL_PARAM_FOCUS_STATUS_T; - -typedef struct MMAL_PARAMETER_FOCUS_STATUS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_FOCUS_STATUS_T status; /**< Focus status */ -} MMAL_PARAMETER_FOCUS_STATUS_T; - -typedef enum MMAL_PARAM_FACE_TRACK_MODE_T -{ - MMAL_PARAM_FACE_DETECT_NONE, /**< Disables face detection */ - MMAL_PARAM_FACE_DETECT_ON, /**< Enables face detection */ - MMAL_PARAM_FACE_DETECT_MAX = 0x7FFFFFFF -} MMAL_PARAM_FACE_TRACK_MODE_T; - -typedef struct MMAL_PARAMETER_FACE_TRACK_T /* face tracking control */ -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_PARAM_FACE_TRACK_MODE_T mode; - uint32_t maxRegions; - uint32_t frames; - uint32_t quality; -} MMAL_PARAMETER_FACE_TRACK_T; - -typedef struct MMAL_PARAMETER_FACE_TRACK_FACE_T /* face tracking face information */ -{ - int32_t face_id; /**< Face ID. Should remain the same whilst the face is detected to remain in the scene */ - int32_t score; /**< Confidence of the face detection. Range 1-100 (1=unsure, 100=positive). */ - MMAL_RECT_T face_rect; /**< Rectangle around the whole face */ - - MMAL_RECT_T eye_rect[2]; /**< Rectangle around the eyes ([0] = left eye, [1] = right eye) */ - MMAL_RECT_T mouth_rect; /**< Rectangle around the mouth */ -} MMAL_PARAMETER_FACE_TRACK_FACE_T; - -typedef struct MMAL_PARAMETER_FACE_TRACK_RESULTS_T /* face tracking results */ -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t num_faces; /**< Number of faces detected */ - uint32_t frame_width; /**< Width of the frame on which the faces were detected (allows scaling) */ - uint32_t frame_height; /**< Height of the frame on which the faces were detected (allows scaling) */ - - MMAL_PARAMETER_FACE_TRACK_FACE_T faces[1]; /**< Face information (variable length array */ -} MMAL_PARAMETER_FACE_TRACK_RESULTS_T; - -typedef enum MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T -{ - MMAL_PARAM_TIMESTAMP_MODE_ZERO, /**< Always timestamp frames as 0 */ - MMAL_PARAM_TIMESTAMP_MODE_RAW_STC, /**< Use the raw STC value for the frame timestamp */ - MMAL_PARAM_TIMESTAMP_MODE_RESET_STC, /**< Use the STC timestamp but subtract the timestamp - * of the first frame sent to give a zero based timestamp. - */ - MMAL_PARAM_TIMESTAMP_MODE_MAX = 0x7FFFFFFF -} MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T; - -typedef struct MMAL_PARAMETER_CAMERA_CONFIG_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - /* Parameters for setting up the image pools */ - uint32_t max_stills_w; /**< Max size of stills capture */ - uint32_t max_stills_h; - uint32_t stills_yuv422; /**< Allow YUV422 stills capture */ - uint32_t one_shot_stills; /**< Continuous or one shot stills captures. */ - - uint32_t max_preview_video_w; /**< Max size of the preview or video capture frames */ - uint32_t max_preview_video_h; - uint32_t num_preview_video_frames; - - uint32_t stills_capture_circular_buffer_height; /**< Sets the height of the circular buffer for stills capture. */ - - uint32_t fast_preview_resume; /**< Allows preview/encode to resume as fast as possible after the stills input frame - * has been received, and then processes the still frame in the background - * whilst preview/encode has resumed. - * Actual mode is controlled by MMAL_PARAMETER_CAPTURE_MODE. - */ - - MMAL_PARAMETER_CAMERA_CONFIG_TIMESTAMP_MODE_T use_stc_timestamp; - /**< Selects algorithm for timestamping frames if there is no clock component connected. - */ - - -} MMAL_PARAMETER_CAMERA_CONFIG_T; - -#define MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS 4 -#define MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES 2 - -typedef struct MMAL_PARAMETER_CAMERA_INFO_CAMERA_T -{ - uint32_t port_id; - uint32_t max_width; - uint32_t max_height; - MMAL_BOOL_T lens_present; -} MMAL_PARAMETER_CAMERA_INFO_CAMERA_T; - -typedef enum MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T -{ - MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_XENON = 0, /* Make values explicit */ - MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_LED = 1, /* to ensure they match */ - MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_OTHER = 2, /* values in config ini */ - MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_MAX = 0x7FFFFFFF -} MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T; - -typedef struct MMAL_PARAMETER_CAMERA_INFO_FLASH_T -{ - MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T flash_type; -} MMAL_PARAMETER_CAMERA_INFO_FLASH_T; - -typedef struct MMAL_PARAMETER_CAMERA_INFO_T -{ - MMAL_PARAMETER_HEADER_T hdr; - uint32_t num_cameras; - uint32_t num_flashes; - MMAL_PARAMETER_CAMERA_INFO_CAMERA_T cameras[MMAL_PARAMETER_CAMERA_INFO_MAX_CAMERAS]; - MMAL_PARAMETER_CAMERA_INFO_FLASH_T flashes[MMAL_PARAMETER_CAMERA_INFO_MAX_FLASHES]; -} MMAL_PARAMETER_CAMERA_INFO_T; - -typedef enum MMAL_PARAMETER_CAPTUREMODE_MODE_T -{ - MMAL_PARAM_CAPTUREMODE_WAIT_FOR_END, /**< Resumes preview once capture is completed. */ - MMAL_PARAM_CAPTUREMODE_WAIT_FOR_END_AND_HOLD, /**< Resumes preview once capture is completed, and hold the image for subsequent reprocessing. */ - MMAL_PARAM_CAPTUREMODE_RESUME_VF_IMMEDIATELY, /**< Resumes preview as soon as possible once capture frame is received from the sensor. - * Requires fast_preview_resume to be set via MMAL_PARAMETER_CAMERA_CONFIG. - */ -} MMAL_PARAMETER_CAPTUREMODE_MODE_T; - -/** Stills capture mode control. */ -typedef struct MMAL_PARAMETER_CAPTUREMODE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_PARAMETER_CAPTUREMODE_MODE_T mode; -} MMAL_PARAMETER_CAPTUREMODE_T; - -typedef enum MMAL_PARAMETER_FOCUS_REGION_TYPE_T -{ - MMAL_PARAMETER_FOCUS_REGION_TYPE_NORMAL, /**< Region defines a generic region */ - MMAL_PARAMETER_FOCUS_REGION_TYPE_FACE, /**< Region defines a face */ - MMAL_PARAMETER_FOCUS_REGION_TYPE_MAX -} MMAL_PARAMETER_FOCUS_REGION_TYPE_T; - -typedef struct MMAL_PARAMETER_FOCUS_REGION_T -{ - MMAL_RECT_T rect; /**< Focus rectangle as 0P16 fixed point values. */ - uint32_t weight; /**< Region weighting. */ - uint32_t mask; /**< Mask for multi-stage regions */ - MMAL_PARAMETER_FOCUS_REGION_TYPE_T type; /**< Region type */ -} MMAL_PARAMETER_FOCUS_REGION_T; - -typedef struct MMAL_PARAMETER_FOCUS_REGIONS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - uint32_t num_regions; /**< Number of regions defined */ - MMAL_BOOL_T lock_to_faces; /**< If region is within tolerance of a face, adopt face rect instead of defined region */ - MMAL_PARAMETER_FOCUS_REGION_T regions[1]; /**< Variable number of regions */ -} MMAL_PARAMETER_FOCUS_REGIONS_T; - -typedef struct MMAL_PARAMETER_INPUT_CROP_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_RECT_T rect; /**< Crop rectangle as 16P16 fixed point values */ -} MMAL_PARAMETER_INPUT_CROP_T; - -typedef struct MMAL_PARAMETER_SENSOR_INFORMATION_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_RATIONAL_T f_number; /**< Lens f-number */ - MMAL_RATIONAL_T focal_length; /**< Lens focal length */ - uint32_t model_id; /**< Sensor reported model id */ - uint32_t manufacturer_id; /**< Sensor reported manufacturer id */ - uint32_t revision; /**< Sensor reported revision */ -} MMAL_PARAMETER_SENSOR_INFORMATION_T; - -typedef struct MMAL_PARAMETER_FLASH_SELECT_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_PARAMETER_CAMERA_INFO_FLASH_TYPE_T flash_type; /**< Flash type to use */ -} MMAL_PARAMETER_FLASH_SELECT_T; - -typedef struct MMAL_PARAMETER_FIELD_OF_VIEW_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_RATIONAL_T fov_h; /**< Horizontal field of view */ - MMAL_RATIONAL_T fov_v; /**< Vertical field of view */ -} MMAL_PARAMETER_FIELD_OF_VIEW_T; - -typedef enum MMAL_PARAMETER_DRC_STRENGTH_T -{ - MMAL_PARAMETER_DRC_STRENGTH_OFF, - MMAL_PARAMETER_DRC_STRENGTH_LOW, - MMAL_PARAMETER_DRC_STRENGTH_MEDIUM, - MMAL_PARAMETER_DRC_STRENGTH_HIGH, - MMAL_PARAMETER_DRC_STRENGTH_MAX = 0x7fffffff -} MMAL_PARAMETER_DRC_STRENGTH_T; - -typedef struct MMAL_PARAMETER_DRC_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_PARAMETER_DRC_STRENGTH_T strength; /**< DRC strength */ -} MMAL_PARAMETER_DRC_T; - -typedef enum MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T -{ - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_FACETRACKING, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_REDEYE_REDUCTION, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_VIDEO_STABILISATION, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_WRITE_RAW, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_VIDEO_DENOISE, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_STILLS_DENOISE, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_TEMPORAL_DENOISE, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_ANTISHAKE, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_IMAGE_EFFECTS, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_DYNAMIC_RANGE_COMPRESSION, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_FACE_RECOGNITION, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_FACE_BEAUTIFICATION, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_SCENE_DETECTION, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_HIGH_DYNAMIC_RANGE, - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_MAX = 0x7fffffff -} MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T; - -typedef struct MMAL_PARAMETER_ALGORITHM_CONTROL_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_PARAMETER_ALGORITHM_CONTROL_ALGORITHMS_T algorithm; - MMAL_BOOL_T enabled; -} MMAL_PARAMETER_ALGORITHM_CONTROL_T; - - -typedef enum MMAL_PARAM_CAMERA_USE_CASE_T -{ - MMAL_PARAM_CAMERA_USE_CASE_UNKNOWN, /**< Compromise on behaviour as use case totally unknown */ - MMAL_PARAM_CAMERA_USE_CASE_STILLS_CAPTURE, /**< Stills capture use case */ - MMAL_PARAM_CAMERA_USE_CASE_VIDEO_CAPTURE, /**< Video encode (camcorder) use case */ - - MMAL_PARAM_CAMERA_USE_CASE_MAX = 0x7fffffff -} MMAL_PARAM_CAMERA_USE_CASE_T; - -typedef struct MMAL_PARAMETER_CAMERA_USE_CASE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_CAMERA_USE_CASE_T use_case; /**< Use case */ -} MMAL_PARAMETER_CAMERA_USE_CASE_T; - -typedef struct MMAL_PARAMETER_FPS_RANGE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_RATIONAL_T fps_low; /**< Low end of the permitted framerate range */ - MMAL_RATIONAL_T fps_high; /**< High end of the permitted framerate range */ -} MMAL_PARAMETER_FPS_RANGE_T; - -typedef struct MMAL_PARAMETER_ZEROSHUTTERLAG_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_BOOL_T zero_shutter_lag_mode; /**< Select zero shutter lag mode from sensor */ - MMAL_BOOL_T concurrent_capture; /**< Activate full zero shutter lag mode and - * use the last preview raw image for the stills capture - */ -} MMAL_PARAMETER_ZEROSHUTTERLAG_T; - -typedef struct MMAL_PARAMETER_AWB_GAINS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_RATIONAL_T r_gain; /**< Red gain */ - MMAL_RATIONAL_T b_gain; /**< Blue gain */ -} MMAL_PARAMETER_AWB_GAINS_T; - -typedef struct MMAL_PARAMETER_CAMERA_SETTINGS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t exposure; - MMAL_RATIONAL_T analog_gain; - MMAL_RATIONAL_T digital_gain; - MMAL_RATIONAL_T awb_red_gain; - MMAL_RATIONAL_T awb_blue_gain; - uint32_t focus_position; -} MMAL_PARAMETER_CAMERA_SETTINGS_T; - -typedef enum MMAL_PARAM_PRIVACY_INDICATOR_T -{ - MMAL_PARAMETER_PRIVACY_INDICATOR_OFF, /**< Indicator will be off. */ - MMAL_PARAMETER_PRIVACY_INDICATOR_ON, /**< Indicator will come on just after a stills capture and - * and remain on for 2seconds, or will be on whilst output[1] - * is actively producing images. - */ - MMAL_PARAMETER_PRIVACY_INDICATOR_FORCE_ON, /**< Turns indicator of for 2s independent of capture status. - * Set this mode repeatedly to keep the indicator on for a - * longer period. - */ - MMAL_PARAMETER_PRIVACY_INDICATOR_MAX = 0x7fffffff -} MMAL_PARAM_PRIVACY_INDICATOR_T; - -typedef struct MMAL_PARAMETER_PRIVACY_INDICATOR_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_PARAM_PRIVACY_INDICATOR_T mode; -} MMAL_PARAMETER_PRIVACY_INDICATOR_T; - -#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN 32 -typedef struct MMAL_PARAMETER_CAMERA_ANNOTATE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_BOOL_T enable; - char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN]; - MMAL_BOOL_T show_shutter; - MMAL_BOOL_T show_analog_gain; - MMAL_BOOL_T show_lens; - MMAL_BOOL_T show_caf; - MMAL_BOOL_T show_motion; -} MMAL_PARAMETER_CAMERA_ANNOTATE_T; - -#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2 256 -typedef struct MMAL_PARAMETER_CAMERA_ANNOTATE_V2_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_BOOL_T enable; - MMAL_BOOL_T show_shutter; - MMAL_BOOL_T show_analog_gain; - MMAL_BOOL_T show_lens; - MMAL_BOOL_T show_caf; - MMAL_BOOL_T show_motion; - MMAL_BOOL_T show_frame_num; - MMAL_BOOL_T black_text_background; - char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V2]; -} MMAL_PARAMETER_CAMERA_ANNOTATE_V2_T; - -#define MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3 256 -typedef struct MMAL_PARAMETER_CAMERA_ANNOTATE_V3_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_BOOL_T enable; - MMAL_BOOL_T show_shutter; - MMAL_BOOL_T show_analog_gain; - MMAL_BOOL_T show_lens; - MMAL_BOOL_T show_caf; - MMAL_BOOL_T show_motion; - MMAL_BOOL_T show_frame_num; - MMAL_BOOL_T enable_text_background; - MMAL_BOOL_T custom_background_colour; - uint8_t custom_background_Y; - uint8_t custom_background_U; - uint8_t custom_background_V; - uint8_t dummy1; - MMAL_BOOL_T custom_text_colour; - uint8_t custom_text_Y; - uint8_t custom_text_U; - uint8_t custom_text_V; - uint8_t text_size; - char text[MMAL_CAMERA_ANNOTATE_MAX_TEXT_LEN_V3]; -} MMAL_PARAMETER_CAMERA_ANNOTATE_V3_T; - -typedef enum MMAL_STEREOSCOPIC_MODE_T { - MMAL_STEREOSCOPIC_MODE_NONE = 0, - MMAL_STEREOSCOPIC_MODE_SIDE_BY_SIDE = 1, - MMAL_STEREOSCOPIC_MODE_TOP_BOTTOM = 2, - MMAL_STEREOSCOPIC_MODE_MAX = 0x7FFFFFFF, -} MMAL_STEREOSCOPIC_MODE_T; - -typedef struct MMAL_PARAMETER_STEREOSCOPIC_MODE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_STEREOSCOPIC_MODE_T mode; - MMAL_BOOL_T decimate; - MMAL_BOOL_T swap_eyes; -} MMAL_PARAMETER_STEREOSCOPIC_MODE_T; - -typedef enum MMAL_CAMERA_INTERFACE_T { - MMAL_CAMERA_INTERFACE_CSI2 = 0, - MMAL_CAMERA_INTERFACE_CCP2 = 1, - MMAL_CAMERA_INTERFACE_CPI = 2, - MMAL_CAMERA_INTERFACE_MAX = 0x7FFFFFFF, -} MMAL_CAMERA_INTERFACE_T; - -typedef struct MMAL_PARAMETER_CAMERA_INTERFACE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_CAMERA_INTERFACE_T mode; -} MMAL_PARAMETER_CAMERA_INTERFACE_T; - -typedef enum MMAL_CAMERA_CLOCKING_MODE_T { - MMAL_CAMERA_CLOCKING_MODE_STROBE = 0, - MMAL_CAMERA_CLOCKING_MODE_CLOCK = 1, - MMAL_CAMERA_CLOCKING_MODE_MAX = 0x7FFFFFFF, -} MMAL_CAMERA_CLOCKING_MODE_T; - -typedef struct MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_CAMERA_CLOCKING_MODE_T mode; -} MMAL_PARAMETER_CAMERA_CLOCKING_MODE_T; - -typedef enum MMAL_CAMERA_RX_CONFIG_DECODE { - MMAL_CAMERA_RX_CONFIG_DECODE_NONE = 0, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO10 = 1, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM7TO10 = 2, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM6TO10 = 3, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO12 = 4, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM7TO12 = 5, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM6TO12 = 6, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM10TO14 = 7, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO14 = 8, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM12TO16 = 9, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM10TO16 = 10, - MMAL_CAMERA_RX_CONFIG_DECODE_DPCM8TO16 = 11, - MMAL_CAMERA_RX_CONFIG_DECODE_MAX = 0x7FFFFFFF -} MMAL_CAMERA_RX_CONFIG_DECODE; - -typedef enum MMAL_CAMERA_RX_CONFIG_ENCODE { - MMAL_CAMERA_RX_CONFIG_ENCODE_NONE = 0, - MMAL_CAMERA_RX_CONFIG_ENCODE_DPCM10TO8 = 1, - MMAL_CAMERA_RX_CONFIG_ENCODE_DPCM12TO8 = 2, - MMAL_CAMERA_RX_CONFIG_ENCODE_DPCM14TO8 = 3, - MMAL_CAMERA_RX_CONFIG_ENCODE_MAX = 0x7FFFFFFF -} MMAL_CAMERA_RX_CONFIG_ENCODE; - -typedef enum MMAL_CAMERA_RX_CONFIG_UNPACK { - MMAL_CAMERA_RX_CONFIG_UNPACK_NONE = 0, - MMAL_CAMERA_RX_CONFIG_UNPACK_6 = 1, - MMAL_CAMERA_RX_CONFIG_UNPACK_7 = 2, - MMAL_CAMERA_RX_CONFIG_UNPACK_8 = 3, - MMAL_CAMERA_RX_CONFIG_UNPACK_10 = 4, - MMAL_CAMERA_RX_CONFIG_UNPACK_12 = 5, - MMAL_CAMERA_RX_CONFIG_UNPACK_14 = 6, - MMAL_CAMERA_RX_CONFIG_UNPACK_16 = 7, - MMAL_CAMERA_RX_CONFIG_UNPACK_MAX = 0x7FFFFFFF -} MMAL_CAMERA_RX_CONFIG_UNPACK; - -typedef enum MMAL_CAMERA_RX_CONFIG_PACK { - MMAL_CAMERA_RX_CONFIG_PACK_NONE = 0, - MMAL_CAMERA_RX_CONFIG_PACK_8 = 1, - MMAL_CAMERA_RX_CONFIG_PACK_10 = 2, - MMAL_CAMERA_RX_CONFIG_PACK_12 = 3, - MMAL_CAMERA_RX_CONFIG_PACK_14 = 4, - MMAL_CAMERA_RX_CONFIG_PACK_16 = 5, - MMAL_CAMERA_RX_CONFIG_PACK_RAW10 = 6, - MMAL_CAMERA_RX_CONFIG_PACK_RAW12 = 7, - MMAL_CAMERA_RX_CONFIG_PACK_MAX = 0x7FFFFFFF -} MMAL_CAMERA_RX_CONFIG_PACK; - -typedef struct MMAL_PARAMETER_CAMERA_RX_CONFIG_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_CAMERA_RX_CONFIG_DECODE decode; - MMAL_CAMERA_RX_CONFIG_ENCODE encode; - MMAL_CAMERA_RX_CONFIG_UNPACK unpack; - MMAL_CAMERA_RX_CONFIG_PACK pack; - uint32_t data_lanes; - uint32_t encode_block_length; - uint32_t embedded_data_lines; - uint32_t image_id; -} MMAL_PARAMETER_CAMERA_RX_CONFIG_T; - -typedef struct MMAL_PARAMETER_CAMERA_RX_TIMING_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t timing1; - uint32_t timing2; - uint32_t timing3; - uint32_t timing4; - uint32_t timing5; - uint32_t term1; - uint32_t term2; - uint32_t cpi_timing1; - uint32_t cpi_timing2; -} MMAL_PARAMETER_CAMERA_RX_TIMING_T; - -#endif /* MMAL_PARAMETERS_CAMERA_H */ diff --git a/vc/include/interface/mmal/mmal_parameters_clock.h b/vc/include/interface/mmal/mmal_parameters_clock.h @@ -1,88 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_PARAMETERS_CLOCK_H -#define MMAL_PARAMETERS_CLOCK_H - -#include "mmal_clock.h" -#include "mmal_parameters_common.h" - -/************************************************* - * ALWAYS ADD NEW ENUMS AT THE END OF THIS LIST! * - ************************************************/ - -/** Clock-specific MMAL parameter IDs. - * @ingroup MMAL_PARAMETER_IDS - */ -enum -{ - MMAL_PARAMETER_CLOCK_REFERENCE /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ - = MMAL_PARAMETER_GROUP_CLOCK, - MMAL_PARAMETER_CLOCK_ACTIVE, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_CLOCK_SCALE, /**< Takes a MMAL_PARAMETER_RATIONAL_T */ - MMAL_PARAMETER_CLOCK_TIME, /**< Takes a MMAL_PARAMETER_INT64_T */ - MMAL_PARAMETER_CLOCK_UPDATE_THRESHOLD, /**< Takes a MMAL_PARAMETER_CLOCK_UPDATE_THRESHOLD_T */ - MMAL_PARAMETER_CLOCK_DISCONT_THRESHOLD, /**< Takes a MMAL_PARAMETER_CLOCK_DISCONT_THRESHOLD_T */ - MMAL_PARAMETER_CLOCK_REQUEST_THRESHOLD, /**< Takes a MMAL_PARAMETER_CLOCK_REQUEST_THRESHOLD_T */ - MMAL_PARAMETER_CLOCK_ENABLE_BUFFER_INFO, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_CLOCK_FRAME_RATE, /**< Takes a MMAL_PARAMETER_RATIONAL_T */ - MMAL_PARAMETER_CLOCK_LATENCY, /**< Takes a MMAL_PARAMETER_CLOCK_LATENCY_T */ -}; - -/** Media-time update thresholds */ -typedef struct MMAL_PARAMETER_CLOCK_UPDATE_THRESHOLD_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_CLOCK_UPDATE_THRESHOLD_T value; -} MMAL_PARAMETER_CLOCK_UPDATE_THRESHOLD_T; - -/** Media-time discontinuity settings */ -typedef struct MMAL_PARAMETER_CLOCK_DISCONT_THRESHOLD_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_CLOCK_DISCONT_THRESHOLD_T value; -} MMAL_PARAMETER_CLOCK_DISCONT_THRESHOLD_T; - -/** Media-time future frame drop settings */ -typedef struct MMAL_PARAMETER_CLOCK_REQUEST_THRESHOLD_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_CLOCK_REQUEST_THRESHOLD_T value; -} MMAL_PARAMETER_CLOCK_REQUEST_THRESHOLD_T; - -/** Clock latency parameter */ -typedef struct MMAL_PARAMETER_CLOCK_LATENCY_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_CLOCK_LATENCY_T value; -} MMAL_PARAMETER_CLOCK_LATENCY_T; - -#endif /* MMAL_PARAMETERS_CLOCK_H */ diff --git a/vc/include/interface/mmal/mmal_parameters_common.h b/vc/include/interface/mmal/mmal_parameters_common.h @@ -1,191 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_PARAMETERS_COMMON_H -#define MMAL_PARAMETERS_COMMON_H - -/** @defgroup MMAL_PARAMETER_IDS Pre-defined MMAL parameter IDs - * @ingroup MmalParameters - * @{ - */ - -/** @name Parameter groups - * Parameters are divided into groups, and then allocated sequentially within - * a group using an enum. - * @{ - */ - -/** Common parameter ID group, used with many types of component. */ -#define MMAL_PARAMETER_GROUP_COMMON (0<<16) -/** Camera-specific parameter ID group. */ -#define MMAL_PARAMETER_GROUP_CAMERA (1<<16) -/** Video-specific parameter ID group. */ -#define MMAL_PARAMETER_GROUP_VIDEO (2<<16) -/** Audio-specific parameter ID group. */ -#define MMAL_PARAMETER_GROUP_AUDIO (3<<16) -/** Clock-specific parameter ID group. */ -#define MMAL_PARAMETER_GROUP_CLOCK (4<<16) -/** Miracast-specific parameter ID group. */ -#define MMAL_PARAMETER_GROUP_MIRACAST (5<<16) - - -/**@}*/ - -/** Common MMAL parameter IDs. - */ -enum { - MMAL_PARAMETER_UNUSED /**< Never a valid parameter ID */ - = MMAL_PARAMETER_GROUP_COMMON, - MMAL_PARAMETER_SUPPORTED_ENCODINGS, /**< Takes a MMAL_PARAMETER_ENCODING_T */ - MMAL_PARAMETER_URI, /**< Takes a MMAL_PARAMETER_URI_T */ - MMAL_PARAMETER_CHANGE_EVENT_REQUEST, /**< Takes a MMAL_PARAMETER_CHANGE_EVENT_REQUEST_T */ - MMAL_PARAMETER_ZERO_COPY, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_BUFFER_REQUIREMENTS, /**< Takes a MMAL_PARAMETER_BUFFER_REQUIREMENTS_T */ - MMAL_PARAMETER_STATISTICS, /**< Takes a MMAL_PARAMETER_STATISTICS_T */ - MMAL_PARAMETER_CORE_STATISTICS, /**< Takes a MMAL_PARAMETER_CORE_STATISTICS_T */ - MMAL_PARAMETER_MEM_USAGE, /**< Takes a MMAL_PARAMETER_MEM_USAGE_T */ - MMAL_PARAMETER_BUFFER_FLAG_FILTER, /**< Takes a MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_SEEK, /**< Takes a MMAL_PARAMETER_SEEK_T */ - MMAL_PARAMETER_POWERMON_ENABLE, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_LOGGING, /**< Takes a MMAL_PARAMETER_LOGGING_T */ - MMAL_PARAMETER_SYSTEM_TIME, /**< Takes a MMAL_PARAMETER_UINT64_T */ - MMAL_PARAMETER_NO_IMAGE_PADDING, /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_LOCKSTEP_ENABLE /**< Takes a MMAL_PARAMETER_BOOLEAN_T */ -}; - -/**@}*/ - -/** Parameter header type. All parameter structures need to begin with this type. - * The \ref id field must be set to a parameter ID, such as one of those listed on - * the \ref MMAL_PARAMETER_IDS "Pre-defined MMAL parameter IDs" page. - */ -typedef struct MMAL_PARAMETER_HEADER_T -{ - uint32_t id; /**< Parameter ID. */ - uint32_t size; /**< Size in bytes of the parameter (including the header) */ -} MMAL_PARAMETER_HEADER_T; - -/** Change event request parameter type. - * This is used to control whether a \ref MMAL_EVENT_PARAMETER_CHANGED_T event - * is issued should a given parameter change. - */ -typedef struct MMAL_PARAMETER_CHANGE_EVENT_REQUEST_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t change_id; /**< ID of parameter that may change, see \ref MMAL_PARAMETER_IDS */ - MMAL_BOOL_T enable; /**< True if the event is enabled, false if disabled */ -} MMAL_PARAMETER_CHANGE_EVENT_REQUEST_T; - -/** Buffer requirements parameter. - * This is mainly used to increase the requirements of a component. */ -typedef struct MMAL_PARAMETER_BUFFER_REQUIREMENTS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t buffer_num_min; /**< Minimum number of buffers the port requires */ - uint32_t buffer_size_min; /**< Minimum size of buffers the port requires */ - uint32_t buffer_alignment_min; /**< Minimum alignment requirement for the buffers. - A value of zero means no special alignment requirements. */ - uint32_t buffer_num_recommended; /**< Number of buffers the port recommends for optimal performance. - A value of zero means no special recommendation. */ - uint32_t buffer_size_recommended; /**< Size of buffers the port recommends for optimal performance. - A value of zero means no special recommendation. */ -} MMAL_PARAMETER_BUFFER_REQUIREMENTS_T; - -/** Seek request parameter type. - * This is used to issue a seek request to a source component. - */ -typedef struct MMAL_PARAMETER_SEEK_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - int64_t offset; /**< Offset (in microseconds) to seek to */ - uint32_t flags; /**< Seeking flags */ - -#define MMAL_PARAM_SEEK_FLAG_PRECISE 0x1 /**< Choose precise seeking even if slower */ -#define MMAL_PARAM_SEEK_FLAG_FORWARD 0x2 /**< Seek to the next keyframe following the specified offset */ - -} MMAL_PARAMETER_SEEK_T; - -/** Port statistics for debugging/test purposes. - * Ports may support query of this parameter to return statistics for debugging or - * test purposes. Not all values may be relevant for a given port. - */ -typedef struct MMAL_PARAMETER_STATISTICS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t buffer_count; /**< Total number of buffers processed */ - uint32_t frame_count; /**< Total number of frames processed */ - uint32_t frames_skipped; /**< Number of frames without expected PTS based on frame rate */ - uint32_t frames_discarded; /**< Number of frames discarded */ - uint32_t eos_seen; /**< Set if the end of stream has been reached */ - uint32_t maximum_frame_bytes; /**< Maximum frame size in bytes */ - int64_t total_bytes; /**< Total number of bytes processed */ - uint32_t corrupt_macroblocks; /**< Number of corrupt macroblocks in the stream */ -} MMAL_PARAMETER_STATISTICS_T; - -typedef enum -{ - MMAL_CORE_STATS_RX, - MMAL_CORE_STATS_TX, - MMAL_CORE_STATS_MAX = 0x7fffffff /* Force 32 bit size for this enum */ -} MMAL_CORE_STATS_DIR; - -/** MMAL core statistics. These are collected by the core itself. - */ -typedef struct MMAL_PARAMETER_CORE_STATISTICS_T -{ - MMAL_PARAMETER_HEADER_T hdr; - MMAL_CORE_STATS_DIR dir; - MMAL_BOOL_T reset; /**< Reset to zero after reading */ - MMAL_CORE_STATISTICS_T stats; /**< The statistics */ -} MMAL_PARAMETER_CORE_STATISTICS_T; - -/** - * Component memory usage statistics. - */ -typedef struct MMAL_PARAMETER_MEM_USAGE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - /**< The amount of memory allocated in image pools by the component */ - uint32_t pool_mem_alloc_size; -} MMAL_PARAMETER_MEM_USAGE_T; - -/** - * Logging control. - */ -typedef struct MMAL_PARAMETER_LOGGING_T -{ - MMAL_PARAMETER_HEADER_T hdr; - uint32_t set; /**< Logging bits to set */ - uint32_t clear; /**< Logging bits to clear */ -} MMAL_PARAMETER_LOGGING_T; - -#endif /* MMAL_PARAMETERS_COMMON_H */ - diff --git a/vc/include/interface/mmal/mmal_parameters_video.h b/vc/include/interface/mmal/mmal_parameters_video.h @@ -1,487 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_PARAMETERS_VIDEO_H -#define MMAL_PARAMETERS_VIDEO_H - -#include "mmal_parameters_common.h" - -/************************************************* - * ALWAYS ADD NEW ENUMS AT THE END OF THIS LIST! * - ************************************************/ - -/** Video-specific MMAL parameter IDs. - * @ingroup MMAL_PARAMETER_IDS - */ -enum { - MMAL_PARAMETER_DISPLAYREGION /**< Takes a @ref MMAL_DISPLAYREGION_T */ - = MMAL_PARAMETER_GROUP_VIDEO, - MMAL_PARAMETER_SUPPORTED_PROFILES, /**< Takes a @ref MMAL_PARAMETER_VIDEO_PROFILE_T */ - MMAL_PARAMETER_PROFILE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_PROFILE_T */ - MMAL_PARAMETER_INTRAPERIOD, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_RATECONTROL, /**< Takes a @ref MMAL_PARAMETER_VIDEO_RATECONTROL_T */ - MMAL_PARAMETER_NALUNITFORMAT, /**< Takes a @ref MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T */ - MMAL_PARAMETER_MINIMISE_FRAGMENTATION, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_MB_ROWS_PER_SLICE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. - * Setting the value to zero resets to the default (one slice per frame). */ - MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION, /**< Takes a @ref MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T */ - MMAL_PARAMETER_VIDEO_EEDE_ENABLE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T */ - MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T */ - MMAL_PARAMETER_VIDEO_REQUEST_I_FRAME, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T. - * Request an I-frame. */ - MMAL_PARAMETER_VIDEO_INTRA_REFRESH, /**< Takes a @ref MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T */ - MMAL_PARAMETER_VIDEO_IMMUTABLE_INPUT, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_BIT_RATE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. - * Run-time bit rate control */ - MMAL_PARAMETER_VIDEO_FRAME_RATE, /**< Takes a @ref MMAL_PARAMETER_FRAME_RATE_T */ - MMAL_PARAMETER_VIDEO_ENCODE_MIN_QUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_MAX_QUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL, /**< Takes a @ref MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T. */ - MMAL_PARAMETER_EXTRA_BUFFERS, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - MMAL_PARAMETER_VIDEO_ALIGN_HORIZ, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. - Changing this paramater from the default can reduce frame rate - because image buffers need to be re-pitched.*/ - MMAL_PARAMETER_VIDEO_ALIGN_VERT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. - Changing this paramater from the default can reduce frame rate - because image buffers need to be re-pitched.*/ - MMAL_PARAMETER_VIDEO_DROPPABLE_PFRAMES, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_INITIAL_QUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_QP_P, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_RC_SLICE_DQUANT, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_FRAME_LIMIT_BITS, /**< Takes a @ref MMAL_PARAMETER_UINT32_T */ - MMAL_PARAMETER_VIDEO_ENCODE_PEAK_RATE, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - - /*H264 specific parameters*/ - MMAL_PARAMETER_VIDEO_ENCODE_H264_DISABLE_CABAC, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_H264_LOW_LATENCY, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_H264_AU_DELIMITERS, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_H264_DEBLOCK_IDC, /**< Takes a @ref MMAL_PARAMETER_UINT32_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_H264_MB_INTRA_MODE, /**< Takes a @ref MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T. */ - - MMAL_PARAMETER_VIDEO_ENCODE_HEADER_ON_OPEN, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_VIDEO_ENCODE_PRECODE_FOR_QP, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - - MMAL_PARAMETER_VIDEO_DRM_INIT_INFO, /**< Takes a @ref MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T. */ - MMAL_PARAMETER_VIDEO_TIMESTAMP_FIFO, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_VIDEO_DECODE_ERROR_CONCEALMENT, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ - MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER, /**< Takes a @ref MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T. */ - - MMAL_PARAMETER_VIDEO_DECODE_CONFIG_VD3, /**< Takes a @ref MMAL_PARAMETER_BYTES_T */ - MMAL_PARAMETER_VIDEO_ENCODE_H264_VCL_HRD_PARAMETERS, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_H264_LOW_DELAY_HRD_FLAG, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_INLINE_HEADER, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_SEI_ENABLE, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_ENCODE_INLINE_VECTORS, /**< Take a @ref MMAL_PARAMETER_BOOLEAN_T. */ - MMAL_PARAMETER_VIDEO_RENDER_STATS, /**< Take a @ref MMAL_PARAMETER_VIDEO_RENDER_STATS_T. */ - MMAL_PARAMETER_VIDEO_INTERLACE_TYPE, /**< Take a @ref MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T. */ - MMAL_PARAMETER_VIDEO_INTERPOLATE_TIMESTAMPS, /**< Takes a @ref MMAL_PARAMETER_BOOLEAN_T */ -}; - -/** Display transformations. - * Although an enumeration, the values correspond to combinations of: - * \li 1 Reflect in a vertical axis - * \li 2 180 degree rotation - * \li 4 Reflect in the leading diagonal - */ -typedef enum MMAL_DISPLAYTRANSFORM_T { - MMAL_DISPLAY_ROT0 = 0, - MMAL_DISPLAY_MIRROR_ROT0 = 1, - MMAL_DISPLAY_MIRROR_ROT180 = 2, - MMAL_DISPLAY_ROT180 = 3, - MMAL_DISPLAY_MIRROR_ROT90 = 4, - MMAL_DISPLAY_ROT270 = 5, - MMAL_DISPLAY_ROT90 = 6, - MMAL_DISPLAY_MIRROR_ROT270 = 7, - MMAL_DISPLAY_DUMMY = 0x7FFFFFFF -} MMAL_DISPLAYTRANSFORM_T; - -/** Display modes. */ -typedef enum MMAL_DISPLAYMODE_T { - MMAL_DISPLAY_MODE_FILL = 0, - MMAL_DISPLAY_MODE_LETTERBOX = 1, - // these allow a left eye source->dest to be specified and the right eye mapping will be inferred by symmetry - MMAL_DISPLAY_MODE_STEREO_LEFT_TO_LEFT = 2, - MMAL_DISPLAY_MODE_STEREO_TOP_TO_TOP = 3, - MMAL_DISPLAY_MODE_STEREO_LEFT_TO_TOP = 4, - MMAL_DISPLAY_MODE_STEREO_TOP_TO_LEFT = 5, - MMAL_DISPLAY_MODE_DUMMY = 0x7FFFFFFF -} MMAL_DISPLAYMODE_T; - -/** Values used to indicate which fields are used when setting the - * display configuration */ -typedef enum MMAL_DISPLAYSET_T { - MMAL_DISPLAY_SET_NONE = 0, - MMAL_DISPLAY_SET_NUM = 1, - MMAL_DISPLAY_SET_FULLSCREEN = 2, - MMAL_DISPLAY_SET_TRANSFORM = 4, - MMAL_DISPLAY_SET_DEST_RECT = 8, - MMAL_DISPLAY_SET_SRC_RECT = 0x10, - MMAL_DISPLAY_SET_MODE = 0x20, - MMAL_DISPLAY_SET_PIXEL = 0x40, - MMAL_DISPLAY_SET_NOASPECT = 0x80, - MMAL_DISPLAY_SET_LAYER = 0x100, - MMAL_DISPLAY_SET_COPYPROTECT = 0x200, - MMAL_DISPLAY_SET_ALPHA = 0x400, - MMAL_DISPLAY_SET_DUMMY = 0x7FFFFFFF -} MMAL_DISPLAYSET_T; - -/** -This config sets the output display device, as well as the region used -on the output display, any display transformation, and some flags to -indicate how to scale the image. -*/ - -typedef struct MMAL_DISPLAYREGION_T { - MMAL_PARAMETER_HEADER_T hdr; - /** Bitfield that indicates which fields are set and should be used. All - * other fields will maintain their current value. - * \ref MMAL_DISPLAYSET_T defines the bits that can be combined. - */ - uint32_t set; - /** Describes the display output device, with 0 typically being a directly - * connected LCD display. The actual values will depend on the hardware. - * Code using hard-wired numbers (e.g. 2) is certain to fail. - */ - uint32_t display_num; - /** Indicates that we are using the full device screen area, rather than - * a window of the display. If zero, then dest_rect is used to specify a - * region of the display to use. - */ - MMAL_BOOL_T fullscreen; - /** Indicates any rotation or flipping used to map frames onto the natural - * display orientation. - */ - MMAL_DISPLAYTRANSFORM_T transform; - /** Where to display the frame within the screen, if fullscreen is zero. - */ - MMAL_RECT_T dest_rect; - /** Indicates which area of the frame to display. If all values are zero, - * the whole frame will be used. - */ - MMAL_RECT_T src_rect; - /** If set to non-zero, indicates that any display scaling should disregard - * the aspect ratio of the frame region being displayed. - */ - MMAL_BOOL_T noaspect; - /** Indicates how the image should be scaled to fit the display. \code - * MMAL_DISPLAY_MODE_FILL \endcode indicates that the image should fill the - * screen by potentially cropping the frames. Setting \code mode \endcode - * to \code MMAL_DISPLAY_MODE_LETTERBOX \endcode indicates that all the source - * region should be displayed and black bars added if necessary. - */ - MMAL_DISPLAYMODE_T mode; - /** If non-zero, defines the width of a source pixel relative to \code pixel_y - * \endcode. If zero, then pixels default to being square. - */ - uint32_t pixel_x; - /** If non-zero, defines the height of a source pixel relative to \code pixel_x - * \endcode. If zero, then pixels default to being square. - */ - uint32_t pixel_y; - /** Sets the relative depth of the images, with greater values being in front - * of smaller values. - */ - int32_t layer; - /** Set to non-zero to ensure copy protection is used on output. - */ - MMAL_BOOL_T copyprotect_required; - /** Level of opacity of the layer, where zero is fully transparent and - * 255 is fully opaque. - */ - uint32_t alpha; -} MMAL_DISPLAYREGION_T; - -/** Video profiles. - * Only certain combinations of profile and level will be valid. - * @ref MMAL_VIDEO_LEVEL_T - */ -typedef enum MMAL_VIDEO_PROFILE_T { - MMAL_VIDEO_PROFILE_H263_BASELINE, - MMAL_VIDEO_PROFILE_H263_H320CODING, - MMAL_VIDEO_PROFILE_H263_BACKWARDCOMPATIBLE, - MMAL_VIDEO_PROFILE_H263_ISWV2, - MMAL_VIDEO_PROFILE_H263_ISWV3, - MMAL_VIDEO_PROFILE_H263_HIGHCOMPRESSION, - MMAL_VIDEO_PROFILE_H263_INTERNET, - MMAL_VIDEO_PROFILE_H263_INTERLACE, - MMAL_VIDEO_PROFILE_H263_HIGHLATENCY, - MMAL_VIDEO_PROFILE_MP4V_SIMPLE, - MMAL_VIDEO_PROFILE_MP4V_SIMPLESCALABLE, - MMAL_VIDEO_PROFILE_MP4V_CORE, - MMAL_VIDEO_PROFILE_MP4V_MAIN, - MMAL_VIDEO_PROFILE_MP4V_NBIT, - MMAL_VIDEO_PROFILE_MP4V_SCALABLETEXTURE, - MMAL_VIDEO_PROFILE_MP4V_SIMPLEFACE, - MMAL_VIDEO_PROFILE_MP4V_SIMPLEFBA, - MMAL_VIDEO_PROFILE_MP4V_BASICANIMATED, - MMAL_VIDEO_PROFILE_MP4V_HYBRID, - MMAL_VIDEO_PROFILE_MP4V_ADVANCEDREALTIME, - MMAL_VIDEO_PROFILE_MP4V_CORESCALABLE, - MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCODING, - MMAL_VIDEO_PROFILE_MP4V_ADVANCEDCORE, - MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSCALABLE, - MMAL_VIDEO_PROFILE_MP4V_ADVANCEDSIMPLE, - MMAL_VIDEO_PROFILE_H264_BASELINE, - MMAL_VIDEO_PROFILE_H264_MAIN, - MMAL_VIDEO_PROFILE_H264_EXTENDED, - MMAL_VIDEO_PROFILE_H264_HIGH, - MMAL_VIDEO_PROFILE_H264_HIGH10, - MMAL_VIDEO_PROFILE_H264_HIGH422, - MMAL_VIDEO_PROFILE_H264_HIGH444, - MMAL_VIDEO_PROFILE_H264_CONSTRAINED_BASELINE, - MMAL_VIDEO_PROFILE_DUMMY = 0x7FFFFFFF -} MMAL_VIDEO_PROFILE_T; - -/** Video levels. - * Only certain combinations of profile and level will be valid. - * @ref MMAL_VIDEO_PROFILE_T - */ -typedef enum MMAL_VIDEO_LEVEL_T { - MMAL_VIDEO_LEVEL_H263_10, - MMAL_VIDEO_LEVEL_H263_20, - MMAL_VIDEO_LEVEL_H263_30, - MMAL_VIDEO_LEVEL_H263_40, - MMAL_VIDEO_LEVEL_H263_45, - MMAL_VIDEO_LEVEL_H263_50, - MMAL_VIDEO_LEVEL_H263_60, - MMAL_VIDEO_LEVEL_H263_70, - MMAL_VIDEO_LEVEL_MP4V_0, - MMAL_VIDEO_LEVEL_MP4V_0b, - MMAL_VIDEO_LEVEL_MP4V_1, - MMAL_VIDEO_LEVEL_MP4V_2, - MMAL_VIDEO_LEVEL_MP4V_3, - MMAL_VIDEO_LEVEL_MP4V_4, - MMAL_VIDEO_LEVEL_MP4V_4a, - MMAL_VIDEO_LEVEL_MP4V_5, - MMAL_VIDEO_LEVEL_MP4V_6, - MMAL_VIDEO_LEVEL_H264_1, - MMAL_VIDEO_LEVEL_H264_1b, - MMAL_VIDEO_LEVEL_H264_11, - MMAL_VIDEO_LEVEL_H264_12, - MMAL_VIDEO_LEVEL_H264_13, - MMAL_VIDEO_LEVEL_H264_2, - MMAL_VIDEO_LEVEL_H264_21, - MMAL_VIDEO_LEVEL_H264_22, - MMAL_VIDEO_LEVEL_H264_3, - MMAL_VIDEO_LEVEL_H264_31, - MMAL_VIDEO_LEVEL_H264_32, - MMAL_VIDEO_LEVEL_H264_4, - MMAL_VIDEO_LEVEL_H264_41, - MMAL_VIDEO_LEVEL_H264_42, - MMAL_VIDEO_LEVEL_H264_5, - MMAL_VIDEO_LEVEL_H264_51, - MMAL_VIDEO_LEVEL_DUMMY = 0x7FFFFFFF -} MMAL_VIDEO_LEVEL_T; - -/** Video profile and level setting. - * This is a variable length structure when querying the supported profiles and - * levels. To get more than one, pass a structure with more profile/level pairs. - */ -typedef struct MMAL_PARAMETER_VIDEO_PROFILE_T -{ - MMAL_PARAMETER_HEADER_T hdr; - - struct - { - MMAL_VIDEO_PROFILE_T profile; - MMAL_VIDEO_LEVEL_T level; - } profile[1]; -} MMAL_PARAMETER_VIDEO_PROFILE_T; - -/** Manner of video rate control */ -typedef enum MMAL_VIDEO_RATECONTROL_T { - MMAL_VIDEO_RATECONTROL_DEFAULT, - MMAL_VIDEO_RATECONTROL_VARIABLE, - MMAL_VIDEO_RATECONTROL_CONSTANT, - MMAL_VIDEO_RATECONTROL_VARIABLE_SKIP_FRAMES, - MMAL_VIDEO_RATECONTROL_CONSTANT_SKIP_FRAMES, - MMAL_VIDEO_RATECONTROL_DUMMY = 0x7fffffff -} MMAL_VIDEO_RATECONTROL_T; - -/** Intra refresh modes */ -typedef enum MMAL_VIDEO_INTRA_REFRESH_T { - MMAL_VIDEO_INTRA_REFRESH_CYCLIC, - MMAL_VIDEO_INTRA_REFRESH_ADAPTIVE, - MMAL_VIDEO_INTRA_REFRESH_BOTH, - MMAL_VIDEO_INTRA_REFRESH_KHRONOSEXTENSIONS = 0x6F000000, - MMAL_VIDEO_INTRA_REFRESH_VENDORSTARTUNUSED = 0x7F000000, - MMAL_VIDEO_INTRA_REFRESH_CYCLIC_MROWS, - MMAL_VIDEO_INTRA_REFRESH_PSEUDO_RAND, - MMAL_VIDEO_INTRA_REFRESH_MAX, - MMAL_VIDEO_INTRA_REFRESH_DUMMY = 0x7FFFFFFF -} MMAL_VIDEO_INTRA_REFRESH_T; - -/*Encode RC Models Supported*/ -typedef enum MMAL_VIDEO_ENCODE_RC_MODEL_T { - MMAL_VIDEO_ENCODER_RC_MODEL_DEFAULT = 0, - MMAL_VIDEO_ENCODER_RC_MODEL_JVT = MMAL_VIDEO_ENCODER_RC_MODEL_DEFAULT, - MMAL_VIDEO_ENCODER_RC_MODEL_VOWIFI, - MMAL_VIDEO_ENCODER_RC_MODEL_CBR, - MMAL_VIDEO_ENCODER_RC_MODEL_LAST, - MMAL_VIDEO_ENCODER_RC_MODEL_DUMMY = 0x7FFFFFFF -} MMAL_VIDEO_ENCODE_RC_MODEL_T; - -typedef struct MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T { - MMAL_PARAMETER_HEADER_T hdr; - MMAL_VIDEO_ENCODE_RC_MODEL_T rc_model; -}MMAL_PARAMETER_VIDEO_ENCODE_RC_MODEL_T; - -/** Video rate control setting */ -typedef struct MMAL_PARAMETER_VIDEO_RATECONTROL_T { - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_VIDEO_RATECONTROL_T control; -} MMAL_PARAMETER_VIDEO_RATECONTROL_T; - -/*H264 INTRA MB MODES*/ -typedef enum MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T { - MMAL_VIDEO_ENCODER_H264_MB_4x4_INTRA = 1, - MMAL_VIDEO_ENCODER_H264_MB_8x8_INTRA = 2, - MMAL_VIDEO_ENCODER_H264_MB_16x16_INTRA = 4, - MMAL_VIDEO_ENCODER_H264_MB_INTRA_DUMMY = 0x7fffffff -} MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T; - -typedef struct MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T { - MMAL_PARAMETER_HEADER_T hdr; - MMAL_VIDEO_ENCODE_H264_MB_INTRA_MODES_T mb_mode; -}MMAL_PARAMETER_VIDEO_ENCODER_H264_MB_INTRA_MODES_T; - -/** NAL unit formats */ -typedef enum MMAL_VIDEO_NALUNITFORMAT_T { - MMAL_VIDEO_NALUNITFORMAT_STARTCODES = 1, - MMAL_VIDEO_NALUNITFORMAT_NALUNITPERBUFFER = 2, - MMAL_VIDEO_NALUNITFORMAT_ONEBYTEINTERLEAVELENGTH = 4, - MMAL_VIDEO_NALUNITFORMAT_TWOBYTEINTERLEAVELENGTH = 8, - MMAL_VIDEO_NALUNITFORMAT_FOURBYTEINTERLEAVELENGTH = 16, - MMAL_VIDEO_NALUNITFORMAT_DUMMY = 0x7fffffff -} MMAL_VIDEO_NALUNITFORMAT_T; - -/** NAL unit format setting */ -typedef struct MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T { - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_VIDEO_NALUNITFORMAT_T format; -} MMAL_PARAMETER_VIDEO_NALUNITFORMAT_T; - -/** H264 Only: Overrides for max macro-blocks per second, max framesize, - * and max bitrates. This overrides the default maximums for the configured level. - */ -typedef struct MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T { - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t custom_max_mbps; - uint32_t custom_max_fs; - uint32_t custom_max_br_and_cpb; -} MMAL_PARAMETER_VIDEO_LEVEL_EXTENSION_T; - -/** H264 Only: Overrides for max macro-blocks per second, max framesize, - * and max bitrates. This overrides the default maximums for the configured level. - */ -typedef struct MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T { - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_VIDEO_INTRA_REFRESH_T refresh_mode; - uint32_t air_mbs; - uint32_t air_ref; - uint32_t cir_mbs; - uint32_t pir_mbs; -} MMAL_PARAMETER_VIDEO_INTRA_REFRESH_T; - -/** Structure for enabling EEDE, we keep it like this for now, there could be extra fields in the future */ -typedef struct MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T { - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t enable; -} MMAL_PARAMETER_VIDEO_EEDE_ENABLE_T; - -/** Structure for setting lossrate for EEDE, we keep it like this for now, there could be extra fields in the future */ -typedef struct MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T { - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t loss_rate; -} MMAL_PARAMETER_VIDEO_EEDE_LOSSRATE_T; - -/** Structure for setting inital DRM parameters */ -typedef struct MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T { - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t current_time; - uint32_t ticks_per_sec; - uint8_t lhs[32]; -} MMAL_PARAMETER_VIDEO_DRM_INIT_INFO_T; - -/** Structure for requesting a hardware-protected memory buffer **/ -typedef struct MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T { - MMAL_PARAMETER_HEADER_T hdr; - - uint32_t size_wanted; /**< Input. Zero size means internal video decoder buffer, - mem_handle and phys_addr not returned in this case */ - uint32_t protect; /**< Input. 1 = protect, 0 = unprotect */ - - uint32_t mem_handle; /**< Output. Handle for protected buffer */ - void * phys_addr; /**< Output. Physical memory address of protected buffer */ - -} MMAL_PARAMETER_VIDEO_DRM_PROTECT_BUFFER_T; - -typedef struct MMAL_PARAMETER_VIDEO_RENDER_STATS_T { - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_BOOL_T valid; - uint32_t match; - uint32_t period; - uint32_t phase; - uint32_t pixel_clock_nominal; - uint32_t pixel_clock; - uint32_t hvs_status; - uint32_t dummy[2]; -} MMAL_PARAMETER_VIDEO_RENDER_STATS_T; - -typedef enum MMAL_INTERLACETYPE_T { - MMAL_InterlaceProgressive, /**< The data is not interlaced, it is progressive scan */ - MMAL_InterlaceFieldSingleUpperFirst, /**< The data is interlaced, fields sent - separately in temporal order, with upper field first */ - MMAL_InterlaceFieldSingleLowerFirst, /**< The data is interlaced, fields sent - separately in temporal order, with lower field first */ - MMAL_InterlaceFieldsInterleavedUpperFirst, /**< The data is interlaced, two fields sent together line - interleaved, with the upper field temporally earlier */ - MMAL_InterlaceFieldsInterleavedLowerFirst, /**< The data is interlaced, two fields sent together line - interleaved, with the lower field temporally earlier */ - MMAL_InterlaceMixed, /**< The stream may contain a mixture of progressive - and interlaced frames */ - MMAL_InterlaceKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - MMAL_InterlaceVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - MMAL_InterlaceMax = 0x7FFFFFFF -} MMAL_INTERLACETYPE_T; - -typedef struct MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T { - MMAL_PARAMETER_HEADER_T hdr; - - MMAL_INTERLACETYPE_T eMode; /**< The interlace type of the content */ - MMAL_BOOL_T bRepeatFirstField; /**< Whether to repeat the first field */ -} MMAL_PARAMETER_VIDEO_INTERLACE_TYPE_T; - -#endif diff --git a/vc/include/interface/mmal/mmal_pool.h b/vc/include/interface/mmal/mmal_pool.h @@ -1,167 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_POOL_H -#define MMAL_POOL_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalPool Pools of buffer headers - * A pool of buffer headers is composed of a queue (\ref MMAL_QUEUE_T) and a user - * specified number of buffer headers (\ref MMAL_BUFFER_HEADER_T). */ -/* @{ */ - -#include "mmal_queue.h" - -/** Definition of a pool */ -typedef struct MMAL_POOL_T -{ - MMAL_QUEUE_T *queue; /**< Queue used by the pool */ - uint32_t headers_num; /**< Number of buffer headers in the pool */ - MMAL_BUFFER_HEADER_T **header; /**< Array of buffer headers belonging to the pool */ -} MMAL_POOL_T; - -/** Allocator alloc prototype - * - * @param context The context pointer passed in on pool creation. - * @param size The size of the allocation required, in bytes. - * @return The pointer to the newly allocated memory, or NULL on failure. - */ -typedef void *(*mmal_pool_allocator_alloc_t)(void *context, uint32_t size); -/** Allocator free prototype - * - * @param context The context pointer passed in on pool creation. - * @param mem The pointer to the memory to be released. - */ -typedef void (*mmal_pool_allocator_free_t)(void *context, void *mem); - -/** Create a pool of MMAL_BUFFER_HEADER_T. - * After allocation, all allocated buffer headers will have been added to the queue. - * - * It is valid to create a pool with no buffer headers, or with zero size payload buffers. - * The mmal_pool_resize() function can be used to increase or decrease the number of buffer - * headers, or the size of the payload buffers, after creation of the pool. - * - * The payload buffers may also be allocated independently by the client, and assigned - * to the buffer headers, but it will be the responsibility of the client to deal with - * resizing and releasing the memory. It is recommended that mmal_pool_create_with_allocator() - * is used in this case, supplying allocator function pointers that will be used as - * necessary by MMAL. - * - * @param headers Number of buffer headers to be allocated with the pool. - * @param payload_size Size of the payload buffer that will be allocated in - * each of the buffer headers. - * @return Pointer to the newly created pool or NULL on failure. - */ -MMAL_POOL_T *mmal_pool_create(unsigned int headers, uint32_t payload_size); - -/** Create a pool of MMAL_BUFFER_HEADER_T. - * After allocation, all allocated buffer headers will have been added to the queue. - * - * It is valid to create a pool with no buffer headers, or with zero size payload buffers. - * The mmal_pool_resize() function can be used to increase or decrease the number of buffer - * headers, or the size of the payload buffers, after creation of the pool. The allocators - * passed during creation shall be used when resizing the payload buffers. - * - * @param headers Number of buffer headers to be allocated with the pool. - * @param payload_size Size of the payload buffer that will be allocated in - * each of the buffer headers. - * @param allocator_context Pointer to the context of the allocator. - * @param allocator_alloc Function pointer for the alloc call of the allocator. - * @param allocator_free Function pointer for the free call of the allocator. - * - * @return Pointer to the newly created pool or NULL on failure. - */ -MMAL_POOL_T *mmal_pool_create_with_allocator(unsigned int headers, uint32_t payload_size, - void *allocator_context, mmal_pool_allocator_alloc_t allocator_alloc, - mmal_pool_allocator_free_t allocator_free); - -/** Destroy a pool of MMAL_BUFFER_HEADER_T. - * This will also deallocate all of the memory which was allocated when creating or - * resizing the pool. - * - * If payload buffers have been allocated independently by the client, they should be - * released prior to calling this function. If the client provided allocator functions, - * the allocator_free function shall be called for each payload buffer. - * - * @param pool Pointer to a pool - */ -void mmal_pool_destroy(MMAL_POOL_T *pool); - -/** Resize a pool of MMAL_BUFFER_HEADER_T. - * This allows modifying either the number of allocated buffers, the payload size or both at the - * same time. - * - * @param pool Pointer to the pool - * @param headers New number of buffer headers to be allocated in the pool. - * It is not valid to pass zero for the number of buffers. - * @param payload_size Size of the payload buffer that will be allocated in - * each of the buffer headers. - * If this is set to 0, all payload buffers shall be released. - * @return MMAL_SUCCESS or an error on failure. - */ -MMAL_STATUS_T mmal_pool_resize(MMAL_POOL_T *pool, unsigned int headers, uint32_t payload_size); - -/** Definition of the callback used by a pool to signal back to the user that a buffer header - * has been released back to the pool. - * - * @param pool Pointer to the pool - * @param buffer Buffer header just released - * @param userdata User specific data passed in when setting the callback - * @return True to have the buffer header put back in the pool's queue, false if the buffer - * header has been taken within the callback. - */ -typedef MMAL_BOOL_T (*MMAL_POOL_BH_CB_T)(MMAL_POOL_T *pool, MMAL_BUFFER_HEADER_T *buffer, void *userdata); - -/** Set a buffer header release callback to the pool. - * Each time a buffer header is released to the pool, the callback will be triggered. - * - * @param pool Pointer to a pool - * @param cb Callback function - * @param userdata User specific data which will be passed with each callback - */ -void mmal_pool_callback_set(MMAL_POOL_T *pool, MMAL_POOL_BH_CB_T cb, void *userdata); - -/** Set a pre-release callback for all buffer headers in the pool. - * Each time a buffer header is about to be released to the pool, the callback - * will be triggered. - * - * @param pool Pointer to the pool - * @param cb Pre-release callback function - * @param userdata User-specific data passed back with each callback - */ -void mmal_pool_pre_release_callback_set(MMAL_POOL_T *pool, MMAL_BH_PRE_RELEASE_CB_T cb, void *userdata); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_POOL_H */ diff --git a/vc/include/interface/mmal/mmal_port.h b/vc/include/interface/mmal/mmal_port.h @@ -1,286 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_PORT_H -#define MMAL_PORT_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalPort Ports - * Definition of a MMAL port and its associated API */ -/* @{ */ - -#include "mmal_types.h" -#include "mmal_format.h" -#include "mmal_buffer.h" -#include "mmal_parameters.h" - -/** List of port types */ -typedef enum -{ - MMAL_PORT_TYPE_UNKNOWN = 0, /**< Unknown port type */ - MMAL_PORT_TYPE_CONTROL, /**< Control port */ - MMAL_PORT_TYPE_INPUT, /**< Input port */ - MMAL_PORT_TYPE_OUTPUT, /**< Output port */ - MMAL_PORT_TYPE_CLOCK, /**< Clock port */ - MMAL_PORT_TYPE_INVALID = 0xffffffff /**< Dummy value to force 32bit enum */ - -} MMAL_PORT_TYPE_T; - -/** \name Port capabilities - * \anchor portcapabilities - * The following flags describe the capabilities advertised by a port */ -/* @{ */ -/** The port is pass-through and doesn't need buffer headers allocated */ -#define MMAL_PORT_CAPABILITY_PASSTHROUGH 0x01 -/** The port wants to allocate the buffer payloads. This signals a preference that - * payload allocation should be done on this port for efficiency reasons. */ -#define MMAL_PORT_CAPABILITY_ALLOCATION 0x02 -/** The port supports format change events. This applies to input ports and is used - * to let the client know whether the port supports being reconfigured via a format - * change event (i.e. without having to disable the port). */ -#define MMAL_PORT_CAPABILITY_SUPPORTS_EVENT_FORMAT_CHANGE 0x04 -/* @} */ - -/** Definition of a port. - * A port is the entity that is exposed by components to receive or transmit - * buffer headers (\ref MMAL_BUFFER_HEADER_T). A port is defined by its - * \ref MMAL_ES_FORMAT_T. - * - * It may be possible to override the buffer requirements of a port by using - * the MMAL_PARAMETER_BUFFER_REQUIREMENTS parameter. - */ -typedef struct MMAL_PORT_T -{ - struct MMAL_PORT_PRIVATE_T *priv; /**< Private member used by the framework */ - const char *name; /**< Port name. Used for debugging purposes (Read Only) */ - - MMAL_PORT_TYPE_T type; /**< Type of the port (Read Only) */ - uint16_t index; /**< Index of the port in its type list (Read Only) */ - uint16_t index_all; /**< Index of the port in the list of all ports (Read Only) */ - - uint32_t is_enabled; /**< Indicates whether the port is enabled or not (Read Only) */ - MMAL_ES_FORMAT_T *format; /**< Format of the elementary stream */ - - uint32_t buffer_num_min; /**< Minimum number of buffers the port requires (Read Only). - This is set by the component. */ - uint32_t buffer_size_min; /**< Minimum size of buffers the port requires (Read Only). - This is set by the component. */ - uint32_t buffer_alignment_min; /**< Minimum alignment requirement for the buffers (Read Only). - A value of zero means no special alignment requirements. - This is set by the component. */ - uint32_t buffer_num_recommended; /**< Number of buffers the port recommends for optimal performance (Read Only). - A value of zero means no special recommendation. - This is set by the component. */ - uint32_t buffer_size_recommended; /**< Size of buffers the port recommends for optimal performance (Read Only). - A value of zero means no special recommendation. - This is set by the component. */ - uint32_t buffer_num; /**< Actual number of buffers the port will use. - This is set by the client. */ - uint32_t buffer_size; /**< Actual maximum size of the buffers that will be sent - to the port. This is set by the client. */ - - struct MMAL_COMPONENT_T *component; /**< Component this port belongs to (Read Only) */ - struct MMAL_PORT_USERDATA_T *userdata; /**< Field reserved for use by the client */ - - uint32_t capabilities; /**< Flags describing the capabilities of a port (Read Only). - * Bitwise combination of \ref portcapabilities "Port capabilities" - * values. - */ - -} MMAL_PORT_T; - -/** Commit format changes on a port. - * - * @param port The port for which format changes are to be committed. - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_format_commit(MMAL_PORT_T *port); - -/** Definition of the callback used by a port to send a \ref MMAL_BUFFER_HEADER_T - * back to the user. - * - * @param port The port sending the buffer header. - * @param buffer The buffer header being sent. - */ -typedef void (*MMAL_PORT_BH_CB_T)(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); - -/** Enable processing on a port - * - * If this port is connected to another, the given callback must be NULL, while for a - * disconnected port, the callback must be non-NULL. - * - * If this is a connected output port and is successfully enabled: - * <ul> - * <li>The port shall be populated with a pool of buffers, allocated as required, according - * to the buffer_num and buffer_size values. - * <li>The input port to which it is connected shall be set to the same buffer - * configuration and then be enabled. Should that fail, the original port shall be - * disabled. - * </ul> - * - * @param port port to enable - * @param cb callback use by the port to send a \ref MMAL_BUFFER_HEADER_T back - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_enable(MMAL_PORT_T *port, MMAL_PORT_BH_CB_T cb); - -/** Disable processing on a port - * - * Disabling a port will stop all processing on this port and return all (non-processed) - * buffer headers to the client. - * - * If this is a connected output port, the input port to which it is connected shall - * also be disabled. Any buffer pool shall be released. - * - * @param port port to disable - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_disable(MMAL_PORT_T *port); - -/** Ask a port to release all the buffer headers it currently has. - * - * Flushing a port will ask the port to send all the buffer headers it currently has - * to the client. Flushing is an asynchronous request and the flush call will - * return before all the buffer headers are returned to the client. - * It is up to the client to keep a count on the buffer headers to know when the - * flush operation has completed. - * It is also important to note that flushing will also reset the state of the port - * and any processing which was buffered by the port will be lost. - * - * \attention Flushing a connected port behaviour TBD. - * - * @param port The port to flush. - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_flush(MMAL_PORT_T *port); - -/** Set a parameter on a port. - * - * @param port The port to which the request is sent. - * @param param The pointer to the header of the parameter to set. - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_parameter_set(MMAL_PORT_T *port, - const MMAL_PARAMETER_HEADER_T *param); - -/** Get a parameter from a port. - * The size field must be set on input to the maximum size of the parameter - * (including the header) and will be set on output to the actual size of the - * parameter retrieved. - * - * \note If MMAL_ENOSPC is returned, the parameter is larger than the size - * given. The given parameter will have been filled up to its size and then - * the size field set to the full parameter's size. This can be used to - * resize the parameter buffer so that a second call should succeed. - * - * @param port The port to which the request is sent. - * @param param The pointer to the header of the parameter to get. - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_parameter_get(MMAL_PORT_T *port, - MMAL_PARAMETER_HEADER_T *param); - -/** Send a buffer header to a port. - * - * @param port The port to which the buffer header is to be sent. - * @param buffer The buffer header to send. - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_send_buffer(MMAL_PORT_T *port, - MMAL_BUFFER_HEADER_T *buffer); - -/** Connect an output port to an input port. - * - * When connected and enabled, buffers will automatically progress from the - * output port to the input port when they become available, and released back - * to the output port when no longer required by the input port. - * - * Ports can be given either way around, but one must be an output port and - * the other must be an input port. Neither can be connected or enabled - * already. The format of the output port will be applied to the input port - * on connection. - * - * @param port One of the ports to connect. - * @param other_port The other port to connect. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_port_connect(MMAL_PORT_T *port, MMAL_PORT_T *other_port); - -/** Disconnect a connected port. - * - * If the port is not connected, an error will be returned. Otherwise, if the - * ports are enabled, they will be disabled and any buffer pool created will be - * freed. - * - * @param port The ports to disconnect. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_port_disconnect(MMAL_PORT_T *port); - -/** Allocate a payload buffer. - * This allows a client to allocate memory for a payload buffer based on the preferences - * of a port. This for instance will allow the port to allocate memory which can be shared - * between the host processor and videocore. - * - * See \ref mmal_pool_create_with_allocator(). - * - * @param port Port responsible for allocating the memory. - * @param payload_size Size of the payload buffer which will be allocated. - * - * @return Pointer to the allocated memory. - */ -uint8_t *mmal_port_payload_alloc(MMAL_PORT_T *port, uint32_t payload_size); - -/** Free a payload buffer. - * This allows a client to free memory allocated by a previous call to \ref mmal_port_payload_alloc. - * - * See \ref mmal_pool_create_with_allocator(). - * - * @param port Port responsible for allocating the memory. - * @param payload Pointer to the memory to free. - */ -void mmal_port_payload_free(MMAL_PORT_T *port, uint8_t *payload); - -/** Get an empty event buffer header from a port - * - * @param port The port from which to get the event buffer header. - * @param buffer The address of a buffer header pointer, which will be set on return. - * @param event The specific event FourCC required. See the \ref MmalEvents "pre-defined events". - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_port_event_get(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T **buffer, uint32_t event); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_PORT_H */ diff --git a/vc/include/interface/mmal/mmal_queue.h b/vc/include/interface/mmal/mmal_queue.h @@ -1,116 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_QUEUE_H -#define MMAL_QUEUE_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalQueue Queues of buffer headers - * This provides a thread-safe implementation of a queue of buffer headers - * (\ref MMAL_BUFFER_HEADER_T). The queue works in a first-in, first-out basis - * so the buffer headers will be dequeued in the order they have been queued. */ -/* @{ */ - -#include "mmal_buffer.h" - -typedef struct MMAL_QUEUE_T MMAL_QUEUE_T; - -/** Create a queue of MMAL_BUFFER_HEADER_T - * - * @return Pointer to the newly created queue or NULL on failure. - */ -MMAL_QUEUE_T *mmal_queue_create(void); - -/** Put a MMAL_BUFFER_HEADER_T into a queue - * - * @param queue Pointer to a queue - * @param buffer Pointer to the MMAL_BUFFER_HEADER_T to add to the queue - */ -void mmal_queue_put(MMAL_QUEUE_T *queue, MMAL_BUFFER_HEADER_T *buffer); - -/** Put a MMAL_BUFFER_HEADER_T back at the start of a queue. - * This is used when a buffer header was removed from the queue but not - * fully processed and needs to be put back where it was originally taken. - * - * @param queue Pointer to a queue - * @param buffer Pointer to the MMAL_BUFFER_HEADER_T to add to the queue - */ -void mmal_queue_put_back(MMAL_QUEUE_T *queue, MMAL_BUFFER_HEADER_T *buffer); - -/** Get a MMAL_BUFFER_HEADER_T from a queue - * - * @param queue Pointer to a queue - * - * @return pointer to the next MMAL_BUFFER_HEADER_T or NULL if the queue is empty. - */ -MMAL_BUFFER_HEADER_T *mmal_queue_get(MMAL_QUEUE_T *queue); - -/** Wait for a MMAL_BUFFER_HEADER_T from a queue. - * This is the same as a get except that this will block until a buffer header is - * available. - * - * @param queue Pointer to a queue - * - * @return pointer to the next MMAL_BUFFER_HEADER_T. - */ -MMAL_BUFFER_HEADER_T *mmal_queue_wait(MMAL_QUEUE_T *queue); - -/** Wait for a MMAL_BUFFER_HEADER_T from a queue, up to a given timeout. - * This is the same as a wait, except that it will abort in case of timeout. - * - * @param queue Pointer to a queue - * @param timeout Number of milliseconds to wait before - * returning if the semaphore can't be acquired. - * - * @return pointer to the next MMAL_BUFFER_HEADER_T. - */ -MMAL_BUFFER_HEADER_T *mmal_queue_timedwait(MMAL_QUEUE_T *queue, VCOS_UNSIGNED timeout); - -/** Get the number of MMAL_BUFFER_HEADER_T currently in a queue. - * - * @param queue Pointer to a queue - * - * @return length (in elements) of the queue. - */ -unsigned int mmal_queue_length(MMAL_QUEUE_T *queue); - -/** Destroy a queue of MMAL_BUFFER_HEADER_T. - * - * @param queue Pointer to a queue - */ -void mmal_queue_destroy(MMAL_QUEUE_T *queue); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_QUEUE_H */ diff --git a/vc/include/interface/mmal/mmal_types.h b/vc/include/interface/mmal/mmal_types.h @@ -1,100 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_TYPES_H -#define MMAL_TYPES_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalTypes Common types - * Definition for common types */ -/* @{ */ - -#include "mmal_common.h" - -/** Status return codes from the API. - * - * \internal Please try to keep this similar to the standard POSIX codes - * rather than making up new ones! - */ -typedef enum -{ - MMAL_SUCCESS = 0, /**< Success */ - MMAL_ENOMEM, /**< Out of memory */ - MMAL_ENOSPC, /**< Out of resources (other than memory) */ - MMAL_EINVAL, /**< Argument is invalid */ - MMAL_ENOSYS, /**< Function not implemented */ - MMAL_ENOENT, /**< No such file or directory */ - MMAL_ENXIO, /**< No such device or address */ - MMAL_EIO, /**< I/O error */ - MMAL_ESPIPE, /**< Illegal seek */ - MMAL_ECORRUPT, /**< Data is corrupt \attention FIXME: not POSIX */ - MMAL_ENOTREADY, /**< Component is not ready \attention FIXME: not POSIX */ - MMAL_ECONFIG, /**< Component is not configured \attention FIXME: not POSIX */ - MMAL_EISCONN, /**< Port is already connected */ - MMAL_ENOTCONN, /**< Port is disconnected */ - MMAL_EAGAIN, /**< Resource temporarily unavailable. Try again later*/ - MMAL_EFAULT, /**< Bad address */ - /* Do not add new codes here unless they match something from POSIX */ - MMAL_STATUS_MAX = 0x7FFFFFFF /**< Force to 32 bit */ -} MMAL_STATUS_T; - -/** Describes a rectangle */ -typedef struct -{ - int32_t x; /**< x coordinate (from left) */ - int32_t y; /**< y coordinate (from top) */ - int32_t width; /**< width */ - int32_t height; /**< height */ -} MMAL_RECT_T; - -/** Describes a rational number */ -typedef struct -{ - int32_t num; /**< Numerator */ - int32_t den; /**< Denominator */ -} MMAL_RATIONAL_T; - -/** \name Special Unknown Time Value - * Timestamps in MMAL are defined as signed 64 bits integer values representing microseconds. - * However a pre-defined special value is used to signal that a timestamp is not known. */ -/* @{ */ -#define MMAL_TIME_UNKNOWN (INT64_C(1)<<63) /**< Special value signalling that time is not known */ -/* @} */ - -/** Four Character Code type */ -typedef uint32_t MMAL_FOURCC_T; - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_TYPES_H */ diff --git a/vc/include/interface/mmal/util/mmal_component_wrapper.h b/vc/include/interface/mmal/util/mmal_component_wrapper.h @@ -1,157 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_WRAPPER_H -#define MMAL_WRAPPER_H - -/** \defgroup MmalComponentWrapper utility - * \ingroup MmalUtilities - * The component wrapper utility functions can be used in place of common sequences - * of calls to the MMAL API in order to control a standalone component. It hides some - * of the complexity in using standalone components behind a fully synchronous - * interface. - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** Forward type definition for a wrapper */ -typedef struct MMAL_WRAPPER_T MMAL_WRAPPER_T; - -/** Definition of the callback used by a wrapper to signal back to the client - * that a buffer header is available either in the pool or in the output queue. - * - * @param wrapper Pointer to the wrapper - */ -typedef void (*MMAL_WRAPPER_CALLBACK_T)(MMAL_WRAPPER_T *wrapper); - -/** Structure describing a wrapper around a component */ -struct MMAL_WRAPPER_T { - - void *user_data; /**< Field reserved for use by the client. */ - MMAL_WRAPPER_CALLBACK_T callback; /**< Callback set by the client. */ - MMAL_COMPONENT_T *component; - MMAL_STATUS_T status; - - MMAL_PORT_T *control; /**< Control port (Read Only). */ - - uint32_t input_num; /**< Number of input ports (Read Only). */ - MMAL_PORT_T **input; /**< Array of input ports (Read Only). */ - MMAL_POOL_T **input_pool; /**< Array of input pools (Read Only). */ - - uint32_t output_num; /**< Number of output ports (Read Only). */ - MMAL_PORT_T **output; /**< Array of output ports (Read Only). */ - MMAL_POOL_T **output_pool; /**< Array of output pools (Read Only). */ - MMAL_QUEUE_T **output_queue; /**< Array of output queues (Read Only). */ - - /* Used for debug / statistics */ - int64_t time_setup; /**< Time in microseconds taken to setup the connection. */ - int64_t time_enable; /**< Time in microseconds taken to enable the connection. */ - int64_t time_disable; /**< Time in microseconds taken to disable the connection. */ - -}; - -/** Create a wrapper around a component. - * The wrapper shall include a pool of buffer headers for each port. The pools will be suitable - * for the current format of its associated port. - * - * @param wrapper The address of a wrapper pointer that will be set to point to the created - * wrapper. - * @param name The name of the component to create. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_wrapper_create(MMAL_WRAPPER_T **wrapper, const char *name); - -/** \name MMAL wrapper flags - * \anchor wrapperflags - */ -/* @{ */ -/** The operation should be blocking */ -#define MMAL_WRAPPER_FLAG_WAIT 1 -/** The pool for the port should allocate memory for the payloads */ -#define MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE 2 -/** The port will use shared memory payloads */ -#define MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY 4 -/* @} */ - -/** Enable a port on a component wrapper. - * - * @param port port to enable - * @param flags used to specify payload allocation flags for the pool - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_wrapper_port_enable(MMAL_PORT_T *port, uint32_t flags); - -/** Disable a port on a component wrapper. - * - * @param port port to disable - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_wrapper_port_disable(MMAL_PORT_T *port); - -/** Wait for an empty buffer to be available on a port. - * - * @param port port to get an empty buffer from - * @param buffer points to the retreived buffer on return - * @param flags specify MMAL_WRAPPER_FLAG_WAIT for a blocking operation - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_wrapper_buffer_get_empty(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T **buffer, uint32_t flags); - -/** Wait for a full buffer to be available on a port. - * - * @param port port to get a full buffer from - * @param buffer points to the retreived buffer on return - * @param flags specify MMAL_WRAPPER_FLAG_WAIT for a blocking operation - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_wrapper_buffer_get_full(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T **buffer, uint32_t flags); - -/** Cancel any ongoing blocking operation on a component wrapper. - * - * @param wrapper The wrapper on which to cancel operations. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_wrapper_cancel(MMAL_WRAPPER_T *wrapper); - -/** Destroy a wrapper. - * Destroys a component wrapper and any resources it owns. - * - * @param wrapper The wrapper to be destroyed. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_wrapper_destroy(MMAL_WRAPPER_T *wrapper); - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif /* MMAL_WRAPPER_H */ diff --git a/vc/include/interface/mmal/util/mmal_connection.h b/vc/include/interface/mmal/util/mmal_connection.h @@ -1,230 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_CONNECTION_H -#define MMAL_CONNECTION_H - -/** \defgroup MmalConnectionUtility Port connection utility - * \ingroup MmalUtilities - * The port connection utility functions can be used in place of common sequences - * of calls to the MMAL API in order to process buffers being passed between two - * ports. - * - * \section ProcessingConnectionBufferHeaders Processing connection buffer headers - * Either in response to the client callback function being called, or simply on a - * timer, the client will need to process the buffer headers of the connection - * (unless tunneling is used). - * - * Buffer headers that are in the pool queue will need to be sent to the output port, - * while buffer headers in the connection queue are sent to the input port. The - * buffer headers in the connection queue may contain pixel data (the cmd field is - * zero) or an event (the cmd field is non-zero). In general, pixel data buffer - * headers need to be passed on, while event buffer headers are released. In the - * case of the format changed event, mmal_connection_event_format_changed() can be - * called before the event is released. - * - * Other, specialized use cases may also be implemented, such as getting and - * immediately releasing buffer headers from the connection queue in order to - * prevent their propagation. This could be used to drop out video, for example. - * - * \section TunnellingConnections Tunnelling connections - * If the \ref MMAL_CONNECTION_FLAG_TUNNELLING flag is set when the connection is - * created, MMAL tunneling will be used. This automates the passing of the buffer - * headers between the output port and input port, and back again. It will also do - * this as efficiently as possible, avoiding trips between the ARM and the VideoCore - * if both components are implemented on the VideoCore. The consequence of this is - * that there is no client callback made as buffer headers get transferred. - * - * The client can still monitor the control port of a component (usually a sink - * component, such as video_render) for the end of stream, in order to know when to - * dismantle the connection. - * - * \section ConnectionClientCallback Client callback - * When not using tunnelling, the client callback function is called each time a - * buffer arrives from a port (either input or output). - * - * \note The callback is made on a different thread from the one used by the - * client to set up the connection, so care must be taken with thread safety. - * One option is to raise a signal to the main client thread that queue processing - * needs to be done, another is for the callback to perform the queue processing - * itself. - * - * The client can also store an opaque pointer in the connection object, which is - * never used by the MMAL code and is only meaningful to the client. - * - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** \name Connection flags - * \anchor connectionflags - * The following flags describe the properties of the connection. */ -/* @{ */ -/** The connection is tunnelled. Buffer headers do not transit via the client but - * directly from the output port to the input port. */ -#define MMAL_CONNECTION_FLAG_TUNNELLING 0x1 -/** Force the pool of buffer headers used by the connection to be allocated on the input port. */ -#define MMAL_CONNECTION_FLAG_ALLOCATION_ON_INPUT 0x2 -/** Force the pool of buffer headers used by the connection to be allocated on the output port. */ -#define MMAL_CONNECTION_FLAG_ALLOCATION_ON_OUTPUT 0x4 -/** Specify that the connection should not modify the buffer requirements. */ -#define MMAL_CONNECTION_FLAG_KEEP_BUFFER_REQUIREMENTS 0x8 -/** The connection is flagged as direct. This doesn't change the behaviour of - * the connection itself but is used by the the graph utility to specify that - * the buffer should be sent to the input port from with the port callback. */ -#define MMAL_CONNECTION_FLAG_DIRECT 0x10 -/* @} */ - -/** Forward type definition for a connection */ -typedef struct MMAL_CONNECTION_T MMAL_CONNECTION_T; - -/** Definition of the callback used by a connection to signal back to the client - * that a buffer header is available either in the pool or in the output queue. - * - * @param connection Pointer to the connection - */ -typedef void (*MMAL_CONNECTION_CALLBACK_T)(MMAL_CONNECTION_T *connection); - -/** Structure describing a connection between 2 ports (1 output and 1 input port) */ -struct MMAL_CONNECTION_T { - - void *user_data; /**< Field reserved for use by the client. */ - MMAL_CONNECTION_CALLBACK_T callback; /**< Callback set by the client. */ - - uint32_t is_enabled; /**< Specifies whether the connection is enabled or not (Read Only). */ - - uint32_t flags; /**< Flags passed during the create call (Read Only). A bitwise - * combination of \ref connectionflags "Connection flags" values. - */ - MMAL_PORT_T *in; /**< Input port used for the connection (Read Only). */ - MMAL_PORT_T *out; /**< Output port used for the connection (Read Only). */ - - MMAL_POOL_T *pool; /**< Pool of buffer headers used by the output port (Read Only). */ - MMAL_QUEUE_T *queue; /**< Queue for the buffer headers produced by the output port (Read Only). */ - - const char *name; /**< Connection name (Read Only). Used for debugging purposes. */ - - /* Used for debug / statistics */ - int64_t time_setup; /**< Time in microseconds taken to setup the connection. */ - int64_t time_enable; /**< Time in microseconds taken to enable the connection. */ - int64_t time_disable; /**< Time in microseconds taken to disable the connection. */ -}; - -/** Create a connection between two ports. - * The connection shall include a pool of buffer headers suitable for the current format of - * the output port. The format of the input port shall have been set to the same as that of - * the input port. - * Note that connections are reference counted and creating a connection automatically - * acquires a reference to it (released when \ref mmal_connection_destroy is called). - * - * @param connection The address of a connection pointer that will be set to point to the created - * connection. - * @param out The output port to use for the connection. - * @param in The input port to use for the connection. - * @param flags The flags specifying which type of connection should be created. - * A bitwise combination of \ref connectionflags "Connection flags" values. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_connection_create(MMAL_CONNECTION_T **connection, - MMAL_PORT_T *out, MMAL_PORT_T *in, uint32_t flags); - -/** Acquire a reference on a connection. - * Acquiring a reference on a connection will prevent a connection from being destroyed until - * the acquired reference is released (by a call to \ref mmal_connection_destroy). - * References are internally counted so all acquired references need a matching call to - * release them. - * - * @param connection connection to acquire - */ -void mmal_connection_acquire(MMAL_CONNECTION_T *connection); - -/** Release a reference on a connection - * Release an acquired reference on a connection. Triggers the destruction of the connection when - * the last reference is being released. - * \note This is in fact an alias of \ref mmal_connection_destroy which is added to make client - * code clearer. - * - * @param connection connection to release - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_connection_release(MMAL_CONNECTION_T *connection); - -/** Destroy a connection. - * Release an acquired reference on a connection. Only actually destroys the connection when - * the last reference is being released. - * The actual destruction of the connection will start by disabling it, if necessary. - * Any pool, queue, and so on owned by the connection shall then be destroyed. - * - * @param connection The connection to be destroyed. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_connection_destroy(MMAL_CONNECTION_T *connection); - -/** Enable a connection. - * The format of the two ports must have been committed before calling this function, - * although note that on creation, the connection automatically copies and commits the - * output port's format to the input port. - * - * The MMAL_CONNECTION_T::callback field must have been set if the \ref MMAL_CONNECTION_FLAG_TUNNELLING - * flag was not specified on creation. The client may also set the MMAL_CONNECTION_T::user_data - * in order to get a pointer passed, via the connection, to the callback. - * - * @param connection The connection to be enabled. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_connection_enable(MMAL_CONNECTION_T *connection); - -/** Disable a connection. - * - * @param connection The connection to be disabled. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_connection_disable(MMAL_CONNECTION_T *connection); - -/** Apply a format changed event to the connection. - * This function can be used when the client is processing buffer headers and receives - * a format changed event (\ref MMAL_EVENT_FORMAT_CHANGED). The connection is - * reconfigured, changing the format of the ports, the number of buffer headers and - * the size of the payload buffers as necessary. - * - * @param connection The connection to which the event shall be applied. - * @param buffer The buffer containing a format changed event. - * @return MMAL_SUCCESS on success. - */ -MMAL_STATUS_T mmal_connection_event_format_changed(MMAL_CONNECTION_T *connection, - MMAL_BUFFER_HEADER_T *buffer); - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif /* MMAL_CONNECTION_H */ diff --git a/vc/include/interface/mmal/util/mmal_default_components.h b/vc/include/interface/mmal/util/mmal_default_components.h @@ -1,90 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_DEFAULT_COMPONENTS_H -#define MMAL_DEFAULT_COMPONENTS_H - -/** \defgroup MmalDefaultComponents List of default components - * This provides a list of default components on a per platform basis. - * @{ - */ - -#define MMAL_COMPONENT_DEFAULT_CONTAINER_READER "container_reader" -#define MMAL_COMPONENT_DEFAULT_CONTAINER_WRITER "container_writer" - -#if defined(ENABLE_MMAL_STANDALONE) -# define MMAL_COMPONENT_DEFAULT_VIDEO_DECODER "avcodec.video_decode" -# define MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER "avcodec.video_encode" -# define MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER "sdl.video_render" -# define MMAL_COMPONENT_DEFAULT_IMAGE_DECODER "avcodec.video_decode" -# define MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER "avcodec.video_encode" -# define MMAL_COMPONENT_DEFAULT_CAMERA "artificial_camera" -# define MMAL_COMPONENT_DEFAULT_VIDEO_CONVERTER "avcodec.video_convert" -# define MMAL_COMPONENT_DEFAULT_SPLITTER "splitter" -# define MMAL_COMPONENT_DEFAULT_SCHEDULER "scheduler" -# define MMAL_COMPONENT_DEFAULT_VIDEO_INJECTER "video_inject" -# define MMAL_COMPONENT_DEFAULT_AUDIO_DECODER "avcodec.audio_decode" -# define MMAL_COMPONENT_DEFAULT_AUDIO_RENDERER "sdl.audio_render" -# define MMAL_COMPONENT_DEFAULT_MIRACAST "miracast" -# define MMAL_COMPONENT_DEFAULT_CLOCK "clock" -#elif defined(__VIDEOCORE__) -# define MMAL_COMPONENT_DEFAULT_VIDEO_DECODER "ril.video_decode" -# define MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER "ril.video_encode" -# define MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER "ril.video_render" -# define MMAL_COMPONENT_DEFAULT_IMAGE_DECODER "ril.image_decode" -# define MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER "ril.image_encode" -# define MMAL_COMPONENT_DEFAULT_CAMERA "ril.camera" -# define MMAL_COMPONENT_DEFAULT_VIDEO_CONVERTER "video_convert" -# define MMAL_COMPONENT_DEFAULT_SPLITTER "splitter" -# define MMAL_COMPONENT_DEFAULT_SCHEDULER "scheduler" -# define MMAL_COMPONENT_DEFAULT_VIDEO_INJECTER "video_inject" -# define MMAL_COMPONENT_DEFAULT_VIDEO_SPLITTER "ril.video_splitter" -# define MMAL_COMPONENT_DEFAULT_AUDIO_DECODER "none" -# define MMAL_COMPONENT_DEFAULT_AUDIO_RENDERER "ril.audio_render" -# define MMAL_COMPONENT_DEFAULT_MIRACAST "miracast" -# define MMAL_COMPONENT_DEFAULT_CLOCK "clock" -#else -# define MMAL_COMPONENT_DEFAULT_VIDEO_DECODER "vc.ril.video_decode" -# define MMAL_COMPONENT_DEFAULT_VIDEO_ENCODER "vc.ril.video_encode" -# define MMAL_COMPONENT_DEFAULT_VIDEO_RENDERER "vc.ril.video_render" -# define MMAL_COMPONENT_DEFAULT_IMAGE_DECODER "vc.ril.image_decode" -# define MMAL_COMPONENT_DEFAULT_IMAGE_ENCODER "vc.ril.image_encode" -# define MMAL_COMPONENT_DEFAULT_CAMERA "vc.ril.camera" -# define MMAL_COMPONENT_DEFAULT_VIDEO_CONVERTER "vc.video_convert" -# define MMAL_COMPONENT_DEFAULT_SPLITTER "vc.splitter" -# define MMAL_COMPONENT_DEFAULT_SCHEDULER "vc.scheduler" -# define MMAL_COMPONENT_DEFAULT_VIDEO_INJECTER "vc.video_inject" -# define MMAL_COMPONENT_DEFAULT_VIDEO_SPLITTER "vc.ril.video_splitter" -# define MMAL_COMPONENT_DEFAULT_AUDIO_DECODER "none" -# define MMAL_COMPONENT_DEFAULT_AUDIO_RENDERER "vc.ril.audio_render" -# define MMAL_COMPONENT_DEFAULT_MIRACAST "vc.miracast" -# define MMAL_COMPONENT_DEFAULT_CLOCK "vc.clock" -#endif - -/** @} */ - -#endif /* MMAL_DEFAULT_COMPONENTS_H */ diff --git a/vc/include/interface/mmal/util/mmal_graph.h b/vc/include/interface/mmal/util/mmal_graph.h @@ -1,243 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_GRAPH_H -#define MMAL_GRAPH_H - -#include "util/mmal_connection.h" - -/** \defgroup MmalGraphUtility Graph Utility - * \ingroup MmalUtilities - * The graph utility functions allows one to easily create graphs of MMAL components. - * - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** List of topology types */ -typedef enum -{ - MMAL_GRAPH_TOPOLOGY_ALL = 0, /**< All input ports and output ports are linked */ - MMAL_GRAPH_TOPOLOGY_STRAIGHT, /**< Input ports and output ports of the same index are linked */ - MMAL_GRAPH_TOPOLOGY_CUSTOM, /**< Custom defined topology */ - MMAL_GRAPH_TOPOLOGY_MAX - -} MMAL_GRAPH_TOPOLOGY_T; - -/** Structure describing a graph */ -typedef struct MMAL_GRAPH_T -{ - /** Pointer to private data of the client */ - struct MMAL_GRAPH_USERDATA_T *userdata; - - /** Optional callback that the client can set to get notified when the graph is going to be destroyed */ - void (*pf_destroy)(struct MMAL_GRAPH_T *); - - /** Optional callback that the client can set to intercept parameter requests on ports exposed by the graph */ - MMAL_STATUS_T (*pf_parameter_set)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port, const MMAL_PARAMETER_HEADER_T *param); - /** Optional callback that the client can set to intercept parameter requests on ports exposed by the graph */ - MMAL_STATUS_T (*pf_parameter_get)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port, MMAL_PARAMETER_HEADER_T *param); - /** Optional callback that the client can set to intercept format commit calls on ports exposed by the graph */ - MMAL_STATUS_T (*pf_format_commit)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port); - /** Optional callback that the client can set to intercept send buffer calls on ports exposed by the graph */ - MMAL_STATUS_T (*pf_send_buffer)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); - /** Optional callback that the client can set to intercept buffer callbacks on ports exposed by the graph */ - MMAL_STATUS_T (*pf_return_buffer)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); - /** Optional callback that the client can set to intercept payload alloc calls on ports exposed by the graph */ - MMAL_STATUS_T (*pf_payload_alloc)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port, uint32_t payload_size, uint8_t **); - /** Optional callback that the client can set to intercept payload free calls on ports exposed by the graph */ - MMAL_STATUS_T (*pf_payload_free)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port, uint8_t *payload); - /** Optional callback that the client can set to intercept flush calls on ports exposed by the graph */ - MMAL_STATUS_T (*pf_flush)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port); - /** Optional callback that the client can set to control callbacks from the internal components of the graph */ - /** Optional callback that the client can set to intercept enable calls on ports exposed by the graph */ - MMAL_STATUS_T (*pf_enable)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port); - /** Optional callback that the client can set to intercept disable calls on ports exposed by the graph */ - MMAL_STATUS_T (*pf_disable)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port); - /** Optional callback that the client can set to control callbacks from the internal components of the graph */ - MMAL_STATUS_T (*pf_control_callback)(struct MMAL_GRAPH_T *, MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer); - /** Optional callback that the client can set to intercept component_enable/disable calls made to the graph */ - MMAL_STATUS_T (*pf_graph_enable)(struct MMAL_GRAPH_T *, MMAL_BOOL_T enable); - /** Optional callback that the client can set to intercept buffers going through internal connections. - * This will only be triggered if the connection is not tunnelled */ - MMAL_STATUS_T (*pf_connection_buffer)(struct MMAL_GRAPH_T *, MMAL_CONNECTION_T *connection, MMAL_BUFFER_HEADER_T *buffer); - -} MMAL_GRAPH_T; - -/** Create an instance of a graph. - * The newly created graph will need to be populated by the client. - * - * @param graph returned graph - * @param userdata_size size to be allocated for the userdata field - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_create(MMAL_GRAPH_T **graph, unsigned int userdata_size); - -/** Add a component to a graph. - * Allows the client to add a component to the graph. - * - * @param graph instance of the graph - * @param component component to add to a graph - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_add_component(MMAL_GRAPH_T *graph, MMAL_COMPONENT_T *component); - -/** Describe the topology of the ports of a component. - * Allows the client to describe the topology of a component. This information - * is used by the graph to choose which action to perform when - * enabling / disabling / committing / flushing a port exposed by the graph. - * Note that by default the topology of a component is set to MMAL_GRAPH_TOPOLOGY_ALL. - * - * @param graph instance of the graph - * @param component component to describe - * @param topology type of topology used by this component - * @param input output index (or -1 if sink) linked to each input port - * @param input_num number of indexes in the input list - * @param output input index (or -1 if source) linked to each output port - * @param output_num number of indexes in the output list - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_component_topology(MMAL_GRAPH_T *graph, MMAL_COMPONENT_T *component, - MMAL_GRAPH_TOPOLOGY_T topology, int8_t *input, unsigned int input_num, - int8_t *output, unsigned int output_num); - -/** Add a port to a graph. - * Allows the client to add an input or output port to a graph. The given port - * will effectively become an end point for the graph. - * - * @param graph instance of the graph - * @param port port to add to the graph - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_add_port(MMAL_GRAPH_T *graph, MMAL_PORT_T *port); - -/** Add a connection to a graph. - * Allows the client to add an internal connection to a graph. - * - * @param graph instance of the graph - * @param connection connection to add to the graph - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_add_connection(MMAL_GRAPH_T *graph, MMAL_CONNECTION_T *connection); - -/** Create a new component and add it to a graph. - * Allows the client to create and add a component to the graph. - * - * @param graph instance of the graph - * @param name name of the component to create - * @param component if not NULL, will contain a pointer to the created component - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_new_component(MMAL_GRAPH_T *graph, const char *name, - MMAL_COMPONENT_T **component); - -/** Create and add a connection to a graph. - * Allows the client to create and add an internal connection to a graph. - * - * @param graph instance of the graph - * @param out the output port to use for the connection - * @param in the input port to use for the connection - * @param flags the flags specifying which type of connection should be created - * @param connection if not NULL, will contain a pointer to the created connection - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_new_connection(MMAL_GRAPH_T *graph, MMAL_PORT_T *out, MMAL_PORT_T *in, - uint32_t flags, MMAL_CONNECTION_T **connection); - -/** Definition of the callback used by a graph to send events to the client. - * - * @param graph the graph sending the event - * @param port the port which generated the event - * @param buffer the buffer header containing the event data - * @param cb_data data passed back to the client when the callback is invoked - */ -typedef void (*MMAL_GRAPH_EVENT_CB)(MMAL_GRAPH_T *graph, MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer, - void *cb_data); - -/** Enable the graph and start processing. - * - * @param graph the graph to enable - * @param cb the callback to invoke when an event occurs on any of the internal control ports - * @param cb_data data passed back to the client when the callback is invoked - * - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_enable(MMAL_GRAPH_T *graph, MMAL_GRAPH_EVENT_CB cb, void *cb_data); - -MMAL_STATUS_T mmal_graph_disable(MMAL_GRAPH_T *graph); - -/** Find a port in the graph. - * - * @param graph graph instance - * @param name name of the component of interest - * @param type type of port (in/out) - * @param index which port index within the component - * - * @return port, or NULL if not found - */ -MMAL_PORT_T *mmal_graph_find_port(MMAL_GRAPH_T *graph, - const char *name, - MMAL_PORT_TYPE_T type, - unsigned index); - -/** Create an instance of a component from a graph. - * The newly created component will expose input and output ports to the client. - * Not that all the exposed ports will be in a disabled state by default. - * - * @param graph graph to create the component from - * @param name name of the component to create - * @param component returned component - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_build(MMAL_GRAPH_T *ctx, - const char *name, MMAL_COMPONENT_T **component); - -/** Component constructor for a graph. - * FIXME: private function - * - * @param name name of the component to create - * @param component component - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_component_constructor(const char *name, MMAL_COMPONENT_T *component); - -/** Destroy a previously created graph - * @param graph graph to destroy - * @return MMAL_SUCCESS on success - */ -MMAL_STATUS_T mmal_graph_destroy(MMAL_GRAPH_T *ctx); - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif /* MMAL_GRAPH_H */ diff --git a/vc/include/interface/mmal/util/mmal_il.h b/vc/include/interface/mmal/util/mmal_il.h @@ -1,212 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_IL_H -#define MMAL_IL_H - -/** \defgroup MmalILUtility MMAL to OMX IL conversion utilities - * \ingroup MmalUtilities - * - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vmcs_host/khronos/IL/OMX_Core.h" -#include "interface/vmcs_host/khronos/IL/OMX_Component.h" -#include "interface/vmcs_host/khronos/IL/OMX_Video.h" -#include "interface/vmcs_host/khronos/IL/OMX_Audio.h" -#include "interface/vmcs_host/khronos/IL/OMX_Broadcom.h" - -/** Convert MMAL status codes into OMX error codes. - * - * @param status MMAL status code. - * @return OMX error code. - */ -OMX_ERRORTYPE mmalil_error_to_omx(MMAL_STATUS_T status); - -/** Convert OMX error codes into MMAL status codes. - * - * @param error OMX error code. - * @return MMAL status code. - */ -MMAL_STATUS_T mmalil_error_to_mmal(OMX_ERRORTYPE error); - -/** Convert MMAL buffer header flags into OMX buffer header flags. - * - * @param flags OMX buffer header flags. - * @return MMAL buffer header flags. - */ -uint32_t mmalil_buffer_flags_to_mmal(OMX_U32 flags); - -/** Convert OMX buffer header flags into MMAL buffer header flags. - * - * @param flags MMAL buffer header flags. - * @return OMX buffer header flags. - */ -OMX_U32 mmalil_buffer_flags_to_omx(uint32_t flags); - -/** Convert a MMAL buffer header into an OMX buffer header. - * Note that only the fields which have a direct mapping between OMX and MMAL are converted. - * - * @param omx Pointer to the destination OMX buffer header. - * @param mmal Pointer to the source MMAL buffer header. - */ -void mmalil_buffer_header_to_omx(OMX_BUFFERHEADERTYPE *omx, MMAL_BUFFER_HEADER_T *mmal); - -/** Convert an OMX buffer header into a MMAL buffer header. - * - * @param mmal Pointer to the destination MMAL buffer header. - * @param omx Pointer to the source OMX buffer header. - */ -void mmalil_buffer_header_to_mmal(MMAL_BUFFER_HEADER_T *mmal, OMX_BUFFERHEADERTYPE *omx); - - -OMX_PORTDOMAINTYPE mmalil_es_type_to_omx_domain(MMAL_ES_TYPE_T type); -MMAL_ES_TYPE_T mmalil_omx_domain_to_es_type(OMX_PORTDOMAINTYPE domain); -uint32_t mmalil_omx_audio_coding_to_encoding(OMX_AUDIO_CODINGTYPE coding); -OMX_AUDIO_CODINGTYPE mmalil_encoding_to_omx_audio_coding(uint32_t encoding); -uint32_t mmalil_omx_video_coding_to_encoding(OMX_VIDEO_CODINGTYPE coding); -OMX_VIDEO_CODINGTYPE mmalil_encoding_to_omx_video_coding(uint32_t encoding); -uint32_t mmalil_omx_image_coding_to_encoding(OMX_IMAGE_CODINGTYPE coding); -OMX_IMAGE_CODINGTYPE mmalil_encoding_to_omx_image_coding(uint32_t encoding); -uint32_t mmalil_omx_coding_to_encoding(uint32_t encoding, OMX_PORTDOMAINTYPE domain); -uint32_t mmalil_omx_color_format_to_encoding(OMX_COLOR_FORMATTYPE coding); -OMX_COLOR_FORMATTYPE mmalil_encoding_to_omx_color_format(uint32_t encoding); -uint32_t mmalil_omx_color_space_to_mmal(OMX_COLORSPACETYPE coding); -OMX_COLORSPACETYPE mmalil_color_space_to_omx(uint32_t coding); -uint32_t mmalil_omx_video_profile_to_mmal(OMX_U32 level, OMX_VIDEO_CODINGTYPE coding); -OMX_U32 mmalil_video_profile_to_omx(uint32_t profile); -uint32_t mmalil_omx_video_level_to_mmal(OMX_U32 level, OMX_VIDEO_CODINGTYPE coding); -OMX_U32 mmalil_video_level_to_omx(uint32_t level); -MMAL_VIDEO_RATECONTROL_T mmalil_omx_video_ratecontrol_to_mmal(OMX_VIDEO_CONTROLRATETYPE omx); -OMX_VIDEO_CONTROLRATETYPE mmalil_video_ratecontrol_to_omx(MMAL_VIDEO_RATECONTROL_T mmal); -MMAL_VIDEO_INTRA_REFRESH_T mmalil_omx_video_intrarefresh_to_mmal(OMX_VIDEO_INTRAREFRESHTYPE omx); - -/** Union of all the OMX_VIDEO/AUDIO_PARAM types */ -typedef union OMX_FORMAT_PARAM_TYPE { - OMX_PARAM_U32TYPE common; - - /* Video */ - OMX_VIDEO_PARAM_AVCTYPE avc; - OMX_VIDEO_PARAM_H263TYPE h263; - OMX_VIDEO_PARAM_MPEG2TYPE mpeg2; - OMX_VIDEO_PARAM_MPEG4TYPE mpeg4; - OMX_VIDEO_PARAM_WMVTYPE wmv; - OMX_VIDEO_PARAM_RVTYPE rv; - - /* Audio */ - OMX_AUDIO_PARAM_PCMMODETYPE pcm; - OMX_AUDIO_PARAM_MP3TYPE mp3; - OMX_AUDIO_PARAM_AACPROFILETYPE aac; - OMX_AUDIO_PARAM_VORBISTYPE vorbis; - OMX_AUDIO_PARAM_WMATYPE wma; - OMX_AUDIO_PARAM_RATYPE ra; - OMX_AUDIO_PARAM_SBCTYPE sbc; - OMX_AUDIO_PARAM_ADPCMTYPE adpcm; - OMX_AUDIO_PARAM_G723TYPE g723; - OMX_AUDIO_PARAM_G726TYPE g726; - OMX_AUDIO_PARAM_G729TYPE g729; - OMX_AUDIO_PARAM_AMRTYPE amr; - OMX_AUDIO_PARAM_GSMFRTYPE gsmfr; - OMX_AUDIO_PARAM_GSMHRTYPE gsmhr; - OMX_AUDIO_PARAM_GSMEFRTYPE gsmefr; - OMX_AUDIO_PARAM_TDMAFRTYPE tdmafr; - OMX_AUDIO_PARAM_TDMAEFRTYPE tdmaefr; - OMX_AUDIO_PARAM_PDCFRTYPE pdcfr; - OMX_AUDIO_PARAM_PDCEFRTYPE pdcefr; - OMX_AUDIO_PARAM_PDCHRTYPE pdchr; - OMX_AUDIO_PARAM_QCELP8TYPE qcelp8; - OMX_AUDIO_PARAM_QCELP13TYPE qcelp13; - OMX_AUDIO_PARAM_EVRCTYPE evrc; - OMX_AUDIO_PARAM_SMVTYPE smv; - OMX_AUDIO_PARAM_MIDITYPE midi; -#ifdef OMX_AUDIO_CodingDDP_Supported - OMX_AUDIO_PARAM_DDPTYPE ddp; -#endif -#ifdef OMX_AUDIO_CodingDTS_Supported - OMX_AUDIO_PARAM_DTSTYPE dts; -#endif - -} OMX_FORMAT_PARAM_TYPE; - -/** Get the OMX_IndexParamAudio index corresponding to a specified audio coding type. - * - * @param coding Audio coding type. - * @param size Pointer used to return the size of the parameter. - * - * @return OMX index or 0 if no match was found. - */ -OMX_INDEXTYPE mmalil_omx_audio_param_index(OMX_AUDIO_CODINGTYPE coding, OMX_U32 *size); - -/** Get the audio coding corresponding to a specified OMX_IndexParamAudio index. - * - * @param index Audio coding type. - * - * @return Audio coding type. - */ -OMX_AUDIO_CODINGTYPE mmalil_omx_audio_param_index_to_coding(OMX_INDEXTYPE index); - -/** Setup a default channel mapping based on the number of channels - * @param channel_mapping The output channel mapping - * @param nchannels Number of channels - * - * @return MMAL_SUCCESS if we managed to produce a channel mapping - */ -MMAL_STATUS_T mmalil_omx_default_channel_mapping(OMX_AUDIO_CHANNELTYPE *channel_mapping, unsigned int nchannels); - -/** Convert an OMX_IndexParamAudio into a MMAL elementary stream format. - * - * @param format Format structure to update. - * @param coding Audio coding type. - * @param param Source OMX_IndexParamAudio structure. - * - * @return The MMAL encoding if a match was found or MMAL_ENCODING_UNKNOWN otherwise. - */ -MMAL_FOURCC_T mmalil_omx_audio_param_to_format(MMAL_ES_FORMAT_T *format, - OMX_AUDIO_CODINGTYPE coding, OMX_FORMAT_PARAM_TYPE *param); - -/** Convert a MMAL elementary stream format into a OMX_IndexParamAudio structure. - * - * @param param OMX_IndexParamAudio structure to update. - * @param param_index returns the OMX_IndexParamAudio index corresponding to the format. - * @param format Source format structure. - * - * @return The OMX aduio coding type if a match was found or OMX_AUDIO_CodingUnused otherwise. - */ -OMX_AUDIO_CODINGTYPE mmalil_format_to_omx_audio_param(OMX_FORMAT_PARAM_TYPE *param, - OMX_INDEXTYPE *param_index, MMAL_ES_FORMAT_T *format); - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif /* MMAL_IL_H */ diff --git a/vc/include/interface/mmal/util/mmal_list.h b/vc/include/interface/mmal/util/mmal_list.h @@ -1,127 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_LIST_H -#define MMAL_LIST_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** \defgroup MmalList Generic Linked List - * This provides a thread-safe implementation of a linked list which can be used - * with any data type. */ -/* @{ */ - -/** Single element in the list */ -typedef struct MMAL_LIST_ELEMENT_T -{ - struct MMAL_LIST_ELEMENT_T *next; - struct MMAL_LIST_ELEMENT_T *prev; -} MMAL_LIST_ELEMENT_T; - -/** Linked list type. - * Clients shouldn't modify this directly. Use the provided API functions to - * add new elements. The public members are only for debug purposes. - * */ -typedef struct MMAL_LIST_T -{ - unsigned int length; /**< Number of elements in the list (read-only) */ - MMAL_LIST_ELEMENT_T *first; /**< First element in the list (read-only) */ - MMAL_LIST_ELEMENT_T *last; /**< Last element in the list (read-only) */ -} MMAL_LIST_T; - -/** Create a new linked list. - * - * @return Pointer to new queue (NULL on failure). - */ -MMAL_LIST_T* mmal_list_create(void); - -/** Destroy a linked list. - * - * @param list List to destroy - */ -void mmal_list_destroy(MMAL_LIST_T *list); - -/** Remove the last element in the list. - * - * @param list List to remove from - * - * @return Pointer to the last element (or NULL if empty) - */ -MMAL_LIST_ELEMENT_T* mmal_list_pop_back(MMAL_LIST_T *list); - -/** Remove the first element in the list. - * - * @param list List to remove from - * - * @return Pointer to the first element (or NULL if empty) - */ -MMAL_LIST_ELEMENT_T* mmal_list_pop_front(MMAL_LIST_T *list); - -/** Add an element to the front of the list. - * - * @param list List to add to - * @param element The element to add - */ -void mmal_list_push_front(MMAL_LIST_T *list, MMAL_LIST_ELEMENT_T *element); - -/** Add an element to the back of the list. - * - * @param list List to add to - * @param element The element to add - */ -void mmal_list_push_back(MMAL_LIST_T *list, MMAL_LIST_ELEMENT_T *element); - -/** List comparison function. - * This is supplied by a client when inserting an element in - * the middle of the list. The list will always insert a smaller - * element in front of a larger element. - * - * @return TRUE: lhs < rhs - * FALSE: lhs >= rhs - */ -typedef int (*MMAL_LIST_COMPARE_T)(MMAL_LIST_ELEMENT_T *lhs, MMAL_LIST_ELEMENT_T *rhs); - -/** Insert an element into the list. - * The location where the element is inserted is determined using - * the supplied comparison function. Smaller elements are inserted - * in front of larger elements. - * - * @param list List to add to - * @param element The element to insert - * @param compare Comparison function supplied by the client - */ -void mmal_list_insert(MMAL_LIST_T *list, MMAL_LIST_ELEMENT_T *element, MMAL_LIST_COMPARE_T compare); - -/* @} */ - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_LIST_H */ diff --git a/vc/include/interface/mmal/util/mmal_param_convert.h b/vc/include/interface/mmal/util/mmal_param_convert.h @@ -1,92 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** \file - * Support for setting/getting parameters as string values. - */ - -#ifndef MMAL_PARAM_CONVERT_H -#define MMAL_PARAM_CONVERT_H - -#include "interface/mmal/mmal.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** Parse a video size. e.g. "1080p" gives 1920x1080. - * - * @param w width result - * @param h height result - * @param str string to convert - * @return MMAL_SUCCESS or error code - */ -MMAL_STATUS_T mmal_parse_video_size(uint32_t *w, uint32_t *h, const char *str); - -/** Parse a rational number. e.g. "30000/1001", "30", etc. - * @param dest filled in with result - * @param str string to convert - * @return MMAL_SUCCESS or error code - */ -MMAL_STATUS_T mmal_parse_rational(MMAL_RATIONAL_T *dest, const char *str); - -/** Parse an integer, e.g. -10, 0x1A, etc. - * @param dest filled in with result - * @param str string to convert - * @return MMAL_SUCCESS or error code - */ -MMAL_STATUS_T mmal_parse_int(int *dest, const char *str); - -/** Parse an unsigned integer, e.g. 10, 0x1A, etc. - * @param dest filled in with result - * @param str string to convert - * @return MMAL_SUCCESS or error code - */ -MMAL_STATUS_T mmal_parse_uint(unsigned int *dest, const char *str); - -/** Parse a geometry for a rectangle - * - * e.g. 100*100+50+75 - * or 200*150 - * @param dest filled in with result - * @param str string to convert - * @return MMAL_SUCCESS or error code - */ -MMAL_STATUS_T mmal_parse_geometry(MMAL_RECT_T *dest, const char *str); - -/** Parse a video codec name (something that can be encoded/decoded) - * @param str string to convert - * @param dest filled in with result - * @return MMAL_SUCCESS or error code - */ -MMAL_STATUS_T mmal_parse_video_codec(uint32_t *dest, const char *str); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/vc/include/interface/mmal/util/mmal_util.h b/vc/include/interface/mmal/util/mmal_util.h @@ -1,173 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_UTIL_H -#define MMAL_UTIL_H - -#include "interface/mmal/mmal.h" - -/** \defgroup MmalUtilities Utility functions - * The utility functions provide helpers for common functionality that is not part - * of the core MMAL API. - * @{ - */ - -/** Offset in bytes of FIELD in TYPE. */ -#define MMAL_OFFSET(TYPE, FIELD) ((size_t)((uint8_t *)&((TYPE*)0)->FIELD - (uint8_t *)0)) - -#ifdef __cplusplus -extern "C" { -#endif - -/** Convert a status to a statically-allocated string. - * - * @param status The MMAL status code. - * @return A C string describing the status code. - */ -const char *mmal_status_to_string(MMAL_STATUS_T status); - -/** Convert stride to pixel width for a given pixel encoding. - * - * @param encoding The pixel encoding (such as one of the \ref MmalEncodings "pre-defined encodings") - * @param stride The stride in bytes. - * @return The width in pixels. - */ -uint32_t mmal_encoding_stride_to_width(uint32_t encoding, uint32_t stride); - -/** Convert pixel width to stride for a given pixel encoding - * - * @param encoding The pixel encoding (such as one of the \ref MmalEncodings "pre-defined encodings") - * @param width The width in pixels. - * @return The stride in bytes. - */ -uint32_t mmal_encoding_width_to_stride(uint32_t encoding, uint32_t width); - -/** Convert a port type to a string. - * - * @param type The MMAL port type. - * @return A NULL-terminated string describing the port type. - */ -const char* mmal_port_type_to_string(MMAL_PORT_TYPE_T type); - -/** Get a parameter from a port allocating the required amount of memory - * for the parameter (i.e. for variable length parameters like URI or arrays). - * The size field will be set on output to the actual size of the - * parameter allocated and retrieved. - * - * The pointer returned must be released by a call to \ref mmal_port_parameter_free(). - * - * @param port port to send request to - * @param id parameter id - * @param size initial size hint for allocation (can be 0) - * @param status status of the parameter get operation (can be 0) - * @return pointer to the header of the parameter or NULL on failure. - */ -MMAL_PARAMETER_HEADER_T *mmal_port_parameter_alloc_get(MMAL_PORT_T *port, - uint32_t id, uint32_t size, MMAL_STATUS_T *status); - -/** Free a parameter structure previously allocated via - * \ref mmal_port_parameter_alloc_get(). - * - * @param param pointer to header of the parameter - */ -void mmal_port_parameter_free(MMAL_PARAMETER_HEADER_T *param); - -/** Copy buffer header metadata from source to destination. - * - * @param dest The destination buffer header. - * @param src The source buffer header. - */ -void mmal_buffer_header_copy_header(MMAL_BUFFER_HEADER_T *dest, const MMAL_BUFFER_HEADER_T *src); - -/** Create a pool of MMAL_BUFFER_HEADER_T associated with a specific port. - * This allows a client to allocate memory for the payload buffers based on the preferences - * of a port. This for instance will allow the port to allocate memory which can be shared - * between the host processor and videocore. - * After allocation, all allocated buffer headers will have been added to the queue. - * - * It is valid to create a pool with no buffer headers, or with zero size payload buffers. - * The mmal_pool_resize() function can be used to increase or decrease the number of buffer - * headers, or the size of the payload buffers, after creation of the pool. - * - * @param port Port responsible for creating the pool. - * @param headers Number of buffers which will be allocated with the pool. - * @param payload_size Size of the payload buffer which will be allocated in - * each of the buffer headers. - * @return Pointer to the newly created pool or NULL on failure. - */ -MMAL_POOL_T *mmal_port_pool_create(MMAL_PORT_T *port, - unsigned int headers, uint32_t payload_size); - -/** Destroy a pool of MMAL_BUFFER_HEADER_T associated with a specific port. - * This will also deallocate all of the memory which was allocated when creating or - * resizing the pool. - * - * @param port Pointer to the port responsible for creating the pool. - * @param pool Pointer to the pool to be destroyed. - */ -void mmal_port_pool_destroy(MMAL_PORT_T *port, MMAL_POOL_T *pool); - -/** Log the content of a \ref MMAL_PORT_T structure. - * - * @param port Pointer to the port to dump. - */ -void mmal_log_dump_port(MMAL_PORT_T *port); - -/** Log the content of a \ref MMAL_ES_FORMAT_T structure. - * - * @param format Pointer to the format to dump. - */ -void mmal_log_dump_format(MMAL_ES_FORMAT_T *format); - -/** Return the nth port. - * - * @param comp component to query - * @param index port index - * @param type port type - * - * @return port or NULL if not found - */ -MMAL_PORT_T *mmal_util_get_port(MMAL_COMPONENT_T *comp, MMAL_PORT_TYPE_T type, unsigned index); - -/** Convert a 4cc into a string. - * - * @param buf Destination for result - * @param len Size of result buffer - * @param fourcc 4cc to be converted - * @return converted string (buf) - * - */ -char *mmal_4cc_to_string(char *buf, size_t len, uint32_t fourcc); - - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif diff --git a/vc/include/interface/mmal/util/mmal_util_params.h b/vc/include/interface/mmal/util/mmal_util_params.h @@ -1,210 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_UTIL_PARAMS_H -#define MMAL_UTIL_PARAMS_H - -#include "interface/mmal/mmal.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @file - * Utility functions to set some common parameters. - */ - -/** Helper function to set the value of a boolean parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param value value to set the parameter to - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_boolean(MMAL_PORT_T *port, uint32_t id, MMAL_BOOL_T value); - -/** Helper function to get the value of a boolean parameter. - * @param port port on which to get the parameter - * @param id parameter id - * @param value pointer to where the value will be returned - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_get_boolean(MMAL_PORT_T *port, uint32_t id, MMAL_BOOL_T *value); - -/** Helper function to set the value of a 64 bits unsigned integer parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param value value to set the parameter to - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_uint64(MMAL_PORT_T *port, uint32_t id, uint64_t value); - -/** Helper function to get the value of a 64 bits unsigned integer parameter. - * @param port port on which to get the parameter - * @param id parameter id - * @param value pointer to where the value will be returned - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_get_uint64(MMAL_PORT_T *port, uint32_t id, uint64_t *value); - -/** Helper function to set the value of a 64 bits signed integer parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param value value to set the parameter to - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_int64(MMAL_PORT_T *port, uint32_t id, int64_t value); - -/** Helper function to get the value of a 64 bits signed integer parameter. - * @param port port on which to get the parameter - * @param id parameter id - * @param value pointer to where the value will be returned - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_get_int64(MMAL_PORT_T *port, uint32_t id, int64_t *value); - -/** Helper function to set the value of a 32 bits unsigned integer parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param value value to set the parameter to - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_uint32(MMAL_PORT_T *port, uint32_t id, uint32_t value); - -/** Helper function to get the value of a 32 bits unsigned integer parameter. - * @param port port on which to get the parameter - * @param id parameter id - * @param value pointer to where the value will be returned - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_get_uint32(MMAL_PORT_T *port, uint32_t id, uint32_t *value); - -/** Helper function to set the value of a 32 bits signed integer parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param value value to set the parameter to - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_int32(MMAL_PORT_T *port, uint32_t id, int32_t value); - -/** Helper function to get the value of a 32 bits signed integer parameter. - * @param port port on which to get the parameter - * @param id parameter id - * @param value pointer to where the value will be returned - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_get_int32(MMAL_PORT_T *port, uint32_t id, int32_t *value); - -/** Helper function to set the value of a rational parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param value value to set the parameter to - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_rational(MMAL_PORT_T *port, uint32_t id, MMAL_RATIONAL_T value); - -/** Helper function to get the value of a rational parameter. - * @param port port on which to get the parameter - * @param id parameter id - * @param value pointer to where the value will be returned - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_get_rational(MMAL_PORT_T *port, uint32_t id, MMAL_RATIONAL_T *value); - -/** Helper function to set the value of a string parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param value null-terminated string value - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_string(MMAL_PORT_T *port, uint32_t id, const char *value); - -/** Helper function to set the value of an array of bytes parameter. - * @param port port on which to set the parameter - * @param id parameter id - * @param data pointer to the array of bytes - * @param size size of the array of bytes - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_port_parameter_set_bytes(MMAL_PORT_T *port, uint32_t id, - const uint8_t *data, unsigned int size); - -/** Helper function to set a MMAL_PARAMETER_URI_T parameter on a port. - * @param port port on which to set the parameter - * @param uri URI string - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_util_port_set_uri(MMAL_PORT_T *port, const char *uri); - -/** Set the display region. - * @param port port to configure - * @param region region - * - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_util_set_display_region(MMAL_PORT_T *port, - MMAL_DISPLAYREGION_T *region); - -/** Tell the camera to use the STC for timestamps rather than the clock. - * - * @param port port to configure - * @param mode STC mode to use - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_util_camera_use_stc_timestamp(MMAL_PORT_T *port, MMAL_CAMERA_STC_MODE_T mode); - -/** Get the MMAL core statistics for a given port. - * - * @param port port to query - * @param dir port direction - * @param reset reset the stats as well - * @param stats filled in with results - * @return MMAL_SUCCESS or error - */ -MMAL_STATUS_T mmal_util_get_core_port_stats(MMAL_PORT_T *port, MMAL_CORE_STATS_DIR dir, MMAL_BOOL_T reset, - MMAL_CORE_STATISTICS_T *stats); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/vc/include/interface/mmal/util/mmal_util_rational.h b/vc/include/interface/mmal/util/mmal_util_rational.h @@ -1,127 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_UTIL_RATIONAL_H -#define MMAL_UTIL_RATIONAL_H - -#include "interface/mmal/mmal_types.h" - -/** \defgroup MmalRationalUtilities Rational Utility Functions - * \ingroup MmalUtilities - * The rational utility functions allow easy manipulation of rational numbers. - * - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** Add 2 rational numbers. - * It is assumed that both input rational numbers are in - * their simplest form. - * - * @param a First operand - * @param b Second operand - * - * @return a + b - */ -MMAL_RATIONAL_T mmal_rational_add(MMAL_RATIONAL_T a, MMAL_RATIONAL_T b); - -/** Subtract 2 rational numbers. - * It is assumed that both input rational numbers are in - * their simplest form. - * - * @param a First operand - * @param b Second operand - * - * @return a - b - */ -MMAL_RATIONAL_T mmal_rational_subtract(MMAL_RATIONAL_T a, MMAL_RATIONAL_T b); - -/** Multiply 2 rational numbers. - * It is assumed that both input rational numbers are in - * their simplest form. - * - * @param a First operand - * @param b Second operand - * - * @return a * b - */ -MMAL_RATIONAL_T mmal_rational_multiply(MMAL_RATIONAL_T a, MMAL_RATIONAL_T b); - -/** Divide 2 rational numbers. - * It is assumed that both input rational numbers are in - * their simplest form. - * - * @param a First operand - * @param b Second operand - * - * @return a / b - */ -MMAL_RATIONAL_T mmal_rational_divide(MMAL_RATIONAL_T a, MMAL_RATIONAL_T b); - -/** Convert a rational number to a 32-bit signed Q16 number. - * Saturation will occur for rational numbers with an absolute - * value greater than 32768. - * - * @param rational Rational number to convert - * - * @return 32-bit signed Q16 number - */ -int32_t mmal_rational_to_fixed_16_16(MMAL_RATIONAL_T rational); - -/** Convert a signed 32-bit Q16 number to a rational number. - * - * @param fixed Signed 32-bit Q16 number to convert - * - * @return Rational number - */ -MMAL_RATIONAL_T mmal_rational_from_fixed_16_16(int32_t fixed); - -/** Reduce a rational number to it's simplest form. - * - * @param rational Rational number to simplify - */ -void mmal_rational_simplify(MMAL_RATIONAL_T *rational); - -/** Test 2 rational numbers for equality. - * - * @param a First operand - * @param b Second operand - * - * @return true if equal - */ -MMAL_BOOL_T mmal_rational_equal(MMAL_RATIONAL_T a, MMAL_RATIONAL_T b); - -#ifdef __cplusplus -} -#endif - -/** @} */ - -#endif diff --git a/vc/include/interface/mmal/vc/mmal_vc_api.h b/vc/include/interface/mmal/vc/mmal_vc_api.h @@ -1,234 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_VC_API_H -#define MMAL_VC_API_H - -/** @file - * - * Public API for MMAL VC client. Most functionality is exposed - * via MMAL itself. - */ - -#include "interface/mmal/mmal_types.h" -#include "interface/mmal/mmal_parameters.h" -#include "interface/mmal/mmal_port.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** State of components created by the VC adaptation layer, used for - * statistics reporting. - */ -typedef enum { - MMAL_STATS_COMP_IDLE, - MMAL_STATS_COMP_CREATED, - MMAL_STATS_COMP_DESTROYING, - MMAL_STATS_COMP_DESTROYED, - MMAL_STATS_COMP_UNUSED = 0xffffffff /* force 32bit */ -} MMAL_STATS_COMP_STATE_T; - -/** Per-component statistics collected by the VC adaptation layer. - */ -struct MMAL_VC_COMP_STATS_T { - struct MMAL_DRIVER_COMPONENT_T *comp; - MMAL_STATS_COMP_STATE_T state; - uint32_t pid; - uint32_t pool_mem_alloc_size; - char name[20]; -}; - -/** VC adaptation layer statistics. - */ -struct MMAL_VC_STATS_T -{ - struct - { - uint32_t rx; /**< Count of data buffers received */ - uint32_t rx_zero_copy; /**< Count of zero-copy data buffers received */ - uint32_t rx_empty; /**< Empty data buffers (to be filled) */ - uint32_t rx_fails; /**< Gave up partway through */ - uint32_t tx; /**< Count of data buffers sent */ - uint32_t tx_zero_copy; /**< Count of zero-copy data buffers sent */ - uint32_t tx_empty; /**< Count of empty data buffers sent */ - uint32_t tx_fails; /**< Gave up partway through */ - uint32_t tx_short_msg; /**< Messages sent directly in the control message */ - uint32_t rx_short_msg; /**< Messages received directly in the control message */ - } buffers; - struct service - { - uint32_t created; /**< How many services created */ - uint32_t pending_destroy; /**< How many destroyed */ - uint32_t destroyed; /**< How many destroyed */ - uint32_t failures; /**< Failures to create a service */ - } service; - struct commands - { - uint32_t bad_messages; - uint32_t executed; - uint32_t failed; - uint32_t replies; - uint32_t reply_fails; - } commands; - struct - { - uint32_t tx; /**< Count of events sent */ - uint32_t tx_fails; /**< Count of events not fully sent */ - } events; - struct - { - uint32_t created; - uint32_t destroyed; - uint32_t destroying; - uint32_t failed; - uint32_t list_size; - struct MMAL_VC_COMP_STATS_T component_list[8]; - } components; - struct - { - uint32_t enqueued_messages; - uint32_t dequeued_messages; - uint32_t max_parameter_set_delay; - uint32_t max_messages_waiting; - } worker; - -}; -typedef struct MMAL_VC_STATS_T MMAL_VC_STATS_T; - -/* Simple circular text buffer used to store 'interesting' data - * from MMAL clients. e.g. settings for each picture taken */ -struct MMAL_VC_HOST_LOG_T -{ - /** Simple circular buffer of plain text log messages separated by NUL */ - char buffer[16 << 10]; - /** For VCDBG validation and to help detect buffer overflow */ - uint32_t magic; - /** Write offset into buffer */ - int32_t offset; - /** Counter of host messages logged since boot */ - unsigned count; -}; -typedef struct MMAL_VC_HOST_LOG_T MMAL_VC_HOST_LOG_T; - -/** Status from querying MMAL core statistics. - */ -typedef enum -{ - MMAL_STATS_FOUND, - MMAL_STATS_COMPONENT_NOT_FOUND, - MMAL_STATS_PORT_NOT_FOUND, - MMAL_STATS_INVALID = 0x7fffffff -} MMAL_STATS_RESULT_T; - -MMAL_STATUS_T mmal_vc_init(void); -void mmal_vc_deinit(void); - -MMAL_STATUS_T mmal_vc_use(void); -MMAL_STATUS_T mmal_vc_release(void); - -MMAL_STATUS_T mmal_vc_get_version(uint32_t *major, uint32_t *minor, uint32_t *minimum); -MMAL_STATUS_T mmal_vc_get_stats(MMAL_VC_STATS_T *stats, int reset); - -/** Return the MMAL core statistics for a given component/port. - * - * @param stats Updated with given port statistics - * @param result Whether the port/component was found - * @param name Filled in with the name of the port - * @param namelen Length of name - * @param component Which component (indexed from zero) - * @param port_type Which type of port - * @param port Which port (index from zero) - * @param reset Reset the stats. - */ -MMAL_STATUS_T mmal_vc_get_core_stats(MMAL_CORE_STATISTICS_T *stats, - MMAL_STATS_RESULT_T *result, - char *name, - size_t namelen, - MMAL_PORT_TYPE_T type, - unsigned component, - unsigned port, - MMAL_CORE_STATS_DIR dir, - MMAL_BOOL_T reset); -/** - * Stores an arbitrary text message in a circular buffer inside the MMAL VC server. - * The purpose of this message is to log high level events from the host in order - * to diagnose problems that require multiple actions to reproduce. e.g. taking - * multiple pictures with different settings. - * - * @param msg The message text. - * @return MMAL_SUCCESS if the message was logged or MMAL_ENOSYS if the API - * if not supported. - */ -MMAL_STATUS_T mmal_vc_host_log(const char *msg); - -/* For backwards compatibility in builds */ -#define MMAL_VC_API_HAVE_HOST_LOG - -/* VC DEBUG ONLY ************************************************************/ -/** Consumes memory in the relocatable heap. - * - * The existing reserved memory is freed first then the new chunk is allocated. - * If zero is specified for the size then the previously reserved memory - * is freed and no allocation occurs. - * - * At startup no memory is reserved. - * - * @param size Size of memory to consume in bytes. - * @param handle Set to the mem handle for the reserved memory or zero - * if no memory was allocated. - * @return MMAL_SUCCESS if memory was reserved (or size zero requested), - * MMAL_ENOSPC if the allocation failed or MMAL_ENOSYS if the - * API is not supported e.g in release mode VC images. - * @internal - */ -MMAL_STATUS_T mmal_vc_consume_mem(size_t size, uint32_t *handle); - -typedef enum -{ - MMAL_VC_COMPACT_NONE = 0, - MMAL_VC_COMPACT_NORMAL = 1, - MMAL_VC_COMPACT_DISCARD = 2, - MMAL_VC_COMPACT_AGGRESSIVE = 4, - MMAL_VC_COMPACT_SHUFFLE = 0x80, - MMAL_VC_COMPACT_ALL = MMAL_VC_COMPACT_NORMAL | MMAL_VC_COMPACT_DISCARD | MMAL_VC_COMPACT_AGGRESSIVE, -} MMAL_VC_COMPACT_MODE_T; - -/** Trigger relocatable heap compaction. - * @internal - */ -MMAL_STATUS_T mmal_vc_compact(MMAL_VC_COMPACT_MODE_T mode, uint32_t *duration); - -/** Trigger LMK action from VC, for diagnostics. - * @internal - */ -MMAL_STATUS_T mmal_vc_lmk(uint32_t alloc_size); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/mmal/vc/mmal_vc_api_drm.h b/vc/include/interface/mmal/vc/mmal_vc_api_drm.h @@ -1,55 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef MMAL_VC_API_DRM_H -#define MMAL_VC_API_DRM_H - -/** @file - * - * Public API for MMAL VC client. (Divx DRM part) - */ - - -#ifdef __cplusplus -extern "C" { -#endif - -// Reads the current clock (in microseconds) into the "time" variable. -// Returns zero on success, nonszero on failure -int mmal_vc_drm_get_time(unsigned int * time); - -// Reads the local hardware secret into the "into" variable (needs to be 32 bytes of space for this) -// Returns 0 on success, nonzero on failure -// Usage: -// unsigned char buffer[32]; -// success = mmal_vc_divx_drm_get_lhs(buffer); -int mmal_vc_drm_get_lhs32(unsigned char * into); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/mmal/vc/mmal_vc_client_priv.h b/vc/include/interface/mmal/vc/mmal_vc_client_priv.h @@ -1,80 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_VC_CLIENT_H -#define MMAL_VC_CLIENT_H - -/** @file mmal_vc_client_priv.h - * - * Internal API for vchiq_arm MMAL client. - */ - -struct MMAL_CLIENT_T; -typedef struct MMAL_CLIENT_T MMAL_CLIENT_T; - -void mmal_vc_client_init(void); - -/** Hold the context required when sending a buffer to the copro. - */ -typedef struct MMAL_VC_CLIENT_BUFFER_CONTEXT_T -{ - uint32_t magic; - - /** Called when VC is done with the buffer */ - void (*callback)(struct mmal_worker_buffer_from_host *); - - /** Called when VC sends an event */ - void (*callback_event)(MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *event); - - /** The port this buffer was sent to */ - MMAL_PORT_T *port; - - /** The original buffer from the host. */ - MMAL_BUFFER_HEADER_T *buffer; - - /** The actual message sent to the host */ - struct mmal_worker_buffer_from_host msg; -} MMAL_VC_CLIENT_BUFFER_CONTEXT_T; - - -MMAL_CLIENT_T *mmal_vc_get_client(void); - -MMAL_STATUS_T mmal_vc_sendwait_message(MMAL_CLIENT_T *client, - mmal_worker_msg_header *header, - size_t size, - uint32_t msgid, - void *dest, - size_t *destlen, - MMAL_BOOL_T send_dummy_bulk); - -MMAL_STATUS_T mmal_vc_send_message(MMAL_CLIENT_T *client, - mmal_worker_msg_header *header, size_t size, - uint8_t *data, size_t data_size, - uint32_t msgid); - -#endif - diff --git a/vc/include/interface/mmal/vc/mmal_vc_msgnames.h b/vc/include/interface/mmal/vc/mmal_vc_msgnames.h @@ -1,37 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_VC_MSGNAMES_H -#define MMAL_VC_MSGNAMES_H - -#include "interface/vcos/vcos.h" - -/** Convert a message id to a name. - */ -const char *mmal_msgname(uint32_t id); - -#endif diff --git a/vc/include/interface/mmal/vc/mmal_vc_msgs.h b/vc/include/interface/mmal/vc/mmal_vc_msgs.h @@ -1,535 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_VC_MSGS_H -#define MMAL_VC_MSGS_H - -/** @file mmal_vc_msgs.h - * - * Private message definitions, defining the message API between - * the host and VideoCore. - */ -#include "interface/vcos/vcos.h" -#include "interface/mmal/mmal.h" -#include "mmal_vc_api.h" - -#define MMAL_CONTROL_FOURCC() VCHIQ_MAKE_FOURCC('m','m','a','l') - -/* Major version indicates binary backwards compatiblity */ -#define WORKER_VER_MAJOR 16 -#define WORKER_VER_MINIMUM 10 -/* Minor version is not used normally. - */ -#define WORKER_VER_MINOR 1 -#ifndef WORKER_VER_MINIMUM -#endif - -#define VIDEOCORE_PREFIX "vc" - -#define MMAL_MAX_PORTS 8 /**< Max ports per component */ - -#define MMAL_WORKER_MAX_MSG_LEN 512 -#define MMAL_VC_CORE_STATS_NAME_MAX 32 /**< Length of the name in the core stats message */ - -/** A MMAL_CONTROL_SERVICE_T gets space for a single message. This - * is the space allocated for these messages. - */ -#define MMAL_WORKER_MSG_LEN 28 - -/** Maximum size of the format extradata. - * FIXME: should probably be made bigger and maybe be passed separately from the info. - */ -#define MMAL_FORMAT_EXTRADATA_MAX_SIZE 128 - -/** Size of space reserved in a buffer message for short messages. - */ -#define MMAL_VC_SHORT_DATA 128 - -/** Message ids sent to worker thread. - */ - -/* Please update the array in mmal_vc_msgnames.c if this is updated. - */ -typedef enum { - MMAL_WORKER_QUIT = 1, - MMAL_WORKER_SERVICE_CLOSED, - MMAL_WORKER_GET_VERSION, - MMAL_WORKER_COMPONENT_CREATE, - MMAL_WORKER_COMPONENT_DESTROY, - MMAL_WORKER_COMPONENT_ENABLE, - MMAL_WORKER_COMPONENT_DISABLE, - MMAL_WORKER_PORT_INFO_GET, - MMAL_WORKER_PORT_INFO_SET, - MMAL_WORKER_PORT_ACTION, - MMAL_WORKER_BUFFER_FROM_HOST, - MMAL_WORKER_BUFFER_TO_HOST, - MMAL_WORKER_GET_STATS, - MMAL_WORKER_PORT_PARAMETER_SET, - MMAL_WORKER_PORT_PARAMETER_GET, - MMAL_WORKER_EVENT_TO_HOST, - MMAL_WORKER_GET_CORE_STATS_FOR_PORT, - MMAL_WORKER_OPAQUE_ALLOCATOR, - /* VC debug mode only - due to security, denial of service implications */ - MMAL_WORKER_CONSUME_MEM, - MMAL_WORKER_LMK, - MMAL_WORKER_OPAQUE_ALLOCATOR_DESC, - MMAL_WORKER_DRM_GET_LHS32, - MMAL_WORKER_DRM_GET_TIME, - MMAL_WORKER_BUFFER_FROM_HOST_ZEROLEN, - MMAL_WORKER_PORT_FLUSH, - MMAL_WORKER_HOST_LOG, - MMAL_WORKER_COMPACT, - MMAL_WORKER_MSG_LAST -} MMAL_WORKER_CMD_T; - -/** Every message has one of these at the start. - */ -typedef struct -{ - uint32_t magic; - uint32_t msgid; - struct MMAL_CONTROL_SERVICE_T *control_service; /** Handle to the control service */ - - union { - struct MMAL_WAITER_T *waiter; /** User-land wait structure, passed back */ - } u; - - MMAL_STATUS_T status; /** Result code, passed back */ - /* Make sure this structure is 64 bit aligned */ - uint32_t dummy; -} mmal_worker_msg_header; - -/* Make sure mmal_worker_msg_header will preserve 64 bits alignment */ -vcos_static_assert(!(sizeof(mmal_worker_msg_header) & 0x7)); - -/* Message structures sent to worker thread. - */ - -/** Tell the worker a service has closed. It should start to delete - * the associated components. - */ -typedef struct -{ - mmal_worker_msg_header header; -} mmal_worker_service_closed; -vcos_static_assert(sizeof(mmal_worker_service_closed) <= MMAL_WORKER_MSG_LEN); - -/** Send from VC to host to report our version */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t flags; - uint32_t major; - uint32_t minor; - uint32_t minimum; -} mmal_worker_version; - -/** Request component creation */ -typedef struct -{ - mmal_worker_msg_header header; - void *client_component; /** Client component */ - char name[128]; - uint32_t pid; /**< For debug */ -} mmal_worker_component_create; - -/** Reply to component-creation message. Reports back - * the number of ports. - */ -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; - uint32_t component_handle; /** Handle on VideoCore for component */ - uint32_t input_num; /**< Number of input ports */ - uint32_t output_num; /**< Number of output ports */ - uint32_t clock_num; /**< Number of clock ports */ -} mmal_worker_component_create_reply; -vcos_static_assert(sizeof(mmal_worker_component_create_reply) <= MMAL_WORKER_MAX_MSG_LEN); - -/** Destroys a component - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< which component */ -} mmal_worker_component_destroy; - -/** Enables a component - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< which component */ -} mmal_worker_component_enable; - -/** Disable a component - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< Which component */ -} mmal_worker_component_disable; - -/** Component port info. Used to get port info. - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< Which component */ - MMAL_PORT_TYPE_T port_type; /**< Type of port */ - uint32_t index; /**< Which port of given type to get */ -} mmal_worker_port_info_get; -vcos_static_assert(sizeof(mmal_worker_port_info_get) <= MMAL_WORKER_MAX_MSG_LEN); - -/** Component port info. Used to set port info. - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< Which component */ - MMAL_PORT_TYPE_T port_type; /**< Type of port */ - uint32_t index; /**< Which port of given type to get */ - MMAL_PORT_T port; - MMAL_ES_FORMAT_T format; - MMAL_ES_SPECIFIC_FORMAT_T es; - uint8_t extradata[MMAL_FORMAT_EXTRADATA_MAX_SIZE]; -} mmal_worker_port_info_set; -vcos_static_assert(sizeof(mmal_worker_port_info_set) <= MMAL_WORKER_MAX_MSG_LEN); - -/** Report port info back in response to a get / set. */ -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; /**< Result of query */ - uint32_t component_handle; /**< Which component */ - MMAL_PORT_TYPE_T port_type; /**< Type of port */ - uint32_t index; /**< Which port of given type to get */ - int32_t found; /**< Did we find anything? */ - uint32_t port_handle; /**< Handle to use for this port */ - MMAL_PORT_T port; - MMAL_ES_FORMAT_T format; - MMAL_ES_SPECIFIC_FORMAT_T es; - uint8_t extradata[MMAL_FORMAT_EXTRADATA_MAX_SIZE]; -} mmal_worker_port_info; -vcos_static_assert(sizeof(mmal_worker_port_info) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; -} mmal_worker_reply; - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; - uint8_t secret[32]; -} mmal_worker_drm_get_lhs32_reply; -vcos_static_assert(sizeof(mmal_worker_drm_get_lhs32_reply) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; - uint32_t time; -} mmal_worker_drm_get_time_reply; -vcos_static_assert(sizeof(mmal_worker_drm_get_time_reply) <= MMAL_WORKER_MAX_MSG_LEN); - -/** List of actions for a port */ -enum MMAL_WORKER_PORT_ACTIONS -{ - MMAL_WORKER_PORT_ACTION_UNKNOWN = 0, /**< Unkown action */ - MMAL_WORKER_PORT_ACTION_ENABLE, /**< Enable a port */ - MMAL_WORKER_PORT_ACTION_DISABLE, /**< Disable a port */ - MMAL_WORKER_PORT_ACTION_FLUSH, /**< Flush a port */ - MMAL_WORKER_PORT_ACTION_CONNECT, /**< Connect 2 ports together */ - MMAL_WORKER_PORT_ACTION_DISCONNECT, /**< Disconnect 2 ports connected together */ - MMAL_WORKER_PORT_ACTION_SET_REQUIREMENTS, /**< Set buffer requirements */ - MMAL_WORKER_PORT_ACTION_MAX = 0x7fffffff /**< Make the enum 32bits */ -}; - -/** Trigger an action on a port. - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; - uint32_t port_handle; - enum MMAL_WORKER_PORT_ACTIONS action; - - /** Action parameter */ - union { - struct { - MMAL_PORT_T port; - } enable; - struct { - uint32_t component_handle; - uint32_t port_handle; - } connect; - } param; - -} mmal_worker_port_action; -vcos_static_assert(sizeof(mmal_worker_port_action) <= MMAL_WORKER_MAX_MSG_LEN); - -#define MMAL_WORKER_PORT_PARAMETER_SPACE 96 - -#define MMAL_WORKER_PORT_PARAMETER_SET_MAX \ - (MMAL_WORKER_PORT_PARAMETER_SPACE*sizeof(uint32_t)+sizeof(MMAL_PARAMETER_HEADER_T)) - -#define MMAL_WORKER_PORT_PARAMETER_GET_MAX MMAL_WORKER_PORT_PARAMETER_SET_MAX - -/** Component port parameter set. Doesn't include space for the parameter data. - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< Which component */ - uint32_t port_handle; /**< Which port */ - MMAL_PARAMETER_HEADER_T param; /**< Parameter ID and size */ - uint32_t space[MMAL_WORKER_PORT_PARAMETER_SPACE]; -} mmal_worker_port_param_set; -vcos_static_assert(sizeof(mmal_worker_port_param_set) <= MMAL_WORKER_MAX_MSG_LEN); - -/** Component port parameter get. - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< Which component */ - uint32_t port_handle; /**< Which port */ - MMAL_PARAMETER_HEADER_T param; /**< Parameter ID and size */ - uint32_t space[MMAL_WORKER_PORT_PARAMETER_SPACE]; -} mmal_worker_port_param_get; -vcos_static_assert(sizeof(mmal_worker_port_param_get) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_handle; /**< Which component */ - uint32_t port_handle; /**< Which port */ - MMAL_PARAMETER_HEADER_T param; /**< Parameter ID and size */ -} mmal_worker_port_param_get_old; - -/** Component port parameter get reply. Doesn't include space for the parameter data. - */ -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; /**< Status of mmal_port_parameter_get call */ - MMAL_PARAMETER_HEADER_T param; /**< Parameter ID and size */ - uint32_t space[MMAL_WORKER_PORT_PARAMETER_SPACE]; -} mmal_worker_port_param_get_reply; -vcos_static_assert(sizeof(mmal_worker_port_param_get_reply) <= MMAL_WORKER_MAX_MSG_LEN); - -/** Buffer header driver area structure. In the private area - * of a buffer header there is a driver area where we can - * put values. This structure defines the layout of that. - */ -struct MMAL_DRIVER_BUFFER_T -{ - uint32_t magic; - uint32_t component_handle; /**< The component this buffer is from */ - uint32_t port_handle; /**< Index into array of ports for this component */ - - /** Client side uses this to get back to its context structure. */ - struct MMAL_VC_CLIENT_BUFFER_CONTEXT_T *client_context; -}; - -/** Receive a buffer from the host. - * - * @sa mmal_port_send_buffer() - */ - -typedef struct mmal_worker_buffer_from_host -{ - mmal_worker_msg_header header; - - /** Our control data, copied from the buffer header "driver area" - * @sa mmal_buffer_header_driver_data(). - */ - struct MMAL_DRIVER_BUFFER_T drvbuf; - - /** Referenced buffer control data. - * This is set if the buffer is referencing another - * buffer as is the case with passthrough ports where - * buffers on the output port reference buffers on the - * input port. */ - struct MMAL_DRIVER_BUFFER_T drvbuf_ref; - - /** the buffer header itself */ - MMAL_BUFFER_HEADER_T buffer_header; - MMAL_BUFFER_HEADER_TYPE_SPECIFIC_T buffer_header_type_specific; - - MMAL_BOOL_T is_zero_copy; - MMAL_BOOL_T has_reference; - - /** If the data is short enough, then send it in the control message rather - * than using a separate VCHIQ bulk transfer. - */ - uint32_t payload_in_message; - uint8_t short_data[MMAL_VC_SHORT_DATA]; - -} mmal_worker_buffer_from_host; -vcos_static_assert(sizeof(mmal_worker_buffer_from_host) <= MMAL_WORKER_MAX_MSG_LEN); - -/** Maximum number of event data bytes that can be passed in the message. - * More than this and the data is passed in a bulk message. - */ -#define MMAL_WORKER_EVENT_SPACE 256 - -/** Send an event buffer from the host. - * - * @sa mmal_port_send_event() - */ - -typedef struct mmal_worker_event_to_host -{ - mmal_worker_msg_header header; - - struct MMAL_COMPONENT_T *client_component; - uint32_t port_type; - uint32_t port_num; - - uint32_t cmd; - uint32_t length; - uint8_t data[MMAL_WORKER_EVENT_SPACE]; - MMAL_BUFFER_HEADER_T *delayed_buffer; /* Only used to remember buffer for bulk rx */ -} mmal_worker_event_to_host; -vcos_static_assert(sizeof(mmal_worker_event_to_host) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_VC_STATS_T stats; - uint32_t reset; -} mmal_worker_stats; -vcos_static_assert(sizeof(mmal_worker_stats) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef enum { - MMAL_WORKER_OPAQUE_MEM_ALLOC, - MMAL_WORKER_OPAQUE_MEM_RELEASE, - MMAL_WORKER_OPAQUE_MEM_ACQUIRE, - MMAL_WORKER_OPAQUE_MEM_MAX = 0x7fffffff, -} MMAL_WORKER_OPAQUE_MEM_OP; - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_WORKER_OPAQUE_MEM_OP op; - uint32_t handle; - MMAL_STATUS_T status; - char description[32]; -} mmal_worker_opaque_allocator; - -/* - * Per-port core statistics - */ -typedef struct -{ - mmal_worker_msg_header header; - uint32_t component_index; - uint32_t port_index; - MMAL_PORT_TYPE_T type; - MMAL_CORE_STATS_DIR dir; - MMAL_BOOL_T reset; -} mmal_worker_get_core_stats_for_port; - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; - MMAL_STATS_RESULT_T result; - MMAL_CORE_STATISTICS_T stats; - char component_name[MMAL_VC_CORE_STATS_NAME_MAX]; -} mmal_worker_get_core_stats_for_port_reply; - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; - /* The amount of memory to reserve */ - uint32_t size; - /* Handle to newly allocated memory or MEM_HANDLE_INVALD on failure */ - uint32_t handle; -} mmal_worker_consume_mem; -vcos_static_assert(sizeof(mmal_worker_consume_mem) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef struct -{ - mmal_worker_msg_header header; - MMAL_STATUS_T status; - uint32_t mode; - uint32_t duration; -} mmal_worker_compact; -vcos_static_assert(sizeof(mmal_worker_compact) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef struct -{ - mmal_worker_msg_header header; - /* Message text to add to the circular buffer */ - char msg[MMAL_WORKER_MAX_MSG_LEN - sizeof(mmal_worker_msg_header)]; -} mmal_worker_host_log; -vcos_static_assert(sizeof(mmal_worker_host_log) <= MMAL_WORKER_MAX_MSG_LEN); - -typedef struct -{ - mmal_worker_msg_header header; - /* The memory allocation size to pass to lmk, as if in a response to an - * allocation for this amount of memory. */ - uint32_t alloc_size; -} mmal_worker_lmk; -vcos_static_assert(sizeof(mmal_worker_lmk) <= MMAL_WORKER_MAX_MSG_LEN); - -static inline void mmal_vc_buffer_header_to_msg(mmal_worker_buffer_from_host *msg, - MMAL_BUFFER_HEADER_T *header) -{ - msg->buffer_header.cmd = header->cmd; - msg->buffer_header.offset = header->offset; - msg->buffer_header.length = header->length; - msg->buffer_header.flags = header->flags; - msg->buffer_header.pts = header->pts; - msg->buffer_header.dts = header->dts; - msg->buffer_header.alloc_size = header->alloc_size; - msg->buffer_header.data = header->data; - msg->buffer_header_type_specific = *header->type; -} - -static inline void mmal_vc_msg_to_buffer_header(MMAL_BUFFER_HEADER_T *header, - mmal_worker_buffer_from_host *msg) -{ - header->cmd = msg->buffer_header.cmd; - header->offset = msg->buffer_header.offset; - header->length = msg->buffer_header.length; - header->flags = msg->buffer_header.flags; - header->pts = msg->buffer_header.pts; - header->dts = msg->buffer_header.dts; - *header->type = msg->buffer_header_type_specific; -} - -#endif - diff --git a/vc/include/interface/mmal/vc/mmal_vc_opaque_alloc.h b/vc/include/interface/mmal/vc/mmal_vc_opaque_alloc.h @@ -1,73 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MMAL_VC_OPAQUE_ALLOC_H -#define MMAL_VC_OPAQUE_ALLOC_H - - -#include <stdint.h> -#include "interface/mmal/mmal.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef uint32_t MMAL_OPAQUE_IMAGE_HANDLE_T; - -/** Allocate an opaque image on VideoCore. - * - * @return allocated handle, or zero if allocation failed. - */ -MMAL_OPAQUE_IMAGE_HANDLE_T mmal_vc_opaque_alloc(void); - -/** Allocate an opaque image on VideoCore, providing a description. - * @return allocated handle, or zero if allocation failed. - */ -MMAL_OPAQUE_IMAGE_HANDLE_T mmal_vc_opaque_alloc_desc(const char *description); - -/** Release an opaque image. - * - * @param handle handle allocated earlier - * @return MMAL_SUCCESS or error code if handle not found - */ -MMAL_STATUS_T mmal_vc_opaque_release(MMAL_OPAQUE_IMAGE_HANDLE_T h); - -/** Acquire an additional reference to an opaque image. - * - * @param handle handle allocated earlier - * @return MMAL_SUCCESS or error code if handle not found - */ -MMAL_STATUS_T mmal_vc_opaque_acquire(MMAL_OPAQUE_IMAGE_HANDLE_T h); - - -#ifdef __cplusplus -} -#endif - - -#endif - diff --git a/vc/include/interface/mmal/vc/mmal_vc_shm.h b/vc/include/interface/mmal/vc/mmal_vc_shm.h @@ -1,62 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef MMAL_VC_SHM_H -#define MMAL_VC_SHM_H - -/** @file - * - * Abstraction layer for MMAL VC shared memory. - * This API is only used by the MMAL VC component. - */ - -#include "mmal_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** Initialise the shared memory system */ -MMAL_STATUS_T mmal_vc_shm_init(void); - -/** Allocate a shared memory buffer */ -uint8_t *mmal_vc_shm_alloc(uint32_t size); - -/** Free a shared memory buffer */ -MMAL_STATUS_T mmal_vc_shm_free(uint8_t *mem); - -/** Lock a shared memory buffer */ -uint8_t *mmal_vc_shm_lock(uint8_t *mem, uint32_t workaround); - -/** Unlock a shared memory buffer */ -uint8_t *mmal_vc_shm_unlock(uint8_t *mem, uint32_t *length, uint32_t workaround); - - -#ifdef __cplusplus -} -#endif - -#endif /* MMAL_VC_SHM_H */ diff --git a/vc/include/interface/vchi/common/endian.h b/vc/include/interface/vchi/common/endian.h @@ -1,44 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef _VCHI_ENDIAN_H_ -#define _VCHI_ENDIAN_H_ - -#include "interface/vcos/vcos.h" - -int16_t vchi_readbuf_int16 ( const void *ptr ); -uint16_t vchi_readbuf_uint16( const void *ptr ); -uint32_t vchi_readbuf_uint32( const void *ptr ); -vcos_fourcc_t vchi_readbuf_fourcc( const void *ptr ); - -void vchi_writebuf_uint16( void *ptr, uint16_t value ); -void vchi_writebuf_uint32( void *ptr, uint32_t value ); -void vchi_writebuf_fourcc( void *ptr, vcos_fourcc_t value ); - -#endif /* _VCHI_ENDIAN_H_ */ - -/********************************** End of file ******************************************/ diff --git a/vc/include/interface/vchi/connections/connection.h b/vc/include/interface/vchi/connections/connection.h @@ -1,324 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * \file - * - * \brief Contains the protypes for the interface functions. -*/ - -#ifndef CONNECTION_H_ -#define CONNECTION_H_ - -#include "interface/vchi/vchi_cfg_internal.h" -#include "interface/vchi/vchi_common.h" -#include "interface/vchi/message_drivers/message.h" - -/****************************************************************************** - Global defs - *****************************************************************************/ - -// Opaque handle for a connection / service pair -typedef struct opaque_vchi_connection_connected_service_handle_t *VCHI_CONNECTION_SERVICE_HANDLE_T; - -// opaque handle to the connection state information -typedef struct opaque_vchi_connection_info_t VCHI_CONNECTION_STATE_T; - -typedef struct vchi_connection_t VCHI_CONNECTION_T; - - -/****************************************************************************** - API - *****************************************************************************/ - -// Routine to init a connection with a particular low level driver -typedef VCHI_CONNECTION_STATE_T * (*VCHI_CONNECTION_INIT_T)( struct vchi_connection_t * connection, - const VCHI_MESSAGE_DRIVER_T * driver ); - -// Routine to control CRC enabling at a connection level -typedef int32_t (*VCHI_CONNECTION_CRC_CONTROL_T)( VCHI_CONNECTION_STATE_T *state_handle, - VCHI_CRC_CONTROL_T control ); - -// Routine to create a service -typedef int32_t (*VCHI_CONNECTION_SERVICE_CONNECT_T)( VCHI_CONNECTION_STATE_T *state_handle, - vcos_fourcc_t service_id, - uint32_t rx_fifo_size, - uint32_t tx_fifo_size, - int server, - VCHI_CALLBACK_T callback, - void *callback_param, - vcos_bool_t want_crc, - vcos_bool_t want_unaligned_bulk_rx, - vcos_bool_t want_unaligned_bulk_tx, - VCHI_CONNECTION_SERVICE_HANDLE_T *service_handle ); - -// Routine to close a service -typedef int32_t (*VCHI_CONNECTION_SERVICE_DISCONNECT_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle ); - -// Routine to queue a message -typedef int32_t (*VCHI_CONNECTION_SERVICE_QUEUE_MESSAGE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - const void *data, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *msg_handle ); - -// scatter-gather (vector) message queueing -typedef int32_t (*VCHI_CONNECTION_SERVICE_QUEUE_MESSAGEV_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - VCHI_MSG_VECTOR_T *vector, - uint32_t count, - VCHI_FLAGS_T flags, - void *msg_handle ); - -// Routine to dequeue a message -typedef int32_t (*VCHI_CONNECTION_SERVICE_DEQUEUE_MESSAGE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - void *data, - uint32_t max_data_size_to_read, - uint32_t *actual_msg_size, - VCHI_FLAGS_T flags ); - -// Routine to peek at a message -typedef int32_t (*VCHI_CONNECTION_SERVICE_PEEK_MESSAGE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - void **data, - uint32_t *msg_size, - VCHI_FLAGS_T flags ); - -// Routine to hold a message -typedef int32_t (*VCHI_CONNECTION_SERVICE_HOLD_MESSAGE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - void **data, - uint32_t *msg_size, - VCHI_FLAGS_T flags, - void **message_handle ); - -// Routine to initialise a received message iterator -typedef int32_t (*VCHI_CONNECTION_SERVICE_LOOKAHEAD_MESSAGE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - VCHI_MSG_ITER_T *iter, - VCHI_FLAGS_T flags ); - -// Routine to release a held message -typedef int32_t (*VCHI_CONNECTION_HELD_MSG_RELEASE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - void *message_handle ); - -// Routine to get info on a held message -typedef int32_t (*VCHI_CONNECTION_HELD_MSG_INFO_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - void *message_handle, - void **data, - int32_t *msg_size, - uint32_t *tx_timestamp, - uint32_t *rx_timestamp ); - -// Routine to check whether the iterator has a next message -typedef vcos_bool_t (*VCHI_CONNECTION_MSG_ITER_HAS_NEXT_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service, - const VCHI_MSG_ITER_T *iter ); - -// Routine to advance the iterator -typedef int32_t (*VCHI_CONNECTION_MSG_ITER_NEXT_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service, - VCHI_MSG_ITER_T *iter, - void **data, - uint32_t *msg_size ); - -// Routine to remove the last message returned by the iterator -typedef int32_t (*VCHI_CONNECTION_MSG_ITER_REMOVE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service, - VCHI_MSG_ITER_T *iter ); - -// Routine to hold the last message returned by the iterator -typedef int32_t (*VCHI_CONNECTION_MSG_ITER_HOLD_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service, - VCHI_MSG_ITER_T *iter, - void **msg_handle ); - -// Routine to transmit bulk data -typedef int32_t (*VCHI_CONNECTION_BULK_QUEUE_TRANSMIT_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - const void *data_src, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *bulk_handle ); - -// Routine to receive data -typedef int32_t (*VCHI_CONNECTION_BULK_QUEUE_RECEIVE_T)( VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, - void *data_dst, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *bulk_handle ); - -// Routine to report if a server is available -typedef int32_t (*VCHI_CONNECTION_SERVER_PRESENT)( VCHI_CONNECTION_STATE_T *state, vcos_fourcc_t service_id, int32_t peer_flags ); - -// Routine to report the number of RX slots available -typedef int (*VCHI_CONNECTION_RX_SLOTS_AVAILABLE)( const VCHI_CONNECTION_STATE_T *state ); - -// Routine to report the RX slot size -typedef uint32_t (*VCHI_CONNECTION_RX_SLOT_SIZE)( const VCHI_CONNECTION_STATE_T *state ); - -// Callback to indicate that the other side has added a buffer to the rx bulk DMA FIFO -typedef void (*VCHI_CONNECTION_RX_BULK_BUFFER_ADDED)(VCHI_CONNECTION_STATE_T *state, - vcos_fourcc_t service, - uint32_t length, - MESSAGE_TX_CHANNEL_T channel, - uint32_t channel_params, - uint32_t data_length, - uint32_t data_offset); - -// Callback to inform a service that a Xon or Xoff message has been received -typedef void (*VCHI_CONNECTION_FLOW_CONTROL)(VCHI_CONNECTION_STATE_T *state, vcos_fourcc_t service_id, int32_t xoff); - -// Callback to inform a service that a server available reply message has been received -typedef void (*VCHI_CONNECTION_SERVER_AVAILABLE_REPLY)(VCHI_CONNECTION_STATE_T *state, vcos_fourcc_t service_id, uint32_t flags); - -// Callback to indicate that bulk auxiliary messages have arrived -typedef void (*VCHI_CONNECTION_BULK_AUX_RECEIVED)(VCHI_CONNECTION_STATE_T *state); - -// Callback to indicate that bulk auxiliary messages have arrived -typedef void (*VCHI_CONNECTION_BULK_AUX_TRANSMITTED)(VCHI_CONNECTION_STATE_T *state, void *handle); - -// Callback with all the connection info you require -typedef void (*VCHI_CONNECTION_INFO)(VCHI_CONNECTION_STATE_T *state, uint32_t protocol_version, uint32_t slot_size, uint32_t num_slots, uint32_t min_bulk_size); - -// Callback to inform of a disconnect -typedef void (*VCHI_CONNECTION_DISCONNECT)(VCHI_CONNECTION_STATE_T *state, uint32_t flags); - -// Callback to inform of a power control request -typedef void (*VCHI_CONNECTION_POWER_CONTROL)(VCHI_CONNECTION_STATE_T *state, MESSAGE_TX_CHANNEL_T channel, vcos_bool_t enable); - -// allocate memory suitably aligned for this connection -typedef void * (*VCHI_BUFFER_ALLOCATE)(VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, uint32_t * length); - -// free memory allocated by buffer_allocate -typedef void (*VCHI_BUFFER_FREE)(VCHI_CONNECTION_SERVICE_HANDLE_T service_handle, void * address); - - -/****************************************************************************** - System driver struct - *****************************************************************************/ - -struct opaque_vchi_connection_api_t -{ - // Routine to init the connection - VCHI_CONNECTION_INIT_T init; - - // Connection-level CRC control - VCHI_CONNECTION_CRC_CONTROL_T crc_control; - - // Routine to connect to or create service - VCHI_CONNECTION_SERVICE_CONNECT_T service_connect; - - // Routine to disconnect from a service - VCHI_CONNECTION_SERVICE_DISCONNECT_T service_disconnect; - - // Routine to queue a message - VCHI_CONNECTION_SERVICE_QUEUE_MESSAGE_T service_queue_msg; - - // scatter-gather (vector) message queue - VCHI_CONNECTION_SERVICE_QUEUE_MESSAGEV_T service_queue_msgv; - - // Routine to dequeue a message - VCHI_CONNECTION_SERVICE_DEQUEUE_MESSAGE_T service_dequeue_msg; - - // Routine to peek at a message - VCHI_CONNECTION_SERVICE_PEEK_MESSAGE_T service_peek_msg; - - // Routine to hold a message - VCHI_CONNECTION_SERVICE_HOLD_MESSAGE_T service_hold_msg; - - // Routine to initialise a received message iterator - VCHI_CONNECTION_SERVICE_LOOKAHEAD_MESSAGE_T service_look_ahead_msg; - - // Routine to release a message - VCHI_CONNECTION_HELD_MSG_RELEASE_T held_msg_release; - - // Routine to get information on a held message - VCHI_CONNECTION_HELD_MSG_INFO_T held_msg_info; - - // Routine to check for next message on iterator - VCHI_CONNECTION_MSG_ITER_HAS_NEXT_T msg_iter_has_next; - - // Routine to get next message on iterator - VCHI_CONNECTION_MSG_ITER_NEXT_T msg_iter_next; - - // Routine to remove the last message returned by iterator - VCHI_CONNECTION_MSG_ITER_REMOVE_T msg_iter_remove; - - // Routine to hold the last message returned by iterator - VCHI_CONNECTION_MSG_ITER_HOLD_T msg_iter_hold; - - // Routine to transmit bulk data - VCHI_CONNECTION_BULK_QUEUE_TRANSMIT_T bulk_queue_transmit; - - // Routine to receive data - VCHI_CONNECTION_BULK_QUEUE_RECEIVE_T bulk_queue_receive; - - // Routine to report the available servers - VCHI_CONNECTION_SERVER_PRESENT server_present; - - // Routine to report the number of RX slots available - VCHI_CONNECTION_RX_SLOTS_AVAILABLE connection_rx_slots_available; - - // Routine to report the RX slot size - VCHI_CONNECTION_RX_SLOT_SIZE connection_rx_slot_size; - - // Callback to indicate that the other side has added a buffer to the rx bulk DMA FIFO - VCHI_CONNECTION_RX_BULK_BUFFER_ADDED rx_bulk_buffer_added; - - // Callback to inform a service that a Xon or Xoff message has been received - VCHI_CONNECTION_FLOW_CONTROL flow_control; - - // Callback to inform a service that a server available reply message has been received - VCHI_CONNECTION_SERVER_AVAILABLE_REPLY server_available_reply; - - // Callback to indicate that bulk auxiliary messages have arrived - VCHI_CONNECTION_BULK_AUX_RECEIVED bulk_aux_received; - - // Callback to indicate that a bulk auxiliary message has been transmitted - VCHI_CONNECTION_BULK_AUX_TRANSMITTED bulk_aux_transmitted; - - // Callback to provide information about the connection - VCHI_CONNECTION_INFO connection_info; - - // Callback to notify that peer has requested disconnect - VCHI_CONNECTION_DISCONNECT disconnect; - - // Callback to notify that peer has requested power change - VCHI_CONNECTION_POWER_CONTROL power_control; - - // allocate memory suitably aligned for this connection - VCHI_BUFFER_ALLOCATE buffer_allocate; - - // free memory allocated by buffer_allocate - VCHI_BUFFER_FREE buffer_free; - -}; - -struct vchi_connection_t { - const VCHI_CONNECTION_API_T *api; - VCHI_CONNECTION_STATE_T *state; -#ifdef VCHI_COARSE_LOCKING - VCOS_SEMAPHORE_T sem; -#endif -}; - - -#endif /* CONNECTION_H_ */ - -/****************************** End of file **********************************/ diff --git a/vc/include/interface/vchi/message_drivers/message.h b/vc/include/interface/vchi/message_drivers/message.h @@ -1,197 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// MPHI videocore message driver - -#ifndef _VCHI_MESSAGE_H_ -#define _VCHI_MESSAGE_H_ - -#include "interface/vchi/vchi_cfg_internal.h" -#include "interface/vcos/vcos.h" -#include "interface/vchi/vchi_common.h" - - -typedef enum message_event_type { - MESSAGE_EVENT_NONE, - MESSAGE_EVENT_NOP, - MESSAGE_EVENT_MESSAGE, - MESSAGE_EVENT_SLOT_COMPLETE, - MESSAGE_EVENT_RX_BULK_PAUSED, - MESSAGE_EVENT_RX_BULK_COMPLETE, - MESSAGE_EVENT_TX_COMPLETE, - MESSAGE_EVENT_MSG_DISCARDED -} MESSAGE_EVENT_TYPE_T; - -typedef enum vchi_msg_flags -{ - VCHI_MSG_FLAGS_NONE = 0x0, - VCHI_MSG_FLAGS_TERMINATE_DMA = 0x1 -} VCHI_MSG_FLAGS_T; - -typedef enum message_tx_channel -{ - MESSAGE_TX_CHANNEL_MESSAGE = 0, - MESSAGE_TX_CHANNEL_BULK = 1 // drivers may provide multiple bulk channels, from 1 upwards -} MESSAGE_TX_CHANNEL_T; - -// Macros used for cycling through bulk channels -#define MESSAGE_TX_CHANNEL_BULK_PREV(c) (MESSAGE_TX_CHANNEL_BULK+((c)-MESSAGE_TX_CHANNEL_BULK+VCHI_MAX_BULK_TX_CHANNELS_PER_CONNECTION-1)%VCHI_MAX_BULK_TX_CHANNELS_PER_CONNECTION) -#define MESSAGE_TX_CHANNEL_BULK_NEXT(c) (MESSAGE_TX_CHANNEL_BULK+((c)-MESSAGE_TX_CHANNEL_BULK+1)%VCHI_MAX_BULK_TX_CHANNELS_PER_CONNECTION) - -typedef enum message_rx_channel -{ - MESSAGE_RX_CHANNEL_MESSAGE = 0, - MESSAGE_RX_CHANNEL_BULK = 1 // drivers may provide multiple bulk channels, from 1 upwards -} MESSAGE_RX_CHANNEL_T; - -// Message receive slot information -typedef struct rx_msg_slot_info { - - struct rx_msg_slot_info *next; - //struct slot_info *prev; -#if !defined VCHI_COARSE_LOCKING - VCOS_SEMAPHORE_T sem; -#endif - - uint8_t *addr; // base address of slot - uint32_t len; // length of slot in bytes - - uint32_t write_ptr; // hardware causes this to advance - uint32_t read_ptr; // this module does the reading - int active; // is this slot in the hardware dma fifo? - uint32_t msgs_parsed; // count how many messages are in this slot - uint32_t msgs_released; // how many messages have been released - void *state; // connection state information - uint8_t ref_count[VCHI_MAX_SERVICES_PER_CONNECTION]; // reference count for slots held by services -} RX_MSG_SLOTINFO_T; - -// The message driver no longer needs to know about the fields of RX_BULK_SLOTINFO_T - sort this out. -// In particular, it mustn't use addr and len - they're the client buffer, but the message -// driver will be tasked with sending the aligned core section. -typedef struct rx_bulk_slotinfo_t { - struct rx_bulk_slotinfo_t *next; - - VCOS_SEMAPHORE_T *blocking; - - // needed by DMA - void *addr; - uint32_t len; - - // needed for the callback - void *service; - void *handle; - VCHI_FLAGS_T flags; -} RX_BULK_SLOTINFO_T; - - -/* ---------------------------------------------------------------------- - * each connection driver will have a pool of the following struct. - * - * the pool will be managed by vchi_qman_* - * this means there will be multiple queues (single linked lists) - * a given struct message_info will be on exactly one of these queues - * at any one time - * -------------------------------------------------------------------- */ -typedef struct rx_message_info { - - struct message_info *next; - //struct message_info *prev; - - uint8_t *addr; - uint32_t len; - RX_MSG_SLOTINFO_T *slot; // points to whichever slot contains this message - uint32_t tx_timestamp; - uint32_t rx_timestamp; - -} RX_MESSAGE_INFO_T; - -typedef struct { - MESSAGE_EVENT_TYPE_T type; - - struct { - // for messages - void *addr; // address of message - uint16_t slot_delta; // whether this message indicated slot delta - uint32_t len; // length of message - RX_MSG_SLOTINFO_T *slot; // slot this message is in - vcos_fourcc_t service; // service id this message is destined for - uint32_t tx_timestamp; // timestamp from the header - uint32_t rx_timestamp; // timestamp when we parsed it - } message; - - // FIXME: cleanup slot reporting... - RX_MSG_SLOTINFO_T *rx_msg; - RX_BULK_SLOTINFO_T *rx_bulk; - void *tx_handle; - MESSAGE_TX_CHANNEL_T tx_channel; - -} MESSAGE_EVENT_T; - - -// callbacks -typedef void VCHI_MESSAGE_DRIVER_EVENT_CALLBACK_T( void *state ); - -typedef struct { - VCHI_MESSAGE_DRIVER_EVENT_CALLBACK_T *event_callback; -} VCHI_MESSAGE_DRIVER_OPEN_T; - - -// handle to this instance of message driver (as returned by ->open) -typedef struct opaque_mhandle_t *VCHI_MDRIVER_HANDLE_T; - -struct opaque_vchi_message_driver_t { - VCHI_MDRIVER_HANDLE_T *(*open)( VCHI_MESSAGE_DRIVER_OPEN_T *params, void *state ); - int32_t (*suspending)( VCHI_MDRIVER_HANDLE_T *handle ); - int32_t (*resumed)( VCHI_MDRIVER_HANDLE_T *handle ); - int32_t (*power_control)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T, vcos_bool_t enable ); - int32_t (*add_msg_rx_slot)( VCHI_MDRIVER_HANDLE_T *handle, RX_MSG_SLOTINFO_T *slot ); // rx message - int32_t (*add_bulk_rx)( VCHI_MDRIVER_HANDLE_T *handle, void *data, uint32_t len, RX_BULK_SLOTINFO_T *slot ); // rx data (bulk) - int32_t (*send)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel, const void *data, uint32_t len, VCHI_MSG_FLAGS_T flags, void *send_handle ); // tx (message & bulk) - void (*next_event)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_EVENT_T *event ); // get the next event from message_driver - int32_t (*enable)( VCHI_MDRIVER_HANDLE_T *handle ); - int32_t (*form_message)( VCHI_MDRIVER_HANDLE_T *handle, vcos_fourcc_t service_id, VCHI_MSG_VECTOR_T *vector, uint32_t count, void - *address, uint32_t length_avail, uint32_t max_total_length, vcos_bool_t pad_to_fill, vcos_bool_t allow_partial ); - - int32_t (*update_message)( VCHI_MDRIVER_HANDLE_T *handle, void *dest, int16_t *slot_count ); - int32_t (*buffer_aligned)( VCHI_MDRIVER_HANDLE_T *handle, int tx, int uncached, const void *address, const uint32_t length ); - void * (*allocate_buffer)( VCHI_MDRIVER_HANDLE_T *handle, uint32_t *length ); - void (*free_buffer)( VCHI_MDRIVER_HANDLE_T *handle, void *address ); - int (*rx_slot_size)( VCHI_MDRIVER_HANDLE_T *handle, int msg_size ); - int (*tx_slot_size)( VCHI_MDRIVER_HANDLE_T *handle, int msg_size ); - - vcos_bool_t (*tx_supports_terminate)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel ); - uint32_t (*tx_bulk_chunk_size)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel ); - int (*tx_alignment)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel ); - int (*rx_alignment)( const VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_RX_CHANNEL_T channel ); - void (*form_bulk_aux)( VCHI_MDRIVER_HANDLE_T *handle, MESSAGE_TX_CHANNEL_T channel, const void *data, uint32_t len, uint32_t chunk_size, const void **aux_data, int32_t *aux_len ); - void (*debug)( VCHI_MDRIVER_HANDLE_T *handle ); -}; - - -#endif // _VCHI_MESSAGE_H_ - -/****************************** End of file ***********************************/ diff --git a/vc/include/interface/vchi/vchi.h b/vc/include/interface/vchi/vchi.h @@ -1,379 +0,0 @@ -/* -Copyright (c) 2012-2014, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Contains the protypes for the vchi functions. - -#ifndef VCHI_H_ -#define VCHI_H_ - -#include "interface/vcos/vcos.h" -#include "interface/vchi/vchi_cfg.h" -#include "interface/vchi/vchi_common.h" -#include "interface/vchi/connections/connection.h" -#include "vchi_mh.h" - - -/****************************************************************************** - Global defs - *****************************************************************************/ - -#define VCHI_SERVICE_HANDLE_INVALID 0 - -#define VCHI_BULK_ROUND_UP(x) ((((unsigned long)(x))+VCHI_BULK_ALIGN-1) & ~(VCHI_BULK_ALIGN-1)) -#define VCHI_BULK_ROUND_DOWN(x) (((unsigned long)(x)) & ~(VCHI_BULK_ALIGN-1)) -#define VCHI_BULK_ALIGN_NBYTES(x) (VCHI_BULK_ALIGNED(x) ? 0 : (VCHI_BULK_ALIGN - ((unsigned long)(x) & (VCHI_BULK_ALIGN-1)))) - -#ifdef USE_VCHIQ_ARM -#define VCHI_BULK_ALIGNED(x) 1 -#else -#define VCHI_BULK_ALIGNED(x) (((unsigned long)(x) & (VCHI_BULK_ALIGN-1)) == 0) -#endif - -typedef struct -{ - uint32_t version; - uint32_t version_min; -} VCHI_VERSION_T; -#define VCHI_VERSION(v_) { v_, v_ } -#define VCHI_VERSION_EX(v_,m_) { v_, m_ } - -typedef enum -{ - VCHI_VEC_POINTER, - VCHI_VEC_HANDLE, - VCHI_VEC_LIST -} VCHI_MSG_VECTOR_TYPE_T; - -typedef struct vchi_msg_vector_ex { - - VCHI_MSG_VECTOR_TYPE_T type; - union - { - // a memory handle - struct - { - VCHI_MEM_HANDLE_T handle; - uint32_t offset; - int32_t vec_len; - } handle; - - // an ordinary data pointer - struct - { - const void *vec_base; - int32_t vec_len; - } ptr; - - // a nested vector list - struct - { - struct vchi_msg_vector_ex *vec; - uint32_t vec_len; - } list; - } u; -} VCHI_MSG_VECTOR_EX_T; - - -// Construct an entry in a msg vector for a pointer (p) of length (l) -#define VCHI_VEC_POINTER(p,l) VCHI_VEC_POINTER, { { (VCHI_MEM_HANDLE_T)(p), (l) } } - -// Construct an entry in a msg vector for a message handle (h), starting at offset (o) of length (l) -#define VCHI_VEC_HANDLE(h,o,l) VCHI_VEC_HANDLE, { { (h), (o), (l) } } - -// Macros to manipulate fourcc_t values -#define MAKE_FOURCC(x) ((fourcc_t)( (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | x[3] )) -#define FOURCC_TO_CHAR(x) (x >> 24) & 0xFF,(x >> 16) & 0xFF,(x >> 8) & 0xFF, x & 0xFF - - -// Opaque service information -struct opaque_vchi_service_t; - -// Descriptor for a held message. Allocated by client, initialised by vchi_msg_hold, -// vchi_msg_iter_hold or vchi_msg_iter_hold_next. Fields are for internal VCHI use only. -typedef struct -{ - struct opaque_vchi_service_t *service; - void *message; -} VCHI_HELD_MSG_T; - - - -// structure used to provide the information needed to open a server or a client -typedef struct { - VCHI_VERSION_T version; - vcos_fourcc_t service_id; - VCHI_CONNECTION_T *connection; - uint32_t rx_fifo_size; - uint32_t tx_fifo_size; - VCHI_CALLBACK_T callback; - void *callback_param; - vcos_bool_t want_unaligned_bulk_rx; // client intends to receive bulk transfers of odd lengths or into unaligned buffers - vcos_bool_t want_unaligned_bulk_tx; // client intends to transmit bulk transfers of odd lengths or out of unaligned buffers - vcos_bool_t want_crc; // client wants to check CRCs on (bulk) transfers. Only needs to be set at 1 end - will do both directions. -} SERVICE_CREATION_T; - -// Opaque handle for a VCHI instance -typedef struct opaque_vchi_instance_handle_t *VCHI_INSTANCE_T; - -// Opaque handle for a server or client -typedef unsigned int VCHI_SERVICE_HANDLE_T; - -// Service registration & startup -typedef void (*VCHI_SERVICE_INIT)(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections); - -typedef struct service_info_tag { - const char * const vll_filename; /* VLL to load to start this service. This is an empty string if VLL is "static" */ - VCHI_SERVICE_INIT init; /* Service initialisation function */ - void *vll_handle; /* VLL handle; NULL when unloaded or a "static VLL" in build */ -} SERVICE_INFO_T; - -/****************************************************************************** - Global funcs - implementation is specific to which side you are on (local / remote) - *****************************************************************************/ - -#ifdef __cplusplus -extern "C" { -#endif - -extern /*@observer@*/ VCHI_CONNECTION_T * vchi_create_connection( const VCHI_CONNECTION_API_T * function_table, - const VCHI_MESSAGE_DRIVER_T * low_level); - - -// Routine used to initialise the vchi on both local + remote connections -extern int32_t vchi_initialise( VCHI_INSTANCE_T *instance_handle ); - -extern int32_t vchi_connect( VCHI_CONNECTION_T **connections, - const uint32_t num_connections, - VCHI_INSTANCE_T instance_handle ); - -//When this is called, ensure that all services have no data pending. -//Bulk transfers can remain 'queued' -extern int32_t vchi_disconnect( VCHI_INSTANCE_T instance_handle ); - -// Global control over bulk CRC checking -extern int32_t vchi_crc_control( VCHI_CONNECTION_T *connection, - VCHI_CRC_CONTROL_T control ); - -// helper functions -extern void * vchi_allocate_buffer(VCHI_SERVICE_HANDLE_T handle, uint32_t *length); -extern void vchi_free_buffer(VCHI_SERVICE_HANDLE_T handle, void *address); -extern uint32_t vchi_current_time(VCHI_INSTANCE_T instance_handle); - - -/****************************************************************************** - Global service API - *****************************************************************************/ -// Routine to create a named service -extern int32_t vchi_service_create( VCHI_INSTANCE_T instance_handle, - SERVICE_CREATION_T *setup, - VCHI_SERVICE_HANDLE_T *handle ); - -// Routine to destory a service -extern int32_t vchi_service_destroy( const VCHI_SERVICE_HANDLE_T handle ); - -// Routine to open a named service -extern int32_t vchi_service_open( VCHI_INSTANCE_T instance_handle, - SERVICE_CREATION_T *setup, - VCHI_SERVICE_HANDLE_T *handle); - -extern int32_t vchi_get_peer_version( const VCHI_SERVICE_HANDLE_T handle, - short *peer_version ); - -// Routine to close a named service -extern int32_t vchi_service_close( const VCHI_SERVICE_HANDLE_T handle ); - -// Routine to increment ref count on a named service -extern int32_t vchi_service_use( const VCHI_SERVICE_HANDLE_T handle ); - -// Routine to decrement ref count on a named service -extern int32_t vchi_service_release( const VCHI_SERVICE_HANDLE_T handle ); - -// Routine to set a control option for a named service -extern int32_t vchi_service_set_option( const VCHI_SERVICE_HANDLE_T handle, - VCHI_SERVICE_OPTION_T option, - int value); - -// Routine to send a message across a service -extern int32_t vchi_msg_queue( VCHI_SERVICE_HANDLE_T handle, - const void *data, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *msg_handle ); - -// scatter-gather (vector) and send message -int32_t vchi_msg_queuev_ex( VCHI_SERVICE_HANDLE_T handle, - VCHI_MSG_VECTOR_EX_T *vector, - uint32_t count, - VCHI_FLAGS_T flags, - void *msg_handle ); - -// legacy scatter-gather (vector) and send message, only handles pointers -int32_t vchi_msg_queuev( VCHI_SERVICE_HANDLE_T handle, - VCHI_MSG_VECTOR_T *vector, - uint32_t count, - VCHI_FLAGS_T flags, - void *msg_handle ); - -// Routine to receive a msg from a service -// Dequeue is equivalent to hold, copy into client buffer, release -extern int32_t vchi_msg_dequeue( VCHI_SERVICE_HANDLE_T handle, - void *data, - uint32_t max_data_size_to_read, - uint32_t *actual_msg_size, - VCHI_FLAGS_T flags ); - -// Routine to look at a message in place. -// The message is not dequeued, so a subsequent call to peek or dequeue -// will return the same message. -extern int32_t vchi_msg_peek( VCHI_SERVICE_HANDLE_T handle, - void **data, - uint32_t *msg_size, - VCHI_FLAGS_T flags ); - -// Routine to remove a message after it has been read in place with peek -// The first message on the queue is dequeued. -extern int32_t vchi_msg_remove( VCHI_SERVICE_HANDLE_T handle ); - -// Routine to look at a message in place. -// The message is dequeued, so the caller is left holding it; the descriptor is -// filled in and must be released when the user has finished with the message. -extern int32_t vchi_msg_hold( VCHI_SERVICE_HANDLE_T handle, - void **data, // } may be NULL, as info can be - uint32_t *msg_size, // } obtained from HELD_MSG_T - VCHI_FLAGS_T flags, - VCHI_HELD_MSG_T *message_descriptor ); - -// Initialise an iterator to look through messages in place -extern int32_t vchi_msg_look_ahead( VCHI_SERVICE_HANDLE_T handle, - VCHI_MSG_ITER_T *iter, - VCHI_FLAGS_T flags ); - -/****************************************************************************** - Global service support API - operations on held messages and message iterators - *****************************************************************************/ - -// Routine to get the address of a held message -extern void *vchi_held_msg_ptr( const VCHI_HELD_MSG_T *message ); - -// Routine to get the size of a held message -extern int32_t vchi_held_msg_size( const VCHI_HELD_MSG_T *message ); - -// Routine to get the transmit timestamp as written into the header by the peer -extern uint32_t vchi_held_msg_tx_timestamp( const VCHI_HELD_MSG_T *message ); - -// Routine to get the reception timestamp, written as we parsed the header -extern uint32_t vchi_held_msg_rx_timestamp( const VCHI_HELD_MSG_T *message ); - -// Routine to release a held message after it has been processed -extern int32_t vchi_held_msg_release( VCHI_HELD_MSG_T *message ); - -// Indicates whether the iterator has a next message. -extern vcos_bool_t vchi_msg_iter_has_next( const VCHI_MSG_ITER_T *iter ); - -// Return the pointer and length for the next message and advance the iterator. -extern int32_t vchi_msg_iter_next( VCHI_MSG_ITER_T *iter, - void **data, - uint32_t *msg_size ); - -// Remove the last message returned by vchi_msg_iter_next. -// Can only be called once after each call to vchi_msg_iter_next. -extern int32_t vchi_msg_iter_remove( VCHI_MSG_ITER_T *iter ); - -// Hold the last message returned by vchi_msg_iter_next. -// Can only be called once after each call to vchi_msg_iter_next. -extern int32_t vchi_msg_iter_hold( VCHI_MSG_ITER_T *iter, - VCHI_HELD_MSG_T *message ); - -// Return information for the next message, and hold it, advancing the iterator. -extern int32_t vchi_msg_iter_hold_next( VCHI_MSG_ITER_T *iter, - void **data, // } may be NULL - uint32_t *msg_size, // } - VCHI_HELD_MSG_T *message ); - - -/****************************************************************************** - Global bulk API - *****************************************************************************/ - -// Routine to prepare interface for a transfer from the other side -extern int32_t vchi_bulk_queue_receive( VCHI_SERVICE_HANDLE_T handle, - void *data_dst, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *transfer_handle ); - - -// Prepare interface for a transfer from the other side into relocatable memory. -int32_t vchi_bulk_queue_receive_reloc( const VCHI_SERVICE_HANDLE_T handle, - VCHI_MEM_HANDLE_T h_dst, - uint32_t offset, - uint32_t data_size, - const VCHI_FLAGS_T flags, - void * const bulk_handle ); - -// Prepare interface for a transfer from the other side into relocatable memory. -int32_t vchi_bulk_queue_receive_reloc_func( const VCHI_SERVICE_HANDLE_T handle, - VCHI_MEM_HANDLE_T h_dst, - uint32_t offset, - uint32_t data_size, - const VCHI_FLAGS_T flags, - void * const bulk_handle, - int (*copy_pagelist)() ); - -// Routine to queue up data ready for transfer to the other (once they have signalled they are ready) -extern int32_t vchi_bulk_queue_transmit( VCHI_SERVICE_HANDLE_T handle, - const void *data_src, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *transfer_handle ); - - -/****************************************************************************** - Configuration plumbing - *****************************************************************************/ - -// function prototypes for the different mid layers (the state info gives the different physical connections) -extern const VCHI_CONNECTION_API_T *single_get_func_table( void ); -//extern const VCHI_CONNECTION_API_T *local_server_get_func_table( void ); -//extern const VCHI_CONNECTION_API_T *local_client_get_func_table( void ); - -// declare all message drivers here -const VCHI_MESSAGE_DRIVER_T *vchi_mphi_message_driver_func_table( void ); - -#ifdef __cplusplus -} -#endif - -extern int32_t vchi_bulk_queue_transmit_reloc( VCHI_SERVICE_HANDLE_T handle, - VCHI_MEM_HANDLE_T h_src, - uint32_t offset, - uint32_t data_size, - VCHI_FLAGS_T flags, - void *transfer_handle ); -#endif /* VCHI_H_ */ - -/****************************** End of file **********************************/ diff --git a/vc/include/interface/vchi/vchi_cfg.h b/vc/include/interface/vchi/vchi_cfg.h @@ -1,222 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Contains the #defines for the number of servers / clients etc, these can be -// over-ridden from the platform makefile if needed - - -#ifndef VCHI_CFG_H_ -#define VCHI_CFG_H_ - -/**************************************************************************************** - * Defines in this first section are part of the VCHI API and may be examined by VCHI - * services. - ***************************************************************************************/ - -/* Required alignment of base addresses for bulk transfer, if unaligned transfers are not enabled */ -/* Really determined by the message driver, and should be available from a run-time call. */ -#ifndef VCHI_BULK_ALIGN -# if __VCCOREVER__ >= 0x04000000 -# define VCHI_BULK_ALIGN 32 // Allows for the need to do cache cleans -# else -# define VCHI_BULK_ALIGN 16 -# endif -#endif - -/* Required length multiple for bulk transfers, if unaligned transfers are not enabled */ -/* May be less than or greater than VCHI_BULK_ALIGN */ -/* Really determined by the message driver, and should be available from a run-time call. */ -#ifndef VCHI_BULK_GRANULARITY -# if __VCCOREVER__ >= 0x04000000 -# define VCHI_BULK_GRANULARITY 32 // Allows for the need to do cache cleans -# else -# define VCHI_BULK_GRANULARITY 16 -# endif -#endif - -/* The largest possible message to be queued with vchi_msg_queue. */ -#ifndef VCHI_MAX_MSG_SIZE -# if defined VCHI_LOCAL_HOST_PORT -# define VCHI_MAX_MSG_SIZE 16384 // makes file transfers fast, but should they be using bulk? -# else -# define VCHI_MAX_MSG_SIZE 4096 // NOTE: THIS MUST BE LARGER THAN OR EQUAL TO THE SIZE OF THE KHRONOS MERGE BUFFER!! -# endif -#endif - -/****************************************************************************************** - * Defines below are system configuration options, and should not be used by VCHI services. - *****************************************************************************************/ - -/* How many connections can we support? A localhost implementation uses 2 connections, - * 1 for host-app, 1 for VMCS, and these are hooked together by a loopback MPHI VCFW - * driver. */ -#ifndef VCHI_MAX_NUM_CONNECTIONS -# define VCHI_MAX_NUM_CONNECTIONS 3 -#endif - -/* How many services can we open per connection? Extending this doesn't cost processing time, just a small - * amount of static memory. */ -#ifndef VCHI_MAX_SERVICES_PER_CONNECTION -# define VCHI_MAX_SERVICES_PER_CONNECTION 36 -#endif - -/* Adjust if using a message driver that supports more logical TX channels */ -#ifndef VCHI_MAX_BULK_TX_CHANNELS_PER_CONNECTION -# define VCHI_MAX_BULK_TX_CHANNELS_PER_CONNECTION 9 // 1 MPHI + 8 CCP2 logical channels -#endif - -/* Adjust if using a message driver that supports more logical RX channels */ -#ifndef VCHI_MAX_BULK_RX_CHANNELS_PER_CONNECTION -# define VCHI_MAX_BULK_RX_CHANNELS_PER_CONNECTION 1 // 1 MPHI -#endif - -/* How many receive slots do we use. This times VCHI_MAX_MSG_SIZE gives the effective - * receive queue space, less message headers. */ -#ifndef VCHI_NUM_READ_SLOTS -# if defined(VCHI_LOCAL_HOST_PORT) -# define VCHI_NUM_READ_SLOTS 4 -# else -# define VCHI_NUM_READ_SLOTS 48 -# endif -#endif - -/* Do we utilise overrun facility for receive message slots? Can aid peer transmit - * performance. Only define on VideoCore end, talking to host. - */ -//#define VCHI_MSG_RX_OVERRUN - -/* How many transmit slots do we use. Generally don't need many, as the hardware driver - * underneath VCHI will usually have its own buffering. */ -#ifndef VCHI_NUM_WRITE_SLOTS -# define VCHI_NUM_WRITE_SLOTS 4 -#endif - -/* If a service has held or queued received messages in VCHI_XOFF_THRESHOLD or more slots, - * then it's taking up too much buffer space, and the peer service will be told to stop - * transmitting with an XOFF message. For this to be effective, the VCHI_NUM_READ_SLOTS - * needs to be considerably bigger than VCHI_NUM_WRITE_SLOTS, or the transmit latency - * is too high. */ -#ifndef VCHI_XOFF_THRESHOLD -# define VCHI_XOFF_THRESHOLD (VCHI_NUM_READ_SLOTS / 2) -#endif - -/* After we've sent an XOFF, the peer will be told to resume transmission once the local - * service has dequeued/released enough messages that it's now occupying - * VCHI_XON_THRESHOLD slots or fewer. */ -#ifndef VCHI_XON_THRESHOLD -# define VCHI_XON_THRESHOLD (VCHI_NUM_READ_SLOTS / 4) -#endif - -/* A size below which a bulk transfer omits the handshake completely and always goes - * via the message channel, if bulk auxiliary is being sent on that service. (The user - * can guarantee this by enabling unaligned transmits). - * Not API. */ -#ifndef VCHI_MIN_BULK_SIZE -# define VCHI_MIN_BULK_SIZE ( VCHI_MAX_MSG_SIZE / 2 < 4096 ? VCHI_MAX_MSG_SIZE / 2 : 4096 ) -#endif - -/* Maximum size of bulk transmission chunks, for each interface type. A trade-off between - * speed and latency; the smaller the chunk size the better change of messages and other - * bulk transmissions getting in when big bulk transfers are happening. Set to 0 to not - * break transmissions into chunks. - */ -#ifndef VCHI_MAX_BULK_CHUNK_SIZE_MPHI -# define VCHI_MAX_BULK_CHUNK_SIZE_MPHI (16 * 1024) -#endif - -/* NB Chunked CCP2 transmissions violate the letter of the CCP2 spec by using "JPEG8" mode - * with multiple-line frames. Only use if the receiver can cope. */ -#ifndef VCHI_MAX_BULK_CHUNK_SIZE_CCP2 -# define VCHI_MAX_BULK_CHUNK_SIZE_CCP2 0 -#endif - -/* How many TX messages can we have pending in our transmit slots. Once exhausted, - * vchi_msg_queue will be blocked. */ -#ifndef VCHI_TX_MSG_QUEUE_SIZE -# define VCHI_TX_MSG_QUEUE_SIZE 256 -#endif - -/* How many RX messages can we have parsed in the receive slots. Once exhausted, parsing - * will be suspended until older messages are dequeued/released. */ -#ifndef VCHI_RX_MSG_QUEUE_SIZE -# define VCHI_RX_MSG_QUEUE_SIZE 256 -#endif - -/* Really should be able to cope if we run out of received message descriptors, by - * suspending parsing as the comment above says, but we don't. This sweeps the issue - * under the carpet. */ -#if VCHI_RX_MSG_QUEUE_SIZE < (VCHI_MAX_MSG_SIZE/16 + 1) * VCHI_NUM_READ_SLOTS -# undef VCHI_RX_MSG_QUEUE_SIZE -# define VCHI_RX_MSG_QUEUE_SIZE (VCHI_MAX_MSG_SIZE/16 + 1) * VCHI_NUM_READ_SLOTS -#endif - -/* How many bulk transmits can we have pending. Once exhausted, vchi_bulk_queue_transmit - * will be blocked. */ -#ifndef VCHI_TX_BULK_QUEUE_SIZE -# define VCHI_TX_BULK_QUEUE_SIZE 64 -#endif - -/* How many bulk receives can we have pending. Once exhausted, vchi_bulk_queue_receive - * will be blocked. */ -#ifndef VCHI_RX_BULK_QUEUE_SIZE -# define VCHI_RX_BULK_QUEUE_SIZE 64 -#endif - -/* A limit on how many outstanding bulk requests we expect the peer to give us. If - * the peer asks for more than this, VCHI will fail and assert. The number is determined - * by the peer's hardware - it's the number of outstanding requests that can be queued - * on all bulk channels. VC3's MPHI peripheral allows 16. */ -#ifndef VCHI_MAX_PEER_BULK_REQUESTS -# define VCHI_MAX_PEER_BULK_REQUESTS 32 -#endif - -/* Define VCHI_CCP2TX_MANUAL_POWER if the host tells us when to turn the CCP2 - * transmitter on and off. - */ -/*#define VCHI_CCP2TX_MANUAL_POWER*/ - -#ifndef VCHI_CCP2TX_MANUAL_POWER - -/* Timeout (in milliseconds) for putting the CCP2TX interface into IDLE state. Set - * negative for no IDLE. - */ -# ifndef VCHI_CCP2TX_IDLE_TIMEOUT -# define VCHI_CCP2TX_IDLE_TIMEOUT 5 -# endif - -/* Timeout (in milliseconds) for putting the CCP2TX interface into OFF state. Set - * negative for no OFF. - */ -# ifndef VCHI_CCP2TX_OFF_TIMEOUT -# define VCHI_CCP2TX_OFF_TIMEOUT 1000 -# endif - -#endif /* VCHI_CCP2TX_MANUAL_POWER */ - -#endif /* VCHI_CFG_H_ */ - -/****************************** End of file **********************************/ diff --git a/vc/include/interface/vchi/vchi_cfg_internal.h b/vc/include/interface/vchi/vchi_cfg_internal.h @@ -1,65 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCHI_CFG_INTERNAL_H_ -#define VCHI_CFG_INTERNAL_H_ - -/**************************************************************************************** - * Control optimisation attempts. - ***************************************************************************************/ - -// Don't use lots of short-term locks - use great long ones, reducing the overall locks-per-second -#define VCHI_COARSE_LOCKING - -// Avoid lock then unlock on exit from blocking queue operations (msg tx, bulk rx/tx) -// (only relevant if VCHI_COARSE_LOCKING) -#define VCHI_ELIDE_BLOCK_EXIT_LOCK - -// Avoid lock on non-blocking peek -// (only relevant if VCHI_COARSE_LOCKING) -#define VCHI_AVOID_PEEK_LOCK - -// Use one slot-handler thread per connection, rather than 1 thread dealing with all connections in rotation. -#define VCHI_MULTIPLE_HANDLER_THREADS - -// Put free descriptors onto the head of the free queue, rather than the tail, so that we don't thrash -// our way through the pool of descriptors. -#define VCHI_PUSH_FREE_DESCRIPTORS_ONTO_HEAD - -// Don't issue a MSG_AVAILABLE callback for every single message. Possibly only safe if VCHI_COARSE_LOCKING. -#define VCHI_FEWER_MSG_AVAILABLE_CALLBACKS - -// Don't use message descriptors for TX messages that don't need them -#define VCHI_MINIMISE_TX_MSG_DESCRIPTORS - -// Nano-locks for multiqueue -//#define VCHI_MQUEUE_NANOLOCKS - -// Lock-free(er) dequeuing -//#define VCHI_RX_NANOLOCKS - -#endif /*VCHI_CFG_INTERNAL_H_*/ diff --git a/vc/include/interface/vchi/vchi_common.h b/vc/include/interface/vchi/vchi_common.h @@ -1,170 +0,0 @@ -/* -Copyright (c) 2012-2014, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Contains global defs used by submodules within vchi - -#ifndef VCHI_COMMON_H_ -#define VCHI_COMMON_H_ - - -//flags used when sending messages (must be bitmapped) -typedef enum -{ - VCHI_FLAGS_NONE = 0x0, - VCHI_FLAGS_BLOCK_UNTIL_OP_COMPLETE = 0x1, // waits for message to be received, or sent (NB. not the same as being seen on other side) - VCHI_FLAGS_CALLBACK_WHEN_OP_COMPLETE = 0x2, // run a callback when message sent - VCHI_FLAGS_BLOCK_UNTIL_QUEUED = 0x4, // return once the transfer is in a queue ready to go - VCHI_FLAGS_ALLOW_PARTIAL = 0x8, - VCHI_FLAGS_BLOCK_UNTIL_DATA_READ = 0x10, - VCHI_FLAGS_CALLBACK_WHEN_DATA_READ = 0x20, - - VCHI_FLAGS_ALIGN_SLOT = 0x000080, // internal use only - VCHI_FLAGS_BULK_AUX_QUEUED = 0x010000, // internal use only - VCHI_FLAGS_BULK_AUX_COMPLETE = 0x020000, // internal use only - VCHI_FLAGS_BULK_DATA_QUEUED = 0x040000, // internal use only - VCHI_FLAGS_BULK_DATA_COMPLETE = 0x080000, // internal use only - VCHI_FLAGS_INTERNAL = 0xFF0000 -} VCHI_FLAGS_T; - -// constants for vchi_crc_control() -typedef enum { - VCHI_CRC_NOTHING = -1, - VCHI_CRC_PER_SERVICE = 0, - VCHI_CRC_EVERYTHING = 1, -} VCHI_CRC_CONTROL_T; - -//callback reasons when an event occurs on a service -typedef enum -{ - VCHI_CALLBACK_REASON_MIN, - - //This indicates that there is data available - //handle is the msg id that was transmitted with the data - // When a message is received and there was no FULL message available previously, send callback - // Tasks get kicked by the callback, reset their event and try and read from the fifo until it fails - VCHI_CALLBACK_MSG_AVAILABLE, - VCHI_CALLBACK_MSG_SENT, - VCHI_CALLBACK_MSG_SPACE_AVAILABLE, // XXX not yet implemented - - // This indicates that a transfer from the other side has completed - VCHI_CALLBACK_BULK_RECEIVED, - //This indicates that data queued up to be sent has now gone - //handle is the msg id that was used when sending the data - VCHI_CALLBACK_BULK_SENT, - VCHI_CALLBACK_BULK_RX_SPACE_AVAILABLE, // XXX not yet implemented - VCHI_CALLBACK_BULK_TX_SPACE_AVAILABLE, // XXX not yet implemented - - VCHI_CALLBACK_SERVICE_CLOSED, - - // this side has sent XOFF to peer due to lack of data consumption by service - // (suggests the service may need to take some recovery action if it has - // been deliberately holding off consuming data) - VCHI_CALLBACK_SENT_XOFF, - VCHI_CALLBACK_SENT_XON, - - // indicates that a bulk transfer has finished reading the source buffer - VCHI_CALLBACK_BULK_DATA_READ, - - // power notification events (currently host side only) - VCHI_CALLBACK_PEER_OFF, - VCHI_CALLBACK_PEER_SUSPENDED, - VCHI_CALLBACK_PEER_ON, - VCHI_CALLBACK_PEER_RESUMED, - VCHI_CALLBACK_FORCED_POWER_OFF, - -#ifdef USE_VCHIQ_ARM - // some extra notifications provided by vchiq_arm - VCHI_CALLBACK_SERVICE_OPENED, - VCHI_CALLBACK_BULK_RECEIVE_ABORTED, - VCHI_CALLBACK_BULK_TRANSMIT_ABORTED, -#endif - - VCHI_CALLBACK_REASON_MAX -} VCHI_CALLBACK_REASON_T; - -// service control options -typedef enum -{ - VCHI_SERVICE_OPTION_MIN, - - VCHI_SERVICE_OPTION_TRACE, - VCHI_SERVICE_OPTION_SYNCHRONOUS, - - VCHI_SERVICE_OPTION_MAX -} VCHI_SERVICE_OPTION_T; - -//Callback used by all services / bulk transfers -typedef void (*VCHI_CALLBACK_T)( void *callback_param, //my service local param - VCHI_CALLBACK_REASON_T reason, - void *handle ); //for transmitting msg's only - - - -/* - * Define vector struct for scatter-gather (vector) operations - * Vectors can be nested - if a vector element has negative length, then - * the data pointer is treated as pointing to another vector array, with - * '-vec_len' elements. Thus to append a header onto an existing vector, - * you can do this: - * - * void foo(const VCHI_MSG_VECTOR_T *v, int n) - * { - * VCHI_MSG_VECTOR_T nv[2]; - * nv[0].vec_base = my_header; - * nv[0].vec_len = sizeof my_header; - * nv[1].vec_base = v; - * nv[1].vec_len = -n; - * ... - * - */ -typedef struct vchi_msg_vector { - const void *vec_base; - int32_t vec_len; -} VCHI_MSG_VECTOR_T; - -// Opaque type for a connection API -typedef struct opaque_vchi_connection_api_t VCHI_CONNECTION_API_T; - -// Opaque type for a message driver -typedef struct opaque_vchi_message_driver_t VCHI_MESSAGE_DRIVER_T; - - -// Iterator structure for reading ahead through received message queue. Allocated by client, -// initialised by vchi_msg_look_ahead. Fields are for internal VCHI use only. -// Iterates over messages in queue at the instant of the call to vchi_msg_lookahead - -// will not proceed to messages received since. Behaviour is undefined if an iterator -// is used again after messages for that service are removed/dequeued by any -// means other than vchi_msg_iter_... calls on the iterator itself. -typedef struct { - struct opaque_vchi_service_t *service; - void *last; - void *next; - void *remove; -} VCHI_MSG_ITER_T; - - -#endif // VCHI_COMMON_H_ diff --git a/vc/include/interface/vchi/vchi_mh.h b/vc/include/interface/vchi/vchi_mh.h @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCHI_MH_H_ -#define VCHI_MH_H_ - -#include <interface/vcos/vcos.h> - -typedef int32_t VCHI_MEM_HANDLE_T; -#define VCHI_MEM_HANDLE_INVALID 0 - -#endif diff --git a/vc/include/interface/vchiq_arm/vchiq.h b/vc/include/interface/vchiq_arm/vchiq.h @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCHIQ_VCHIQ_H -#define VCHIQ_VCHIQ_H - -#include "vchiq_if.h" -#include "vchiq_util.h" -#include "interface/vcos/vcos.h" - -#endif - diff --git a/vc/include/interface/vchiq_arm/vchiq_cfg.h b/vc/include/interface/vchiq_arm/vchiq_cfg.h @@ -1,63 +0,0 @@ -/* -Copyright (c) 2014, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef VCHIQ_CFG_H -#define VCHIQ_CFG_H - -#define VCHIQ_MAGIC VCHIQ_MAKE_FOURCC('V', 'C', 'H', 'I') -/* The version of VCHIQ - change with any non-trivial change */ -#define VCHIQ_VERSION 8 -/* The minimum compatible version - update to match VCHIQ_VERSION with any -** incompatible change */ -#define VCHIQ_VERSION_MIN 3 - -/* The version that introduced the VCHIQ_IOC_LIB_VERSION ioctl */ -#define VCHIQ_VERSION_LIB_VERSION 7 - -/* The version that introduced the VCHIQ_IOC_CLOSE_DELIVERED ioctl */ -#define VCHIQ_VERSION_CLOSE_DELIVERED 7 - -/* The version that made it safe to use SYNCHRONOUS mode */ -#define VCHIQ_VERSION_SYNCHRONOUS_MODE 8 - -#define VCHIQ_MAX_STATES 2 -#define VCHIQ_MAX_SERVICES 4096 -#define VCHIQ_MAX_SLOTS 128 -#define VCHIQ_MAX_SLOTS_PER_SIDE 64 - -#define VCHIQ_NUM_CURRENT_BULKS 32 -#define VCHIQ_NUM_SERVICE_BULKS 4 - -#ifndef VCHIQ_ENABLE_DEBUG -#define VCHIQ_ENABLE_DEBUG 1 -#endif - -#ifndef VCHIQ_ENABLE_STATS -#define VCHIQ_ENABLE_STATS 1 -#endif - -#endif /* VCHIQ_CFG_H */ diff --git a/vc/include/interface/vchiq_arm/vchiq_if.h b/vc/include/interface/vchiq_arm/vchiq_if.h @@ -1,190 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef VCHIQ_IF_H -#define VCHIQ_IF_H - -#include "interface/vchi/vchi_mh.h" - -#define VCHIQ_SERVICE_HANDLE_INVALID 0 - -#define VCHIQ_SLOT_SIZE 4096 -#define VCHIQ_MAX_MSG_SIZE (VCHIQ_SLOT_SIZE - sizeof(VCHIQ_HEADER_T)) -#define VCHIQ_CHANNEL_SIZE VCHIQ_MAX_MSG_SIZE /* For backwards compatibility */ - -#define VCHIQ_MAKE_FOURCC(x0, x1, x2, x3) (((x0) << 24) | ((x1) << 16) | ((x2) << 8) | (x3)) -#define VCHIQ_GET_SERVICE_USERDATA(service) vchiq_get_service_userdata(service) -#define VCHIQ_GET_SERVICE_FOURCC(service) vchiq_get_service_fourcc(service) - -typedef enum { - VCHIQ_SERVICE_OPENED, // service, -, - - VCHIQ_SERVICE_CLOSED, // service, -, - - VCHIQ_MESSAGE_AVAILABLE, // service, header, - - VCHIQ_BULK_TRANSMIT_DONE, // service, -, bulk_userdata - VCHIQ_BULK_RECEIVE_DONE, // service, -, bulk_userdata - VCHIQ_BULK_TRANSMIT_ABORTED, // service, -, bulk_userdata - VCHIQ_BULK_RECEIVE_ABORTED // service, -, bulk_userdata -} VCHIQ_REASON_T; - -typedef enum -{ - VCHIQ_ERROR = -1, - VCHIQ_SUCCESS = 0, - VCHIQ_RETRY = 1 -} VCHIQ_STATUS_T; - -typedef enum -{ - VCHIQ_BULK_MODE_CALLBACK, - VCHIQ_BULK_MODE_BLOCKING, - VCHIQ_BULK_MODE_NOCALLBACK -} VCHIQ_BULK_MODE_T; - -typedef enum -{ - VCHIQ_SERVICE_OPTION_AUTOCLOSE, - VCHIQ_SERVICE_OPTION_SLOT_QUOTA, - VCHIQ_SERVICE_OPTION_MESSAGE_QUOTA, - VCHIQ_SERVICE_OPTION_SYNCHRONOUS, - VCHIQ_SERVICE_OPTION_TRACE -} VCHIQ_SERVICE_OPTION_T; - -#ifdef __HIGHC__ -/* Allow zero-sized arrays without warnings */ -#pragma warning (push) -#pragma warning (disable : 4200) -#endif - -typedef struct vchiq_header_struct { - /* The message identifier - opaque to applications. */ - int msgid; - - /* Size of message data. */ - unsigned int size; - - char data[0]; /* message */ -} VCHIQ_HEADER_T; - -#ifdef __HIGHC__ -#pragma warning (pop) -#endif - -typedef struct { - const void *data; - int size; -} VCHIQ_ELEMENT_T; - -typedef unsigned int VCHIQ_SERVICE_HANDLE_T; - -typedef VCHIQ_STATUS_T (*VCHIQ_CALLBACK_T)(VCHIQ_REASON_T, VCHIQ_HEADER_T *, - VCHIQ_SERVICE_HANDLE_T, void *); - -typedef struct vchiq_service_base_struct { - int fourcc; - VCHIQ_CALLBACK_T callback; - void *userdata; -} VCHIQ_SERVICE_BASE_T; - -typedef struct vchiq_service_params_struct { - int fourcc; - VCHIQ_CALLBACK_T callback; - void *userdata; - short version; /* Increment for non-trivial changes */ - short version_min; /* Update for incompatible changes */ -} VCHIQ_SERVICE_PARAMS_T; - -typedef struct vchiq_config_struct { - int max_msg_size; - int bulk_threshold; /* The message size aboce which it is better to use - a bulk transfer (<= max_msg_size) */ - int max_outstanding_bulks; - int max_services; - short version; /* The version of VCHIQ */ - short version_min; /* The minimum compatible version of VCHIQ */ -} VCHIQ_CONFIG_T; - -typedef struct vchiq_instance_struct *VCHIQ_INSTANCE_T; -typedef void (*VCHIQ_REMOTE_USE_CALLBACK_T)(void* cb_arg); - - -extern VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *pinstance); -extern VCHIQ_STATUS_T vchiq_shutdown(VCHIQ_INSTANCE_T instance); -extern VCHIQ_STATUS_T vchiq_connect(VCHIQ_INSTANCE_T instance); -extern VCHIQ_STATUS_T vchiq_add_service(VCHIQ_INSTANCE_T instance, - const VCHIQ_SERVICE_PARAMS_T *params, - VCHIQ_SERVICE_HANDLE_T *pservice); -extern VCHIQ_STATUS_T vchiq_open_service(VCHIQ_INSTANCE_T instance, - const VCHIQ_SERVICE_PARAMS_T *params, - VCHIQ_SERVICE_HANDLE_T *pservice); -extern VCHIQ_STATUS_T vchiq_close_service(VCHIQ_SERVICE_HANDLE_T service); -extern VCHIQ_STATUS_T vchiq_remove_service(VCHIQ_SERVICE_HANDLE_T service); -extern VCHIQ_STATUS_T vchiq_use_service(VCHIQ_SERVICE_HANDLE_T service); -extern VCHIQ_STATUS_T vchiq_release_service(VCHIQ_SERVICE_HANDLE_T service); - -extern VCHIQ_STATUS_T vchiq_queue_message(VCHIQ_SERVICE_HANDLE_T service, - const VCHIQ_ELEMENT_T *elements, int count); -extern void vchiq_release_message(VCHIQ_SERVICE_HANDLE_T service, - VCHIQ_HEADER_T *header); -extern VCHIQ_STATUS_T vchiq_queue_bulk_transmit(VCHIQ_SERVICE_HANDLE_T service, - const void *data, int size, void *userdata); -extern VCHIQ_STATUS_T vchiq_queue_bulk_receive(VCHIQ_SERVICE_HANDLE_T service, - void *data, int size, void *userdata); -extern VCHIQ_STATUS_T vchiq_queue_bulk_transmit_handle( - VCHIQ_SERVICE_HANDLE_T service, VCHI_MEM_HANDLE_T handle, - const void *offset, int size, void *userdata); -extern VCHIQ_STATUS_T vchiq_queue_bulk_receive_handle( - VCHIQ_SERVICE_HANDLE_T service, VCHI_MEM_HANDLE_T handle, - void *offset, int size, void *userdata); -extern VCHIQ_STATUS_T vchiq_bulk_transmit(VCHIQ_SERVICE_HANDLE_T service, - const void *data, int size, void *userdata, VCHIQ_BULK_MODE_T mode); -extern VCHIQ_STATUS_T vchiq_bulk_receive(VCHIQ_SERVICE_HANDLE_T service, - void *data, int size, void *userdata, VCHIQ_BULK_MODE_T mode); -extern VCHIQ_STATUS_T vchiq_bulk_transmit_handle(VCHIQ_SERVICE_HANDLE_T service, - VCHI_MEM_HANDLE_T handle, const void *offset, int size, void *userdata, - VCHIQ_BULK_MODE_T mode); -extern VCHIQ_STATUS_T vchiq_bulk_receive_handle(VCHIQ_SERVICE_HANDLE_T service, - VCHI_MEM_HANDLE_T handle, void *offset, int size, void *userdata, - VCHIQ_BULK_MODE_T mode, int (*copy_pagelist)()); -extern int vchiq_get_client_id(VCHIQ_SERVICE_HANDLE_T service); -extern void *vchiq_get_service_userdata(VCHIQ_SERVICE_HANDLE_T service); -extern int vchiq_get_service_fourcc(VCHIQ_SERVICE_HANDLE_T service); -extern VCHIQ_STATUS_T vchiq_get_config(VCHIQ_INSTANCE_T instance, - int config_size, VCHIQ_CONFIG_T *pconfig); -extern VCHIQ_STATUS_T vchiq_set_service_option(VCHIQ_SERVICE_HANDLE_T service, - VCHIQ_SERVICE_OPTION_T option, int value); - -extern VCHIQ_STATUS_T vchiq_remote_use(VCHIQ_INSTANCE_T instance, - VCHIQ_REMOTE_USE_CALLBACK_T callback, void *cb_arg); -extern VCHIQ_STATUS_T vchiq_remote_release(VCHIQ_INSTANCE_T instance); - -extern VCHIQ_STATUS_T vchiq_dump_phys_mem(VCHIQ_SERVICE_HANDLE_T service, - void *ptr, size_t num_bytes); - -extern VCHIQ_STATUS_T vchiq_get_peer_version(VCHIQ_SERVICE_HANDLE_T handle, - short *peer_version); - -#endif /* VCHIQ_IF_H */ diff --git a/vc/include/interface/vchiq_arm/vchiq_ioctl.h b/vc/include/interface/vchiq_arm/vchiq_ioctl.h @@ -1,116 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef VCHIQ_IOCTLS_H -#define VCHIQ_IOCTLS_H - -#include <linux/ioctl.h> -#include "vchiq_if.h" - -#define VCHIQ_IOC_MAGIC 0xc4 -#define VCHIQ_INVALID_HANDLE (~0) - -typedef struct { - VCHIQ_SERVICE_PARAMS_T params; - int is_open; - int is_vchi; - unsigned int handle; /* OUT */ -} VCHIQ_CREATE_SERVICE_T; - -typedef struct { - unsigned int handle; - unsigned int count; - const VCHIQ_ELEMENT_T *elements; -} VCHIQ_QUEUE_MESSAGE_T; - -typedef struct { - unsigned int handle; - void *data; - unsigned int size; - void *userdata; - VCHIQ_BULK_MODE_T mode; -} VCHIQ_QUEUE_BULK_TRANSFER_T; - -typedef struct { - VCHIQ_REASON_T reason; - VCHIQ_HEADER_T *header; - void *service_userdata; - void *bulk_userdata; -} VCHIQ_COMPLETION_DATA_T; - -typedef struct { - unsigned int count; - VCHIQ_COMPLETION_DATA_T *buf; - unsigned int msgbufsize; - unsigned int msgbufcount; /* IN/OUT */ - void **msgbufs; -} VCHIQ_AWAIT_COMPLETION_T; - -typedef struct { - unsigned int handle; - int blocking; - unsigned int bufsize; - void *buf; -} VCHIQ_DEQUEUE_MESSAGE_T; - -typedef struct { - unsigned int config_size; - VCHIQ_CONFIG_T *pconfig; -} VCHIQ_GET_CONFIG_T; - -typedef struct { - unsigned int handle; - VCHIQ_SERVICE_OPTION_T option; - int value; -} VCHIQ_SET_SERVICE_OPTION_T; - -typedef struct { - void *virt_addr; - size_t num_bytes; -} VCHIQ_DUMP_MEM_T; - -#define VCHIQ_IOC_CONNECT _IO(VCHIQ_IOC_MAGIC, 0) -#define VCHIQ_IOC_SHUTDOWN _IO(VCHIQ_IOC_MAGIC, 1) -#define VCHIQ_IOC_CREATE_SERVICE _IOWR(VCHIQ_IOC_MAGIC, 2, VCHIQ_CREATE_SERVICE_T) -#define VCHIQ_IOC_REMOVE_SERVICE _IO(VCHIQ_IOC_MAGIC, 3) -#define VCHIQ_IOC_QUEUE_MESSAGE _IOW(VCHIQ_IOC_MAGIC, 4, VCHIQ_QUEUE_MESSAGE_T) -#define VCHIQ_IOC_QUEUE_BULK_TRANSMIT _IOWR(VCHIQ_IOC_MAGIC, 5, VCHIQ_QUEUE_BULK_TRANSFER_T) -#define VCHIQ_IOC_QUEUE_BULK_RECEIVE _IOWR(VCHIQ_IOC_MAGIC, 6, VCHIQ_QUEUE_BULK_TRANSFER_T) -#define VCHIQ_IOC_AWAIT_COMPLETION _IOWR(VCHIQ_IOC_MAGIC, 7, VCHIQ_AWAIT_COMPLETION_T) -#define VCHIQ_IOC_DEQUEUE_MESSAGE _IOWR(VCHIQ_IOC_MAGIC, 8, VCHIQ_DEQUEUE_MESSAGE_T) -#define VCHIQ_IOC_GET_CLIENT_ID _IO(VCHIQ_IOC_MAGIC, 9) -#define VCHIQ_IOC_GET_CONFIG _IOWR(VCHIQ_IOC_MAGIC, 10, VCHIQ_GET_CONFIG_T) -#define VCHIQ_IOC_CLOSE_SERVICE _IO(VCHIQ_IOC_MAGIC, 11) -#define VCHIQ_IOC_USE_SERVICE _IO(VCHIQ_IOC_MAGIC, 12) -#define VCHIQ_IOC_RELEASE_SERVICE _IO(VCHIQ_IOC_MAGIC, 13) -#define VCHIQ_IOC_SET_SERVICE_OPTION _IOW(VCHIQ_IOC_MAGIC, 14, VCHIQ_SET_SERVICE_OPTION_T) -#define VCHIQ_IOC_DUMP_PHYS_MEM _IOW(VCHIQ_IOC_MAGIC, 15, VCHIQ_DUMP_MEM_T) -#define VCHIQ_IOC_LIB_VERSION _IO(VCHIQ_IOC_MAGIC, 16) -#define VCHIQ_IOC_CLOSE_DELIVERED _IO(VCHIQ_IOC_MAGIC, 17) -#define VCHIQ_IOC_MAX 17 - -#endif diff --git a/vc/include/interface/vchiq_arm/vchiq_test.h b/vc/include/interface/vchiq_arm/vchiq_test.h @@ -1,135 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef VCHIQ_TEST_H -#define VCHIQ_TEST_H - -#include "vchiq_test_if.h" - -#define VCOS_LOG_CATEGORY (&vchiq_test_log_category) - -#define VERBOSE_TRACE 1 - -#define FUNC_FOURCC VCHIQ_MAKE_FOURCC('f','u','n','c') -#define FUN2_FOURCC VCHIQ_MAKE_FOURCC('f','u','n','2') - -#define SERVICE1_DATA_SIZE 1024 -#define SERVICE2_DATA_SIZE 2048 -#define FUN2_MAX_DATA_SIZE 16384 -#define FUN2_MAX_ALIGN 4096 -#define BULK_ALIGN_SIZE 4096 - -#define VCHIQ_TEST_VER 3 - -enum { - MSG_ERROR, - MSG_ONEWAY, - MSG_ASYNC, - MSG_SYNC, - MSG_CONFIG, - MSG_ECHO -}; - -struct test_params -{ - int magic; /* = MSG_CONFIG */ - int blocksize; - int iters; - int verify; - int echo; - int align_size; - int client_align; - int server_align; - int client_message_quota; - int server_message_quota; -}; - -#if VERBOSE_TRACE - -#define EXPECT(_e, _v) if (_e != _v) { vcos_log_error("%d: " #_e " != " #_v, __LINE__); VCOS_BKPT; goto error_exit; } else { vcos_log_trace("%d: " #_e " == " #_v, __LINE__); } - -#define START_CALLBACK(_r, _u) \ - if (++callback_index == callback_count) { \ - if (reason != _r) { \ - vcos_log_error("%d: expected callback reason " #_r ", got %d", __LINE__, reason); VCOS_BKPT; goto error_exit; \ - } \ - else if ((int)VCHIQ_GET_SERVICE_USERDATA(service) != _u) { \ - vcos_log_error("%d: expected userdata %d, got %d", __LINE__, _u, (int)VCHIQ_GET_SERVICE_USERDATA(service)); VCOS_BKPT; goto error_exit; \ - } \ - else \ - { \ - vcos_log_trace("%d: " #_r ", " #_u, __LINE__); \ - } - -#define START_BULK_CALLBACK(_r, _u, _bu) \ - if (++bulk_index == bulk_count) { \ - if (reason != _r) { \ - vcos_log_error("%d: expected callback reason " #_r ", got %d", __LINE__, reason); VCOS_BKPT; goto error_exit; \ - } \ - else if ((int)VCHIQ_GET_SERVICE_USERDATA(service) != _u) { \ - vcos_log_error("%d: expected userdata %d, got %d", __LINE__, _u, (int)VCHIQ_GET_SERVICE_USERDATA(service)); VCOS_BKPT; goto error_exit; \ - } \ - else if ((int)bulk_userdata != _bu) { \ - vcos_log_error("%d: expected bulk_userdata %d, got %d", __LINE__, _bu, (int)bulk_userdata); VCOS_BKPT; goto error_exit; \ - } \ - else \ - { \ - vcos_log_trace("%d: " #_r ", " #_u ", " #_bu, __LINE__); \ - } - -#else - -#define EXPECT(_e, _v) if (_e != _v) { vcos_log_trace("%d: " #_e " != " #_v, __LINE__); VCOS_BKPT; goto error_exit; } - -#define START_CALLBACK(_r, _u) \ - if (++callback_index == callback_count) { \ - if (reason != _r) { \ - vcos_log_error("%d: expected callback reason " #_r ", got %d", __LINE__, reason); VCOS_BKPT; goto error_exit; \ - } \ - else if ((int)VCHIQ_GET_SERVICE_USERDATA(service) != _u) { \ - vcos_log_error("%d: expected userdata %d, got %d", __LINE__, _u, (int)VCHIQ_GET_SERVICE_USERDATA(service)); VCOS_BKPT; goto error_exit; \ - } - -#define START_BULK_CALLBACK(_r, _u, _bu) \ - if (++bulk_index == bulk_count) { \ - if (reason != _r) { \ - vcos_log_error("%d: expected callback reason " #_r ", got %d", __LINE__, reason); VCOS_BKPT; goto error_exit; \ - } \ - else if ((int)VCHIQ_GET_SERVICE_USERDATA(service) != _u) { \ - vcos_log_error("%d: expected userdata %d, got %d", __LINE__, _u, (int)VCHIQ_GET_SERVICE_USERDATA(service)); VCOS_BKPT; goto error_exit; \ - } \ - else if ((int)bulk_userdata != _bu) { \ - vcos_log_error("%d: expected bulkuserdata %d, got %d", __LINE__, _bu, (int)bulk_userdata); VCOS_BKPT; goto error_exit; \ - } - -#endif - -#define END_CALLBACK(_s) \ - return _s; \ - } - -#endif diff --git a/vc/include/interface/vchiq_arm/vchiq_test_if.h b/vc/include/interface/vchiq_arm/vchiq_test_if.h @@ -1,35 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCHIQ_TEST_IF_H -#define VCHIQ_TEST_IF_H - -#include "vchiq.h" - -extern void vchiq_test_start_services(VCHIQ_INSTANCE_T instance); - -#endif diff --git a/vc/include/interface/vchiq_arm/vchiq_util.h b/vc/include/interface/vchiq_arm/vchiq_util.h @@ -1,57 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef VCHIQ_UTIL_H -#define VCHIQ_UTIL_H - -#include "vchiq_if.h" -#include "interface/vcos/vcos.h" - -typedef struct { - int size; - int read; - int write; - - VCOS_EVENT_T pop; - VCOS_EVENT_T push; - - VCHIQ_HEADER_T **storage; -} VCHIU_QUEUE_T; - -extern int vchiu_queue_init(VCHIU_QUEUE_T *queue, int size); -extern void vchiu_queue_delete(VCHIU_QUEUE_T *queue); - -extern int vchiu_queue_is_empty(VCHIU_QUEUE_T *queue); -extern int vchiu_queue_is_full(VCHIU_QUEUE_T *queue); - -extern void vchiu_queue_push(VCHIU_QUEUE_T *queue, VCHIQ_HEADER_T *header); - -extern VCHIQ_HEADER_T *vchiu_queue_peek(VCHIU_QUEUE_T *queue); -extern VCHIQ_HEADER_T *vchiu_queue_pop(VCHIU_QUEUE_T *queue); - -#endif - diff --git a/vc/include/interface/vcos/generic/vcos_common.h b/vc/include/interface/vcos/generic/vcos_common.h @@ -1,96 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - common postamble code -=============================================================================*/ - -/** \file - * - * Postamble code included by the platform-specific header files - */ - -#define VCOS_THREAD_PRI_DEFAULT VCOS_THREAD_PRI_NORMAL - -#if !defined(VCOS_THREAD_PRI_INCREASE) -#error Which way to thread priorities go? -#endif - -#if VCOS_THREAD_PRI_INCREASE < 0 -/* smaller numbers are higher priority */ -#define VCOS_THREAD_PRI_LESS(x) ((x)<VCOS_THREAD_PRI_MAX?(x)+1:VCOS_THREAD_PRI_MAX) -#define VCOS_THREAD_PRI_MORE(x) ((x)>VCOS_THREAD_PRI_MIN?(x)-1:VCOS_THREAD_PRI_MIN) -#else -/* bigger numbers are lower priority */ -#define VCOS_THREAD_PRI_MORE(x) ((x)<VCOS_THREAD_PRI_MAX?(x)+1:VCOS_THREAD_PRI_MAX) -#define VCOS_THREAD_PRI_LESS(x) ((x)>VCOS_THREAD_PRI_MIN?(x)-1:VCOS_THREAD_PRI_MIN) -#endif - -/* Convenience for Brits: */ -#define VCOS_APPLICATION_INITIALISE VCOS_APPLICATION_INITIALIZE - -/* - * Check for constant definitions - */ -#ifndef VCOS_TICKS_PER_SECOND -#error VCOS_TICKS_PER_SECOND not defined -#endif - -#if !defined(VCOS_THREAD_PRI_MIN) || !defined(VCOS_THREAD_PRI_MAX) -#error Priority range not defined -#endif - -#if !defined(VCOS_THREAD_PRI_HIGHEST) || !defined(VCOS_THREAD_PRI_LOWEST) || !defined(VCOS_THREAD_PRI_NORMAL) -#error Priority ordering not defined -#endif - -#if !defined(VCOS_CAN_SET_STACK_ADDR) -#error Can stack addresses be set on this platform? Please set this macro to either 0 or 1. -#endif - -#if (_VCOS_AFFINITY_CPU0|_VCOS_AFFINITY_CPU1) & (~_VCOS_AFFINITY_MASK) -#error _VCOS_AFFINITY_CPUxxx values are not consistent with _VCOS_AFFINITY_MASK -#endif - -/** Append to the end of a singly-linked queue, O(1). Works with - * any structure where list has members 'head' and 'tail' and - * item has a 'next' pointer. - */ -#define VCOS_QUEUE_APPEND_TAIL(list, item) {\ - (item)->next = NULL;\ - if (!(list)->head) {\ - (list)->head = (list)->tail = (item); \ - } else {\ - (list)->tail->next = (item); \ - (list)->tail = (item); \ - } \ -} - -#ifndef VCOS_HAVE_TIMER -VCOSPRE_ void VCOSPOST_ vcos_timer_init(void); -#endif - diff --git a/vc/include/interface/vcos/generic/vcos_deprecated.h b/vc/include/interface/vcos/generic/vcos_deprecated.h @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* -The symbol vcos_deprecated_code may be defined at most once, by the inclusion of "vcos_deprecated.h" in vcos_init.c. -Any other inclusions of this header will cause the linker to warn about multiple definitions of vcos_deprecated_code, for example: - [ldvc] (Warning) "vcos_deprecated_code" is multiply defined in libs/vcos_threadx/vcos_init.c.o and libs/xxxxx/xxxxx.c.o -If you see a build message like this then the configuration you are building is using deprecated code. -Contact the person named in the accompanying comment for advice - do not remove the inclusion. -*/ - -int vcos_deprecated_code; diff --git a/vc/include/interface/vcos/generic/vcos_generic_blockpool.h b/vc/include/interface/vcos/generic/vcos_generic_blockpool.h @@ -1,294 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - event flags implemented via a semaphore -=============================================================================*/ - -#ifndef VCOS_GENERIC_BLOCKPOOL_H -#define VCOS_GENERIC_BLOCKPOOL_H - -/** - * \file - * - * This provides a generic, thread safe implementation of a VCOS block pool - * fixed size memory allocator. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" - -/** Bits 0 to (VCOS_BLOCKPOOL_SUBPOOL_BITS - 1) are used to store the - * subpool id. */ -#define VCOS_BLOCKPOOL_SUBPOOL_BITS 3 -#define VCOS_BLOCKPOOL_MAX_SUBPOOLS (1 << VCOS_BLOCKPOOL_SUBPOOL_BITS) - -/* Make zero an invalid handle at the cost of decreasing the maximum - * number of blocks (2^28) by 1. Alternatively, a spare bit could be - * used to indicated valid blocks but there are likely to be better - * uses for spare bits. e.g. allowing more subpools - */ -#define INDEX_OFFSET 1 - -#define VCOS_BLOCKPOOL_HANDLE_GET_INDEX(h) \ - (((h) >> VCOS_BLOCKPOOL_SUBPOOL_BITS) - INDEX_OFFSET) - -#define VCOS_BLOCKPOOL_HANDLE_GET_SUBPOOL(h) \ - ((h) & ((1 << VCOS_BLOCKPOOL_SUBPOOL_BITS) - 1)) - -#define VCOS_BLOCKPOOL_HANDLE_CREATE(i,s) \ - ((((i) + INDEX_OFFSET) << VCOS_BLOCKPOOL_SUBPOOL_BITS) | (s)) - -#define VCOS_BLOCKPOOL_INVALID_HANDLE 0 -#define VCOS_BLOCKPOOL_ALIGN_DEFAULT sizeof(unsigned long) -#define VCOS_BLOCKPOOL_FLAG_NONE 0 - -typedef struct VCOS_BLOCKPOOL_HEADER_TAG -{ - /* Blocks either refer to to the pool if they are allocated - * or the free list if they are available. - */ - union { - struct VCOS_BLOCKPOOL_HEADER_TAG *next; - struct VCOS_BLOCKPOOL_SUBPOOL_TAG* subpool; - } owner; -} VCOS_BLOCKPOOL_HEADER_T; - -typedef struct VCOS_BLOCKPOOL_SUBPOOL_TAG -{ - /** VCOS_BLOCKPOOL_SUBPOOL_MAGIC */ - uint32_t magic; - VCOS_BLOCKPOOL_HEADER_T* free_list; - /* The start of the pool memory */ - void *mem; - /* Address of the first block header */ - void *start; - /* The end of the subpool */ - void *end; - /** The number of blocks in this sub-pool */ - VCOS_UNSIGNED num_blocks; - /** Current number of available blocks in this sub-pool */ - VCOS_UNSIGNED available_blocks; - /** Pointers to the pool that owns this sub-pool */ - struct VCOS_BLOCKPOOL_TAG* owner; - /** Define properties such as memory ownership */ - uint32_t flags; -} VCOS_BLOCKPOOL_SUBPOOL_T; - -typedef struct VCOS_BLOCKPOOL_TAG -{ - /** VCOS_BLOCKPOOL_MAGIC */ - uint32_t magic; - /** Thread safety for Alloc, Free, Delete, Stats */ - VCOS_MUTEX_T mutex; - /** Alignment of block data pointers */ - VCOS_UNSIGNED align; - /** Flags for future use e.g. cache options */ - VCOS_UNSIGNED flags; - /** The size of the block data */ - size_t block_data_size; - /** Block size inc overheads */ - size_t block_size; - /** Name for debugging */ - const char *name; - /* The number of subpools that may be used */ - VCOS_UNSIGNED num_subpools; - /** Number of blocks in each dynamically allocated subpool */ - VCOS_UNSIGNED num_extension_blocks; - /** Array of subpools. Subpool zero is is not deleted until the pool is - * destroed. If the index of the pool is < num_subpools and - * subpool[index.mem] is null then the subpool entry is valid but - * "not currently allocated" */ - VCOS_BLOCKPOOL_SUBPOOL_T subpools[VCOS_BLOCKPOOL_MAX_SUBPOOLS]; -} VCOS_BLOCKPOOL_T; - -#define VCOS_BLOCKPOOL_ROUND_UP(x,s) (((x) + ((s) - 1)) & ~((s) - 1)) -/** - * Calculates the size in bytes required for a block pool containing - * num_blocks of size block_size plus any overheads. - * - * The block pool header (VCOS_BLOCKPOOL_T) is allocated separately - * - * Overheads: - * block_size + header must be rounded up to meet the required alignment - * The start of the first block may need to be up to align bytes - * into the given buffer because statically allocated buffers within structures - * are not guaranteed to be aligned as required. - */ -#define VCOS_BLOCKPOOL_SIZE(num_blocks, block_size, align) \ - ((VCOS_BLOCKPOOL_ROUND_UP((block_size) + (align >= 4096 ? 32 : 0) + sizeof(VCOS_BLOCKPOOL_HEADER_T), \ - (align)) * (num_blocks)) + (align)) - -/** - * Sanity check to verify whether a handle is potentially a blockpool handle - * when the pool pointer is not available. - * - * If the pool pointer is availabe use vcos_blockpool_elem_to_handle instead. - * - * @param handle the handle to verify - * @param max_blocks the expected maximum number of block in the pool - * that the handle belongs to. - */ -#define VCOS_BLOCKPOOL_IS_VALID_HANDLE_FORMAT(handle, max_blocks) \ - ((handle) != VCOS_BLOCKPOOL_INVALID_HANDLE \ - && VCOS_BLOCKPOOL_HANDLE_GET_INDEX((handle)) < (max_blocks)) - -VCOSPRE_ - VCOS_STATUS_T VCOSPOST_ vcos_generic_blockpool_init(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_blocks, VCOS_UNSIGNED block_size, - void *start, VCOS_UNSIGNED pool_size, - VCOS_UNSIGNED align, VCOS_UNSIGNED flags, - const char *name); - -VCOSPRE_ - VCOS_STATUS_T VCOSPOST_ vcos_generic_blockpool_create_on_heap( - VCOS_BLOCKPOOL_T *pool, VCOS_UNSIGNED num_blocks, - VCOS_UNSIGNED block_size, - VCOS_UNSIGNED align, VCOS_UNSIGNED flags, - const char *name); - -VCOSPRE_ - VCOS_STATUS_T VCOSPOST_ vcos_generic_blockpool_extend(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_extensions, VCOS_UNSIGNED num_blocks); - -VCOSPRE_ void VCOSPOST_ *vcos_generic_blockpool_alloc(VCOS_BLOCKPOOL_T *pool); - -VCOSPRE_ void VCOSPOST_ *vcos_generic_blockpool_calloc(VCOS_BLOCKPOOL_T *pool); - -VCOSPRE_ void VCOSPOST_ vcos_generic_blockpool_free(void *block); - -VCOSPRE_ - VCOS_UNSIGNED VCOSPOST_ vcos_generic_blockpool_available_count( - VCOS_BLOCKPOOL_T *pool); - -VCOSPRE_ - VCOS_UNSIGNED VCOSPOST_ vcos_generic_blockpool_used_count( - VCOS_BLOCKPOOL_T *pool); - -VCOSPRE_ void VCOSPOST_ vcos_generic_blockpool_delete(VCOS_BLOCKPOOL_T *pool); - -VCOSPRE_ uint32_t VCOSPOST_ vcos_generic_blockpool_elem_to_handle(void *block); - -VCOSPRE_ void VCOSPOST_ - *vcos_generic_blockpool_elem_from_handle( - VCOS_BLOCKPOOL_T *pool, uint32_t handle); - -VCOSPRE_ uint32_t VCOSPOST_ - vcos_generic_blockpool_is_valid_elem( - VCOS_BLOCKPOOL_T *pool, const void *block); -#if defined(VCOS_INLINE_BODIES) - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_blockpool_init(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_blocks, VCOS_UNSIGNED block_size, - void *start, VCOS_UNSIGNED pool_size, - VCOS_UNSIGNED align, VCOS_UNSIGNED flags, const char *name) -{ - return vcos_generic_blockpool_init(pool, num_blocks, block_size, - start, pool_size, align, flags, name); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_blockpool_create_on_heap(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_blocks, VCOS_UNSIGNED block_size, - VCOS_UNSIGNED align, VCOS_UNSIGNED flags, const char *name) -{ - return vcos_generic_blockpool_create_on_heap( - pool, num_blocks, block_size, align, flags, name); -} - -VCOS_INLINE_IMPL - VCOS_STATUS_T VCOSPOST_ vcos_blockpool_extend(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_extensions, VCOS_UNSIGNED num_blocks) -{ - return vcos_generic_blockpool_extend(pool, num_extensions, num_blocks); -} - -VCOS_INLINE_IMPL -void *vcos_blockpool_alloc(VCOS_BLOCKPOOL_T *pool) -{ - return vcos_generic_blockpool_alloc(pool); -} - -VCOS_INLINE_IMPL -void *vcos_blockpool_calloc(VCOS_BLOCKPOOL_T *pool) -{ - return vcos_generic_blockpool_calloc(pool); -} - -VCOS_INLINE_IMPL -void vcos_blockpool_free(void *block) -{ - vcos_generic_blockpool_free(block); -} - -VCOS_INLINE_IMPL -VCOS_UNSIGNED vcos_blockpool_available_count(VCOS_BLOCKPOOL_T *pool) -{ - return vcos_generic_blockpool_available_count(pool); -} - -VCOS_INLINE_IMPL -VCOS_UNSIGNED vcos_blockpool_used_count(VCOS_BLOCKPOOL_T *pool) -{ - return vcos_generic_blockpool_used_count(pool); -} - -VCOS_INLINE_IMPL -void vcos_blockpool_delete(VCOS_BLOCKPOOL_T *pool) -{ - vcos_generic_blockpool_delete(pool); -} - -VCOS_INLINE_IMPL -uint32_t vcos_blockpool_elem_to_handle(void *block) -{ - return vcos_generic_blockpool_elem_to_handle(block); -} - -VCOS_INLINE_IMPL -void *vcos_blockpool_elem_from_handle(VCOS_BLOCKPOOL_T *pool, uint32_t handle) -{ - return vcos_generic_blockpool_elem_from_handle(pool, handle); -} - -VCOS_INLINE_IMPL -uint32_t vcos_blockpool_is_valid_elem(VCOS_BLOCKPOOL_T *pool, const void *block) -{ - return vcos_generic_blockpool_is_valid_elem(pool, block); -} -#endif /* VCOS_INLINE_BODIES */ - - -#ifdef __cplusplus -} -#endif -#endif /* VCOS_GENERIC_BLOCKPOOL_H */ - diff --git a/vc/include/interface/vcos/generic/vcos_generic_event_flags.h b/vc/include/interface/vcos/generic/vcos_generic_event_flags.h @@ -1,127 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - event flags implemented via a semaphore -=============================================================================*/ - -#ifndef VCOS_GENERIC_EVENT_FLAGS_H -#define VCOS_GENERIC_EVENT_FLAGS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" - -/** - * \file - * - * This provides event flags (as per Nucleus Event Groups) based on a - * mutex, a semaphore (per waiting thread) and a timer (per waiting - * thread). - * - * The data structure is a 32 bit unsigned int (the current set of - * flags) and a linked list of clients waiting to be 'satisfied'. - * - * The mutex merely locks access to the data structure. If a client - * calls vcos_event_flags_get() and the requested bits are not already - * present, it then sleeps on its per-thread semaphore after adding - * this semaphore to the queue waiting. It also sets up a timer. - * - * The per-thread semaphore and timer are actually stored in the - * thread context (joinable thread). In future it may become necessary - * to support non-VCOS threads by using thread local storage to - * create these objects and associate them with the thread. - */ - -struct VCOS_EVENT_WAITER_T; - -typedef struct VCOS_EVENT_FLAGS_T -{ - VCOS_UNSIGNED events; /**< Events currently set */ - VCOS_MUTEX_T lock; /**< Serialize access */ - struct - { - struct VCOS_EVENT_WAITER_T *head; /**< List of threads waiting */ - struct VCOS_EVENT_WAITER_T *tail; /**< List of threads waiting */ - } waiters; -} VCOS_EVENT_FLAGS_T; - -#define VCOS_OR 1 -#define VCOS_AND 2 -#define VCOS_CONSUME 4 -#define VCOS_OR_CONSUME (VCOS_OR | VCOS_CONSUME) -#define VCOS_AND_CONSUME (VCOS_AND | VCOS_CONSUME) -#define VCOS_EVENT_FLAG_OP_MASK (VCOS_OR|VCOS_AND) - -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_generic_event_flags_create(VCOS_EVENT_FLAGS_T *flags, const char *name); -VCOSPRE_ void VCOSPOST_ vcos_generic_event_flags_set(VCOS_EVENT_FLAGS_T *flags, - VCOS_UNSIGNED events, - VCOS_OPTION op); -VCOSPRE_ void VCOSPOST_ vcos_generic_event_flags_delete(VCOS_EVENT_FLAGS_T *); -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_generic_event_flags_get(VCOS_EVENT_FLAGS_T *flags, - VCOS_UNSIGNED requested_events, - VCOS_OPTION op, - VCOS_UNSIGNED suspend, - VCOS_UNSIGNED *retrieved_events); - -#ifdef VCOS_INLINE_BODIES - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_event_flags_create(VCOS_EVENT_FLAGS_T *flags, const char *name) { - return vcos_generic_event_flags_create(flags, name); -} - -VCOS_INLINE_IMPL -void vcos_event_flags_set(VCOS_EVENT_FLAGS_T *flags, - VCOS_UNSIGNED events, - VCOS_OPTION op) { - vcos_generic_event_flags_set(flags, events, op); -} - -VCOS_INLINE_IMPL -void vcos_event_flags_delete(VCOS_EVENT_FLAGS_T *f) { - vcos_generic_event_flags_delete(f); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_event_flags_get(VCOS_EVENT_FLAGS_T *flags, - VCOS_UNSIGNED requested_events, - VCOS_OPTION op, - VCOS_UNSIGNED suspend, - VCOS_UNSIGNED *retrieved_events) { - return vcos_generic_event_flags_get(flags, requested_events, op, suspend, retrieved_events); -} - -#endif /* VCOS_INLINE_BODIES */ - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/generic/vcos_generic_named_sem.h b/vc/include/interface/vcos/generic/vcos_generic_named_sem.h @@ -1,101 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - named semaphores -=============================================================================*/ - -#ifndef VCOS_GENERIC_NAMED_SEM_H -#define VCOS_GENERIC_NAMED_SEM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" - -/** - * \file - * - * Generic support for named semaphores, using regular ones. This is only - * suitable for emulating them on an embedded MMUless system, since there is - * no support for opening semaphores across process boundaries. - * - */ - -#define VCOS_NAMED_SEMAPHORE_NAMELEN 64 - -/* In theory we could use the name facility provided within Nucleus. However, this - * is hard to do as semaphores are constantly being created and destroyed; we - * would need to stop everything while allocating the memory for the semaphore - * list and then walking it. So keep our own list. - */ -typedef struct VCOS_NAMED_SEMAPHORE_T -{ - struct VCOS_NAMED_SEMAPHORE_IMPL_T *actual; /**< There are 'n' named semaphores per 1 actual semaphore */ - VCOS_SEMAPHORE_T *sem; /**< Pointer to actual underlying semaphore */ -} VCOS_NAMED_SEMAPHORE_T; - -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ -vcos_generic_named_semaphore_create(VCOS_NAMED_SEMAPHORE_T *sem, const char *name, VCOS_UNSIGNED count); - -VCOSPRE_ void VCOSPOST_ vcos_named_semaphore_delete(VCOS_NAMED_SEMAPHORE_T *sem); - -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ _vcos_named_semaphore_init(void); -VCOSPRE_ void VCOSPOST_ _vcos_named_semaphore_deinit(void); - -#if defined(VCOS_INLINE_BODIES) - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_named_semaphore_create(VCOS_NAMED_SEMAPHORE_T *sem, const char *name, VCOS_UNSIGNED count) { - return vcos_generic_named_semaphore_create(sem, name, count); -} - -VCOS_INLINE_IMPL -void vcos_named_semaphore_wait(VCOS_NAMED_SEMAPHORE_T *sem) { - vcos_semaphore_wait(sem->sem); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_named_semaphore_trywait(VCOS_NAMED_SEMAPHORE_T *sem) { - return vcos_semaphore_trywait(sem->sem); -} - -VCOS_INLINE_IMPL -void vcos_named_semaphore_post(VCOS_NAMED_SEMAPHORE_T *sem) { - vcos_semaphore_post(sem->sem); -} - - -#endif - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/vc/include/interface/vcos/generic/vcos_generic_quickslow_mutex.h b/vc/include/interface/vcos/generic/vcos_generic_quickslow_mutex.h @@ -1,95 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - reentrant mutexes created from regular ones. -=============================================================================*/ - -#ifndef VCOS_GENERIC_QUICKSLOW_MUTEX_H -#define VCOS_GENERIC_QUICKSLOW_MUTEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" - -/** - * \file - * - * Quickslow Mutexes implemented as regular ones (i.e. quick and slow modes are the same). - * - */ - -typedef VCOS_MUTEX_T VCOS_QUICKSLOW_MUTEX_T; - -#if defined(VCOS_INLINE_BODIES) -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_quickslow_mutex_create(VCOS_QUICKSLOW_MUTEX_T *m, const char *name) -{ - return vcos_mutex_create(m, name); -} - -VCOS_INLINE_IMPL -void vcos_quickslow_mutex_delete(VCOS_QUICKSLOW_MUTEX_T *m) -{ - vcos_mutex_delete(m); -} - -VCOS_INLINE_IMPL -void vcos_quickslow_mutex_lock(VCOS_QUICKSLOW_MUTEX_T *m) -{ - while (vcos_mutex_lock(m) == VCOS_EAGAIN); -} - -VCOS_INLINE_IMPL -void vcos_quickslow_mutex_unlock(VCOS_QUICKSLOW_MUTEX_T *m) -{ - vcos_mutex_unlock(m); -} - -VCOS_INLINE_IMPL -void vcos_quickslow_mutex_lock_quick(VCOS_QUICKSLOW_MUTEX_T *m) -{ - while (vcos_mutex_lock(m) == VCOS_EAGAIN); -} - -VCOS_INLINE_IMPL -void vcos_quickslow_mutex_unlock_quick(VCOS_QUICKSLOW_MUTEX_T *m) -{ - vcos_mutex_unlock(m); -} - -#endif - - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/vc/include/interface/vcos/generic/vcos_generic_reentrant_mtx.h b/vc/include/interface/vcos/generic/vcos_generic_reentrant_mtx.h @@ -1,95 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - reentrant mutexes created from regular ones. -=============================================================================*/ - -#ifndef VCOS_GENERIC_REENTRANT_MUTEX_H -#define VCOS_GENERIC_REENTRANT_MUTEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" - -/** - * \file - * - * Reentrant Mutexes from regular ones. - * - */ - -typedef struct VCOS_REENTRANT_MUTEX_T -{ - VCOS_MUTEX_T mutex; - VCOS_THREAD_T *owner; - unsigned count; -} VCOS_REENTRANT_MUTEX_T; - -/* Extern definitions of functions that do the actual work */ - -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_generic_reentrant_mutex_create(VCOS_REENTRANT_MUTEX_T *m, const char *name); - -VCOSPRE_ void VCOSPOST_ vcos_generic_reentrant_mutex_delete(VCOS_REENTRANT_MUTEX_T *m); - -VCOSPRE_ void VCOSPOST_ vcos_generic_reentrant_mutex_lock(VCOS_REENTRANT_MUTEX_T *m); - -VCOSPRE_ void VCOSPOST_ vcos_generic_reentrant_mutex_unlock(VCOS_REENTRANT_MUTEX_T *m); - -/* Inline forwarding functions */ - -#if defined(VCOS_INLINE_BODIES) - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_reentrant_mutex_create(VCOS_REENTRANT_MUTEX_T *m, const char *name) { - return vcos_generic_reentrant_mutex_create(m,name); -} - -VCOS_INLINE_IMPL -void vcos_reentrant_mutex_delete(VCOS_REENTRANT_MUTEX_T *m) { - vcos_generic_reentrant_mutex_delete(m); -} - -VCOS_INLINE_IMPL -void vcos_reentrant_mutex_lock(VCOS_REENTRANT_MUTEX_T *m) { - vcos_generic_reentrant_mutex_lock(m); -} - -VCOS_INLINE_IMPL -void vcos_reentrant_mutex_unlock(VCOS_REENTRANT_MUTEX_T *m) { - vcos_generic_reentrant_mutex_unlock(m); -} -#endif - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/vc/include/interface/vcos/generic/vcos_generic_tls.h b/vc/include/interface/vcos/generic/vcos_generic_tls.h @@ -1,164 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - generic thread local storage -=============================================================================*/ - -#ifndef VCOS_GENERIC_TLS_H -#define VCOS_GENERIC_TLS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" - -/** - * \file - * - * Do an emulation of Thread Local Storage. The platform needs to - * provide a way to set and get a per-thread pointer which is - * where the TLS data itself is stored. - * - * - * Each thread that wants to join in this scheme needs to call - * vcos_tls_thread_register(). - * - * The platform needs to support the macros/functions - * _vcos_tls_thread_ptr_set() and _vcos_tls_thread_ptr_get(). - */ - -#ifndef VCOS_WANT_TLS_EMULATION -#error Should not be included unless TLS emulation is defined -#endif - -/** Number of slots to reserve per thread. This results in an overhead - * of this many words per thread. - */ -#define VCOS_TLS_MAX_SLOTS 4 - -/** TLS key. Allocating one of these reserves the client one of the - * available slots. - */ -typedef VCOS_UNSIGNED VCOS_TLS_KEY_T; - -/** TLS per-thread structure. Each thread gets one of these - * if TLS emulation (rather than native TLS support) is - * being used. - */ -typedef struct VCOS_TLS_THREAD_T -{ - void *slots[VCOS_TLS_MAX_SLOTS]; -} VCOS_TLS_THREAD_T; - -/* - * Internal APIs - */ - -/** Register this thread's TLS storage area. */ -VCOSPRE_ void VCOSPOST_ vcos_tls_thread_register(VCOS_TLS_THREAD_T *); - -/** Create a new TLS key */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_generic_tls_create(VCOS_TLS_KEY_T *key); - -/** Delete a TLS key */ -VCOSPRE_ void VCOSPOST_ vcos_generic_tls_delete(VCOS_TLS_KEY_T tls); - -/** Initialise the TLS library */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_tls_init(void); - -/** Deinitialise the TLS library */ -VCOSPRE_ void VCOSPOST_ vcos_tls_deinit(void); - -#if defined(VCOS_INLINE_BODIES) - -#undef VCOS_ASSERT_LOGGING_DISABLE -#define VCOS_ASSERT_LOGGING_DISABLE 1 - -/* - * Implementations of public API functions - */ - -/** Set the given value. Since everything is per-thread, there is no need - * for any locking. - */ -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_tls_set(VCOS_TLS_KEY_T tls, void *v) { - VCOS_TLS_THREAD_T *tlsdata = _vcos_tls_thread_ptr_get(); - vcos_assert(tlsdata); /* Fires if this thread has not been registered */ - if (tls<VCOS_TLS_MAX_SLOTS) - { - tlsdata->slots[tls] = v; - return VCOS_SUCCESS; - } - else - { - vcos_assert(0); - return VCOS_EINVAL; - } -} - -/** Get the given value. No locking required. - */ -VCOS_INLINE_IMPL -void *vcos_tls_get(VCOS_TLS_KEY_T tls) { - VCOS_TLS_THREAD_T *tlsdata = _vcos_tls_thread_ptr_get(); - vcos_assert(tlsdata); /* Fires if this thread has not been registered */ - if (tls<VCOS_TLS_MAX_SLOTS) - { - return tlsdata->slots[tls]; - } - else - { - vcos_assert(0); - return NULL; - } -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_tls_create(VCOS_TLS_KEY_T *key) { - return vcos_generic_tls_create(key); -} - -VCOS_INLINE_IMPL -void vcos_tls_delete(VCOS_TLS_KEY_T tls) { - vcos_generic_tls_delete(tls); -} - -#undef VCOS_ASSERT_LOGGING_DISABLE -#define VCOS_ASSERT_LOGGING_DISABLE 0 - -#endif /* VCOS_INLINE_BODIES */ - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/vc/include/interface/vcos/generic/vcos_joinable_thread_from_plain.h b/vc/include/interface/vcos/generic/vcos_joinable_thread_from_plain.h @@ -1,229 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - implementation: joinable thread from plain -=============================================================================*/ - -/** \file - * - * Header file for platforms creating the joinable thread from a lowlevel - * thread. - * - * In addition to the actual thread, the following are also created: - * - * - a semaphore to wait on when joining the thread - * - a semaphore to support counted suspend/resume (used by event group) - * - a per-thread timer (used by event group, but could be removed) - */ - -#ifndef VCOS_JOINABLE_THREAD_FROM_PLAIN_H -#define VCOS_JOINABLE_THREAD_FROM_PLAIN_H - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef VCOS_SEMAPHORE_H -#include "interface/vcos/vcos_semaphore.h" -#endif -#ifndef VCOS_LOWLEVEL_THREAD_H -#include "interface/vcos/vcos_lowlevel_thread.h" -#endif -#ifndef VCOS_TIMER_H -#include "interface/vcos/vcos_timer.h" -#endif - -#ifdef VCOS_WANT_TLS_EMULATION -#include "interface/vcos/generic/vcos_generic_tls.h" -#endif - -#define VCOS_THREAD_MAGIC 0x56436a74 - -#define VCOS_THREAD_VALID(t) (t->magic == VCOS_THREAD_MAGIC) -#define VCOS_HAVE_THREAD_AT_EXIT 1 - -/** Thread attribute structure. Clients should not manipulate this directly, but - * should instead use the provided functions. - */ -typedef struct VCOS_THREAD_ATTR_T -{ - void *ta_stackaddr; - VCOS_UNSIGNED ta_stacksz; - VCOS_UNSIGNED ta_priority; - VCOS_UNSIGNED ta_affinity; - VCOS_UNSIGNED ta_timeslice; - VCOS_UNSIGNED legacy; - VCOS_UNSIGNED ta_autostart; -} VCOS_THREAD_ATTR_T; - -/** Each thread gets a timer, which is for internal VCOS use. - */ -typedef struct _VCOS_THREAD_TIMER_T -{ - VCOS_TIMER_T timer; - void (*pfn)(void *); - void *cxt; -} _VCOS_THREAD_TIMER_T; - -typedef void (*VCOS_THREAD_EXIT_HANDLER_T)(void *); -/** Called at thread exit. - */ -typedef struct VCOS_THREAD_EXIT_T -{ - VCOS_THREAD_EXIT_HANDLER_T pfn; - void *cxt; -} VCOS_THREAD_EXIT_T; -#define VCOS_MAX_EXIT_HANDLERS 8 - -/* The name field isn't used for anything, so we can just copy the - * the pointer. Nucleus makes its own copy. - */ -typedef const char * VCOS_LLTHREAD_T_NAME; -#define _VCOS_LLTHREAD_NAME(dst,src) (dst)=(src) - -/* - * Simulated TLS support - */ - - -/** Thread structure. - * - * \warning Do not access the members of this structure directly! - */ -typedef struct VCOS_THREAD_T -{ - VCOS_LLTHREAD_T thread; /**< The underlying thread */ - char name[16]; /**< The name */ - unsigned int magic; /**< For debug */ - void *exit_data; /**< Exit data passed out in vcos_joinable_thread_exit() */ - void *stack; /**< Stack, if not supplied by caller */ - VCOS_SEMAPHORE_T wait; /**< Semaphore to wait on at join */ - VCOS_SEMAPHORE_T suspend; /**< Semaphore to wait on for counted suspend */ - int16_t joined; /**< Joined yet? For debug. */ - VCOS_UNSIGNED legacy; /**< Use (argc,argv) for entry point arguments */ - void *(*entry)(void*); /**< Entry point */ - void *arg; /**< Argument passed to entry point */ - void *(*term)(void*); /**< Termination function, used by reaper */ - void *term_arg; /**< Argument passed to termination function */ - _VCOS_THREAD_TIMER_T _timer; /**< Internal timer, mainly for event groups */ -#ifdef VCOS_WANT_TLS_EMULATION - VCOS_TLS_THREAD_T _tls; /**< TLS data when native TLS not available, or NULL */ -#endif - /** Array of functions to call at thread exit */ - VCOS_THREAD_EXIT_T at_exit[VCOS_MAX_EXIT_HANDLERS]; - - struct VCOS_THREAD_T *next; /**< For linked lists of threads */ -} VCOS_THREAD_T; - -#if defined(VCOS_INLINE_BODIES) - -VCOS_INLINE_IMPL -void vcos_thread_attr_setstack(VCOS_THREAD_ATTR_T *attrs, void *addr, VCOS_UNSIGNED stacksz) { - attrs->ta_stackaddr = addr; - attrs->ta_stacksz = stacksz; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setstacksize(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED stacksz) { - attrs->ta_stacksz = stacksz; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setpriority(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED pri) { - attrs->ta_priority = pri; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setaffinity(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED affinity) { - attrs->ta_affinity = affinity; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_settimeslice(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED ts) { - attrs->ta_timeslice = ts; -} - -VCOS_INLINE_IMPL -void _vcos_thread_attr_setlegacyapi(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED legacy) { - attrs->legacy = legacy; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setautostart(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED autostart) { - attrs->ta_autostart = autostart; -} - -VCOS_INLINE_IMPL -VCOS_THREAD_T *vcos_thread_current(void) { - VCOS_THREAD_T *ret = (VCOS_THREAD_T*)vcos_llthread_current(); - /*If we're called from a non-vcos thread, this assert will fail. - *XXX FIXME why is this commented out? - *vcos_assert(ret->magic == VCOS_THREAD_MAGIC); - */ - return ret; -} - -VCOS_INLINE_IMPL -int vcos_thread_running(VCOS_THREAD_T *thread) { - return vcos_llthread_running(&thread->thread); -} - -VCOS_INLINE_IMPL -void vcos_thread_resume(VCOS_THREAD_T *thread) { - vcos_llthread_resume(&thread->thread); -} - -#endif /* VCOS_INLINE_BODIES */ - -/** - * \brief Create a VCOS_THREAD_T for the current thread. This is so we can have - * VCOS_THREAD_Ts even for threads not originally created by VCOS (eg the - * thread that calls vcos_init) - */ -extern VCOS_STATUS_T _vcos_thread_create_attach(VCOS_THREAD_T *thread, - const char *name); - -/** - * \brief Deletes the VCOS_THREAD_T, but does not wait for the underlying - * thread to exit. This will cleanup everything created by - * _vcos_thread_create_attach - */ -extern void _vcos_thread_delete(VCOS_THREAD_T *thread); - -/** Register a function to be called when the current thread exits. - */ -extern VCOS_STATUS_T vcos_thread_at_exit(void (*pfn)(void*), void *cxt); - -/** Deregister a previously registered at-exit function. - */ -extern void vcos_thread_deregister_at_exit(void (*pfn)(void*), void *cxt); - -#ifdef __cplusplus -} -#endif -#endif /* VCOS_JOINABLE_THREAD_FROM_PLAIN_H */ diff --git a/vc/include/interface/vcos/generic/vcos_latch_from_sem.h b/vc/include/interface/vcos/generic/vcos_latch_from_sem.h @@ -1,68 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - Construct a latch from a semaphore -=============================================================================*/ - -/** FIXME: rename to vcos_mutex_from_sem.c - */ - -typedef struct VCOS_MUTEX_T { - VCOS_SEMAPHORE_T sem; - struct VCOS_THREAD_T *owner; -} VCOS_MUTEX_T; - -extern VCOS_STATUS_T vcos_generic_mutex_create(VCOS_MUTEX_T *latch, const char *name); -extern void vcos_generic_mutex_delete(VCOS_MUTEX_T *latch); -extern VCOS_STATUS_T vcos_generic_mutex_lock(VCOS_MUTEX_T *latch); -extern void vcos_generic_mutex_unlock(VCOS_MUTEX_T *latch); - -#if defined(VCOS_INLINE_BODIES) - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_create(VCOS_MUTEX_T *latch, const char *name) { - return vcos_generic_mutex_create(latch,name); -} - -VCOS_INLINE_IMPL -void vcos_mutex_delete(VCOS_MUTEX_T *latch) { - vcos_generic_mutex_delete(latch); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_lock(VCOS_MUTEX_T *latch) { - return vcos_generic_mutex_lock(latch); -} - -VCOS_INLINE_IMPL -void vcos_mutex_unlock(VCOS_MUTEX_T *latch) { - vcos_generic_mutex_unlock(latch); -} - -#endif /* VCOS_INLINE_BODIES */ - diff --git a/vc/include/interface/vcos/generic/vcos_mem_from_malloc.h b/vc/include/interface/vcos/generic/vcos_mem_from_malloc.h @@ -1,74 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -Create the vcos_malloc API from the regular system malloc/free -=============================================================================*/ - -/** - * \file - * - * Create the vcos malloc API from a regular system malloc/free library. - * - * The API lets callers specify an alignment. - * - * Under VideoCore this is not needed, as we can simply use the rtos_malloc routines. - * But on host platforms that won't be the case. - * - */ - -VCOSPRE_ void * VCOSPOST_ vcos_generic_mem_alloc(VCOS_UNSIGNED sz, const char *desc); -VCOSPRE_ void * VCOSPOST_ vcos_generic_mem_calloc(VCOS_UNSIGNED count, VCOS_UNSIGNED sz, const char *descr); -VCOSPRE_ void VCOSPOST_ vcos_generic_mem_free(void *ptr); -VCOSPRE_ void * VCOSPOST_ vcos_generic_mem_alloc_aligned(VCOS_UNSIGNED sz, VCOS_UNSIGNED align, const char *desc); - -#ifdef VCOS_INLINE_BODIES - -VCOS_INLINE_IMPL -void *vcos_malloc(VCOS_UNSIGNED size, const char *description) { - return vcos_generic_mem_alloc(size, description); -} - -VCOS_INLINE_IMPL -void *vcos_calloc(VCOS_UNSIGNED num, VCOS_UNSIGNED size, const char *description) { - return vcos_generic_mem_calloc(num, size, description); -} - -VCOS_INLINE_IMPL -void vcos_free(void *ptr) { - vcos_generic_mem_free(ptr); -} - -VCOS_INLINE_IMPL -void * vcos_malloc_aligned(VCOS_UNSIGNED size, VCOS_UNSIGNED align, const char *description) { - return vcos_generic_mem_alloc_aligned(size, align, description); -} - - -#endif /* VCOS_INLINE_BODIES */ - - diff --git a/vc/include/interface/vcos/generic/vcos_mutexes_are_reentrant.h b/vc/include/interface/vcos/generic/vcos_mutexes_are_reentrant.h @@ -1,88 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - reentrant mutexes mapped directly to regular ones -=============================================================================*/ - -#ifndef VCOS_GENERIC_REENTRANT_MUTEX_H -#define VCOS_GENERIC_REENTRANT_MUTEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "interface/vcos/vcos_mutex.h" - -/** - * \file - * - * Reentrant Mutexes directly using the native re-entrant mutex. - * - */ - -typedef VCOS_MUTEX_T VCOS_REENTRANT_MUTEX_T; - -/* Inline forwarding functions */ - -#if defined(VCOS_INLINE_BODIES) - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_reentrant_mutex_create(VCOS_REENTRANT_MUTEX_T *m, const char *name) { - return vcos_mutex_create(m,name); -} - -VCOS_INLINE_IMPL -void vcos_reentrant_mutex_delete(VCOS_REENTRANT_MUTEX_T *m) { - vcos_mutex_delete(m); -} - -VCOS_INLINE_IMPL -void vcos_reentrant_mutex_lock(VCOS_REENTRANT_MUTEX_T *m) { - vcos_mutex_lock(m); -} - -VCOS_INLINE_IMPL -void vcos_reentrant_mutex_unlock(VCOS_REENTRANT_MUTEX_T *m) { - vcos_mutex_unlock(m); -} - -VCOS_INLINE_IMPL -int vcos_reentrant_mutex_is_locked(VCOS_REENTRANT_MUTEX_T *m) { - return vcos_mutex_is_locked(m); -} - -#endif - -#ifdef __cplusplus -} -#endif -#endif - - - diff --git a/vc/include/interface/vcos/generic/vcos_thread_reaper.h b/vc/include/interface/vcos/generic/vcos_thread_reaper.h @@ -1,55 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - thread reaping -=============================================================================*/ - -#ifndef VCOS_THREAD_REAPER_H -#define VCOS_THREAD_REAPER_H - -#define VCOS_HAVE_THREAD_REAPER - -/** Initialise the thread reaper. - */ -VCOS_STATUS_T vcos_thread_reaper_init(void); - -/** Reap a thread. Arranges for the thread to be automatically - * joined. - * - * @sa vcos_thread_join(). - * - * @param thread the thread to terminate - * @param on_terminated called after the thread has exited - * @param cxt pass back to the callback - * - */ -void vcos_thread_reap(VCOS_THREAD_T *thread, void (*on_terminated)(void*), void *cxt); - -#endif - - diff --git a/vc/include/interface/vcos/pthreads/vcos_futex_mutex.h b/vc/include/interface/vcos/pthreads/vcos_futex_mutex.h @@ -1,102 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -FIXME: This code should be moved to 'linux', it is linux-specific and not generic -on 'pthreads'. -============================================================================*/ - -#ifndef VCOS_MUTEX_FROM_FUTEX_H -#define VCOS_MUTEX_FROM_FUTEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -typedef struct VCOS_FUTEX_T -{ - volatile int value; -} VCOS_FUTEX_T; - -typedef VCOS_FUTEX_T VCOS_MUTEX_T; - -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_futex_init(VCOS_FUTEX_T *futex); -VCOSPRE_ void VCOSPOST_ vcos_futex_delete(VCOS_FUTEX_T *futex); -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_futex_lock(VCOS_FUTEX_T *futex); -VCOSPRE_ void VCOSPOST_ vcos_futex_unlock(VCOS_FUTEX_T *futex); -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_futex_trylock(VCOS_FUTEX_T *futex); - -#if defined(VCOS_INLINE_BODIES) - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_create(VCOS_MUTEX_T *latch, const char *name) { - vcos_unused(name); - return vcos_futex_init(latch); -} - -VCOS_INLINE_IMPL -void vcos_mutex_delete(VCOS_MUTEX_T *latch) { - vcos_futex_delete(latch); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_lock(VCOS_MUTEX_T *latch) { - return vcos_futex_lock(latch); -} - -VCOS_INLINE_IMPL -void vcos_mutex_unlock(VCOS_MUTEX_T *latch) { - vcos_futex_unlock(latch); -} - -VCOS_INLINE_IMPL -int vcos_mutex_is_locked(VCOS_MUTEX_T *latch) { - int rc = latch->value; - if (!rc) { - /* it wasn't locked */ - return 0; - } - else { - return 1; /* it was locked */ - } -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_trylock(VCOS_MUTEX_T *m) { - return vcos_futex_trylock(m); -} - -#endif /* VCOS_INLINE_BODIES */ - -#ifdef __cplusplus -} -#endif -#endif /* VCOS_MUTEX_FROM_FUTEX_H */ - diff --git a/vc/include/interface/vcos/pthreads/vcos_platform.h b/vc/include/interface/vcos/pthreads/vcos_platform.h @@ -1,746 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - pthreads types -=============================================================================*/ - -/* Do not include this file directly - instead include it via vcos.h */ - -/** @file - * - * Pthreads implementation of VCOS. - * - */ - -#ifndef VCOS_PLATFORM_H -#define VCOS_PLATFORM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <pthread.h> -#include <semaphore.h> -#include <unistd.h> -#include <sys/types.h> -#include <sched.h> -#include <errno.h> -#include <unistd.h> -#include <string.h> -#include <strings.h> -#include <time.h> -#include <signal.h> -#include <stddef.h> -#include <stdlib.h> -#include <dlfcn.h> - - -#define VCOS_HAVE_RTOS 1 -#define VCOS_HAVE_SEMAPHORE 1 -#define VCOS_HAVE_EVENT 1 -#define VCOS_HAVE_QUEUE 0 -#define VCOS_HAVE_LEGACY_ISR 0 -#define VCOS_HAVE_TIMER 1 -#define VCOS_HAVE_CANCELLATION_SAFE_TIMER 1 -#define VCOS_HAVE_MEMPOOL 0 -#define VCOS_HAVE_ISR 0 -#define VCOS_HAVE_ATOMIC_FLAGS 1 -#define VCOS_HAVE_THREAD_AT_EXIT 1 -#define VCOS_HAVE_ONCE 1 -#define VCOS_HAVE_BLOCK_POOL 1 -#define VCOS_HAVE_FILE 0 -#define VCOS_HAVE_PROC 0 -#define VCOS_HAVE_CFG 0 -#define VCOS_HAVE_ALIEN_THREADS 1 -#define VCOS_HAVE_CMD 1 -#define VCOS_HAVE_EVENT_FLAGS 1 -#define VCOS_WANT_LOG_CMD 0 /* User apps should do their own thing */ - -#define VCOS_ALWAYS_WANT_LOGGING - -#ifdef __linux__ -#define VCOS_HAVE_BACKTRACE 1 -#endif - -#define VCOS_SO_EXT ".so" - -/* Linux/pthreads seems to have different timer characteristics */ -#define VCOS_TIMER_MARGIN_EARLY 0 -#define VCOS_TIMER_MARGIN_LATE 15 - -typedef sem_t VCOS_SEMAPHORE_T; -typedef uint32_t VCOS_UNSIGNED; -typedef uint32_t VCOS_OPTION; -typedef pthread_key_t VCOS_TLS_KEY_T; -typedef pthread_once_t VCOS_ONCE_T; - -typedef struct VCOS_LLTHREAD_T -{ - pthread_t thread; // Must be first field. -} VCOS_LLTHREAD_T; - -/* VCOS_CASSERT(offsetof(VCOS_LLTHREAD_T, thread) == 0); */ - -#ifndef VCOS_USE_VCOS_FUTEX -typedef pthread_mutex_t VCOS_MUTEX_T; -#else -#include "vcos_futex_mutex.h" -#endif /* VCOS_USE_VCOS_FUTEX */ - -typedef struct -{ - VCOS_MUTEX_T mutex; - sem_t sem; -} VCOS_EVENT_T; - -#define VCOS_ONCE_INIT PTHREAD_ONCE_INIT - -typedef struct VCOS_TIMER_T -{ - pthread_t thread; /**< id of the timer thread */ - - pthread_mutex_t lock; /**< lock protecting all other members of the struct */ - pthread_cond_t settings_changed; /**< cond. var. for informing the timer thread about changes*/ - int quit; /**< non-zero if the timer thread is requested to quit*/ - - struct timespec expires; /**< absolute time of next expiration, or 0 if disarmed*/ - - void (*orig_expiration_routine)(void*);/**< the expiration routine provided by the user of the timer*/ - void *orig_context; /**< the context for exp. routine provided by the user*/ - -} VCOS_TIMER_T; - -/** Thread attribute structure. Don't use pthread_attr directly, as - * the calls can fail, and inits must match deletes. - */ -typedef struct VCOS_THREAD_ATTR_T -{ - void *ta_stackaddr; - VCOS_UNSIGNED ta_stacksz; - VCOS_UNSIGNED ta_priority; - VCOS_UNSIGNED ta_affinity; - VCOS_UNSIGNED ta_timeslice; - VCOS_UNSIGNED legacy; -} VCOS_THREAD_ATTR_T; - -/** Called at thread exit. - */ -typedef struct VCOS_THREAD_EXIT_T -{ - void (*pfn)(void *); - void *cxt; -} VCOS_THREAD_EXIT_T; -#define VCOS_MAX_EXIT_HANDLERS 4 - -typedef struct VCOS_THREAD_T -{ - pthread_t thread; /**< The thread itself */ - VCOS_THREAD_ENTRY_FN_T entry; /**< The thread entry point */ - void *arg; /**< The argument to be passed to entry */ - VCOS_SEMAPHORE_T suspend; /**< For support event groups and similar - a per thread semaphore */ - - VCOS_TIMER_T task_timer; - int task_timer_created; /**< non-zero if the task timer has already been created*/ - void (*orig_task_timer_expiration_routine)(void*); - void *orig_task_timer_context; - - VCOS_UNSIGNED legacy; - char name[16]; /**< Record the name of this thread, for diagnostics */ - VCOS_UNSIGNED dummy; /**< Dummy thread created for non-vcos created threads */ - - /** Callback invoked at thread exit time */ - VCOS_THREAD_EXIT_T at_exit[VCOS_MAX_EXIT_HANDLERS]; -} VCOS_THREAD_T; - -#ifdef VCOS_PTHREADS_WANT_HISR_EMULATION - -typedef struct -{ - VCOS_THREAD_T thread; - char stack[1024]; - VCOS_SEMAPHORE_T waitsem; -} VCOS_HISR_T; - -#endif - -#define VCOS_SUSPEND -1 -#define VCOS_NO_SUSPEND 0 - -#define VCOS_START 1 -#define VCOS_NO_START 0 - -#define VCOS_THREAD_PRI_MIN (sched_get_priority_min(SCHED_OTHER)) -#define VCOS_THREAD_PRI_MAX (sched_get_priority_max(SCHED_OTHER)) - -#define VCOS_THREAD_PRI_INCREASE (1) -#define VCOS_THREAD_PRI_HIGHEST VCOS_THREAD_PRI_MAX -#define VCOS_THREAD_PRI_LOWEST VCOS_THREAD_PRI_MIN -#define VCOS_THREAD_PRI_NORMAL ((VCOS_THREAD_PRI_MAX+VCOS_THREAD_PRI_MIN)/2) -#define VCOS_THREAD_PRI_BELOW_NORMAL (VCOS_THREAD_PRI_NORMAL-VCOS_THREAD_PRI_INCREASE) -#define VCOS_THREAD_PRI_ABOVE_NORMAL (VCOS_THREAD_PRI_NORMAL+VCOS_THREAD_PRI_INCREASE) -#define VCOS_THREAD_PRI_REALTIME VCOS_THREAD_PRI_MAX - -#define _VCOS_AFFINITY_DEFAULT 0 -#define _VCOS_AFFINITY_CPU0 0x100 -#define _VCOS_AFFINITY_CPU1 0x200 -#define _VCOS_AFFINITY_MASK 0x300 -#define VCOS_CAN_SET_STACK_ADDR 0 - -#define VCOS_TICKS_PER_SECOND _vcos_get_ticks_per_second() - -#include "interface/vcos/generic/vcos_generic_event_flags.h" -#include "interface/vcos/generic/vcos_generic_blockpool.h" -#include "interface/vcos/generic/vcos_mem_from_malloc.h" - -/** Convert errno values into the values recognized by vcos */ -VCOSPRE_ VCOS_STATUS_T vcos_pthreads_map_error(int error); -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_pthreads_map_errno(void); - -/** Register a function to be called when the current thread exits. - */ -extern VCOS_STATUS_T vcos_thread_at_exit(void (*pfn)(void*), void *cxt); - -extern uint32_t _vcos_get_ticks_per_second(void); - -/** - * Set to 1 by default when ANDROID is defined. Allows runtime - * switching for console apps. - */ -extern int vcos_use_android_log; - -typedef struct { - VCOS_MUTEX_T mutex; - uint32_t flags; -} VCOS_ATOMIC_FLAGS_T; - -#if defined(VCOS_INLINE_BODIES) - -#undef VCOS_ASSERT_LOGGING_DISABLE -#define VCOS_ASSERT_LOGGING_DISABLE 1 - - -/* - * Counted Semaphores - */ -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_semaphore_wait(VCOS_SEMAPHORE_T *sem) { - int ret; - /* gdb causes sem_wait() to EINTR when a breakpoint is hit, retry here */ - while ((ret = sem_wait(sem)) == -1 && errno == EINTR) - continue; - vcos_assert(ret==0); - return VCOS_SUCCESS; -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_semaphore_trywait(VCOS_SEMAPHORE_T *sem) { - int ret; - while ((ret = sem_trywait(sem)) == -1 && errno == EINTR) - continue; - if (ret == 0) - return VCOS_SUCCESS; - else if (errno == EAGAIN) - return VCOS_EAGAIN; - else { - vcos_assert(0); - return VCOS_EINVAL; - } -} - -/** - * \brief Wait on a semaphore with a timeout. - * - * Note that this function may not be implemented on all - * platforms, and may not be efficient on all platforms - * (see comment in vcos_semaphore_wait) - * - * Try to obtain the semaphore. If it is already taken, return - * VCOS_EAGAIN. - * @param sem Semaphore to wait on - * @param timeout Number of milliseconds to wait before - * returning if the semaphore can't be acquired. - * @return VCOS_SUCCESS - semaphore was taken. - * VCOS_EAGAIN - could not take semaphore (i.e. timeout - * expired) - * VCOS_EINVAL - Some other error (most likely bad - * parameters). - */ -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_semaphore_wait_timeout(VCOS_SEMAPHORE_T *sem, VCOS_UNSIGNED timeout) { - struct timespec ts; - int ret; - if (clock_gettime(CLOCK_REALTIME, &ts) == -1) - return VCOS_EINVAL; - ts.tv_sec += timeout/1000; - ts.tv_nsec += (timeout%1000)*1000*1000; - if (ts.tv_nsec > 1000000000) { - ts.tv_sec++; - ts.tv_nsec -= 1000000000; - } - - while (1) { - ret = sem_timedwait( sem, &ts ); - if (ret == 0) { - return VCOS_SUCCESS; - } else { - if (errno == EINTR) { - continue; - } else if (errno == ETIMEDOUT) { - return VCOS_EAGAIN; - } else { - vcos_assert(0); - return VCOS_EINVAL; - } - } - } -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_semaphore_create(VCOS_SEMAPHORE_T *sem, - const char *name, - VCOS_UNSIGNED initial_count) { - int rc = sem_init(sem, 0, initial_count); - (void)name; - if (rc != -1) return VCOS_SUCCESS; - else return vcos_pthreads_map_errno(); -} - -VCOS_INLINE_IMPL -void vcos_semaphore_delete(VCOS_SEMAPHORE_T *sem) { - int rc = sem_destroy(sem); - vcos_assert(rc != -1); - (void)rc; -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_semaphore_post(VCOS_SEMAPHORE_T *sem) { - int rc = sem_post(sem); - vcos_assert(rc == 0); - (void)rc; - return VCOS_SUCCESS; -} - -/*********************************************************** - * - * Threads - * - ***********************************************************/ - - -extern VCOS_THREAD_T *vcos_dummy_thread_create(void); -extern pthread_key_t _vcos_thread_current_key; -extern uint64_t vcos_getmicrosecs64_internal(void); - -VCOS_INLINE_IMPL -uint32_t vcos_getmicrosecs(void) { return (uint32_t)vcos_getmicrosecs64_internal(); } - -VCOS_INLINE_IMPL -uint64_t vcos_getmicrosecs64(void) { return vcos_getmicrosecs64_internal(); } - -VCOS_INLINE_IMPL -VCOS_THREAD_T *vcos_thread_current(void) { - void *ret = pthread_getspecific(_vcos_thread_current_key); - if (ret == NULL) - { - ret = vcos_dummy_thread_create(); - } - -#ifdef __cplusplus - return static_cast<VCOS_THREAD_T*>(ret); -#else - return (VCOS_THREAD_T *)ret; -#endif -} - -VCOS_INLINE_IMPL -void vcos_sleep(uint32_t ms) { - struct timespec ts; - ts.tv_sec = ms/1000; - ts.tv_nsec = ms % 1000 * (1000000); - nanosleep(&ts, NULL); -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setstack(VCOS_THREAD_ATTR_T *attr, void *addr, VCOS_UNSIGNED sz) { - attr->ta_stackaddr = addr; - attr->ta_stacksz = sz; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setstacksize(VCOS_THREAD_ATTR_T *attr, VCOS_UNSIGNED sz) { - attr->ta_stacksz = sz; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setpriority(VCOS_THREAD_ATTR_T *attr, VCOS_UNSIGNED pri) { - (void)attr; - (void)pri; -} - -VCOS_INLINE_IMPL -void vcos_thread_set_priority(VCOS_THREAD_T *thread, VCOS_UNSIGNED p) { - /* not implemented */ - (void)thread; - (void)p; -} - -VCOS_INLINE_IMPL -VCOS_UNSIGNED vcos_thread_get_priority(VCOS_THREAD_T *thread) { - /* not implemented */ - (void)thread; - return 0; -} - -VCOS_INLINE_IMPL -void vcos_thread_set_affinity(VCOS_THREAD_T *thread, VCOS_UNSIGNED affinity) { - /* not implemented */ - vcos_unused(thread); - vcos_unused(affinity); -} - - -VCOS_INLINE_IMPL -void vcos_thread_attr_setaffinity(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED affinity) { - attrs->ta_affinity = affinity; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_settimeslice(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED ts) { - attrs->ta_timeslice = ts; -} - -VCOS_INLINE_IMPL -void _vcos_thread_attr_setlegacyapi(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED legacy) { - attrs->legacy = legacy; -} - -VCOS_INLINE_IMPL -void vcos_thread_attr_setautostart(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED autostart) { - (void)attrs; - (void)autostart; -} - -VCOS_INLINE_IMPL -VCOS_LLTHREAD_T *vcos_llthread_current(void) { - return (VCOS_LLTHREAD_T *)pthread_self(); -} - -/* - * Mutexes - */ - -#ifndef VCOS_USE_VCOS_FUTEX - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_create(VCOS_MUTEX_T *latch, const char *name) { - int rc = pthread_mutex_init(latch, NULL); - (void)name; - if (rc == 0) return VCOS_SUCCESS; - else return vcos_pthreads_map_errno(); -} - -VCOS_INLINE_IMPL -void vcos_mutex_delete(VCOS_MUTEX_T *latch) { - int rc = pthread_mutex_destroy(latch); - (void)rc; - vcos_assert(rc==0); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_lock(VCOS_MUTEX_T *latch) { - int rc = pthread_mutex_lock(latch); - vcos_assert(rc==0); - (void)rc; - return VCOS_SUCCESS; -} - -VCOS_INLINE_IMPL -void vcos_mutex_unlock(VCOS_MUTEX_T *latch) { - int rc = pthread_mutex_unlock(latch); - (void)rc; - vcos_assert(rc==0); -} - -VCOS_INLINE_IMPL -int vcos_mutex_is_locked(VCOS_MUTEX_T *m) { - int rc = pthread_mutex_trylock(m); - if (rc == 0) { - pthread_mutex_unlock(m); - /* it wasn't locked */ - return 0; - } - else { - return 1; /* it was locked */ - } -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_mutex_trylock(VCOS_MUTEX_T *m) { - int rc = pthread_mutex_trylock(m); - (void)rc; - return (rc == 0) ? VCOS_SUCCESS : VCOS_EAGAIN; -} - -#endif /* VCOS_USE_VCOS_FUTEX */ - -/* - * Events - */ - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_event_create(VCOS_EVENT_T *event, const char *debug_name) -{ - VCOS_STATUS_T status; - - int rc = sem_init(&event->sem, 0, 0); - if (rc != 0) return vcos_pthreads_map_errno(); - - status = vcos_mutex_create(&event->mutex, debug_name); - if (status != VCOS_SUCCESS) { - sem_destroy(&event->sem); - return status; - } - - return VCOS_SUCCESS; -} - -VCOS_INLINE_IMPL -void vcos_event_signal(VCOS_EVENT_T *event) -{ - int ok = 0; - int value; - - if (vcos_mutex_lock(&event->mutex) != VCOS_SUCCESS) - goto fail_mtx; - - if (sem_getvalue(&event->sem, &value) != 0) - goto fail_sem; - - if (value == 0) - if (sem_post(&event->sem) != 0) - goto fail_sem; - - ok = 1; -fail_sem: - vcos_mutex_unlock(&event->mutex); -fail_mtx: - vcos_assert(ok); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_event_wait(VCOS_EVENT_T *event) -{ - int ret; - /* gdb causes sem_wait() to EINTR when a breakpoint is hit, retry here */ - while ((ret = sem_wait(&event->sem)) == -1 && errno == EINTR) - continue; - vcos_assert(ret==0); - return ret == 0 ? VCOS_SUCCESS : (VCOS_STATUS_T)errno; -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_event_try(VCOS_EVENT_T *event) -{ - int ret; - while ((ret = sem_trywait(&event->sem)) == -1 && errno == EINTR) - continue; - - if (ret == -1 && errno == EAGAIN) - return VCOS_EAGAIN; - else - return VCOS_SUCCESS; -} - -VCOS_INLINE_IMPL -void vcos_event_delete(VCOS_EVENT_T *event) -{ - int rc = sem_destroy(&event->sem); - vcos_assert(rc != -1); - (void)rc; - - vcos_mutex_delete(&event->mutex); -} - -VCOS_INLINE_IMPL -VCOS_UNSIGNED vcos_process_id_current(void) { - return (VCOS_UNSIGNED) getpid(); -} - -VCOS_INLINE_IMPL -int vcos_strcasecmp(const char *s1, const char *s2) { - return strcasecmp(s1,s2); -} - -VCOS_INLINE_IMPL -int vcos_strncasecmp(const char *s1, const char *s2, size_t n) { - return strncasecmp(s1,s2,n); -} - -VCOS_INLINE_IMPL -int vcos_in_interrupt(void) { - return 0; -} - -/* For support event groups - per thread semaphore */ -VCOS_INLINE_IMPL -void _vcos_thread_sem_wait(void) { - VCOS_THREAD_T *t = vcos_thread_current(); - vcos_semaphore_wait(&t->suspend); -} - -VCOS_INLINE_IMPL -void _vcos_thread_sem_post(VCOS_THREAD_T *target) { - vcos_semaphore_post(&target->suspend); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_tls_create(VCOS_TLS_KEY_T *key) { - int st = pthread_key_create(key, NULL); - return st == 0 ? VCOS_SUCCESS: VCOS_ENOMEM; -} - -VCOS_INLINE_IMPL -void vcos_tls_delete(VCOS_TLS_KEY_T tls) { - pthread_key_delete(tls); -} - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_tls_set(VCOS_TLS_KEY_T tls, void *v) { - pthread_setspecific(tls, v); - return VCOS_SUCCESS; -} - -VCOS_INLINE_IMPL -void *vcos_tls_get(VCOS_TLS_KEY_T tls) { - return pthread_getspecific(tls); -} - -#if VCOS_HAVE_ATOMIC_FLAGS - -/* - * Atomic flags - */ - -/* TODO implement properly... */ - -VCOS_INLINE_IMPL -VCOS_STATUS_T vcos_atomic_flags_create(VCOS_ATOMIC_FLAGS_T *atomic_flags) -{ - atomic_flags->flags = 0; - return vcos_mutex_create(&atomic_flags->mutex, "VCOS_ATOMIC_FLAGS_T"); -} - -VCOS_INLINE_IMPL -void vcos_atomic_flags_or(VCOS_ATOMIC_FLAGS_T *atomic_flags, uint32_t flags) -{ - vcos_mutex_lock(&atomic_flags->mutex); - atomic_flags->flags |= flags; - vcos_mutex_unlock(&atomic_flags->mutex); -} - -VCOS_INLINE_IMPL -uint32_t vcos_atomic_flags_get_and_clear(VCOS_ATOMIC_FLAGS_T *atomic_flags) -{ - uint32_t flags; - vcos_mutex_lock(&atomic_flags->mutex); - flags = atomic_flags->flags; - atomic_flags->flags = 0; - vcos_mutex_unlock(&atomic_flags->mutex); - return flags; -} - -VCOS_INLINE_IMPL -void vcos_atomic_flags_delete(VCOS_ATOMIC_FLAGS_T *atomic_flags) -{ - vcos_mutex_delete(&atomic_flags->mutex); -} - -#endif - -#if defined(linux) || defined(_HAVE_SBRK) - -/* not exactly the free memory, but a measure of it */ - -VCOS_INLINE_IMPL -unsigned long vcos_get_free_mem(void) { - return (unsigned long)sbrk(0); -} - -#endif - -#ifdef VCOS_PTHREADS_WANT_HISR_EMULATION -VCOS_STATUS_T vcos_legacy_hisr_create(VCOS_HISR_T *hisr, const char *name, - void (*entry)(void), - VCOS_UNSIGNED pri, - void *stack, VCOS_UNSIGNED stack_size); - -void vcos_legacy_hisr_activate(VCOS_HISR_T *hisr); - -void vcos_legacy_hisr_delete(VCOS_HISR_T *hisr); - -#endif - -#undef VCOS_ASSERT_LOGGING_DISABLE -#define VCOS_ASSERT_LOGGING_DISABLE 0 - -#endif /* VCOS_INLINE_BODIES */ - -#define vcos_log_platform_init() _vcos_log_platform_init() -VCOSPRE_ void VCOSPOST_ _vcos_log_platform_init(void); - -VCOS_INLINE_DECL void _vcos_thread_sem_wait(void); -VCOS_INLINE_DECL void _vcos_thread_sem_post(VCOS_THREAD_T *); - -#define VCOS_APPLICATION_ARGC vcos_get_argc() -#define VCOS_APPLICATION_ARGV vcos_get_argv() - -#include "interface/vcos/generic/vcos_generic_reentrant_mtx.h" -#include "interface/vcos/generic/vcos_generic_named_sem.h" -#include "interface/vcos/generic/vcos_generic_quickslow_mutex.h" -#include "interface/vcos/generic/vcos_common.h" - -#define _VCOS_LOG_LEVEL() getenv("VC_LOGLEVEL") - -VCOS_STATIC_INLINE -char *vcos_strdup(const char *str) -{ - return strdup(str); -} - -typedef void (*VCOS_ISR_HANDLER_T)(VCOS_UNSIGNED vecnum); - -#define VCOS_DL_LAZY RTLD_LAZY -#define VCOS_DL_NOW RTLD_NOW -#define VCOS_DL_LOCAL RTLD_LOCAL -#define VCOS_DL_GLOBAL RTLD_GLOBAL - -#ifdef __cplusplus -} -#endif -#endif /* VCOS_PLATFORM_H */ - diff --git a/vc/include/interface/vcos/pthreads/vcos_platform_types.h b/vc/include/interface/vcos/pthreads/vcos_platform_types.h @@ -1,71 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - platform-specific types and defines -=============================================================================*/ - -#ifndef VCOS_PLATFORM_TYPES_H -#define VCOS_PLATFORM_TYPES_H - -#include "interface/vcos/vcos_inttypes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define VCOSPRE_ extern -#define VCOSPOST_ - -#if defined(__GNUC__) && (( __GNUC__ > 2 ) || (( __GNUC__ == 2 ) && ( __GNUC_MINOR__ >= 3 ))) -#define VCOS_FORMAT_ATTR_(ARCHETYPE, STRING_INDEX, FIRST_TO_CHECK) __attribute__ ((format (ARCHETYPE, STRING_INDEX, FIRST_TO_CHECK))) -#else -#define VCOS_FORMAT_ATTR_(ARCHETYPE, STRING_INDEX, FIRST_TO_CHECK) -#endif - -#if defined(__linux__) && !defined(NDEBUG) && defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) - #define VCOS_BKPT ({ __asm volatile ("int3":::"memory"); }) -#endif -/*#define VCOS_BKPT vcos_abort() */ - -#define VCOS_ASSERT_LOGGING 1 -#define VCOS_ASSERT_LOGGING_DISABLE 0 - -extern void -vcos_pthreads_logging_assert(const char *file, const char *func, unsigned int line, const char *fmt, ...); - -#define VCOS_ASSERT_MSG(...) ((VCOS_ASSERT_LOGGING && !VCOS_ASSERT_LOGGING_DISABLE) ? vcos_pthreads_logging_assert(__FILE__, __func__, __LINE__, __VA_ARGS__) : (void)0) - -#define VCOS_INLINE_BODIES -#define VCOS_INLINE_DECL extern __inline__ -#define VCOS_INLINE_IMPL static __inline__ - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/vc/include/interface/vcos/user_nodefs.h b/vc/include/interface/vcos/user_nodefs.h @@ -1,47 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef USER_NODEFS_H -#define USER_NODEFS_H - -/* - * This tells coverity not to expand the assert macro, so it still sees the - * asserts in the code, even in release builds (we currently run coverity on - * our release builds). Unfortunately MetaWare won't compile it, even though - * __COVERITY__ isn't defined, so we put this in its own header. - * - * FIXME: This belongs in the Coverity config (in a file called - * config/user_nodefs.h) - */ -#nodef assert - -/* - * So we need to declare the function now that it isn't a macro any more. It's - * already built into coverity that assert is a "killpath". - */ -extern void assert(int cond); - -#endif /* USER_NODEFS_H */ diff --git a/vc/include/interface/vcos/vcos.h b/vc/include/interface/vcos/vcos.h @@ -1,221 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file -=============================================================================*/ - -/** - * \mainpage OS Abstraction Layer - * - * \section intro Introduction - * - * This abstraction layer is here to allow the underlying OS to be easily changed (e.g. from - * Nucleus to ThreadX) and to aid in porting host applications to new targets. - * - * \subsection error Error handling - * - * Wherever possible, VCOS functions assert internally and return void. The only exceptions - * are creation functions (which might fail due to lack of resources) and functions that - * might timeout or fail due to lack of space. Errors that might be reported by the underlying - * OS API (e.g. invalid mutex) are treated as a programming error, and are merely asserted on. - * - * \section thread_synch Threads and synchronisation - * - * \subsection thread Threads - * - * The thread API is somewhat different to that found in Nucleus. In particular, threads - * cannot just be destroyed at arbitrary times and nor can they merely exit. This is so - * that the same API can be implemented across all interesting platforms without too much - * difficulty. See vcos_thread.h for details. Thread attributes are configured via - * the VCOS_THREAD_ATTR_T structure, found in vcos_thread_attr.h. - * - * \subsection sema Semaphores - * - * Counted semaphores (c.f. Nucleus NU_SEMAPHORE) are created with VCOS_SEMAPHORE_T. - * Under ThreadX on VideoCore, semaphores are implemented using VideoCore spinlocks, and - * so are quite a lot faster than ordinary ThreadX semaphores. See vcos_semaphore.h. - * - * \subsection mtx Mutexes - * - * Mutexes are used for locking. Attempts to take a mutex twice, or to unlock it - * in a different thread to the one in which it was locked should be expected to fail. - * Mutexes are not re-entrant (see vcos_reentrant_mutex.h for a slightly slower - * re-entrant mutex). - * - * \subsection evflags Event flags - * - * Event flags (the ThreadX name - also known as event groups under Nucleus) provide - * 32 flags which can be waited on by multiple clients, and signalled by multiple clients. - * A timeout can be specified. See vcos_event_flags.h. An alternative to this is the - * VCOS_EVENT_T (see vcos_event.h) which is akin to the Win32 auto-reset event, or a - * saturating counted semaphore. - * - * \subsection event Events - * - * A VCOS_EVENT_T is a bit like a saturating semaphore. No matter how many times it - * is signalled, the waiter will only wake up once. See vcos_event.h. You might think this - * is useful if you suspect that the cost of reading the semaphore count (perhaps via a - * system call) is expensive on your platform. - * - * \subsection tls Thread local storage - * - * Thread local storage is supported using vcos_tls.h. This is emulated on Nucleus - * and ThreadX. - * - * \section int Interrupts - * - * The legacy LISR/HISR scheme found in Nucleus is supported via the legacy ISR API, - * which is also supported on ThreadX. New code should avoid this, and old code should - * be migrated away from it, since it is slow. See vcos_legacy_isr.h. - * - * Registering an interrupt handler, and disabling/restoring interrupts, is handled - * using the functions in vcos_isr.h. - * - */ - -/** - * \file vcos.h - * - * This is the top level header file. Clients include this. It pulls in the platform-specific - * header file (vcos_platform.h) together with header files defining the expected APIs, such - * as vcos_mutex.h, vcos_semaphore.h, etc. It is also possible to include these header files - * directly. - * - */ - -#ifndef VCOS_H -#define VCOS_H - -#include "interface/vcos/vcos_assert.h" -#include "vcos_types.h" -#include "vcos_platform.h" - -#ifndef VCOS_INIT_H -#include "interface/vcos/vcos_init.h" -#endif - -#ifndef VCOS_SEMAPHORE_H -#include "interface/vcos/vcos_semaphore.h" -#endif - -#ifndef VCOS_THREAD_H -#include "interface/vcos/vcos_thread.h" -#endif - -#ifndef VCOS_MUTEX_H -#include "interface/vcos/vcos_mutex.h" -#endif - -#ifndef VCOS_MEM_H -#include "interface/vcos/vcos_mem.h" -#endif - -#ifndef VCOS_LOGGING_H -#include "interface/vcos/vcos_logging.h" -#endif - -#ifndef VCOS_STRING_H -#include "interface/vcos/vcos_string.h" -#endif - -#ifndef VCOS_EVENT_H -#include "interface/vcos/vcos_event.h" -#endif - -#ifndef VCOS_THREAD_ATTR_H -#include "interface/vcos/vcos_thread_attr.h" -#endif - -#ifndef VCOS_TLS_H -#include "interface/vcos/vcos_tls.h" -#endif - -#ifndef VCOS_REENTRANT_MUTEX_H -#include "interface/vcos/vcos_reentrant_mutex.h" -#endif - -#ifndef VCOS_NAMED_SEMAPHORE_H -#include "interface/vcos/vcos_named_semaphore.h" -#endif - -#ifndef VCOS_QUICKSLOW_MUTEX_H -#include "interface/vcos/vcos_quickslow_mutex.h" -#endif - -/* Headers with predicates */ - -#if VCOS_HAVE_EVENT_FLAGS -#include "interface/vcos/vcos_event_flags.h" -#endif - -#if VCOS_HAVE_QUEUE -#include "interface/vcos/vcos_queue.h" -#endif - -#if VCOS_HAVE_LEGACY_ISR -#include "interface/vcos/vcos_legacy_isr.h" -#endif - -#if VCOS_HAVE_TIMER -#include "interface/vcos/vcos_timer.h" -#endif - -#if VCOS_HAVE_MEMPOOL -#include "interface/vcos/vcos_mempool.h" -#endif - -#if VCOS_HAVE_ISR -#include "interface/vcos/vcos_isr.h" -#endif - -#if VCOS_HAVE_ATOMIC_FLAGS -#include "interface/vcos/vcos_atomic_flags.h" -#endif - -#if VCOS_HAVE_ONCE -#include "interface/vcos/vcos_once.h" -#endif - -#if VCOS_HAVE_BLOCK_POOL -#include "interface/vcos/vcos_blockpool.h" -#endif - -#if VCOS_HAVE_FILE -#include "interface/vcos/vcos_file.h" -#endif - -#if VCOS_HAVE_CFG -#include "interface/vcos/vcos_cfg.h" -#endif - -#if VCOS_HAVE_CMD -#include "interface/vcos/vcos_cmd.h" -#endif - -#endif /* VCOS_H */ - diff --git a/vc/include/interface/vcos/vcos_assert.h b/vc/include/interface/vcos/vcos_assert.h @@ -1,324 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - Assertion and error-handling macros. -=============================================================================*/ - - -#ifndef VCOS_ASSERT_H -#define VCOS_ASSERT_H - -/* - * Macro: - * vcos_assert(cond) - * vcos_assert_msg(cond, fmt, ...) - * Use: - * Detecting programming errors by ensuring that assumptions are correct. - * On failure: - * Performs a platform-dependent "breakpoint", usually with an assert-style - * message. The '_msg' variant expects a printf-style format string and - * parameters. - * If a failure is detected, the code should be fixed and rebuilt. - * In release builds: - * Generates no code, i.e. does not evaluate 'cond'. - * Returns: - * Nothing. - * - * Macro: - * vcos_demand(cond) - * vcos_demand_msg(cond, fmt, ...) - * Use: - * Detecting fatal system errors that require a reboot. - * On failure: - * Performs a platform-dependent "breakpoint", usually with an assert-style - * message, then calls vcos_abort (see below). - * In release builds: - * Calls vcos_abort() if 'cond' is false. - * Returns: - * Nothing (never, on failure). - * - * Macro: - * vcos_verify(cond) - * vcos_verify_msg(cond, fmt, ...) - * Use: - * Detecting run-time errors and interesting conditions, normally within an - * 'if' statement to catch the failures, i.e. - * if (!vcos_verify(cond)) handle_error(); - * On failure: - * Generates a message and optionally stops at a platform-dependent - * "breakpoint" (usually disabled). See vcos_verify_bkpts_enable below. - * In release builds: - * Just evaluates and returns 'cond'. - * Returns: - * Non-zero if 'cond' is true, otherwise zero. - * - * Macro: - * vcos_static_assert(cond) - * Use: - * Detecting compile-time errors. - * On failure: - * Generates a compiler error. - * In release builds: - * Generates a compiler error. - * - * Function: - * void vcos_abort(void) - * Use: - * Invokes the fatal error handling mechanism, alerting the host where - * applicable. - * Returns: - * Never. - * - * Macro: - * VCOS_VERIFY_BKPTS - * Use: - * Define in a module (before including vcos.h) to specify an alternative - * flag to control breakpoints on vcos_verify() failures. - * Returns: - * Non-zero values enable breakpoints. - * - * Function: - * int vcos_verify_bkpts_enable(int enable); - * Use: - * Sets the global flag controlling breakpoints on vcos_verify failures, - * enabling the breakpoints iff 'enable' is non-zero. - * Returns: - * The previous state of the flag. - * - * Function: - * int vcos_verify_bkpts_enabled(void); - * Use: - * Queries the state of the global flag enabling breakpoints on vcos_verify - * failures. - * Returns: - * The current state of the flag. - * - * Examples: - * - * int my_breakpoint_enable_flag = 1; - * - * #define VCOS_VERIFY_BKPTS my_breakpoint_enable_flag - * - * #include "interface/vcos/vcos.h" - * - * vcos_static_assert((sizeof(object) % 32) == 0); - * - * // ... - * - * vcos_assert_msg(postcondition_is_true, "Coding error"); - * - * if (!vcos_verify_msg(buf, "Buffer allocation failed (%d bytes)", size)) - * { - * // Tidy up - * // ... - * return OUT_OF_MEMORY; - * } - * - * vcos_demand(*p++==GUARDWORDHEAP); - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" - -#ifdef __COVERITY__ -#include "interface/vcos/user_nodefs.h" - -extern void __coverity_panic__(void); -#undef VCOS_ASSERT_BKPT -#define VCOS_ASSERT_BKPT __coverity_panic__() -#endif - -/* - * ANDROID should NOT be defined for files built for Videocore, but currently it - * is. FIXME When that's fixed, remove the __VIDEOCORE__ band-aid. - */ -#if (defined(ANDROID) && !defined(__VIDEOCORE__)) -# include "assert.h" -# define vcos_assert assert -#endif - -#ifndef VCOS_VERIFY_BKPTS -#define VCOS_VERIFY_BKPTS vcos_verify_bkpts_enabled() -#endif - -#ifndef VCOS_BKPT -#if defined(__VIDEOCORE__) && !defined(VCOS_ASSERT_NO_BKPTS) -#define VCOS_BKPT _bkpt() -#else -#define VCOS_BKPT (void )0 -#endif -#endif - -#ifndef VCOS_ASSERT_BKPT -#define VCOS_ASSERT_BKPT VCOS_BKPT -#endif - -#ifndef VCOS_VERIFY_BKPT -#define VCOS_VERIFY_BKPT (VCOS_VERIFY_BKPTS ? VCOS_BKPT : (void)0) -#endif - -VCOSPRE_ int VCOSPOST_ vcos_verify_bkpts_enabled(void); -VCOSPRE_ int VCOSPOST_ vcos_verify_bkpts_enable(int enable); -VCOSPRE_ void VCOSPOST_ vcos_abort(void); - -#ifndef VCOS_ASSERT_MSG -#ifdef LOGGING -extern void logging_assert(const char *file, const char *func, int line, const char *format, ...); -extern void logging_assert_dump(void); -#define VCOS_ASSERT_MSG(...) ((VCOS_ASSERT_LOGGING && !VCOS_ASSERT_LOGGING_DISABLE) ? logging_assert_dump(), logging_assert(__FILE__, __func__, __LINE__, __VA_ARGS__) : (void)0) -#else -#define VCOS_ASSERT_MSG(...) ((void)0) -#endif -#endif - -#ifndef VCOS_VERIFY_MSG -#define VCOS_VERIFY_MSG(...) VCOS_ASSERT_MSG(__VA_ARGS__) -#endif - -#ifndef VCOS_ASSERT_LOGGING -#define VCOS_ASSERT_LOGGING 0 -#endif - -#ifndef VCOS_ASSERT_LOGGING_DISABLE -#define VCOS_ASSERT_LOGGING_DISABLE 0 -#endif - -#if !defined(NDEBUG) || defined(VCOS_RELEASE_ASSERTS) -#define VCOS_ASSERT_ENABLED 1 -#define VCOS_VERIFY_ENABLED 1 -#else -#define VCOS_ASSERT_ENABLED 0 -#define VCOS_VERIFY_ENABLED 0 -#endif - -#define VCOS_DEMAND_ENABLED 1 - -#if VCOS_ASSERT_ENABLED - -#ifndef vcos_assert -#define vcos_assert(cond) \ - ( (cond) ? (void)0 : (VCOS_ASSERT_MSG("%s", #cond), VCOS_ASSERT_BKPT) ) -#endif - -#ifndef vcos_assert_msg -#define vcos_assert_msg(cond, ...) \ - ( (cond) ? (void)0 : (VCOS_ASSERT_MSG(__VA_ARGS__), VCOS_ASSERT_BKPT) ) -#endif - -#else /* VCOS_ASSERT_ENABLED */ - -#ifndef vcos_assert -#define vcos_assert(cond) (void)0 -#endif - -#ifndef vcos_assert_msg -#define vcos_assert_msg(cond, ...) (void)0 -#endif - -#endif /* VCOS_ASSERT_ENABLED */ - - -#if VCOS_DEMAND_ENABLED - -#ifndef vcos_demand -#define vcos_demand(cond) \ - ( (cond) ? (void)0 : (VCOS_ASSERT_MSG("%s", #cond), VCOS_ASSERT_BKPT, vcos_abort()) ) -#endif - -#ifndef vcos_demand_msg -#define vcos_demand_msg(cond, ...) \ - ( (cond) ? (void)0 : (VCOS_ASSERT_MSG(__VA_ARGS__), VCOS_ASSERT_BKPT, vcos_abort()) ) -#endif - -#else /* VCOS_DEMAND_ENABLED */ - -#ifndef vcos_demand -#define vcos_demand(cond) \ - ( (cond) ? (void)0 : vcos_abort() ) -#endif - -#ifndef vcos_demand_msg -#define vcos_demand_msg(cond, ...) \ - ( (cond) ? (void)0 : vcos_abort() ) -#endif - -#endif /* VCOS_DEMAND_ENABLED */ - - -#if VCOS_VERIFY_ENABLED - -#ifndef vcos_verify -#define vcos_verify(cond) \ - ( (cond) ? 1 : (VCOS_VERIFY_MSG("%s", #cond), VCOS_VERIFY_BKPT, 0) ) -#endif - -#ifndef vcos_verify_msg -#define vcos_verify_msg(cond, ...) \ - ( (cond) ? 1 : (VCOS_VERIFY_MSG(__VA_ARGS__), VCOS_VERIFY_BKPT, 0) ) -#endif - -#else /* VCOS_VERIFY_ENABLED */ - -#ifndef vcos_verify -#define vcos_verify(cond) (cond) -#endif - -#ifndef vcos_verify_msg -#define vcos_verify_msg(cond, ...) (cond) -#endif - -#endif /* VCOS_VERIFY_ENABLED */ - - -#ifndef vcos_static_assert -#if defined(__GNUC__) -#define vcos_static_assert(cond) __attribute__((unused)) extern int vcos_static_assert[(cond)?1:-1] -#else -#define vcos_static_assert(cond) extern int vcos_static_assert[(cond)?1:-1] -#endif -#endif - -#ifndef vc_assert -#define vc_assert(cond) vcos_assert(cond) -#endif - -#define vcos_unreachable() vcos_assert(0) -#define vcos_not_impl() vcos_assert(0) - -/** Print out a backtrace, on supported platforms. - */ -extern void vcos_backtrace_self(void); - -#ifdef __cplusplus -} -#endif - -#endif /* VCOS_ASSERT_H */ diff --git a/vc/include/interface/vcos/vcos_atomic_flags.h b/vc/include/interface/vcos/vcos_atomic_flags.h @@ -1,92 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file -=============================================================================*/ - -#ifndef VCOS_ATOMIC_FLAGS_H -#define VCOS_ATOMIC_FLAGS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file vcos_atomic_flags.h - * - * Defines atomic flags API. - * - * 32 flags. Atomic "or" and "get and clear" operations - */ - -/** - * Create an atomic flags instance. - * - * @param atomic_flags Pointer to atomic flags instance, filled in on return - * - * @return VCOS_SUCCESS if succeeded. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_atomic_flags_create(VCOS_ATOMIC_FLAGS_T *atomic_flags); - -/** - * Atomically set the specified flags. - * - * @param atomic_flags Instance to set flags on - * @param flags Mask of flags to set - */ -VCOS_INLINE_DECL -void vcos_atomic_flags_or(VCOS_ATOMIC_FLAGS_T *atomic_flags, uint32_t flags); - -/** - * Retrieve the current flags and then clear them. The entire operation is - * atomic. - * - * @param atomic_flags Instance to get/clear flags from/on - * - * @return Mask of flags which were set (and we cleared) - */ -VCOS_INLINE_DECL -uint32_t vcos_atomic_flags_get_and_clear(VCOS_ATOMIC_FLAGS_T *atomic_flags); - -/** - * Delete an atomic flags instance. - * - * @param atomic_flags Instance to delete - */ -VCOS_INLINE_DECL -void vcos_atomic_flags_delete(VCOS_ATOMIC_FLAGS_T *atomic_flags); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/vc/include/interface/vcos/vcos_attr.h b/vc/include/interface/vcos/vcos_attr.h @@ -1,153 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - compiler-specific attributes -=============================================================================*/ - -#ifndef VCOS_ATTR_H -#define VCOS_ATTR_H - -/** - * Type attribute indicating the enum should be stored in as few bytes as - * possible. MetaWare does this by default, so the attribute is useful when - * structs need to be portable to GCC too. - * - * MSVC doesn't support VCOS_ENUM_PACKED, so code that needs to be portable - * across all platforms but wants the type-safety and debug-info benefits - * of enum types when possible, should do: - * - * typedef enum VCOS_ENUM_PACKED { a = 0, b = 0xffff } EXAMPLE_T; - * struct foo { - * int bar; - * #if VCOS_HAS_ENUM_PACKED - * EXAMPLE_T baz; - * #else - * uint16_t baz; - * #endif - * }; - */ - -#if defined(__VECTORC__) -# define VCOS_ENUM_PACKED -# define VCOS_HAS_ENUM_PACKED 0 -#elif defined(__GNUC__) -# define VCOS_ENUM_PACKED __attribute__ ((packed)) -# define VCOS_HAS_ENUM_PACKED 1 -#elif defined(__HIGHC__) -# define VCOS_ENUM_PACKED /* packed enums are default on Metaware */ -# define VCOS_HAS_ENUM_PACKED 1 -#else -# define VCOS_ENUM_PACKED -# define VCOS_HAS_ENUM_PACKED 0 -#endif - -/** Variable attribute indicating the variable must be emitted even if it appears unused. */ -#if defined(__GNUC__) || defined(__HIGHC__) -# define VCOS_ATTR_USED __attribute__ ((used)) -#else -# define VCOS_ATTR_USED -#endif - -/** Variable attribute indicating the compiler should not warn if the variable is unused. */ -#if defined(__GNUC__) || defined(__HIGHC__) -# define VCOS_ATTR_POSSIBLY_UNUSED __attribute__ ((unused)) -#else -# define VCOS_ATTR_POSSIBLY_UNUSED -#endif - -/** Variable attribute requiring specific alignment. - * - * Use as: - * int VCOS_ATTR_ALIGNED(256) n; - * or: - * VCOS_ATTR_ALIGNED(256) int n; - * or if you don't want to support MSVC: - * int n VCOS_ATTR_ALIGNED(256); - */ -#if defined(__GNUC__) || defined(__HIGHC__) -# define VCOS_ATTR_ALIGNED(n) __attribute__ ((aligned(n))) -#elif defined(_MSC_VER) -# define VCOS_ATTR_ALIGNED(n) __declspec(align(n)) -#else -/* Force a syntax error if this is used when the compiler doesn't support it, - * instead of silently misaligning */ -# define VCOS_ATTR_ALIGNED(n) VCOS_ATTR_ALIGNED_NOT_SUPPORTED_ON_THIS_COMPILER -#endif - -/** Variable attribute requiring specific ELF section. - * - * Use as: - * int n VCOS_ATTR_SECTION(".foo") = 1; - * - * A pointer like &n will have type "VCOS_ATTR_SECTION_QUALIFIER int *". - */ -#if defined(__HIGHC__) || defined(__VECTORC__) -/* hcvc requires 'far' else it'll put small objects in .sdata/.rsdata/.sbss */ -# define VCOS_ATTR_SECTION(s) __attribute__ ((far, section(s))) -# define VCOS_ATTR_SECTION_QUALIFIER _Far -#elif defined(__GNUC__) -# define VCOS_ATTR_SECTION(s) __attribute__ ((section(s))) -# define VCOS_ATTR_SECTION_QUALIFIER -#else -/* Force a syntax error if this is used when the compiler doesn't support it */ -# define VCOS_ATTR_SECTION(s) VCOS_ATTR_SECTION_NOT_SUPPORTED_ON_THIS_COMPILER -# define VCOS_ATTR_SECTION_QUALIFIER -#endif - -/** Define a function as a weak alias to another function. - * @param ret_type Function return type. - * @param alias_name Name of the alias. - * @param param_list Function parameter list, including the parentheses. - * @param target_name Target function (bare function name, not a string). - */ -#if defined(__GNUC__) || defined(__HIGHC__) - /* N.B. gcc allows __attribute__ after parameter list, but hcvc seems to silently ignore it. */ -# define VCOS_WEAK_ALIAS(ret_type, alias_name, param_list, target_name) \ - __attribute__ ((weak, alias(#target_name))) ret_type alias_name param_list -#else -# define VCOS_WEAK_ALIAS(ret_type, alias, params, target) VCOS_CASSERT(0) -#endif - -/** Define a function as a weak alias to another function, specified as a string. - * @param ret_type Function return type. - * @param alias_name Name of the alias. - * @param param_list Function parameter list, including the parentheses. - * @param target_name Target function name as a string. - * @note Prefer the use of VCOS_WEAK_ALIAS - it is likely to be more portable. - * Only use VCOS_WEAK_ALIAS_STR if you need to do pre-processor mangling of the target - * symbol. - */ -#if defined(__GNUC__) || defined(__HIGHC__) - /* N.B. gcc allows __attribute__ after parameter list, but hcvc seems to silently ignore it. */ -# define VCOS_WEAK_ALIAS_STR(ret_type, alias_name, param_list, target_name) \ - __attribute__ ((weak, alias(target_name))) ret_type alias_name param_list -#else -# define VCOS_WEAK_ALIAS_STR(ret_type, alias, params, target) VCOS_CASSERT(0) -#endif - -#endif /* VCOS_ATTR_H */ diff --git a/vc/include/interface/vcos/vcos_blockpool.h b/vc/include/interface/vcos/vcos_blockpool.h @@ -1,171 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - fixed size allocator support -=============================================================================*/ - -#ifndef VCOS_BLOCKPOOL_H -#define VCOS_BLOCKPOOL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** \file - * - * Thread safe, fixed size allocator API. - * - */ - -/** Initialises a block pool to use already allocated (e.g. statically) - * allocated memory. - * - * Different implementations will incur different overheads. Use - * VCOS_BLOCKPOOL_SIZE(num_blocks, block_size) to calculate the number - * of bytes required including overheads for the desired pools. - * - * @param pool Pointer to pool object - * @param num_blocks The number of blocks required. - * @param block_size The size of an individual block. - * @param start The address of the start of the pool. - * @param pool_size The size of the pool in bytes. - * @param align Alignment for block data. Use VCOS_BLOCKPOOL_ALIGN_DEFAULT - * for default word alignment. - * @param flags Reserved for future use. - * @param name Name of the pool. Used for diagnostics. - * - * @return VCOS_SUCCESS if the pool was created. - */ - -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_blockpool_init(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_blocks, VCOS_UNSIGNED block_size, - void *start, VCOS_UNSIGNED pool_size, VCOS_UNSIGNED align, - VCOS_UNSIGNED flags, const char *name); - -/** Creates a pool of blocks of a given size within a buffer allocated on - * the heap. - * - * The heap memory is freed when the block pool is destroyed by - * calling vcos_blockpool_delete. - * - * @param pool Pointer to pool object - * @param num_blocks The number of blocks required. - * @param block_size The size of an individual block. - * @param align Alignment for block data. Use VCOS_BLOCKPOOL_ALIGN_DEFAULT - * for default word alignment. - * @param flags Reserved for future use. - * @param name Name of the pool. Used for diagnostics. - * - * @return VCOS_SUCCESS if the pool was created. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_blockpool_create_on_heap(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_blocks, VCOS_UNSIGNED block_size, - VCOS_UNSIGNED align, VCOS_UNSIGNED flags, - const char *name); - -/** Allocate a block from the pool - * - * @param pool Pointer to the pool to allocate from. - * @return a pointer to the newly allocated block or NULL if no blocks were - * available. - */ -VCOS_INLINE_DECL -void *vcos_blockpool_alloc(VCOS_BLOCKPOOL_T *pool); - -/** Allocate a block from the pool and zero it. - * - * @param pool Pointer to the pool to allocate from. - * @return a pointer to the newly allocated block or NULL if no blocks were - * available. - */ -VCOS_INLINE_DECL -void *vcos_blockpool_calloc(VCOS_BLOCKPOOL_T *pool); - -/** Returns a block to the pool. - * - * @param block The block to free. - */ -VCOS_INLINE_DECL -void vcos_blockpool_free(void *block); - -/** Queries the number of available blocks in the pool. - * @param pool The pool to query. - */ -VCOS_INLINE_IMPL - VCOS_UNSIGNED vcos_blockpool_available_count(VCOS_BLOCKPOOL_T *pool); - -/** Queries the number of used blocks in the pool. - * @param pool The pool to query. - */ -VCOS_INLINE_IMPL - VCOS_UNSIGNED vcos_blockpool_used_count(VCOS_BLOCKPOOL_T *pool); - -/** Deinitialize a memory pool. - * - * @param pool The pool to de-initialize. - */ -VCOS_INLINE_DECL -void vcos_blockpool_delete(VCOS_BLOCKPOOL_T *pool); - -/** Return an integer handle for a given allocated block. */ -VCOS_INLINE_DECL -uint32_t vcos_blockpool_elem_to_handle(void *block); - -/** Convert an integer handle back into a pointer. - * Returns NULL if invalid. */ -VCOS_INLINE_DECL -void *vcos_blockpool_elem_from_handle(VCOS_BLOCKPOOL_T *pool, uint32_t handle); - -/** Checks whether a pointer is an allocated block within the specified pool. - * Returns true if the block is valid, otherwise, false is returned. */ -VCOS_INLINE_DECL -uint32_t vcos_blockpool_is_valid_elem( - VCOS_BLOCKPOOL_T *pool, const void *block); - -/** May be called once to allow the block pool to be extended by dynamically - * adding subpools. The block size cannot be altered. - * - * @param num_extensions The number of extensions that may be created. - * The maximum is (VCOS_BLOCKPOOL_MAX_SUBPOOLS - 1) - * @param num_blocks The number of blocks to allocate in each in each - * dynamically allocated subpool. - * @return VCOS_SUCCESS if successful. - */ -VCOS_INLINE_DECL - VCOS_STATUS_T vcos_blockpool_extend(VCOS_BLOCKPOOL_T *pool, - VCOS_UNSIGNED num_extensions, VCOS_UNSIGNED num_blocks); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_build_info.h b/vc/include/interface/vcos/vcos_build_info.h @@ -1,32 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -const char *vcos_get_build_hostname( void ); -const char *vcos_get_build_version( void ); -const char *vcos_get_build_time( void ); -const char *vcos_get_build_date( void ); - diff --git a/vc/include/interface/vcos/vcos_cfg.h b/vc/include/interface/vcos/vcos_cfg.h @@ -1,126 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#if !defined( VCOS_CFG_H ) -#define VCOS_CFG_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -typedef struct opaque_vcos_cfg_buf_t *VCOS_CFG_BUF_T; -typedef struct opaque_vcos_cfg_entry_t *VCOS_CFG_ENTRY_T; - -/** \file vcos_file.h - * - * API for accessing configuration/statistics information. This - * is loosely modelled on the linux proc entries. - */ - -typedef void (*VCOS_CFG_SHOW_FPTR)( VCOS_CFG_BUF_T buf, void *data ); -typedef void (*VCOS_CFG_PARSE_FPTR)( VCOS_CFG_BUF_T buf, void *data ); - -/** Create a configuration directory. - * - * @param entry Place to store the created config entry. - * @param parent Parent entry (for directory like config - * options). - * @param entryName Name of the directory. - */ - -VCOS_STATUS_T vcos_cfg_mkdir( VCOS_CFG_ENTRY_T *entry, - VCOS_CFG_ENTRY_T *parent, - const char *dirName ); - -/** Create a configuration entry. - * - * @param entry Place to store the created config entry. - * @param parent Parent entry (for directory like config - * options). - * @param entryName Name of the configuration entry. - * @param showFunc Function pointer to show configuration - * data. - * @param parseFunc Function pointer to parse new data. - */ - -VCOS_STATUS_T vcos_cfg_create_entry( VCOS_CFG_ENTRY_T *entry, - VCOS_CFG_ENTRY_T *parent, - const char *entryName, - VCOS_CFG_SHOW_FPTR showFunc, - VCOS_CFG_PARSE_FPTR parseFunc, - void *data ); - -/** Determines if a configuration entry has been created or not. - * - * @param entry Configuration entry to query. - */ - -int vcos_cfg_is_entry_created( VCOS_CFG_ENTRY_T entry ); - -/** Returns the name of a configuration entry. - * - * @param entry Configuration entry to query. - */ - -const char *vcos_cfg_get_entry_name( VCOS_CFG_ENTRY_T entry ); - -/** Removes a configuration entry. - * - * @param entry Configuration entry to remove. - */ - -VCOS_STATUS_T vcos_cfg_remove_entry( VCOS_CFG_ENTRY_T *entry ); - - -/** Writes data into a configuration buffer. Only valid inside - * the show function. - * - * @param buf Buffer to write data into. - * @param fmt printf style format string. - */ - -void vcos_cfg_buf_printf( VCOS_CFG_BUF_T buf, const char *fmt, ... ); - -/** Retrieves a null terminated string of the data associated - * with the buffer. Only valid inside the parse function. - * - * @param buf Buffer to get data from. - * @param fmt printf style format string. - */ - -char *vcos_cfg_buf_get_str( VCOS_CFG_BUF_T buf ); - -void *vcos_cfg_get_proc_entry( VCOS_CFG_ENTRY_T entry ); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_cmd.h b/vc/include/interface/vcos/vcos_cmd.h @@ -1,119 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#if !defined( VCOS_CMD_H ) -#define VCOS_CMD_H - -/* ---- Include Files ----------------------------------------------------- */ - -#ifndef VCOS_H -#include "interface/vcos/vcos.h" -#endif -#include "interface/vcos/vcos_stdint.h" - - -/* ---- Constants and Types ---------------------------------------------- */ - -struct VCOS_CMD_S; -typedef struct VCOS_CMD_S VCOS_CMD_T; - -typedef struct -{ - int argc; /* Number of arguments (includes the command/sub-command) */ - char **argv; /* Array of arguments */ - char **argv_orig; /* Original array of arguments */ - - VCOS_CMD_T *cmd_entry; - VCOS_CMD_T *cmd_parent_entry; - - int use_log; /* Output being logged? */ - size_t result_size; /* Size of result buffer. */ - char *result_ptr; /* Next place to put output. */ - char *result_buf; /* Start of the buffer. */ - -} VCOS_CMD_PARAM_T; - -typedef VCOS_STATUS_T (*VCOS_CMD_FUNC_T)( VCOS_CMD_PARAM_T *param ); - -struct VCOS_CMD_S -{ - const char *name; - const char *args; - VCOS_CMD_FUNC_T cmd_fn; - VCOS_CMD_T *sub_cmd_entry; - const char *descr; - -}; - -/* ---- Variable Externs ------------------------------------------------- */ - -/* ---- Function Prototypes ---------------------------------------------- */ - -/* - * Common printing routine for generating command output. - */ -VCOSPRE_ void VCOSPOST_ vcos_cmd_error( VCOS_CMD_PARAM_T *param, const char *fmt, ... ) VCOS_FORMAT_ATTR_(printf, 2, 3); -VCOSPRE_ void VCOSPOST_ vcos_cmd_printf( VCOS_CMD_PARAM_T *param, const char *fmt, ... ) VCOS_FORMAT_ATTR_(printf, 2, 3); -VCOSPRE_ void VCOSPOST_ vcos_cmd_vprintf( VCOS_CMD_PARAM_T *param, const char *fmt, va_list args ) VCOS_FORMAT_ATTR_(printf, 2, 0); - -/* - * Cause vcos_cmd_error, printf and vprintf to always log to the provided - * category. When this call is made, the results buffer passed into - * vcos_cmd_execute is used as a line buffer and does not need to be - * output by the caller. - */ -VCOSPRE_ void VCOSPOST_ vcos_cmd_always_log_output( VCOS_LOG_CAT_T *log_category ); - -/* - * Prints command usage for the current command. - */ -VCOSPRE_ void VCOSPOST_ vcos_cmd_usage( VCOS_CMD_PARAM_T *param ); - -/* - * Register commands to be processed - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_cmd_register( VCOS_CMD_T *cmd_entry ); - -/* - * Registers multiple commands to be processed. The array should - * be terminated by an entry with all zeros. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_cmd_register_multiple( VCOS_CMD_T *cmd_entry ); - -/* - * Executes a command based on a command line. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_cmd_execute( int argc, char **argv, size_t result_size, char *result_buf ); - -/* - * Shut down the command system and free all allocated data. - * Do not call any other command functions after this. - */ -VCOSPRE_ void VCOSPOST_ vcos_cmd_shutdown( void ); - -#endif /* VCOS_CMD_H */ - diff --git a/vc/include/interface/vcos/vcos_ctype.h b/vc/include/interface/vcos/vcos_ctype.h @@ -1,49 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file -=============================================================================*/ - -#ifndef VCOS_CTYPE_H -#define VCOS_CTYPE_H - -/** - * \file - * - * ctype functions. - * - */ - -#ifdef __KERNEL__ -#include <linux/ctype.h> -#else -#include <ctype.h> -#endif - -#endif - diff --git a/vc/include/interface/vcos/vcos_dlfcn.h b/vc/include/interface/vcos/vcos_dlfcn.h @@ -1,86 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VCOS - abstraction over dynamic library opening -=============================================================================*/ - -#ifndef VCOS_DLFCN_H -#define VCOS_DLFCN_H - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file - * - * Loading dynamic libraries. See also dlfcn.h. - */ - -/** Open a dynamic library. - * - * @param name name of the library - * @param mode Load lazily or immediately (VCOS_DL_LAZY, VCOS_DL_NOW, VCOS_DL_LOCAL, VCOS_DL_GLOBAL). - * - * @return A handle for use in subsequent calls. - */ -VCOSPRE_ void * VCOSPOST_ vcos_dlopen(const char *name, int mode); - -/** Look up a symbol. - * - * @param handle Handle to open - * @param name Name of function - * - * @return Function pointer, or NULL. - */ -VCOSPRE_ void VCOSPOST_ (*vcos_dlsym(void *handle, const char *name))(void); - -/** Close a library - * - * @param handle Handle to close - */ -VCOSPRE_ int VCOSPOST_ vcos_dlclose (void *handle); - -/** Return error message from library. - * - * @param err On return, set to non-zero if an error has occurred - * @param buf Buffer to write error to - * @param len Size of buffer (including terminating NUL). - */ -VCOSPRE_ int VCOSPOST_ vcos_dlerror(int *err, char *buf, size_t buflen); - - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/vc/include/interface/vcos/vcos_event.h b/vc/include/interface/vcos/vcos_event.h @@ -1,117 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file for events -=============================================================================*/ - -#ifndef VCOS_EVENT_H -#define VCOS_EVENT_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file - * - * An event is akin to the Win32 auto-reset event. - * - * - * Signalling an event will wake up one waiting thread only. Once one - * thread has been woken the event atomically returns to the unsignalled - * state. - * - * If no threads are waiting on the event when it is signalled it remains - * signalled. - * - * This is almost, but not quite, completely unlike the "event flags" - * object based on Nucleus event groups and ThreadX event flags. - * - * In particular, it should be similar in speed to a semaphore, unlike - * the event flags. - */ - -/** - * Create an event instance. - * - * @param event Filled in with constructed event. - * @param name Name of the event (for debugging) - * - * @return VCOS_SUCCESS on success, or error code. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_event_create(VCOS_EVENT_T *event, const char *name); - -#ifndef vcos_event_signal - -/** - * Signal the event. The event will return to being unsignalled - * after exactly one waiting thread has been woken up. If no - * threads are waiting it remains signalled. - * - * @param event The event to signal - */ -VCOS_INLINE_DECL -void vcos_event_signal(VCOS_EVENT_T *event); - -/** - * Wait for the event. - * - * @param event The event to wait for - * @return VCOS_SUCCESS on success, VCOS_EAGAIN if the wait was interrupted. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_event_wait(VCOS_EVENT_T *event); - -/** - * Try event, but don't block. - * - * @param event The event to try - * @return VCOS_SUCCESS on success, VCOS_EAGAIN if the event is not currently signalled - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_event_try(VCOS_EVENT_T *event); - -#endif - -/* - * Destroy an event. - */ -VCOS_INLINE_DECL -void vcos_event_delete(VCOS_EVENT_T *event); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/vc/include/interface/vcos/vcos_event_flags.h b/vc/include/interface/vcos/vcos_event_flags.h @@ -1,118 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file -=============================================================================*/ - -#ifndef VCOS_EVENT_FLAGS_H -#define VCOS_EVENT_FLAGS_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -#define VCOS_EVENT_FLAGS_SUSPEND VCOS_SUSPEND -#define VCOS_EVENT_FLAGS_NO_SUSPEND VCOS_NO_SUSPEND -typedef VCOS_OPTION VCOS_EVENTGROUP_OPERATION_T; - -/** - * \file vcos_event_flags.h - * - * Defines event flags API. - * - * Similar to Nucleus event groups. - * - * These have the same semantics as Nucleus event groups and ThreadX event - * flags. As such, they are quite complex internally; if speed is important - * they might not be your best choice. - * - */ - -/** - * Create an event flags instance. - * - * @param flags Pointer to event flags instance, filled in on return. - * @param name Name for the event flags, used for debug. - * - * @return VCOS_SUCCESS if succeeded. - */ - -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_event_flags_create(VCOS_EVENT_FLAGS_T *flags, const char *name); - -/** - * Set some events. - * - * @param flags Instance to set flags on - * @param events Bitmask of the flags to actually set - * @param op How the flags should be set. VCOS_OR will OR in the flags; VCOS_AND - * will AND them in, possibly clearing existing flags. - */ -VCOS_INLINE_DECL -void vcos_event_flags_set(VCOS_EVENT_FLAGS_T *flags, - VCOS_UNSIGNED events, - VCOS_OPTION op); - -/** - * Retrieve some events. - * - * Waits until the specified events have been set. - * - * @param flags Instance to wait on - * @param requested_events The bitmask to wait for - * @param op VCOS_OR - get any; VCOS_AND - get all. - * @param ms_suspend How long to wait, in milliseconds - * @param retrieved_events the events actually retrieved. - * - * @return VCOS_SUCCESS if events were retrieved. VCOS_EAGAIN if the - * timeout expired. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_event_flags_get(VCOS_EVENT_FLAGS_T *flags, - VCOS_UNSIGNED requested_events, - VCOS_OPTION op, - VCOS_UNSIGNED ms_suspend, - VCOS_UNSIGNED *retrieved_events); - - -/** - * Delete an event flags instance. - */ -VCOS_INLINE_DECL -void vcos_event_flags_delete(VCOS_EVENT_FLAGS_T *); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/vc/include/interface/vcos/vcos_init.h b/vc/include/interface/vcos/vcos_init.h @@ -1,110 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - initialization routines -=============================================================================*/ - - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** \file - * - * Some OS support libraries need some initialization. To support this, call - * vcos_init() function at the start of day; vcos_deinit() at the end. - */ - -/** - * vcos initialization. Call this function before using other vcos functions. - * Calls can be nested within the same process; they are reference counted so - * that only a call from uninitialized state has any effect. - * @note On platforms/toolchains that support it, gcc's constructor attribute or - * similar is used to invoke this function before main() or equivalent. - * @return Status of initialisation. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_init(void); - -/** - * vcos deinitialization. Call this function when vcos is no longer required, - * in order to free resources. - * Calls can be nested within the same process; they are reference counted so - * that only a call that decrements the reference count to 0 has any effect. - * @note On platforms/toolchains that support it, gcc's destructor attribute or - * similar is used to invoke this function after exit() or equivalent. - * @return Status of initialisation. - */ -VCOSPRE_ void VCOSPOST_ vcos_deinit(void); - -/** - * Acquire global lock. This must be available independent of vcos_init()/vcos_deinit(). - */ -VCOSPRE_ void VCOSPOST_ vcos_global_lock(void); - -/** - * Release global lock. This must be available independent of vcos_init()/vcos_deinit(). - */ -VCOSPRE_ void VCOSPOST_ vcos_global_unlock(void); - -/** Pass in the argv/argc arguments passed to main() */ -VCOSPRE_ void VCOSPOST_ vcos_set_args(int argc, const char **argv); - -/** Return argc. */ -VCOSPRE_ int VCOSPOST_ vcos_get_argc(void); - -/** Return argv. */ -VCOSPRE_ const char ** VCOSPOST_ vcos_get_argv(void); - -/** - * Platform-specific initialisation. - * VCOS internal function, not part of public API, do not call from outside - * vcos. vcos_init()/vcos_deinit() reference count calls, so this function is - * only called from an uninitialized state, i.e. there will not be two - * consecutive calls to vcos_platform_init() without an intervening call to - * vcos_platform_deinit(). - * This function is called with vcos_global_lock held. - * @return Status of initialisation. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_platform_init(void); - -/** - * Platform-specific de-initialisation. - * VCOS internal function, not part of public API, do not call from outside - * vcos. - * See vcos_platform_init() re reference counting. - * This function is called with vcos_global_lock held. - */ -VCOSPRE_ void VCOSPOST_ vcos_platform_deinit(void); - -#ifdef __cplusplus -} -#endif - diff --git a/vc/include/interface/vcos/vcos_inttypes.h b/vc/include/interface/vcos/vcos_inttypes.h @@ -1,49 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCOS_INTTYPES_H -#define VCOS_INTTYPES_H - -/** \file - * Attempt to provide the support for fixed width integer types as per - * inttypes.h. This simply includes inttypes.h, which should find the - * system/toolchain version if present, otherwise falling back to the version - * in interface/vcos/<platform>. The vcos versions initially only provide the - * most common printf() macros. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include <inttypes.h> - -#ifdef __cplusplus -} -#endif - -#endif /* VCOS_INTTYPES_H */ diff --git a/vc/include/interface/vcos/vcos_isr.h b/vc/include/interface/vcos/vcos_isr.h @@ -1,90 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - IRQ support -=============================================================================*/ - -#ifndef VCOS_ISR_H -#define VCOS_ISR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file vcos_isr.h - * - * \section isr ISR support - * - * API for dispatching interrupts. - */ - -/** - * - * Register an interrupt handler. The old handler (if any) is returned in - * old_handler. The old handler should be called if the interrupt was not - * for you. - * - * The handler function will be called in a context with interrupts disabled, - * so should be written to be as short as possible. If significant processing - * is needed, the handler should delegate to a thread. - * - * The handler function can call any OS primitive that does not block (e.g. - * post a semaphore or set an event flag). Blocking operations (including memory - * allocation from the system heap) are not permitted. - * - * To deregister an ISR, pass in NULL. - * - * @param vec Vector to register for - * @param handler Handler to be called - * @param old_handler Updated with the old handler, or NULL. - */ - -VCOS_INLINE_DECL -void vcos_register_isr(VCOS_UNSIGNED vec, - VCOS_ISR_HANDLER_T handler, - VCOS_ISR_HANDLER_T *old_handler); - -/** Disable interrupts, returning the old value (enabled/disabled) to the caller. - */ -VCOS_INLINE_DECL -VCOS_UNSIGNED vcos_int_disable(void); - -/** Restore the previous interrupt enable/disable state. - */ -VCOS_INLINE_DECL -void vcos_int_restore(VCOS_UNSIGNED previous); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_legacy_isr.h b/vc/include/interface/vcos/vcos_legacy_isr.h @@ -1,102 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - legacy (Nucleus) IRQ support -=============================================================================*/ - -#ifndef VCOS_LEGACY_ISR_H -#define VCOS_LEGACY_ISR_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** \file vcos_legacy_isr.h - * - * API for dispatching interrupts the Nucleus way, via a LISR and HISR. - * New code should use the single-dispatch scheme - the LISR/HISR - * distinction is not necessary. - * - * Under ThreadX, a HISR is implemented as a high-priority thread which - * waits on a counting semaphore to call the HISR function. Although this - * provides a good approximation to the Nucleus semantics, it is potentially - * slow if all you are trying to do is to wake a thread from LISR context. - */ - -/** Register a LISR. This is identical to the NU_Register_LISR API. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_register_legacy_lisr(VCOS_UNSIGNED vecnum, - void (*lisr)(VCOS_INT), - void (**old_lisr)(VCOS_INT)); - -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_legacy_hisr_create(VCOS_HISR_T *hisr, const char *name, - void (*entry)(void), - VCOS_UNSIGNED pri, - void *stack, VCOS_UNSIGNED stack_size); - -/** Activate a HISR. On an OS which has no distinction between a HISR and LISR, - * this may use some kind of emulation, which could well be less efficient than - * a normal ISR.` - * - * @param hisr HISR to activate. - */ -VCOS_INLINE_DECL -void vcos_legacy_hisr_activate(VCOS_HISR_T *hisr); - -/** Delete a HISR. - * - * @param hisr HISR to delete. - */ -VCOS_INLINE_DECL -void vcos_legacy_hisr_delete(VCOS_HISR_T *hisr); - -/** Are we in a legacy LISR? - * - * @return On Nucleus, non-zero if in a LISR. On other platforms, non-zero if - * in an interrupt. - */ -VCOS_INLINE_DECL -int vcos_in_legacy_lisr(void); - -/** Is the current thread actually a fake HISR thread? Only implemented - * on platforms that fake up HISRs. - */ - -#ifndef VCOS_LISRS_NEED_HISRS -VCOSPRE_ int VCOSPOST_ vcos_current_thread_is_fake_hisr_thread(VCOS_HISR_T *); -#endif - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_logging.h b/vc/include/interface/vcos/vcos_logging.h @@ -1,315 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - logging support -=============================================================================*/ - -#ifndef VCOS_LOGGING_H -#define VCOS_LOGGING_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stdarg.h> - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" -#include "vcos_logging_control.h" - -/** - * \file - * - * Logging support - * - * This provides categorised logging. Clients register - * a category, and then get a number of logging levels for - * that category. - * - * The logging level flag is tested using a flag *before* the - * function call, which makes logging very fast when disabled - there - * is no function call overhead just to find out that this log - * message is disabled. - * - * \section VCOS_LOG_CATEGORY - * - * As a convenience, clients define VCOS_LOG_CATEGORY to point to - * their category; the various vcos_log_xxx() macros then expand to - * use this. - * - * e.g. - * - * #define VCOS_LOG_CATEGORY (&my_category) - * - * #include <interface/vcos/vcos.h> - * - * VCOS_LOG_CAT_T my_category; - * - * .... - * - * vcos_log_trace("Stuff happened: %d", n_stuff); - * - */ - -/** Logging levels */ -typedef enum VCOS_LOG_LEVEL_T -{ - VCOS_LOG_UNINITIALIZED = 0, - VCOS_LOG_NEVER, - VCOS_LOG_ERROR, - VCOS_LOG_WARN, - VCOS_LOG_INFO, - VCOS_LOG_TRACE, -} VCOS_LOG_LEVEL_T; - - -/** Initialize a logging category without going through vcos_log_register(). - * - * This is useful for the case where there is no obvious point to do the - * registration (no initialization function for the module). However, it - * means that your logging category is not registered, so cannot be easily - * changed at run-time. - */ -#define VCOS_LOG_INIT(n,l) { l, n, 0, {0}, 0, 0 } - -/** A registered logging category. - */ -typedef struct VCOS_LOG_CAT_T -{ - VCOS_LOG_LEVEL_T level; /**< Which levels are enabled for this category */ - const char *name; /**< Name for this category. */ - struct VCOS_LOG_CAT_T *next; - struct { - unsigned int want_prefix:1; - } flags; - unsigned int refcount; - void *platform_data; /**< platform specific data */ -} VCOS_LOG_CAT_T; - -typedef void (*VCOS_VLOG_IMPL_FUNC_T)(const VCOS_LOG_CAT_T *cat, VCOS_LOG_LEVEL_T _level, const char *fmt, va_list args); - -/** Convert a VCOS_LOG_LEVEL_T into a printable string. - * The platform needs to implement this function. - */ -VCOSPRE_ const char * VCOSPOST_ vcos_log_level_to_string( VCOS_LOG_LEVEL_T level ); - -/** Convert a string into a VCOS_LOG_LEVEL_T - * The platform needs to implement this function. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_string_to_log_level( const char *str, VCOS_LOG_LEVEL_T *level ); - -/** Log a message. Basic API. Normal code should not use this. - * The platform needs to implement this function. - */ -VCOSPRE_ void VCOSPOST_ vcos_log_impl(const VCOS_LOG_CAT_T *cat, VCOS_LOG_LEVEL_T _level, const char *fmt, ...) VCOS_FORMAT_ATTR_(printf, 3, 4); - -/** Log a message using a varargs parameter list. Normal code should - * not use this. - */ -VCOSPRE_ void VCOSPOST_ vcos_vlog_impl(const VCOS_LOG_CAT_T *cat, VCOS_LOG_LEVEL_T _level, const char *fmt, va_list args) VCOS_FORMAT_ATTR_(printf, 3, 0); - -/** Set the function which does the actual logging output. - * Passing in NULL causes the default logging function to be - * used. - */ -VCOSPRE_ void VCOSPOST_ vcos_set_vlog_impl( VCOS_VLOG_IMPL_FUNC_T vlog_impl_func ); - -/** The default logging function, which is provided by each - * platform. - */ - -VCOSPRE_ void VCOSPOST_ vcos_vlog_default_impl(const VCOS_LOG_CAT_T *cat, VCOS_LOG_LEVEL_T _level, const char *fmt, va_list args) VCOS_FORMAT_ATTR_(printf, 3, 0); - -/* - * Initialise the logging subsystem. This is called from - * vcos_init() so you don't normally need to call it. - */ -VCOSPRE_ void VCOSPOST_ vcos_logging_init(void); - -/** Register a logging category. - * - * @param name the name of this category. - * @param category the category to register. - */ -VCOSPRE_ void VCOSPOST_ vcos_log_register(const char *name, VCOS_LOG_CAT_T *category); - -/** Unregister a logging category. - */ -VCOSPRE_ void VCOSPOST_ vcos_log_unregister(VCOS_LOG_CAT_T *category); - -/** Return a default logging category, for people too lazy to create their own. - * - * Using the default category will be slow (there's an extra function - * call overhead). Don't do this in normal code. - */ -VCOSPRE_ const VCOS_LOG_CAT_T * VCOSPOST_ vcos_log_get_default_category(void); - -VCOSPRE_ void VCOSPOST_ vcos_set_log_options(const char *opt); - -/** Set the logging level for a category at run time. Without this, the level - * will be that set by vcos_log_register from a platform-specific source. - * - * @param category the category to modify. - * @param level the new logging level for this category. - */ -VCOS_STATIC_INLINE void vcos_log_set_level(VCOS_LOG_CAT_T *category, VCOS_LOG_LEVEL_T level) -{ - category->level = level; -} - -#define vcos_log_dump_mem(cat,label,addr,voidMem,numBytes) do { if (vcos_is_log_enabled(cat,VCOS_LOG_TRACE)) vcos_log_dump_mem_impl(cat,label,addr,voidMem,numBytes); } while (0) - -void vcos_log_dump_mem_impl( const VCOS_LOG_CAT_T *cat, - const char *label, - uint32_t addr, - const void *voidMem, - size_t numBytes ); - -/* - * Platform specific hooks (optional). - */ -#ifndef vcos_log_platform_init -#define vcos_log_platform_init() (void)0 -#endif - -#ifndef vcos_log_platform_register -#define vcos_log_platform_register(category) (void)0 -#endif - -#ifndef vcos_log_platform_unregister -#define vcos_log_platform_unregister(category) (void)0 -#endif - -/* VCOS_TRACE() - deprecated macro which just outputs in a debug build and - * is a no-op in a release build. - * - * _VCOS_LOG_X() - internal macro which outputs if the current level for the - * particular category is higher than the supplied message level. - */ - -#define VCOS_LOG_DFLT_CATEGORY vcos_log_get_default_category() - -#define _VCOS_LEVEL(x) (x) - -#define vcos_is_log_enabled(cat,_level) (_VCOS_LEVEL((cat)->level) >= _VCOS_LEVEL(_level)) - -#if defined(_VCOS_METAWARE) || defined(__GNUC__) - -# if !defined(AMPUTATE_ALL_VCOS_LOGGING) && (!defined(NDEBUG) || defined(VCOS_ALWAYS_WANT_LOGGING)) -# define VCOS_LOGGING_ENABLED -# define _VCOS_LOG_X(cat, _level, fmt...) do { if (vcos_is_log_enabled(cat,_level)) vcos_log_impl(cat,_level,fmt); } while (0) -# define _VCOS_VLOG_X(cat, _level, fmt, ap) do { if (vcos_is_log_enabled(cat,_level)) vcos_vlog_impl(cat,_level,fmt,ap); } while (0) -# else -# define _VCOS_LOG_X(cat, _level, fmt...) (void)0 -# define _VCOS_VLOG_X(cat, _level, fmt, ap) (void)0 -# endif - - - -# define vcos_log_error(...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_ERROR, __VA_ARGS__) -# define vcos_log_warn(...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_WARN, __VA_ARGS__) -# define vcos_log_info(...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_INFO, __VA_ARGS__) -# define vcos_log_trace(...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_TRACE, __VA_ARGS__) - -# define vcos_vlog_error(fmt,ap) _VCOS_VLOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_ERROR, fmt, ap) -# define vcos_vlog_warn(fmt,ap) _VCOS_VLOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_WARN, fmt, ap) -# define vcos_vlog_info(fmt,ap) _VCOS_VLOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_INFO, fmt, ap) -# define vcos_vlog_trace(fmt,ap) _VCOS_VLOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_TRACE, fmt, ap) - -# define vcos_logc_error(cat,...) _VCOS_LOG_X(cat, VCOS_LOG_ERROR, __VA_ARGS__) -# define vcos_logc_warn(cat,...) _VCOS_LOG_X(cat, VCOS_LOG_WARN, __VA_ARGS__) -# define vcos_logc_info(cat,...) _VCOS_LOG_X(cat, VCOS_LOG_INFO, __VA_ARGS__) -# define vcos_logc_trace(cat,...) _VCOS_LOG_X(cat, VCOS_LOG_TRACE, __VA_ARGS__) - -# define vcos_vlogc_error(cat,fmt,ap) _VCOS_VLOG_X(cat, VCOS_LOG_ERROR, fmt, ap) -# define vcos_vlogc_warn(cat,fmt,ap) _VCOS_VLOG_X(cat, VCOS_LOG_WARN, fmt, ap) -# define vcos_vlogc_info(cat,fmt,ap) _VCOS_VLOG_X(cat, VCOS_LOG_INFO, fmt, ap) -# define vcos_vlogc_trace(cat,fmt,ap) _VCOS_VLOG_X(cat, VCOS_LOG_TRACE, fmt, ap) - -# define vcos_log(...) _VCOS_LOG_X(VCOS_LOG_DFLT_CATEGORY, VCOS_LOG_INFO, __VA_ARGS__) -# define vcos_vlog(fmt,ap) _VCOS_VLOG_X(VCOS_LOG_DFLT_CATEGORY, VCOS_LOG_INFO, fmt, ap) -# define VCOS_ALERT(...) _VCOS_LOG_X(VCOS_LOG_DFLT_CATEGORY, VCOS_LOG_ERROR, __VA_ARGS__) -# define VCOS_TRACE(...) _VCOS_LOG_X(VCOS_LOG_DFLT_CATEGORY, VCOS_LOG_INFO, __VA_ARGS__) - -/* - * MS Visual Studio - pre 2005 does not grok variadic macros - */ -#elif defined(_MSC_VER) - -# if _MSC_VER >= 1400 - -# if !defined(AMPUTATE_ALL_VCOS_LOGGING) && (!defined(NDEBUG) || defined(VCOS_ALWAYS_WANT_LOGGING)) -# define VCOS_LOGGING_ENABLED -# define _VCOS_LOG_X(cat, _level, fmt,...) do { if (vcos_is_log_enabled(cat,_level)) vcos_log_impl(cat, _level, fmt, __VA_ARGS__); } while (0) -# else -# define _VCOS_LOG_X(cat, _level, fmt,...) (void)0 -# endif - -# define vcos_log_error(fmt,...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_ERROR, fmt, __VA_ARGS__) -# define vcos_log_warn(fmt,...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_WARN, fmt, __VA_ARGS__) -# define vcos_log_info(fmt,...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_INFO, fmt, __VA_ARGS__) -# define vcos_log_trace(fmt,...) _VCOS_LOG_X(VCOS_LOG_CATEGORY, VCOS_LOG_TRACE, fmt, __VA_ARGS__) - -# define vcos_logc_error(cat,fmt,...) _VCOS_LOG_X(cat, VCOS_LOG_ERROR, fmt, __VA_ARGS__) -# define vcos_logc_warn(cat,fmt,...) _VCOS_LOG_X(cat, VCOS_LOG_WARN, fmt, __VA_ARGS__) -# define vcos_logc_info(cat,fmt,...) _VCOS_LOG_X(cat, VCOS_LOG_INFO, fmt, __VA_ARGS__) -# define vcos_logc_trace(cat,fmt,...) _VCOS_LOG_X(cat, VCOS_LOG_TRACE, fmt, __VA_ARGS__) - -# define vcos_log(fmt,...) _VCOS_LOG_X(VCOS_LOG_DFLT_CATEGORY, VCOS_LOG_INFO, fmt, __VA_ARGS__) -# define VCOS_ALERT(fmt,...) _VCOS_LOG_X(VCOS_LOG_DFLT_CATEGORY, VCOS_LOG_ERROR, fmt, __VA_ARGS__) -# define VCOS_TRACE(fmt,...) _VCOS_LOG_X(VCOS_LOG_DFLT_CATEGORY, VCOS_LOG_INFO, fmt, __VA_ARGS__) - -# else /* _MSC_VER >= 1400 */ - -/* do not define these */ - -# endif /* _MSC_VER >= 1400 */ - -#endif - -#if VCOS_HAVE_CMD - -#include "interface/vcos/vcos_cmd.h" - -/* - * These are the log sub-commands. They're exported here for user-mode apps which - * may want to call these, since the "log" command isn't registered for user-mode - * apps (vcdbg for example, has its own log command). - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_log_assert_cmd( VCOS_CMD_PARAM_T *param ); -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_log_set_cmd( VCOS_CMD_PARAM_T *param ); -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_log_status_cmd( VCOS_CMD_PARAM_T *param ); -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_log_test_cmd( VCOS_CMD_PARAM_T *param ); -#endif - -#ifdef __cplusplus -} -#endif -#endif /* VCOS_LOGGING_H */ - - diff --git a/vc/include/interface/vcos/vcos_logging_control.h b/vc/include/interface/vcos/vcos_logging_control.h @@ -1,28 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - diff --git a/vc/include/interface/vcos/vcos_lowlevel_thread.h b/vc/include/interface/vcos/vcos_lowlevel_thread.h @@ -1,129 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - low level thread support -=============================================================================*/ - -#ifndef VCOS_LOWLEVEL_THREAD_H -#define VCOS_LOWLEVEL_THREAD_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#ifndef VCOS_PLATFORM_H -#include "vcos_platform.h" -#endif - -/** - * \file - * - * This defines a low level thread API that is supported by *some* operating systems - * and can be used to construct the regular "joinable thread" API on those operating - * systems. - * - * Most clients will not need to use this code. - * - * \sa vcos_joinable_thread.h - */ - -/** - * \brief Create a thread. - * - * This creates a thread which can be stopped either by returning from the - * entry point function or by calling vcos_llthread_exit from within the entry - * point function. The thread must be cleaned up by calling - * vcos_llthread_delete. vcos_llthread_delete may or may not terminate the - * thread. - * - * The preemptible parameter familiar from Nucleus is removed, as it is unused in - * VideoCore code. Affinity is added, since we do use this. - * - * @param thread Filled in with thread instance - * @param name An optional name for the thread. "" may be used (but - * a name will aid in debugging). - * @param entry Entry point - * @param arg A single argument passed to the entry point function - * @param stack Pointer to stack address - * @param stacksz Size of stack in bytes - * @param priority Priority of task, between VCOS_PRI_LOW and VCOS_PRI_HIGH - * @param affinity CPU affinity - * - * @sa vcos_llthread_terminate vcos_llthread_delete - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_llthread_create(VCOS_LLTHREAD_T *thread, - const char *name, - VCOS_LLTHREAD_ENTRY_FN_T entry, - void *arg, - void *stack, - VCOS_UNSIGNED stacksz, - VCOS_UNSIGNED priority, - VCOS_UNSIGNED affinity, - VCOS_UNSIGNED timeslice, - VCOS_UNSIGNED autostart); - -/** - * \brief Exits the current thread. - */ -VCOSPRE_ void VCOSPOST_ vcos_llthread_exit(void); - -/** - * \brief Delete a thread. This must be called to cleanup after - * vcos_llthread_create. This may or may not terminate the thread. - * It does not clean up any resources that may have been - * allocated by the thread. - */ -VCOSPRE_ void VCOSPOST_ vcos_llthread_delete(VCOS_LLTHREAD_T *thread); - -/** - * \brief Return current lowlevel thread pointer. - */ -VCOS_INLINE_DECL -VCOS_LLTHREAD_T *vcos_llthread_current(void); - -/** - * Resume a thread. - */ -VCOS_INLINE_DECL -void vcos_llthread_resume(VCOS_LLTHREAD_T *thread); - -VCOSPRE_ int VCOSPOST_ vcos_llthread_running(VCOS_LLTHREAD_T *thread); - -/** - * \brief Create a VCOS_LLTHREAD_T for the current thread. This is so we can - * have VCOS_LLTHREAD_Ts even for threads not originally created by VCOS (eg - * the thread that calls vcos_init). - */ -extern VCOS_STATUS_T _vcos_llthread_create_attach(VCOS_LLTHREAD_T *thread); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_mem.h b/vc/include/interface/vcos/vcos_mem.h @@ -1,101 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - memory support -=============================================================================*/ - -#ifndef VCOS_MEM_H -#define VCOS_MEM_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** \file - * - * Memory allocation api (malloc/free equivalents) is for benefit of host - * applications. VideoCore code should use rtos_XXX functions. - * - */ - - -/** Allocate memory - * - * @param size Size of memory to allocate - * @param description Description, to aid in debugging. May be ignored internally on some platforms. - */ -VCOS_INLINE_DECL -void *vcos_malloc(VCOS_UNSIGNED size, const char *description); - -void *vcos_kmalloc(VCOS_UNSIGNED size, const char *description); -void *vcos_kcalloc(VCOS_UNSIGNED num, VCOS_UNSIGNED size, const char *description); - -/** Allocate cleared memory - * - * @param num Number of items to allocate. - * @param size Size of each item in bytes. - * @param description Description, to aid in debugging. May be ignored internally on some platforms. - */ -VCOS_INLINE_DECL -void *vcos_calloc(VCOS_UNSIGNED num, VCOS_UNSIGNED size, const char *description); - -/** Free memory - * - * Free memory that has been allocated. - */ -VCOS_INLINE_DECL -void vcos_free(void *ptr); - -void vcos_kfree(void *ptr); - -/** Allocate aligned memory - * - * Allocate memory aligned on the specified boundary. - * - * @param size Size of memory to allocate - * @param description Description, to aid in debugging. May be ignored internally on some platforms. - */ -VCOS_INLINE_DECL -void *vcos_malloc_aligned(VCOS_UNSIGNED size, VCOS_UNSIGNED align, const char *description); - -/** Return the amount of free heap memory - * - */ -VCOS_INLINE_DECL -unsigned long vcos_get_free_mem(void); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/vc/include/interface/vcos/vcos_mempool.h b/vc/include/interface/vcos/vcos_mempool.h @@ -1,109 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - memory pool support -=============================================================================*/ - -#ifndef VCOS_MEMPOOL_H -#define VCOS_MEMPOOL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** \file - * - * Memory pools - variable sized allocator. - * - * A very basic memory pool API. - * - * This interface is deliberately not thread safe - clients should add - * their own locking, if required. - * - * - * \fixme: Add fixed-size allocator. - * - */ - - -/** Initialize a memory pool. The control data is taken from the memory - * supplied itself. - * - * Note: the dmalloc pool uses the memory supplied for its control - * area. This is probably a bit broken, as it stops you creating - * a pool in some "special" area of memory, while leaving the control - * information in normal memory. - * - * @param pool Pointer to pool object. - * - * @param name Name for the pool. Used for diagnostics. - * - * @param start Starting address. Must be at least 8byte aligned. - * - * @param size Size of pool in bytes. - * - * @return VCOS_SUCCESS if pool was created. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_mempool_create(VCOS_MEMPOOL_T *pool, const char *name, void *start, VCOS_UNSIGNED size); - -/** Allocate some memory from a pool. If no memory is available, it - * returns NULL. - * - * @param pool Pool to allocate from - * @param len Length of memory to allocate - * - */ -VCOS_INLINE_DECL -void *vcos_mempool_alloc(VCOS_MEMPOOL_T *pool, VCOS_UNSIGNED len); - -/** Free some memory back to a pool. - * - * @param pool Pool to return to - * @param mem Memory to return - */ -VCOS_INLINE_DECL -void vcos_mempool_free(VCOS_MEMPOOL_T *pool, void *mem); - -/** Deinitialize a memory pool. - * - * @param pool Pool to return to - */ -VCOS_INLINE_DECL -void vcos_mempool_delete(VCOS_MEMPOOL_T *pool); - -#ifdef __cplusplus -} -#endif -#endif - - - diff --git a/vc/include/interface/vcos/vcos_msgqueue.h b/vc/include/interface/vcos/vcos_msgqueue.h @@ -1,280 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VCOS - packet-like messages, based loosely on those found in TRIPOS. - -In the simple case, only the server thread creates a message queue, and -clients wait for replies on a semaphore. In more complex cases, clients can -also create message queues (not yet implemented). - -Although it's possible for a thread to create multiple queues and listen -on them in turn, if you find yourself doing this it's probably a bug. -=============================================================================*/ - -#ifndef VCOS_MSGQUEUE_H -#define VCOS_MSGQUEUE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "vcos_types.h" -#include "vcos_platform.h" -#include "vcos_blockpool.h" - -/** - * \file - * - * Packet-like messages, based loosely on those found in TRIPOS and - * derivatives thereof. - * - * A task can send a message *pointer* to another task, where it is - * queued on a linked list and the task woken up. The receiving task - * consumes all of the messages on its input queue, and optionally - * sends back replies using the original message memory. - * - * A caller can wait for the reply to a specific message - any other - * messages that arrive in the meantime are queued separately. - * - * - * All messages have a standard common layout, but the payload area can - * be used freely to extend this. - */ - -#define VCOS_MSGQ_MAGIC 0x5147534d - -/** Map the payload portion of a message to a structure pointer. - */ -#define VCOS_MSG_DATA(_msg) (void*)((_msg)->data) - -/** Standard message ids - FIXME - these need to be done properly! */ -#define VCOS_MSG_N_QUIT 1 -#define VCOS_MSG_N_OPEN 2 -#define VCOS_MSG_N_CLOSE 3 -#define VCOS_MSG_N_PRIVATE (1<<20) - -#define VCOS_MSG_REPLY_BIT (1<<31) - -/** Make gnuc compiler be happy about pointer punning */ -#ifdef __GNUC__ -#define __VCOS_MAY_ALIAS __attribute__((__may_alias__)) -#else -#define __VCOS_MAY_ALIAS -#endif - -struct VCOS_MSG_T; - -/* Replies go to one of these objects. - */ -typedef struct VCOS_MSG_WAITER_T -{ - /* When the reply is sent, this function gets called with the - * address of the waiter. - */ - void (*on_reply)(struct VCOS_MSG_WAITER_T *waiter, - struct VCOS_MSG_T *msg); -} VCOS_MSG_WAITER_T; - -/** A single message queue. - */ -typedef struct VCOS_MSGQUEUE_T -{ - VCOS_MSG_WAITER_T waiter; /**< So we can wait on a queue */ - struct VCOS_MSG_T *head; /**< head of linked list of messages waiting on this queue */ - struct VCOS_MSG_T *tail; /**< tail of message queue */ - VCOS_SEMAPHORE_T sem; /**< thread waits on this for new messages */ - VCOS_MUTEX_T lock; /**< locks the messages list */ - int attached; /**< Is this attached to a thread? */ -} VCOS_MSGQUEUE_T; - -/** A single message - */ -typedef struct VCOS_MSG_T -{ - uint32_t magic; /**< Sanity checking */ - uint32_t code; /**< message code */ - struct VCOS_MSG_T *next; /**< next in queue */ - VCOS_THREAD_T *src_thread; /**< for debug */ - struct VCOS_MSG_WAITER_T *waiter; /**< client waiter structure */ - struct VCOS_MSGQ_POOL_T *pool; /**< Pool allocated from, or NULL */ -} VCOS_MSG_T; - -#define MSG_REPLY_BIT (1<<31) - -/** Initialize a VCOS_MSG_T. Can also use vcos_msg_init(). - */ -#define VCOS_MSG_INITIALIZER {VCOS_MSGQ_MAGIC, 0, NULL, NULL, NULL, 0} - -/** A pool of messages. This contains its own waiter and - * semaphore, as well as a blockpool for the actual memory - * management. - * - * When messages are returned to the waiter, it posts the - * semaphore. - * - * When waiting for a message, we just wait on the semaphore. - * When allocating without waiting, we just try-wait on the - * semaphore. - * - * If we managed to claim the semaphore, then by definition - * there must be at least that many free messages in the - * blockpool. - */ -typedef struct VCOS_MSGQ_POOL_T -{ - VCOS_MSG_WAITER_T waiter; - VCOS_BLOCKPOOL_T blockpool; - VCOS_SEMAPHORE_T sem; - uint32_t magic; -} VCOS_MSGQ_POOL_T; - -/** Initalise the library. Normally called from vcos_init(). - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_msgq_init(void); - -/** De-initialise the library. Normally called from vcos_deinit(). - */ -VCOSPRE_ void VCOSPOST_ vcos_msgq_deinit(void); - -/** Send a message. - * - * @param dest Destination message queue - * @param code Message code. - * @param msg Pointer to message to send. Must not go out of scope before - * message is received (do not declare on the stack). - */ -VCOSPRE_ void VCOSPOST_ vcos_msg_send(VCOS_MSGQUEUE_T *dest, uint32_t code, VCOS_MSG_T *msg); - -/** Send a message and wait for a reply. - * - * @param dest Destination message queue - * @param code Message code. - * @param msg Pointer to message to send. May be declared on the stack. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_msg_sendwait(VCOS_MSGQUEUE_T *queue, uint32_t code, VCOS_MSG_T *msg); - -/** Wait for a message on a queue. - */ -VCOSPRE_ VCOS_MSG_T * VCOSPOST_ vcos_msg_wait(VCOS_MSGQUEUE_T *queue); - -/** Peek for a message on this thread's endpoint. If a message is not - * available, NULL is returned. If a message is available it will be - * removed from the endpoint and returned. - */ -VCOSPRE_ VCOS_MSG_T * VCOSPOST_ vcos_msg_peek(VCOS_MSGQUEUE_T *queue); - -/** Send a reply to a message - */ -VCOSPRE_ void VCOSPOST_ vcos_msg_reply(VCOS_MSG_T *msg); - -/** Set the reply queue for a message. When the message is replied-to, it - * will return to the given queue. - * - * @param msg Message - * @param queue Message queue the message should return to - */ -VCOSPRE_ void VCOSPOST_ vcos_msg_set_source(VCOS_MSG_T *msg, VCOS_MSGQUEUE_T *queue); - -/** Initialise a newly allocated message. This only needs to be called - * for messages allocated on the stack, heap or statically. It is not - * needed for messages allocated from a pool. - */ -VCOSPRE_ void VCOSPOST_ vcos_msg_init(VCOS_MSG_T *msg); - -/** Create a message queue to wait on. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_msgq_create(VCOS_MSGQUEUE_T *queue, const char *name); - -/** Destroy a queue - */ -VCOSPRE_ void VCOSPOST_ vcos_msgq_delete(VCOS_MSGQUEUE_T *queue); - -/* - * Message pools - */ - -/** Create a pool of messages. Messages can be allocated from the pool and - * sent to a message queue. Replying to the message will automatically - * free it back to the pool. - * - * The pool is threadsafe. - * - * @param count number of messages in the pool - * @param payload_size maximum message payload size, not including MSG_T. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_msgq_pool_create( - VCOS_MSGQ_POOL_T *pool, - size_t count, - size_t payload_size, - const char *name); - -/** Destroy a message pool. - */ -VCOSPRE_ void VCOSPOST_ vcos_msgq_pool_delete(VCOS_MSGQ_POOL_T *pool); - -/** Allocate a message from a message pool. - * - * Note: - * - * If the alloc fails (returns NULL) then your worker thread has stopped - * servicing requests or your pool is too small for the latency in - * the system. Your best bet to handle this is to fail the call that - * needs to send the message. - * - * The returned message payload area is initialised to zero. - * - * @param pool Pool to allocate from. - * @return Message or NULL if pool exhausted. - */ -VCOSPRE_ VCOS_MSG_T *VCOSPOST_ vcos_msgq_pool_alloc(VCOS_MSGQ_POOL_T *pool); - -/** Wait for a message from a message pool. Waits until a - * message is available in the pool and then allocates it. If - * one is already available, returns immediately. - * - * This call can never fail. - * - * The returned message payload area is initialised to zero. - * - * @param pool Pool to allocate from. - * @return Message - */ -VCOSPRE_ VCOS_MSG_T *VCOSPOST_ vcos_msgq_pool_wait(VCOS_MSGQ_POOL_T *pool); - -/** Explicitly free a message and return it to its pool. - * - * @param msg Message to free. No-op if NULL. - */ -VCOSPRE_ void VCOSPOST_ vcos_msgq_pool_free(VCOS_MSG_T *msg); - -#ifdef __cplusplus -} -#endif -#endif - - diff --git a/vc/include/interface/vcos/vcos_mutex.h b/vc/include/interface/vcos/vcos_mutex.h @@ -1,112 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - mutex public header file -=============================================================================*/ - -#ifndef VCOS_MUTEX_H -#define VCOS_MUTEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file vcos_mutex.h - * - * Mutex API. Mutexes are not re-entrant, as supporting this adds extra code - * that slows down clients which have been written sensibly. - * - * \sa vcos_reentrant_mutex.h - * - */ - -/** Create a mutex. - * - * @param m Filled in with mutex on return - * @param name A non-null name for the mutex, used for diagnostics. - * - * @return VCOS_SUCCESS if mutex was created, or error code. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_mutex_create(VCOS_MUTEX_T *m, const char *name); - -/** Delete the mutex. - */ -VCOS_INLINE_DECL -void vcos_mutex_delete(VCOS_MUTEX_T *m); - -/** - * \brief Wait to claim the mutex. - * - * On most platforms this always returns VCOS_SUCCESS, and so would ideally be - * a void function, however some platforms allow a wait to be interrupted so - * it remains non-void. - * - * Try to obtain the mutex. - * @param m Mutex to wait on - * @return VCOS_SUCCESS - mutex was taken. - * VCOS_EAGAIN - could not take mutex. - */ -#ifndef vcos_mutex_lock -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_mutex_lock(VCOS_MUTEX_T *m); - -/** Release the mutex. - */ -VCOS_INLINE_DECL -void vcos_mutex_unlock(VCOS_MUTEX_T *m); -#endif - -/** Test if the mutex is already locked. - * - * @return 1 if mutex is locked, 0 if it is unlocked. - */ -VCOS_INLINE_DECL -int vcos_mutex_is_locked(VCOS_MUTEX_T *m); - -/** Obtain the mutex if possible. - * - * @param m the mutex to try to obtain - * - * @return VCOS_SUCCESS if mutex is succesfully obtained, or VCOS_EAGAIN - * if it is already in use by another thread. - */ -#ifndef vcos_mutex_trylock -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_mutex_trylock(VCOS_MUTEX_T *m); -#endif - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_named_semaphore.h b/vc/include/interface/vcos/vcos_named_semaphore.h @@ -1,113 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - named semaphores -=============================================================================*/ - -#ifndef VCOS_NAMED_SEMAPHORE_H -#define VCOS_NAMED_SEMAPHORE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file - * - * Create a named semaphore, or open an existing one by name. - * - */ - -/** - * \brief Create a named semaphore. - * - * Semaphores are not re-entrant. - * - * @param sem Pointer to memory to be initialized - * @param name A name for this semaphore. - * @param count The initial count for the semaphore. - * - * @return VCOS_SUCCESS if the semaphore was created. - * - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_named_semaphore_create(VCOS_NAMED_SEMAPHORE_T *sem, const char *name, VCOS_UNSIGNED count); - -/** - * \brief Wait on a named semaphore. - * - * There is no timeout option on a semaphore, as adding this will slow down - * implementations on some platforms. If you need that kind of behaviour, use - * an event group. - * - * This always returns VCOS_SUCCESS and so should really be a void function. However - * too many lines of code would need to be changed in non-trivial ways, so for now - * it is non-void. - * - * @param sem Semaphore to wait on - * @return VCOS_SUCCESS - semaphore was taken. - * - */ -VCOS_INLINE_DECL -void vcos_named_semaphore_wait(VCOS_NAMED_SEMAPHORE_T *sem); - -/** - * \brief Try to wait for a semaphore. - * - * Try to obtain the semaphore. If it is already taken, return VCOS_TIMEOUT. - * @param sem Semaphore to wait on - * @return VCOS_SUCCESS - semaphore was taken. - * VCOS_EAGAIN - could not take semaphore - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_named_semaphore_trywait(VCOS_NAMED_SEMAPHORE_T *sem); - -/** - * \brief Post a semaphore. - * - * @param sem Semaphore to wait on - */ -VCOS_INLINE_DECL -void vcos_named_semaphore_post(VCOS_NAMED_SEMAPHORE_T *sem); - -/** - * \brief Delete a semaphore, releasing any resources consumed by it. - * - * @param sem Semaphore to wait on - */ -void vcos_named_semaphore_delete(VCOS_NAMED_SEMAPHORE_T *sem); - - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_once.h b/vc/include/interface/vcos/vcos_once.h @@ -1,62 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - 'once' -=============================================================================*/ - -#ifndef VCOS_ONCE_H -#define VCOS_ONCE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file vcos_once.h - * - * Ensure something is called only once. - * - * Initialize once_control to VCOS_ONCE_INIT. The first - * time this is called, the init_routine will be called. Thereafter - * it won't. - * - * \sa pthread_once() - * - */ - -VCOS_STATUS_T vcos_once(VCOS_ONCE_T *once_control, - void (*init_routine)(void)); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_queue.h b/vc/include/interface/vcos/vcos_queue.h @@ -1,105 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - Queue public header file -=============================================================================*/ - -#ifndef VCOS_QUEUE_H -#define VCOS_QUEUE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** \file vcos_queue.h - * - * API for accessing a fixed length queue. - * - * Nucleus offers variable length items, but this feature is not used - * in the current code base, so is withdrawn to simplify the API. - */ - -/** Create a fixed length queue. - * - * @param queue Pointer to queue control block - * @param name Name of queue - * @param message_size Size of each queue message item in words (words are sizeof VCOS_UNSIGNED). - * @param queue_start Start address of queue area - * @param queue_size Size in words (words are sizeof VCOS_UNSIGNED) of queue - * - */ - -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_queue_create(VCOS_QUEUE_T *queue, - const char *name, - VCOS_UNSIGNED message_size, - void *queue_start, - VCOS_UNSIGNED queue_size); - -/** Delete a queue. - * @param queue The queue to delete - */ -VCOS_INLINE_DECL -void vcos_queue_delete(VCOS_QUEUE_T *queue); - -/** Send an item to a queue. If there is no space, the call with - * either block waiting for space, or return an error, depending - * on the value of the wait parameter. - * - * @param queue The queue to send to - * @param src The data to send (length set when queue was created) - * @param wait Whether to wait for space (VCOS_SUSPEND) or fail if - * no space (VCOS_NO_SUSPEND). - * - * @return If space available, returns VCOS_SUCCESS. Otherwise returns - * VCOS_EAGAIN if no space available before timeout expires. - * - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_queue_send(VCOS_QUEUE_T *queue, const void *src, VCOS_UNSIGNED wait); - -/** Receive an item from a queue. - * @param queue The queue to receive from - * @param dst Where to write the data to - * @param wait Whether to wait (VCOS_SUSPEND) or fail if - * empty (VCOS_NO_SUSPEND). - * - * @return If an item is available, returns VCOS_SUCCESS. Otherwise returns - * VCOS_EAGAIN if no item available before timeout expires. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_queue_receive(VCOS_QUEUE_T *queue, void *dst, VCOS_UNSIGNED wait); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_quickslow_mutex.h b/vc/include/interface/vcos/vcos_quickslow_mutex.h @@ -1,101 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - mutex public header file -=============================================================================*/ - -#ifndef VCOS_QUICKSLOW_MUTEX_H -#define VCOS_QUICKSLOW_MUTEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file vcos_quickslow_mutex.h - * - * "Quick/Slow" Mutex API. This is a mutex which supports an additional "quick" - * (spinlock-based) locking mechanism. While in this quick locked state, other - * operating system commands will be unavailable and the caller should complete - * whatever it has to do in a short, bounded length of time (as the spinlock - * completely locks out other system activity). - * - * \sa vcos_mutex.h - * - */ - -/** Create a mutex. - * - * @param m Filled in with mutex on return - * @param name A non-null name for the mutex, used for diagnostics. - * - * @return VCOS_SUCCESS if mutex was created, or error code. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_quickslow_mutex_create(VCOS_QUICKSLOW_MUTEX_T *m, const char *name); - -/** Delete the mutex. - */ -VCOS_INLINE_DECL -void vcos_quickslow_mutex_delete(VCOS_QUICKSLOW_MUTEX_T *m); - -/** - * \brief Wait to claim the mutex ("slow" mode). - * - * Obtain the mutex. - */ -VCOS_INLINE_DECL -void vcos_quickslow_mutex_lock(VCOS_QUICKSLOW_MUTEX_T *m); - -/** Release the mutex ("slow" mode). - */ -VCOS_INLINE_DECL -void vcos_quickslow_mutex_unlock(VCOS_QUICKSLOW_MUTEX_T *m); - -/** - * \brief Wait to claim the mutex ("quick" mode). - * - * Obtain the mutex. The caller must not call any OS functions or do anything - * "slow" before the corresponding call to vcos_mutex_quickslow_unlock_quick. - */ -VCOS_INLINE_DECL -void vcos_quickslow_mutex_lock_quick(VCOS_QUICKSLOW_MUTEX_T *m); - -/** Release the mutex ("quick" mode). - */ -VCOS_INLINE_DECL -void vcos_quickslow_mutex_unlock_quick(VCOS_QUICKSLOW_MUTEX_T *m); - - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_reentrant_mutex.h b/vc/include/interface/vcos/vcos_reentrant_mutex.h @@ -1,86 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - reentrant mutex public header file -=============================================================================*/ - -#ifndef VCOS_REENTRANT_MUTEX_H -#define VCOS_REENTRANT_MUTEX_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file - * - * Reentrant Mutex API. You can take one of these mutexes even if you've already - * taken it. Just to make sure. - * - * A re-entrant mutex may be slower on some platforms than a regular one. - * - * \sa vcos_mutex.h - * - */ - -/** Create a mutex. - * - * @param m Filled in with mutex on return - * @param name A non-null name for the mutex, used for diagnostics. - * - * @return VCOS_SUCCESS if mutex was created, or error code. - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_reentrant_mutex_create(VCOS_REENTRANT_MUTEX_T *m, const char *name); - -/** Delete the mutex. - */ -VCOS_INLINE_DECL -void vcos_reentrant_mutex_delete(VCOS_REENTRANT_MUTEX_T *m); - -/** Wait to claim the mutex. Must not have already been claimed by the current thread. - */ -#ifndef vcos_reentrant_mutexlock -VCOS_INLINE_DECL -void vcos_reentrant_mutex_lock(VCOS_REENTRANT_MUTEX_T *m); - -/** Release the mutex. - */ -VCOS_INLINE_DECL -void vcos_reentrant_mutex_unlock(VCOS_REENTRANT_MUTEX_T *m); -#endif - - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_semaphore.h b/vc/include/interface/vcos/vcos_semaphore.h @@ -1,158 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file -=============================================================================*/ - -#ifndef VCOS_SEMAPHORE_H -#define VCOS_SEMAPHORE_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#ifndef VCOS_PLATFORM_H -#include "vcos_platform.h" -#endif - -/** - * \file vcos_semaphore.h - * - * \section sem Semaphores - * - * This provides counting semaphores. Semaphores are not re-entrant. On sensible - * operating systems a semaphore can always be posted but can only be taken in - * thread (not interrupt) context. Under Nucleus, a LISR cannot post a semaphore, - * although it would not be hard to lift this restriction. - * - * \subsection timeout Timeout - * - * On both Nucleus and ThreadX a semaphore can be taken with a timeout. This is - * not supported by VCOS because it makes the non-timeout code considerably more - * complicated (and hence slower). In the unlikely event that you need a timeout - * with a semaphore, and you cannot simply redesign your code to avoid it, use - * an event flag (vcos_event_flags.h). - * - * \subsection sem_nucleus Changes from Nucleus: - * - * Semaphores are always "FIFO" - i.e. sleeping threads are woken in FIFO order. That's - * because: - * \arg there's no support for NU_PRIORITY in threadx (though it can be emulated, slowly) - * \arg we don't appear to actually consciously use it - for example, Dispmanx uses - * it, but all threads waiting are the same priority. - * - */ - -/** - * \brief Create a semaphore. - * - * Create a semaphore. - * - * @param sem Pointer to memory to be initialized - * @param name A name for this semaphore. The name may be truncated internally. - * @param count The initial count for the semaphore. - * - * @return VCOS_SUCCESS if the semaphore was created. - * - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_semaphore_create(VCOS_SEMAPHORE_T *sem, const char *name, VCOS_UNSIGNED count); - -/** - * \brief Wait on a semaphore. - * - * There is no timeout option on a semaphore, as adding this will slow down - * implementations on some platforms. If you need that kind of behaviour, use - * an event group. - * - * On most platforms this always returns VCOS_SUCCESS, and so would ideally be - * a void function, however some platforms allow a wait to be interrupted so - * it remains non-void. - * - * @param sem Semaphore to wait on - * @return VCOS_SUCCESS - semaphore was taken. - * VCOS_EAGAIN - could not take semaphore - * - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_semaphore_wait(VCOS_SEMAPHORE_T *sem); - -/** - * \brief Wait on a semaphore with a timeout. - * - * Note that this function may not be implemented on all - * platforms, and may not be efficient on all platforms - * (see comment in vcos_semaphore_wait) - * - * Try to obtain the semaphore. If it is already taken, return - * VCOS_EAGAIN. - * @param sem Semaphore to wait on - * @param timeout Number of milliseconds to wait before - * returning if the semaphore can't be acquired. - * @return VCOS_SUCCESS - semaphore was taken. - * VCOS_EAGAIN - could not take semaphore (i.e. timeout - * expired) - * VCOS_EINVAL - Some other error (most likely bad - * parameters). - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_semaphore_wait_timeout(VCOS_SEMAPHORE_T *sem, VCOS_UNSIGNED timeout); - -/** - * \brief Try to wait for a semaphore. - * - * Try to obtain the semaphore. If it is already taken, return VCOS_TIMEOUT. - * @param sem Semaphore to wait on - * @return VCOS_SUCCESS - semaphore was taken. - * VCOS_EAGAIN - could not take semaphore - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_semaphore_trywait(VCOS_SEMAPHORE_T *sem); - -/** - * \brief Post a semaphore. - * - * @param sem Semaphore to wait on - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_semaphore_post(VCOS_SEMAPHORE_T *sem); - -/** - * \brief Delete a semaphore, releasing any resources consumed by it. - * - * @param sem Semaphore to wait on - */ -VCOS_INLINE_DECL -void vcos_semaphore_delete(VCOS_SEMAPHORE_T *sem); - -#ifdef __cplusplus -} -#endif -#endif - diff --git a/vc/include/interface/vcos/vcos_stdbool.h b/vc/include/interface/vcos/vcos_stdbool.h @@ -1,47 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef VCOS_STDBOOL_H -#define VCOS_STDBOOL_H - -#ifndef __cplusplus - -#if defined(__STDC__) && (__STDC_VERSION__ >= 199901L) -#include <stdbool.h> -#else -/* sizeof(bool) == 1. hopefully this matches up with c++ (so structures and - * such containing bool are binary compatible), but the c++ standard doesn't - * require sizeof(bool) == 1, so there's no guarantee */ -typedef unsigned char bool; -enum { - false, - true -}; -#endif - -#endif /* __cplusplus */ - -#endif diff --git a/vc/include/interface/vcos/vcos_stdint.h b/vc/include/interface/vcos/vcos_stdint.h @@ -1,107 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCOS_STDINT_H -#define VCOS_STDINT_H - -/** \file - * Attempt to provide the types defined in stdint.h. - * - * Except for use with lcc, this simply includes stdint.h, which should find - * the system/toolchain version if present, otherwise falling back to the - * version in interface/vcos/<platform>. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined (VCMODS_LCC) - -#include <limits.h> - -typedef signed char int8_t; -typedef unsigned char uint8_t; - -typedef signed short int16_t; -typedef unsigned short uint16_t; - -typedef signed long int32_t; -typedef unsigned long uint32_t; - -typedef int32_t intptr_t; -typedef uint32_t uintptr_t; - -typedef int32_t intmax_t; -typedef uint32_t uintmax_t; - -typedef int8_t int_least8_t; -typedef int16_t int_least16_t; -typedef int32_t int_least32_t; -typedef uint8_t uint_least8_t; -typedef uint16_t uint_least16_t; -typedef uint32_t uint_least32_t; - -#define INT8_MIN SCHAR_MIN -#define INT8_MAX SCHAR_MAX -#define UINT8_MAX UCHAR_MAX - -#define INT16_MIN SHRT_MIN -#define INT16_MAX SHRT_MAX -#define UINT16_MAX USHRT_MAX - -#define INT32_MIN LONG_MIN -#define INT32_MAX LONG_MAX -#define UINT32_MAX ULONG_MAX - -#define INTPTR_MIN INT32_MIN -#define INTPTR_MAX INT32_MAX -#define UINTPTR_MAX UINT32_MAX - -#define INTMAX_MIN INT32_MIN -#define INTMAX_MAX INT32_MAX -#define UINTMAX_MAX UINT32_MAX - -/* N.B. 64-bit integer types are not currently supported by lcc. - * However, these symbols are referenced in header files included by files - * compiled by lcc for VCE, so removing them would break the build. - * The solution here then is to define them, as the correct size, but in a - * way that should make them unusable in normal arithmetic operations. - */ -typedef struct { uint32_t a; uint32_t b; } int64_t; -typedef struct { uint32_t a; uint32_t b; } uint64_t; - -#else - -#include <stdint.h> - -#endif - -#ifdef __cplusplus -} -#endif -#endif /* VCOS_STDINT_H */ diff --git a/vc/include/interface/vcos/vcos_string.h b/vc/include/interface/vcos/vcos_string.h @@ -1,129 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file -=============================================================================*/ - -#ifndef VCOS_STRING_H -#define VCOS_STRING_H - -/** - * \file - * - * String functions. - * - */ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -#ifdef __KERNEL__ -#include <linux/string.h> -#else -#include <string.h> -#endif - -/** Case insensitive string comparison. - * - */ - -VCOS_INLINE_DECL -int vcos_strcasecmp(const char *s1, const char *s2); - -VCOS_INLINE_DECL -int vcos_strncasecmp(const char *s1, const char *s2, size_t n); - -VCOSPRE_ int VCOSPOST_ vcos_vsnprintf(char *buf, size_t buflen, const char *fmt, va_list ap); - -VCOSPRE_ int VCOSPOST_ vcos_snprintf(char *buf, size_t buflen, const char *fmt, ...); - -/** Like vsnprintf, except it places the output at the specified offset. - * Output is truncated to fit in buflen bytes, and is guaranteed to be NUL-terminated. - * Returns the string length before/without truncation. - */ -VCOSPRE_ size_t VCOSPOST_ vcos_safe_vsprintf(char *buf, size_t buflen, size_t offset, const char *fmt, va_list ap); - -#define VCOS_SAFE_VSPRINTF(buf, offset, fmt, ap) \ - vcos_safe_vsprintf(buf, sizeof(buf) + ((char (*)[sizeof(buf)])buf - &(buf)), offset, fmt, ap) - -/** Like snprintf, except it places the output at the specified offset. - * Output is truncated to fit in buflen bytes, and is guaranteed to be NUL-terminated. - * Returns the string length before/without truncation. - */ -VCOSPRE_ size_t VCOSPOST_ vcos_safe_sprintf(char *buf, size_t buflen, size_t offset, const char *fmt, ...); - -/* The Metaware compiler currently has a bug in its variadic macro handling which - causes it to append a spurious command to the end of its __VA_ARGS__ data. - Do not use until this has been fixed (and this comment has been deleted). */ - -#define VCOS_SAFE_SPRINTF(buf, offset, ...) \ - vcos_safe_sprintf(buf, sizeof(buf) + ((char (*)[sizeof(buf)])buf - &(buf)), offset, __VA_ARGS__) - -/** Copies string src to dst at the specified offset. - * Output is truncated to fit in dstlen bytes, i.e. the string is at most - * (buflen - 1) characters long. Unlike strncpy, exactly one NUL is written - * to dst, which is always NUL-terminated. - * Returns the string length before/without truncation. - */ -VCOSPRE_ size_t VCOSPOST_ vcos_safe_strcpy(char *dst, const char *src, size_t dstlen, size_t offset); - -#define VCOS_SAFE_STRCPY(dst, src, offset) \ - vcos_safe_strcpy(dst, src, sizeof(dst) + ((char (*)[sizeof(dst)])dst - &(dst)), offset) - -VCOS_STATIC_INLINE -int vcos_strlen(const char *s) { return (int)strlen(s); } - -VCOS_STATIC_INLINE -int vcos_strcmp(const char *s1, const char *s2) { return strcmp(s1,s2); } - -VCOS_STATIC_INLINE -int vcos_strncmp(const char *cs, const char *ct, size_t count) { return strncmp(cs, ct, count); } - -VCOS_STATIC_INLINE -char *vcos_strcpy(char *dst, const char *src) { return strcpy(dst, src); } - -VCOS_STATIC_INLINE -char *vcos_strncpy(char *dst, const char *src, size_t count) { return strncpy(dst, src, count); } - -VCOS_STATIC_INLINE -void *vcos_memcpy(void *dst, const void *src, size_t n) { memcpy(dst, src, n); return dst; } - -VCOS_STATIC_INLINE -void *vcos_memset(void *p, int c, size_t n) { return memset(p, c, n); } - -VCOS_STATIC_INLINE -int vcos_memcmp(const void *ptr1, const void *ptr2, size_t count) { return memcmp(ptr1, ptr2, count); } - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_thread.h b/vc/include/interface/vcos/vcos_thread.h @@ -1,282 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - public header file -=============================================================================*/ - -#ifndef VCOS_THREAD_H -#define VCOS_THREAD_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - -/** - * \file vcos_thread.h - * - * \section thread Threads - * - * Under Nucleus, a thread is created by NU_Create_Task, passing in the stack - * and various other parameters. To stop the thread, NU_Terminate_Thread() and - * NU_Delete_Thread() are called. - * - * Unfortunately it's not possible to emulate this API under some fairly common - * operating systems. Under Windows you can't pass in the stack, and you can't - * safely terminate a thread. - * - * Therefore, an API which is similar to the pthreads API is used instead. This - * API can (mostly) be emulated under all interesting operating systems. - * - * Obviously this makes the code somewhat more complicated on VideoCore than it - * would otherwise be - we end up with an extra mutex per thread, and some code - * that waits for it. The benefit is that we have a single way of creating - * threads that works consistently on all platforms (apart from stack supplying). - * - * \subsection stack Stack - * - * It's still not possible to pass in the stack address, but this can be made - * much more obvious in the API: the relevant function is missing and the - * CPP symbol VCOS_CAN_SET_STACK_ADDR is zero rather than one. - * - * \subsection thr_create Creating a thread - * - * The simplest way to create a thread is with vcos_thread_create() passing in a - * NULL thread parameter argument. To wait for the thread to exit, call - * vcos_thread_join(). - * - * \subsection back Backward compatibility - * - * To ease migration, a "classic" thread creation API is provided for code - * that used to make use of Nucleus, vcos_thread_create_classic(). The - * arguments are not exactly the same, as the PREEMPT parameter is dropped. - * - */ - -#define VCOS_AFFINITY_CPU0 _VCOS_AFFINITY_CPU0 -#define VCOS_AFFINITY_CPU1 _VCOS_AFFINITY_CPU1 -#define VCOS_AFFINITY_MASK _VCOS_AFFINITY_MASK -#define VCOS_AFFINITY_DEFAULT _VCOS_AFFINITY_DEFAULT -#define VCOS_AFFINITY_THISCPU _VCOS_AFFINITY_THISCPU - -/** Report whether or not we have an RTOS at all, and hence the ability to - * create threads. - */ -VCOSPRE_ int VCOSPOST_ vcos_have_rtos(void); - -/** Create a thread. It must be cleaned up by calling vcos_thread_join(). - * - * @param thread Filled in on return with thread - * @param name A name for the thread. May be the empty string. - * @param attrs Attributes; default attributes will be used if this is NULL. - * @param entry Entry point. - * @param arg Argument passed to the entry point. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_thread_create(VCOS_THREAD_T *thread, - const char *name, - VCOS_THREAD_ATTR_T *attrs, - VCOS_THREAD_ENTRY_FN_T entry, - void *arg); - -/** Exit the thread from within the thread function itself. - * Resources must still be cleaned up via a call to thread_join(). - * - * The thread can also be terminated by simply exiting the thread function. - * - * @param data Data passed to thread_join. May be NULL. - */ -VCOSPRE_ void VCOSPOST_ vcos_thread_exit(void *data); - -/** Wait for a thread to terminate and then clean up its resources. - * - * @param thread Thread to wait for - * @param pData Updated to point at data provided in vcos_thread_exit or exit - * code of thread function. - */ -VCOSPRE_ void VCOSPOST_ vcos_thread_join(VCOS_THREAD_T *thread, - void **pData); - - -/** - * \brief Create a thread using an API similar to the one "traditionally" - * used under Nucleus. - * - * This creates a thread which must be cleaned up by calling vcos_thread_join(). - * The thread cannot be simply terminated (as in Nucleus and ThreadX) as thread - * termination is not universally supported. - * - * @param thread Filled in with thread instance - * @param name An optional name for the thread. NULL or "" may be used (but - * a name will aid in debugging). - * @param entry Entry point - * @param arg A single argument passed to the entry point function - * @param stack Pointer to stack address - * @param stacksz Size of stack in bytes - * @param priaff Priority of task, between VCOS_PRI_LOW and VCOS_PRI_HIGH, ORed with the CPU affinity - * @param autostart If non-zero the thread will start immediately. - * @param timeslice Timeslice (system ticks) for this thread. - * - * @sa vcos_thread_terminate vcos_thread_delete - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_thread_create_classic(VCOS_THREAD_T *thread, - const char *name, - void *(*entry)(void *arg), - void *arg, - void *stack, - VCOS_UNSIGNED stacksz, - VCOS_UNSIGNED priaff, - VCOS_UNSIGNED timeslice, - VCOS_UNSIGNED autostart); - -/** - * \brief Set a thread's priority - * - * Set the priority for a thread. - * - * @param thread The thread - * @param pri Thread priority in VCOS_PRI_MASK bits; affinity in VCOS_AFFINITY_MASK bits. - */ -VCOS_INLINE_DECL -void vcos_thread_set_priority(VCOS_THREAD_T *thread, VCOS_UNSIGNED pri); - -/** - * \brief Return the currently executing thread. - * - */ -VCOS_INLINE_DECL -VCOS_THREAD_T *vcos_thread_current(void); - -/** - * \brief Return the thread's priority. - */ -VCOS_INLINE_DECL -VCOS_UNSIGNED vcos_thread_get_priority(VCOS_THREAD_T *thread); - -/** - * \brief Return the thread's cpu affinity. - */ -VCOS_INLINE_DECL -VCOS_UNSIGNED vcos_thread_get_affinity(VCOS_THREAD_T *thread); - -/** - * \brief Set the thread's cpu affinity. - */ - -VCOS_INLINE_DECL -void vcos_thread_set_affinity(VCOS_THREAD_T *thread, VCOS_UNSIGNED affinity); - -/** - * \brief Query whether we are in an interrupt. - * - * @return 1 if in interrupt context. - */ -VCOS_INLINE_DECL -int vcos_in_interrupt(void); - -/** - * \brief Sleep a while. - * - * @param ms Number of milliseconds to sleep for - * - * This may actually sleep a whole number of ticks. - */ -VCOS_INLINE_DECL -void vcos_sleep(uint32_t ms); - -/** - * \brief Return the value of the hardware microsecond counter. - * - */ -VCOS_INLINE_DECL -uint32_t vcos_getmicrosecs(void); - -VCOS_INLINE_DECL -uint64_t vcos_getmicrosecs64(void); - -#define vcos_get_ms() (vcos_getmicrosecs()/1000) - -/** - * \brief Return a unique identifier for the current process - * - */ -VCOS_INLINE_DECL -VCOS_UNSIGNED vcos_process_id_current(void); - -/** Relinquish this time slice. */ -VCOS_INLINE_DECL -void vcos_thread_relinquish(void); - -/** Return the name of the given thread. - */ -VCOSPRE_ const char * VCOSPOST_ vcos_thread_get_name(const VCOS_THREAD_T *thread); - -/** Change preemption. This is almost certainly not what you want, as it won't - * work reliably in a multicore system: although you can affect the preemption - * on *this* core, you won't affect what's happening on the other core(s). - * - * It's mainly here to ease migration. If you're using it in new code, you - * probably need to think again. - * - * @param pe New preemption, VCOS_PREEMPT or VCOS_NO_PREEMPT - * @return Old value of preemption. - */ -VCOS_INLINE_DECL -VCOS_UNSIGNED vcos_change_preemption(VCOS_UNSIGNED pe); - -/** Is a thread still running, or has it exited? - * - * Note: this exists for some fairly scary code in the video codec tests. Don't - * try to use it for anything else, as it may well not do what you expect. - * - * @param thread thread to query - * @return non-zero if thread is running, or zero if it has exited. - */ -VCOS_INLINE_DECL -int vcos_thread_running(VCOS_THREAD_T *thread); - -/** Resume a thread. - * - * @param thread thread to resume - */ -VCOS_INLINE_DECL -void vcos_thread_resume(VCOS_THREAD_T *thread); - -/* - * Internal APIs - may not always be present and should not be used in - * client code. - */ - -extern void _vcos_task_timer_set(void (*pfn)(void*), void *, VCOS_UNSIGNED ms); -extern void _vcos_task_timer_cancel(void); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_thread_attr.h b/vc/include/interface/vcos/vcos_thread_attr.h @@ -1,96 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - thread attributes -=============================================================================*/ - -#ifndef VCOS_THREAD_ATTR_H -#define VCOS_THREAD_ATTR_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \file - * - * Attributes for thread creation. - * - */ - -/** Initialize thread attribute struct. This call does not allocate memory, - * and so cannot fail. - * - */ -VCOSPRE_ void VCOSPOST_ vcos_thread_attr_init(VCOS_THREAD_ATTR_T *attrs); - -/** Set the stack address and size. If not set, a stack will be allocated automatically. - * - * This can only be set on some platforms. It will always be possible to set the stack - * address on VideoCore, but on host platforms, support may well not be available. - */ -#if VCOS_CAN_SET_STACK_ADDR -VCOS_INLINE_DECL -void vcos_thread_attr_setstack(VCOS_THREAD_ATTR_T *attrs, void *addr, VCOS_UNSIGNED sz); -#endif - -/** Set the stack size. If not set, a default size will be used. Attempting to call this after having - * set the stack location with vcos_thread_attr_setstack() will result in undefined behaviour. - */ -VCOS_INLINE_DECL -void vcos_thread_attr_setstacksize(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED sz); - -/** Set the task priority. If not set, a default value will be used. - */ -VCOS_INLINE_DECL -void vcos_thread_attr_setpriority(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED pri); - -/** Set the task cpu affinity. If not set, the default will be used. - */ -VCOS_INLINE_DECL -void vcos_thread_attr_setaffinity(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED aff); - -/** Set the timeslice. If not set the default will be used. - */ -VCOS_INLINE_DECL -void vcos_thread_attr_settimeslice(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED ts); - -/** The thread entry function takes (argc,argv), as per Nucleus, with - * argc being 0. This may be withdrawn in a future release and should not - * be used in new code. - */ -VCOS_INLINE_DECL -void _vcos_thread_attr_setlegacyapi(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED legacy); - -VCOS_INLINE_DECL -void vcos_thread_attr_setautostart(VCOS_THREAD_ATTR_T *attrs, VCOS_UNSIGNED autostart); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_timer.h b/vc/include/interface/vcos/vcos_timer.h @@ -1,117 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - timer support -=============================================================================*/ - -#ifndef VCOS_TIMER_H -#define VCOS_TIMER_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#ifndef VCOS_PLATFORM_H -#include "vcos_platform.h" -#endif - -/** \file vcos_timer.h - * - * Timers are single shot. - * - * Timer times are in milliseconds. - * - * \note that timer callback functions are called from an arbitrary thread - * context. The expiration function should do its work as quickly as possible; - * blocking should be avoided. - * - * \note On Windows, the separate function vcos_timer_init() must be called - * as timer initialization from DllMain is not possible. - */ - -/** Perform timer subsystem initialization. This function is not needed - * on non-Windows platforms but is still present so that it can be - * called. On Windows it is needed because vcos_init() gets called - * from DLL initialization where it is not possible to create a - * time queue (deadlock occurs if you try). - * - * @return VCOS_SUCCESS on success. VCOS_EEXIST if this has already been called - * once. VCOS_ENOMEM if resource allocation failed. - */ -VCOSPRE_ VCOS_STATUS_T VCOSPOST_ vcos_timer_init(void); - -/** Create a timer in a disabled state. - * - * The timer is initially disabled. - * - * @param timer timer handle - * @param name name for timer - * @param expiration_routine function to call when timer expires - * @param context context passed to expiration routine - * - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_timer_create(VCOS_TIMER_T *timer, - const char *name, - void (*expiration_routine)(void *context), - void *context); - - - -/** Start a timer running. - * - * Timer must be stopped. - * - * @param timer timer handle - * @param delay Delay to wait for, in ms - */ -VCOS_INLINE_DECL -void vcos_timer_set(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay); - -/** Stop an already running timer. - * - * @param timer timer handle - */ -VCOS_INLINE_DECL -void vcos_timer_cancel(VCOS_TIMER_T *timer); - -/** Stop a timer and restart it. - * @param timer timer handle - * @param delay delay in ms - */ -VCOS_INLINE_DECL -void vcos_timer_reset(VCOS_TIMER_T *timer, VCOS_UNSIGNED delay); - -VCOS_INLINE_DECL -void vcos_timer_delete(VCOS_TIMER_T *timer); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/vc/include/interface/vcos/vcos_tls.h b/vc/include/interface/vcos/vcos_tls.h @@ -1,84 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - thread local storage -=============================================================================*/ - -#ifndef VCOS_TLS_H -#define VCOS_TLS_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "interface/vcos/vcos_types.h" -#include "vcos_platform.h" - - -/** Create a new thread local storage data key visible to all threads in - * the current process. - * - * @param key The key to create - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_tls_create(VCOS_TLS_KEY_T *key); - -/** Delete an existing TLS data key. - */ -VCOS_INLINE_DECL -void vcos_tls_delete(VCOS_TLS_KEY_T tls); - -/** Set the value seen by the current thread. - * - * @param key The key to update - * @param v The value to set for the current thread. - * - * @return VCOS_SUCCESS, or VCOS_ENOMEM if memory for this slot - * could not be allocated. - * - * If TLS is being emulated via VCOS then the memory required - * can be preallocated at thread creation time - */ -VCOS_INLINE_DECL -VCOS_STATUS_T vcos_tls_set(VCOS_TLS_KEY_T tls, void *v); - -/** Get the value for the current thread. - * - * @param key The key to update - * - * @return The current value for this thread. - */ -VCOS_INLINE_DECL -void *vcos_tls_get(VCOS_TLS_KEY_T tls); - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/vc/include/interface/vcos/vcos_types.h b/vc/include/interface/vcos/vcos_types.h @@ -1,283 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -VideoCore OS Abstraction Layer - basic types -=============================================================================*/ - -#ifndef VCOS_TYPES_H -#define VCOS_TYPES_H - -#define VCOS_VERSION 1 - -#include <stddef.h> -#include "vcos_platform_types.h" -#include "interface/vcos/vcos_attr.h" - -#if !defined(VCOSPRE_) || !defined(VCOSPOST_) -#error VCOSPRE_ and VCOSPOST_ not defined! -#endif - -/* Redefine these here; this means that existing header files can carry on - * using the VCHPOST/VCHPRE macros rather than having huge changes, which - * could cause nasty merge problems. - */ -#ifndef VCHPOST_ -#define VCHPOST_ VCOSPOST_ -#endif -#ifndef VCHPRE_ -#define VCHPRE_ VCOSPRE_ -#endif - -/** Entry function for a lowlevel thread. - * - * Returns void for consistency with Nucleus/ThreadX. - */ -typedef void (*VCOS_LLTHREAD_ENTRY_FN_T)(void *); - -/** Thread entry point. Returns a void* for consistency - * with pthreads. - */ -typedef void *(*VCOS_THREAD_ENTRY_FN_T)(void*); - - -/* Error return codes - chosen to be similar to errno values */ -typedef enum -{ - VCOS_SUCCESS, - VCOS_EAGAIN, - VCOS_ENOENT, - VCOS_ENOSPC, - VCOS_EINVAL, - VCOS_EACCESS, - VCOS_ENOMEM, - VCOS_ENOSYS, - VCOS_EEXIST, - VCOS_ENXIO, - VCOS_EINTR -} VCOS_STATUS_T; - -/* Some compilers (MetaWare) won't inline with -g turned on, which then results - * in a lot of code bloat. To overcome this, inline functions are forward declared - * with the prefix VCOS_INLINE_DECL, and implemented with the prefix VCOS_INLINE_IMPL. - * - * That then means that in a release build, "static inline" can be used in the obvious - * way, but in a debug build the implementations can be skipped in all but one file, - * by using VCOS_INLINE_BODIES. - * - * VCOS_INLINE_DECL - put this at the start of an inline forward declaration of a VCOS - * function. - * - * VCOS_INLINE_IMPL - put this at the start of an inlined implementation of a VCOS - * function. - * - */ - -/* VCOS_EXPORT - it turns out that in some circumstances we need the implementation of - * a function even if it is usually inlined. - * - * In particular, if we have a codec that is usually provided in object form, if it - * was built for a debug build it will be full of calls to vcos_XXX(). If this is used - * in a *release* build, then there won't be any of these calls around in the main image - * as they will all have been inlined. The problem also exists for vcos functions called - * from assembler. - * - * VCOS_EXPORT ensures that the named function will be emitted as a regular (not static-inline) - * function inside vcos_<platform>.c so that it can be linked against. Doing this for every - * VCOS function would be a bit code-bloat-tastic, so it is only done for those that need it. - * - */ - -#ifdef __cplusplus -#define _VCOS_INLINE inline -#else -#define _VCOS_INLINE __inline -#endif - -#if defined(NDEBUG) - -#ifdef __GNUC__ -# define VCOS_INLINE_DECL extern __inline__ -# define VCOS_INLINE_IMPL static __inline__ -#else -# define VCOS_INLINE_DECL static _VCOS_INLINE /* declare a func */ -# define VCOS_INLINE_IMPL static _VCOS_INLINE /* implement a func inline */ -#endif - -# if defined(VCOS_WANT_IMPL) -# define VCOS_EXPORT -# else -# define VCOS_EXPORT VCOS_INLINE_IMPL -# endif /* VCOS_WANT_IMPL */ - -#define VCOS_INLINE_BODIES - -#else /* NDEBUG */ - -#if !defined(VCOS_INLINE_DECL) - #define VCOS_INLINE_DECL extern -#endif -#if !defined(VCOS_INLINE_IMPL) - #define VCOS_INLINE_IMPL -#endif -#define VCOS_EXPORT VCOS_INLINE_IMPL -#endif - -#define VCOS_STATIC_INLINE static _VCOS_INLINE - -#if defined(__HIGHC__) || defined(__HIGHC_ANSI__) -#define _VCOS_METAWARE -#endif - -/** It seems that __FUNCTION__ isn't standard! - */ -#if __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 || defined(__VIDEOCORE__) -# define VCOS_FUNCTION __FUNCTION__ -# else -# define VCOS_FUNCTION "<unknown>" -# endif -#else -# define VCOS_FUNCTION __func__ -#endif - -#define _VCOS_MS_PER_TICK (1000/VCOS_TICKS_PER_SECOND) - -/* Convert a number of milliseconds to a tick count. Internal use only - fails to - * convert VCOS_SUSPEND correctly. - */ -#define _VCOS_MS_TO_TICKS(ms) (((ms)+_VCOS_MS_PER_TICK-1)/_VCOS_MS_PER_TICK) - -#define VCOS_TICKS_TO_MS(ticks) ((ticks) * _VCOS_MS_PER_TICK) - -/** VCOS version of DATESTR, from pcdisk.h. Used by the hostreq service. - */ -typedef struct vcos_datestr -{ - uint8_t cmsec; /**< Centesimal mili second */ - uint16_t date; /**< Date */ - uint16_t time; /**< Time */ - -} VCOS_DATESTR; - -/* Compile-time assert - declares invalid array length if condition - * not met, or array of length one if OK. - */ -#define VCOS_CASSERT(e) extern char vcos_compile_time_check[1/(e)] - -#define vcos_min(x,y) ((x) < (y) ? (x) : (y)) -#define vcos_max(x,y) ((x) > (y) ? (x) : (y)) - -/** Return the count of an array. FIXME: under gcc we could make - * this report an error for pointers using __builtin_types_compatible(). - */ -#define vcos_countof(x) (sizeof((x)) / sizeof((x)[0])) - -/* for backward compatibility */ -#define countof(x) (sizeof((x)) / sizeof((x)[0])) - -#define VCOS_ALIGN_DOWN(p,n) (((ptrdiff_t)(p)) & ~((n)-1)) -#define VCOS_ALIGN_UP(p,n) VCOS_ALIGN_DOWN((ptrdiff_t)(p)+(n)-1,(n)) - -#ifdef _MSC_VER - #define vcos_alignof(T) __alignof(T) -#elif defined(__GNUC__) - #define vcos_alignof(T) __alignof__(T) -#else - #define vcos_alignof(T) (sizeof(struct { T t; char ch; }) - sizeof(T)) -#endif - -/** bool_t is not a POSIX type so cannot rely on it. Define it here. - * It's not even defined in stdbool.h. - */ -typedef int32_t vcos_bool_t; -typedef int32_t vcos_fourcc_t; - -#define VCOS_FALSE 0 -#define VCOS_TRUE (!VCOS_FALSE) - -/** Mark unused arguments to keep compilers quiet */ -#define vcos_unused(x) (void)(x) - -/** For backward compatibility */ -typedef vcos_fourcc_t fourcc_t; -typedef vcos_fourcc_t FOURCC_T; - -#ifdef __cplusplus -#define VCOS_EXTERN_C_BEGIN extern "C" { -#define VCOS_EXTERN_C_END } -#else -#define VCOS_EXTERN_C_BEGIN -#define VCOS_EXTERN_C_END -#endif - -/** Variable attribute indicating the variable must be emitted even if it appears unused. */ -#if defined(__GNUC__) || defined(_VCOS_METAWARE) -# define VCOS_ATTR_USED __attribute__ ((used)) -#else -# define VCOS_ATTR_USED -#endif - -/** Variable attribute requiring specific alignment. */ -#if defined(__GNUC__) || defined(_VCOS_METAWARE) -# define VCOS_ATTR_ALIGNED(n) __attribute__ ((aligned(n))) -#else -# define VCOS_ATTR_ALIGNED(n) -#endif - -/** Define a function as a weak alias to another function. - * @param ret_type Function return type. - * @param alias_name Name of the alias. - * @param param_list Function parameter list, including the parentheses. - * @param target_name Target function (bare function name, not a string). - */ -#if defined(__GNUC__) || defined(_VCOS_METAWARE) - /* N.B. gcc allows __attribute__ after parameter list, but hcvc seems to silently ignore it. */ -# define VCOS_WEAK_ALIAS(ret_type, alias_name, param_list, target_name) \ - __attribute__ ((weak, alias(#target_name))) ret_type alias_name param_list -#else -# define VCOS_WEAK_ALIAS(ret_type, alias, params, target) VCOS_CASSERT(0) -#endif - -/** Define a function as a weak alias to another function, specified as a string. - * @param ret_type Function return type. - * @param alias_name Name of the alias. - * @param param_list Function parameter list, including the parentheses. - * @param target_name Target function name as a string. - * @note Prefer the use of VCOS_WEAK_ALIAS - it is likely to be more portable. - * Only use VCOS_WEAK_ALIAS_STR if you need to do pre-processor mangling of the target - * symbol. - */ -#if defined(__GNUC__) || defined(_VCOS_METAWARE) - /* N.B. gcc allows __attribute__ after parameter list, but hcvc seems to silently ignore it. */ -# define VCOS_WEAK_ALIAS_STR(ret_type, alias_name, param_list, target_name) \ - __attribute__ ((weak, alias(target_name))) ret_type alias_name param_list -#else -# define VCOS_WEAK_ALIAS_STR(ret_type, alias, params, target) VCOS_CASSERT(0) -#endif - -#endif diff --git a/vc/include/interface/vctypes/vc_display_types.h b/vc/include/interface/vctypes/vc_display_types.h @@ -1,114 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*============================================================================= -Common image types used by the vc_image library. -=============================================================================*/ - -#ifndef INTERFACE_VC_DISPLAY_TYPES_H -#define INTERFACE_VC_DISPLAY_TYPES_H - -//enums of display input format -typedef enum -{ - VCOS_DISPLAY_INPUT_FORMAT_INVALID = 0, - VCOS_DISPLAY_INPUT_FORMAT_RGB888, - VCOS_DISPLAY_INPUT_FORMAT_RGB565 -} -VCOS_DISPLAY_INPUT_FORMAT_T; - -/** For backward compatibility */ -#define DISPLAY_INPUT_FORMAT_INVALID VCOS_DISPLAY_INPUT_FORMAT_INVALID -#define DISPLAY_INPUT_FORMAT_RGB888 VCOS_DISPLAY_INPUT_FORMAT_RGB888 -#define DISPLAY_INPUT_FORMAT_RGB565 VCOS_DISPLAY_INPUT_FORMAT_RGB565 -typedef VCOS_DISPLAY_INPUT_FORMAT_T DISPLAY_INPUT_FORMAT_T; - -// Enum determining how image data for 3D displays has to be supplied -typedef enum -{ - DISPLAY_3D_UNSUPPORTED = 0, // default - DISPLAY_3D_INTERLEAVED, // For autosteroscopic displays - DISPLAY_3D_SBS_FULL_AUTO, // Side-By-Side, Full Width (also used by some autostereoscopic displays) - DISPLAY_3D_SBS_HALF_HORIZ, // Side-By-Side, Half Width, Horizontal Subsampling (see HDMI spec) - DISPLAY_3D_TB_HALF, // Top-bottom 3D - DISPLAY_3D_FRAME_PACKING, // Frame Packed 3D - DISPLAY_3D_FRAME_SEQUENTIAL, // Output left on even frames and right on odd frames (typically 120Hz) - DISPLAY_3D_FORMAT_MAX -} DISPLAY_3D_FORMAT_T; - -//enums of display types -typedef enum -{ - DISPLAY_INTERFACE_MIN, - DISPLAY_INTERFACE_SMI, - DISPLAY_INTERFACE_DPI, - DISPLAY_INTERFACE_DSI, - DISPLAY_INTERFACE_LVDS, - DISPLAY_INTERFACE_MAX - -} DISPLAY_INTERFACE_T; - -/* display dither setting, used on B0 */ -typedef enum { - DISPLAY_DITHER_NONE = 0, /* default if not set */ - DISPLAY_DITHER_RGB666 = 1, - DISPLAY_DITHER_RGB565 = 2, - DISPLAY_DITHER_RGB555 = 3, - DISPLAY_DITHER_MAX -} DISPLAY_DITHER_T; - -//info struct -typedef struct -{ - //type - DISPLAY_INTERFACE_T type; - //width / height - uint32_t width; - uint32_t height; - //output format - DISPLAY_INPUT_FORMAT_T input_format; - //interlaced? - uint32_t interlaced; - /* output dither setting (if required) */ - DISPLAY_DITHER_T output_dither; - /* Pixel frequency */ - uint32_t pixel_freq; - /* Line rate in lines per second */ - uint32_t line_rate; - // Format required for image data for 3D displays - DISPLAY_3D_FORMAT_T format_3d; - // If display requires PV1 (e.g. DSI1), special config is required in HVS - uint32_t use_pixelvalve_1; - // Set for DSI displays which use video mode. - uint32_t dsi_video_mode; - // Select HVS channel (usually 0). - uint32_t hvs_channel; -} DISPLAY_INFO_T; - -#endif /* __VC_INCLUDE_IMAGE_TYPES_H__ */ - - diff --git a/vc/include/interface/vctypes/vc_image_types.h b/vc/include/interface/vctypes/vc_image_types.h @@ -1,170 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Common image types used by the vc_image library - -#ifndef INTERFACE_VC_IMAGE_TYPES_H -#define INTERFACE_VC_IMAGE_TYPES_H - -/* This file gets included by the VCE compiler, which gets confused - * easily by the VCOS headers. So cannot include vcos.h here. - */ -#include "interface/vcos/vcos_stdint.h" - -/* We have so many rectangle types; let's try to introduce a common one. */ -typedef struct tag_VC_RECT_T { - int32_t x; - int32_t y; - int32_t width; - int32_t height; -} VC_RECT_T; - -struct VC_IMAGE_T; -typedef struct VC_IMAGE_T VC_IMAGE_T; - -/* Types of image supported. */ -/* Please add any new types to the *end* of this list. Also update - * case_VC_IMAGE_ANY_xxx macros (below), and the vc_image_type_info table in - * vc_image/vc_image_helper.c. - */ -typedef enum -{ - VC_IMAGE_MIN = 0, //bounds for error checking - - VC_IMAGE_RGB565 = 1, - VC_IMAGE_1BPP, - VC_IMAGE_YUV420, - VC_IMAGE_48BPP, - VC_IMAGE_RGB888, - VC_IMAGE_8BPP, - VC_IMAGE_4BPP, // 4bpp palettised image - VC_IMAGE_3D32, /* A separated format of 16 colour/light shorts followed by 16 z values */ - VC_IMAGE_3D32B, /* 16 colours followed by 16 z values */ - VC_IMAGE_3D32MAT, /* A separated format of 16 material/colour/light shorts followed by 16 z values */ - VC_IMAGE_RGB2X9, /* 32 bit format containing 18 bits of 6.6.6 RGB, 9 bits per short */ - VC_IMAGE_RGB666, /* 32-bit format holding 18 bits of 6.6.6 RGB */ - VC_IMAGE_PAL4_OBSOLETE, // 4bpp palettised image with embedded palette - VC_IMAGE_PAL8_OBSOLETE, // 8bpp palettised image with embedded palette - VC_IMAGE_RGBA32, /* RGB888 with an alpha byte after each pixel */ /* xxx: isn't it BEFORE each pixel? */ - VC_IMAGE_YUV422, /* a line of Y (32-byte padded), a line of U (16-byte padded), and a line of V (16-byte padded) */ - VC_IMAGE_RGBA565, /* RGB565 with a transparent patch */ - VC_IMAGE_RGBA16, /* Compressed (4444) version of RGBA32 */ - VC_IMAGE_YUV_UV, /* VCIII codec format */ - VC_IMAGE_TF_RGBA32, /* VCIII T-format RGBA8888 */ - VC_IMAGE_TF_RGBX32, /* VCIII T-format RGBx8888 */ - VC_IMAGE_TF_FLOAT, /* VCIII T-format float */ - VC_IMAGE_TF_RGBA16, /* VCIII T-format RGBA4444 */ - VC_IMAGE_TF_RGBA5551, /* VCIII T-format RGB5551 */ - VC_IMAGE_TF_RGB565, /* VCIII T-format RGB565 */ - VC_IMAGE_TF_YA88, /* VCIII T-format 8-bit luma and 8-bit alpha */ - VC_IMAGE_TF_BYTE, /* VCIII T-format 8 bit generic sample */ - VC_IMAGE_TF_PAL8, /* VCIII T-format 8-bit palette */ - VC_IMAGE_TF_PAL4, /* VCIII T-format 4-bit palette */ - VC_IMAGE_TF_ETC1, /* VCIII T-format Ericsson Texture Compressed */ - VC_IMAGE_BGR888, /* RGB888 with R & B swapped */ - VC_IMAGE_BGR888_NP, /* RGB888 with R & B swapped, but with no pitch, i.e. no padding after each row of pixels */ - VC_IMAGE_BAYER, /* Bayer image, extra defines which variant is being used */ - VC_IMAGE_CODEC, /* General wrapper for codec images e.g. JPEG from camera */ - VC_IMAGE_YUV_UV32, /* VCIII codec format */ - VC_IMAGE_TF_Y8, /* VCIII T-format 8-bit luma */ - VC_IMAGE_TF_A8, /* VCIII T-format 8-bit alpha */ - VC_IMAGE_TF_SHORT,/* VCIII T-format 16-bit generic sample */ - VC_IMAGE_TF_1BPP, /* VCIII T-format 1bpp black/white */ - VC_IMAGE_OPENGL, - VC_IMAGE_YUV444I, /* VCIII-B0 HVS YUV 4:4:4 interleaved samples */ - VC_IMAGE_YUV422PLANAR, /* Y, U, & V planes separately (VC_IMAGE_YUV422 has them interleaved on a per line basis) */ - VC_IMAGE_ARGB8888, /* 32bpp with 8bit alpha at MS byte, with R, G, B (LS byte) */ - VC_IMAGE_XRGB8888, /* 32bpp with 8bit unused at MS byte, with R, G, B (LS byte) */ - - VC_IMAGE_YUV422YUYV, /* interleaved 8 bit samples of Y, U, Y, V */ - VC_IMAGE_YUV422YVYU, /* interleaved 8 bit samples of Y, V, Y, U */ - VC_IMAGE_YUV422UYVY, /* interleaved 8 bit samples of U, Y, V, Y */ - VC_IMAGE_YUV422VYUY, /* interleaved 8 bit samples of V, Y, U, Y */ - - VC_IMAGE_RGBX32, /* 32bpp like RGBA32 but with unused alpha */ - VC_IMAGE_RGBX8888, /* 32bpp, corresponding to RGBA with unused alpha */ - VC_IMAGE_BGRX8888, /* 32bpp, corresponding to BGRA with unused alpha */ - - VC_IMAGE_YUV420SP, /* Y as a plane, then UV byte interleaved in plane with with same pitch, half height */ - - VC_IMAGE_YUV444PLANAR, /* Y, U, & V planes separately 4:4:4 */ - - VC_IMAGE_TF_U8, /* T-format 8-bit U - same as TF_Y8 buf from U plane */ - VC_IMAGE_TF_V8, /* T-format 8-bit U - same as TF_Y8 buf from V plane */ - - VC_IMAGE_MAX, //bounds for error checking - VC_IMAGE_FORCE_ENUM_16BIT = 0xffff, -} VC_IMAGE_TYPE_T; - -/* Image transformations (flips and 90 degree rotations). - These are made out of 3 primitives (transpose is done first). - These must match the DISPMAN and Media Player definitions. */ - -#define TRANSFORM_HFLIP (1<<0) -#define TRANSFORM_VFLIP (1<<1) -#define TRANSFORM_TRANSPOSE (1<<2) - -typedef enum { - VC_IMAGE_ROT0 = 0, - VC_IMAGE_MIRROR_ROT0 = TRANSFORM_HFLIP, - VC_IMAGE_MIRROR_ROT180 = TRANSFORM_VFLIP, - VC_IMAGE_ROT180 = TRANSFORM_HFLIP|TRANSFORM_VFLIP, - VC_IMAGE_MIRROR_ROT90 = TRANSFORM_TRANSPOSE, - VC_IMAGE_ROT270 = TRANSFORM_TRANSPOSE|TRANSFORM_HFLIP, - VC_IMAGE_ROT90 = TRANSFORM_TRANSPOSE|TRANSFORM_VFLIP, - VC_IMAGE_MIRROR_ROT270 = TRANSFORM_TRANSPOSE|TRANSFORM_HFLIP|TRANSFORM_VFLIP, -} VC_IMAGE_TRANSFORM_T; - -typedef enum -{ //defined to be identical to register bits - VC_IMAGE_BAYER_RGGB = 0, - VC_IMAGE_BAYER_GBRG = 1, - VC_IMAGE_BAYER_BGGR = 2, - VC_IMAGE_BAYER_GRBG = 3 -} VC_IMAGE_BAYER_ORDER_T; - -typedef enum -{ //defined to be identical to register bits - VC_IMAGE_BAYER_RAW6 = 0, - VC_IMAGE_BAYER_RAW7 = 1, - VC_IMAGE_BAYER_RAW8 = 2, - VC_IMAGE_BAYER_RAW10 = 3, - VC_IMAGE_BAYER_RAW12 = 4, - VC_IMAGE_BAYER_RAW14 = 5, - VC_IMAGE_BAYER_RAW16 = 6, - VC_IMAGE_BAYER_RAW10_8 = 7, - VC_IMAGE_BAYER_RAW12_8 = 8, - VC_IMAGE_BAYER_RAW14_8 = 9, - VC_IMAGE_BAYER_RAW10L = 11, - VC_IMAGE_BAYER_RAW12L = 12, - VC_IMAGE_BAYER_RAW14L = 13, - VC_IMAGE_BAYER_RAW16_BIG_ENDIAN = 14, - VC_IMAGE_BAYER_RAW4 = 15, -} VC_IMAGE_BAYER_FORMAT_T; - -#endif /* __VC_INCLUDE_IMAGE_TYPES_H__ */ - diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Audio.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Audio.h @@ -1,1391 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** @file OMX_Audio.h - OpenMax IL version 1.1.2 - * The structures needed by Audio components to exchange - * parameters and configuration data with the componenmilts. - */ - -#ifndef OMX_Audio_h -#define OMX_Audio_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Core.h" - -/** @defgroup midi MIDI - * @ingroup audio - */ - -/** @defgroup effects Audio effects - * @ingroup audio - */ - -/** @defgroup audio OpenMAX IL Audio Domain - * Structures for OpenMAX IL Audio domain - * @{ - */ - -/** Enumeration used to define the possible audio codings. - * If "OMX_AUDIO_CodingUnused" is selected, the coding selection must - * be done in a vendor specific way. Since this is for an audio - * processing element this enum is relevant. However, for another - * type of component other enums would be in this area. - */ -typedef enum OMX_AUDIO_CODINGTYPE { - OMX_AUDIO_CodingUnused = 0, /**< Placeholder value when coding is N/A */ - OMX_AUDIO_CodingAutoDetect, /**< auto detection of audio format */ - OMX_AUDIO_CodingPCM, /**< Any variant of PCM coding */ - OMX_AUDIO_CodingADPCM, /**< Any variant of ADPCM encoded data */ - OMX_AUDIO_CodingAMR, /**< Any variant of AMR encoded data */ - OMX_AUDIO_CodingGSMFR, /**< Any variant of GSM fullrate (i.e. GSM610) */ - OMX_AUDIO_CodingGSMEFR, /**< Any variant of GSM Enhanced Fullrate encoded data*/ - OMX_AUDIO_CodingGSMHR, /**< Any variant of GSM Halfrate encoded data */ - OMX_AUDIO_CodingPDCFR, /**< Any variant of PDC Fullrate encoded data */ - OMX_AUDIO_CodingPDCEFR, /**< Any variant of PDC Enhanced Fullrate encoded data */ - OMX_AUDIO_CodingPDCHR, /**< Any variant of PDC Halfrate encoded data */ - OMX_AUDIO_CodingTDMAFR, /**< Any variant of TDMA Fullrate encoded data (TIA/EIA-136-420) */ - OMX_AUDIO_CodingTDMAEFR, /**< Any variant of TDMA Enhanced Fullrate encoded data (TIA/EIA-136-410) */ - OMX_AUDIO_CodingQCELP8, /**< Any variant of QCELP 8kbps encoded data */ - OMX_AUDIO_CodingQCELP13, /**< Any variant of QCELP 13kbps encoded data */ - OMX_AUDIO_CodingEVRC, /**< Any variant of EVRC encoded data */ - OMX_AUDIO_CodingSMV, /**< Any variant of SMV encoded data */ - OMX_AUDIO_CodingG711, /**< Any variant of G.711 encoded data */ - OMX_AUDIO_CodingG723, /**< Any variant of G.723 dot 1 encoded data */ - OMX_AUDIO_CodingG726, /**< Any variant of G.726 encoded data */ - OMX_AUDIO_CodingG729, /**< Any variant of G.729 encoded data */ - OMX_AUDIO_CodingAAC, /**< Any variant of AAC encoded data */ - OMX_AUDIO_CodingMP3, /**< Any variant of MP3 encoded data */ - OMX_AUDIO_CodingSBC, /**< Any variant of SBC encoded data */ - OMX_AUDIO_CodingVORBIS, /**< Any variant of VORBIS encoded data */ - OMX_AUDIO_CodingWMA, /**< Any variant of WMA encoded data */ - OMX_AUDIO_CodingRA, /**< Any variant of RA encoded data */ - OMX_AUDIO_CodingMIDI, /**< Any variant of MIDI encoded data */ - OMX_AUDIO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - -#define OMX_AUDIO_CodingFLAC_Supported 1 - OMX_AUDIO_CodingFLAC, /**< Any variant of FLAC */ -#define OMX_AUDIO_CodingDDP_Supported 1 - OMX_AUDIO_CodingDDP, /**< Any variant of Dolby Digital Plus */ -#define OMX_AUDIO_CodingDTS_Supported 1 - OMX_AUDIO_CodingDTS, /**< Any variant of DTS */ -#define OMX_AUDIO_CodingWMAPRO_Supported 1 - OMX_AUDIO_CodingWMAPRO, /**< Any variant of WMA Professional */ -#define OMX_AUDIO_CodingATRAC3_Supported 1 - OMX_AUDIO_CodingATRAC3, /**< Sony ATRAC-3 variants */ -#define OMX_AUDIO_CodingATRACX_Supported 1 - OMX_AUDIO_CodingATRACX, /**< Sony ATRAC-X variants */ -#define OMX_AUDIO_CodingATRACAAL_Supported 1 - OMX_AUDIO_CodingATRACAAL, /**< Sony ATRAC advanced-lossless variants */ - - OMX_AUDIO_CodingMax = 0x7FFFFFFF -} OMX_AUDIO_CODINGTYPE; - - -/** The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output audio - * path. If additional information is needed to define the parameters of the - * port (such as frequency), additional structures must be sent such as the - * OMX_AUDIO_PARAM_PCMMODETYPE structure to supply the extra parameters for the port. - */ -typedef struct OMX_AUDIO_PORTDEFINITIONTYPE { - OMX_STRING cMIMEType; /**< MIME type of data for the port */ - OMX_NATIVE_DEVICETYPE pNativeRender; /** < platform specific reference - for an output device, - otherwise this field is 0 */ - OMX_BOOL bFlagErrorConcealment; /**< Turns on error concealment if it is - supported by the OMX component */ - OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this - port (e.g. PCM, AMR, MP3, etc) */ -} OMX_AUDIO_PORTDEFINITIONTYPE; - - -/** Port format parameter. This structure is used to enumerate - * the various data input/output format supported by the port. - */ -typedef struct OMX_AUDIO_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Indicates which port to set */ - OMX_U32 nIndex; /**< Indicates the enumeration index for the format from 0x0 to N-1 */ - OMX_AUDIO_CODINGTYPE eEncoding; /**< Type of data expected for this port (e.g. PCM, AMR, MP3, etc) */ -} OMX_AUDIO_PARAM_PORTFORMATTYPE; - - -/** PCM mode type */ -typedef enum OMX_AUDIO_PCMMODETYPE { - OMX_AUDIO_PCMModeLinear = 0, /**< Linear PCM encoded data */ - OMX_AUDIO_PCMModeALaw, /**< A law PCM encoded data (G.711) */ - OMX_AUDIO_PCMModeMULaw, /**< Mu law PCM encoded data (G.711) */ - OMX_AUDIO_PCMModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_PCMModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_PCMModeMax = 0x7FFFFFFF -} OMX_AUDIO_PCMMODETYPE; - - -typedef enum OMX_AUDIO_CHANNELTYPE { - OMX_AUDIO_ChannelNone = 0x0, /**< Unused or empty */ - OMX_AUDIO_ChannelLF = 0x1, /**< Left front */ - OMX_AUDIO_ChannelRF = 0x2, /**< Right front */ - OMX_AUDIO_ChannelCF = 0x3, /**< Center front */ - OMX_AUDIO_ChannelLS = 0x4, /**< Left surround */ - OMX_AUDIO_ChannelRS = 0x5, /**< Right surround */ - OMX_AUDIO_ChannelLFE = 0x6, /**< Low frequency effects */ - OMX_AUDIO_ChannelCS = 0x7, /**< Back surround */ - OMX_AUDIO_ChannelLR = 0x8, /**< Left rear. */ - OMX_AUDIO_ChannelRR = 0x9, /**< Right rear. */ - OMX_AUDIO_ChannelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_ChannelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_ChannelMax = 0x7FFFFFFF -} OMX_AUDIO_CHANNELTYPE; - -#define OMX_AUDIO_MAXCHANNELS 16 /**< maximum number distinct audio channels that a buffer may contain */ -#define OMX_MIN_PCMPAYLOAD_MSEC 5 /**< Minimum audio buffer payload size for uncompressed (PCM) audio */ - -/** PCM format description */ -typedef struct OMX_AUDIO_PARAM_PCMMODETYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels (e.g. 2 for stereo) */ - OMX_NUMERICALDATATYPE eNumData; /**< indicates PCM data as signed or unsigned */ - OMX_ENDIANTYPE eEndian; /**< indicates PCM data as little or big endian */ - OMX_BOOL bInterleaved; /**< True for normal interleaved data; false for - non-interleaved data (e.g. block data) */ - OMX_U32 nBitPerSample; /**< Bit per sample */ - OMX_U32 nSamplingRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_AUDIO_PCMMODETYPE ePCMMode; /**< PCM mode enumeration */ - OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMap[i] */ - -} OMX_AUDIO_PARAM_PCMMODETYPE; - - -/** Audio channel mode. This is used by both AAC and MP3, although the names are more appropriate - * for the MP3. For example, JointStereo for MP3 is CouplingChannels for AAC. - */ -typedef enum OMX_AUDIO_CHANNELMODETYPE { - OMX_AUDIO_ChannelModeStereo = 0, /**< 2 channels, the bitrate allocation between those - two channels changes accordingly to each channel information */ - OMX_AUDIO_ChannelModeJointStereo, /**< mode that takes advantage of what is common between - 2 channels for higher compression gain */ - OMX_AUDIO_ChannelModeDual, /**< 2 mono-channels, each channel is encoded with half - the bitrate of the overall bitrate */ - OMX_AUDIO_ChannelModeMono, /**< Mono channel mode */ - OMX_AUDIO_ChannelModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_ChannelModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_ChannelModeMax = 0x7FFFFFFF -} OMX_AUDIO_CHANNELMODETYPE; - - -typedef enum OMX_AUDIO_MP3STREAMFORMATTYPE { - OMX_AUDIO_MP3StreamFormatMP1Layer3 = 0, /**< MP3 Audio MPEG 1 Layer 3 Stream format */ - OMX_AUDIO_MP3StreamFormatMP2Layer3, /**< MP3 Audio MPEG 2 Layer 3 Stream format */ - OMX_AUDIO_MP3StreamFormatMP2_5Layer3, /**< MP3 Audio MPEG2.5 Layer 3 Stream format */ - OMX_AUDIO_MP3StreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MP3StreamFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MP3StreamFormatMax = 0x7FFFFFFF -} OMX_AUDIO_MP3STREAMFORMATTYPE; - -/** MP3 params */ -typedef struct OMX_AUDIO_PARAM_MP3TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should - limit the audio signal. Use 0 to let encoder decide */ - OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ - OMX_AUDIO_MP3STREAMFORMATTYPE eFormat; /**< MP3 stream format */ -} OMX_AUDIO_PARAM_MP3TYPE; - -typedef enum OMX_AUDIO_DDPBITSTREAMID { - OMX_AUDIO_DDPBitStreamIdAC3 = 8, - OMX_AUDIO_DDPBitStreamIdEAC3 = 16, - OMX_AUDIO_DDPBitStreamIdKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_DDPBitStreamIdVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_DDPBitStreamIdMax = 0x7FFFFFFF -} OMX_AUDIO_DDPBITSTREAMID; - -typedef enum OMX_AUDIO_DDPBITSTREAMMODE { - OMX_AUDIO_DDPBitStreamModeCM = 0, /**< DDP any main audio service: complete main (CM) */ - OMX_AUDIO_DDPBitStreamModeME, /**< DDP any main audio service: music and effects (ME) */ - OMX_AUDIO_DDPBitStreamModeVI, /**< DDP any associated service: visually impaired (VI) */ - OMX_AUDIO_DDPBitStreamModeHI, /**< DDP any associated service: hearing impaired (HI) */ - OMX_AUDIO_DDPBitStreamModeD, /**< DDP any associated service: dialogue (D) */ - OMX_AUDIO_DDPBitStreamModeC, /**< DDP any associated service: commentary (C) */ - OMX_AUDIO_DDPBitStreamModeE, /**< DDP any associated service: emergency (E) */ - OMX_AUDIO_DDPBitStreamModeVO, /**< DDP associated service: voice over (VO) */ - OMX_AUDIO_DDPBitStreamModeK, /**< DDP main audio service: karaoke */ - OMX_AUDIO_DDPBitStreamModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_DDPBitStreamModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_DDPBitStreamModeMax = 0x7FFFFFFF -} OMX_AUDIO_DDPBITSTREAMMODE; - -typedef enum OMX_AUDIO_DDPDOLBYSURROUNDMODE { - OMX_AUDIO_DDPDolbySurroundModeNotIndicated = 0, /**< Not indicated */ - OMX_AUDIO_DDPDolbySurroundModeNotDolbySurround, /**< Not Dolby Surround */ - OMX_AUDIO_DDPDolbySurroundModeDolbySurroundEncoded, /**< Dolby Surround encoded */ - OMX_AUDIO_DDPDolbySurroundModeReserverd, /**< Reserved */ - OMX_AUDIO_DDPDolbySurroundModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_DDPDolbySurroundModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_DDPDolbySurroundModeMax = 0x7FFFFFFF -} OMX_AUDIO_DDPDOLBYSURROUNDMODE; - -/** DDP params */ -typedef struct OMX_AUDIO_PARAM_DDPTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_AUDIO_DDPBITSTREAMID eBitStreamId; - OMX_AUDIO_DDPBITSTREAMMODE eBitStreamMode; - OMX_AUDIO_DDPDOLBYSURROUNDMODE eDolbySurroundMode; - OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMapping[i] */ -} OMX_AUDIO_PARAM_DDPTYPE; - -/** DTS params */ -typedef struct OMX_AUDIO_PARAM_DTSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nDtsType; /** DTS type 1, 2, or 3. */ - OMX_U32 nFormat; /** DTS stream is either big/little endian and 16/14 bit packing */ - OMX_U32 nDtsFrameSizeBytes; /** DTS frame size in bytes */ - OMX_AUDIO_CHANNELTYPE eChannelMapping[OMX_AUDIO_MAXCHANNELS]; /**< Slot i contains channel defined by eChannelMapping[i] */ -} OMX_AUDIO_PARAM_DTSTYPE; - -typedef enum OMX_AUDIO_AACSTREAMFORMATTYPE { - OMX_AUDIO_AACStreamFormatMP2ADTS = 0, /**< AAC Audio Data Transport Stream 2 format */ - OMX_AUDIO_AACStreamFormatMP4ADTS, /**< AAC Audio Data Transport Stream 4 format */ - OMX_AUDIO_AACStreamFormatMP4LOAS, /**< AAC Low Overhead Audio Stream format */ - OMX_AUDIO_AACStreamFormatMP4LATM, /**< AAC Low overhead Audio Transport Multiplex */ - OMX_AUDIO_AACStreamFormatADIF, /**< AAC Audio Data Interchange Format */ - OMX_AUDIO_AACStreamFormatMP4FF, /**< AAC inside MPEG-4/ISO File Format */ - OMX_AUDIO_AACStreamFormatRAW, /**< AAC Raw Format */ - OMX_AUDIO_AACStreamFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AACStreamFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AACStreamFormatMax = 0x7FFFFFFF -} OMX_AUDIO_AACSTREAMFORMATTYPE; - - -/** AAC mode type. Note that the term profile is used with the MPEG-2 - * standard and the term object type and profile is used with MPEG-4 */ -typedef enum OMX_AUDIO_AACPROFILETYPE{ - OMX_AUDIO_AACObjectNull = 0, /**< Null, not used */ - OMX_AUDIO_AACObjectMain = 1, /**< AAC Main object */ - OMX_AUDIO_AACObjectLC, /**< AAC Low Complexity object (AAC profile) */ - OMX_AUDIO_AACObjectSSR, /**< AAC Scalable Sample Rate object */ - OMX_AUDIO_AACObjectLTP, /**< AAC Long Term Prediction object */ - OMX_AUDIO_AACObjectHE, /**< AAC High Efficiency (object type SBR, HE-AAC profile) */ - OMX_AUDIO_AACObjectScalable, /**< AAC Scalable object */ - OMX_AUDIO_AACObjectERLC = 17, /**< ER AAC Low Complexity object (Error Resilient AAC-LC) */ - OMX_AUDIO_AACObjectLD = 23, /**< AAC Low Delay object (Error Resilient) */ - OMX_AUDIO_AACObjectHE_PS = 29, /**< AAC High Efficiency with Parametric Stereo coding (HE-AAC v2, object type PS) */ - OMX_AUDIO_AACObjectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AACObjectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AACObjectMax = 0x7FFFFFFF -} OMX_AUDIO_AACPROFILETYPE; - - -/** AAC tool usage (for nAACtools in OMX_AUDIO_PARAM_AACPROFILETYPE). - * Required for encoder configuration and optional as decoder info output. - * For MP3, OMX_AUDIO_CHANNELMODETYPE is sufficient. */ -#define OMX_AUDIO_AACToolNone 0x00000000 /**< no AAC tools allowed (encoder config) or active (decoder info output) */ -#define OMX_AUDIO_AACToolMS 0x00000001 /**< MS: Mid/side joint coding tool allowed or active */ -#define OMX_AUDIO_AACToolIS 0x00000002 /**< IS: Intensity stereo tool allowed or active */ -#define OMX_AUDIO_AACToolTNS 0x00000004 /**< TNS: Temporal Noise Shaping tool allowed or active */ -#define OMX_AUDIO_AACToolPNS 0x00000008 /**< PNS: MPEG-4 Perceptual Noise substitution tool allowed or active */ -#define OMX_AUDIO_AACToolLTP 0x00000010 /**< LTP: MPEG-4 Long Term Prediction tool allowed or active */ -#define OMX_AUDIO_AACToolAll 0x7FFFFFFF /**< all AAC tools allowed or active (*/ - -/** MPEG-4 AAC error resilience (ER) tool usage (for nAACERtools in OMX_AUDIO_PARAM_AACPROFILETYPE). - * Required for ER encoder configuration and optional as decoder info output */ -#define OMX_AUDIO_AACERNone 0x00000000 /**< no AAC ER tools allowed/used */ -#define OMX_AUDIO_AACERVCB11 0x00000001 /**< VCB11: Virtual Code Books for AAC section data */ -#define OMX_AUDIO_AACERRVLC 0x00000002 /**< RVLC: Reversible Variable Length Coding */ -#define OMX_AUDIO_AACERHCR 0x00000004 /**< HCR: Huffman Codeword Reordering */ -#define OMX_AUDIO_AACERAll 0x7FFFFFFF /**< all AAC ER tools allowed/used */ - - -/** AAC params */ -typedef struct OMX_AUDIO_PARAM_AACPROFILETYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should - limit the audio signal. Use 0 to let encoder decide */ - OMX_U32 nFrameLength; /**< Frame length (in audio samples per channel) of the codec. - Can be 1024 or 960 (AAC-LC), 2048 (HE-AAC), 480 or 512 (AAC-LD). - Use 0 to let encoder decide */ - OMX_U32 nAACtools; /**< AAC tool usage */ - OMX_U32 nAACERtools; /**< MPEG-4 AAC error resilience tool usage */ - OMX_AUDIO_AACPROFILETYPE eAACProfile; /**< AAC profile enumeration */ - OMX_AUDIO_AACSTREAMFORMATTYPE eAACStreamFormat; /**< AAC stream format enumeration */ - OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ -} OMX_AUDIO_PARAM_AACPROFILETYPE; - - -/** VORBIS params */ -typedef struct OMX_AUDIO_PARAM_VORBISTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the encoded data data. Use 0 for variable - rate or unknown bit rates. Encoding is set to the - bitrate closest to specified value (in bps) */ - OMX_U32 nMinBitRate; /**< Sets minimum bitrate (in bps). */ - OMX_U32 nMaxBitRate; /**< Sets maximum bitrate (in bps). */ - - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nAudioBandWidth; /**< Audio band width (in Hz) to which an encoder should - limit the audio signal. Use 0 to let encoder decide */ - OMX_S32 nQuality; /**< Sets encoding quality to n, between -1 (low) and 10 (high). - In the default mode of operation, teh quality level is 3. - Normal quality range is 0 - 10. */ - OMX_BOOL bManaged; /**< Set bitrate management mode. This turns off the - normal VBR encoding, but allows hard or soft bitrate - constraints to be enforced by the encoder. This mode can - be slower, and may also be lower quality. It is - primarily useful for streaming. */ - OMX_BOOL bDownmix; /**< Downmix input from stereo to mono (has no effect on - non-stereo streams). Useful for lower-bitrate encoding. */ -} OMX_AUDIO_PARAM_VORBISTYPE; - - -/** WMA Version */ -typedef enum OMX_AUDIO_WMAFORMATTYPE { - OMX_AUDIO_WMAFormatUnused = 0, /**< format unused or unknown */ - OMX_AUDIO_WMAFormat7, /**< Windows Media Audio format 7 */ - OMX_AUDIO_WMAFormat8, /**< Windows Media Audio format 8 */ - OMX_AUDIO_WMAFormat9, /**< Windows Media Audio format 9 */ - OMX_AUDIO_WMAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_WMAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_WMAFormatMax = 0x7FFFFFFF -} OMX_AUDIO_WMAFORMATTYPE; - - -/** WMA Profile */ -typedef enum OMX_AUDIO_WMAPROFILETYPE { - OMX_AUDIO_WMAProfileUnused = 0, /**< profile unused or unknown */ - OMX_AUDIO_WMAProfileL1, /**< Windows Media audio version 9 profile L1 */ - OMX_AUDIO_WMAProfileL2, /**< Windows Media audio version 9 profile L2 */ - OMX_AUDIO_WMAProfileL3, /**< Windows Media audio version 9 profile L3 */ - OMX_AUDIO_WMAProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_WMAProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_WMAProfileMax = 0x7FFFFFFF -} OMX_AUDIO_WMAPROFILETYPE; - - -/** WMA params */ -typedef struct OMX_AUDIO_PARAM_WMATYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U16 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_AUDIO_WMAFORMATTYPE eFormat; /**< Version of WMA stream / data */ - OMX_AUDIO_WMAPROFILETYPE eProfile; /**< Profile of WMA stream / data */ - OMX_U32 nSamplingRate; /**< Sampling rate of the source data */ - OMX_U16 nBlockAlign; /**< is the block alignment, or block size, in bytes of the audio codec */ - OMX_U16 nEncodeOptions; /**< WMA Type-specific data */ - OMX_U32 nSuperBlockAlign; /**< WMA Type-specific data */ -} OMX_AUDIO_PARAM_WMATYPE; - -/** - * RealAudio format - */ -typedef enum OMX_AUDIO_RAFORMATTYPE { - OMX_AUDIO_RAFormatUnused = 0, /**< Format unused or unknown */ - OMX_AUDIO_RA8, /**< RealAudio 8 codec */ - OMX_AUDIO_RA9, /**< RealAudio 9 codec */ - OMX_AUDIO_RA10_AAC, /**< MPEG-4 AAC codec for bitrates of more than 128kbps */ - OMX_AUDIO_RA10_CODEC, /**< RealAudio codec for bitrates less than 128 kbps */ - OMX_AUDIO_RA10_LOSSLESS, /**< RealAudio Lossless */ - OMX_AUDIO_RA10_MULTICHANNEL, /**< RealAudio Multichannel */ - OMX_AUDIO_RA10_VOICE, /**< RealAudio Voice for bitrates below 15 kbps */ - OMX_AUDIO_RAFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_RAFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_RAFormatMax = 0x7FFFFFFF -} OMX_AUDIO_RAFORMATTYPE; - -/** RA (Real Audio) params */ -typedef struct OMX_AUDIO_PARAM_RATYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nSamplingRate; /**< is the sampling rate of the source data */ - OMX_U32 nBitsPerFrame; /**< is the value for bits per frame */ - OMX_U32 nSamplePerFrame; /**< is the value for samples per frame */ - OMX_U32 nCouplingQuantBits; /**< is the number of coupling quantization bits in the stream */ - OMX_U32 nCouplingStartRegion; /**< is the coupling start region in the stream */ - OMX_U32 nNumRegions; /**< is the number of regions value */ - OMX_AUDIO_RAFORMATTYPE eFormat; /**< is the RealAudio audio format */ -} OMX_AUDIO_PARAM_RATYPE; - - -/** SBC Allocation Method Type */ -typedef enum OMX_AUDIO_SBCALLOCMETHODTYPE { - OMX_AUDIO_SBCAllocMethodLoudness, /**< Loudness allocation method */ - OMX_AUDIO_SBCAllocMethodSNR, /**< SNR allocation method */ - OMX_AUDIO_SBCAllocMethodKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_SBCAllocMethodVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_SBCAllocMethodMax = 0x7FFFFFFF -} OMX_AUDIO_SBCALLOCMETHODTYPE; - - -/** SBC params */ -typedef struct OMX_AUDIO_PARAM_SBCTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ - OMX_U32 nBlocks; /**< Number of blocks */ - OMX_U32 nSubbands; /**< Number of subbands */ - OMX_U32 nBitPool; /**< Bitpool value */ - OMX_BOOL bEnableBitrate; /**< Use bitrate value instead of bitpool */ - OMX_AUDIO_CHANNELMODETYPE eChannelMode; /**< Channel mode enumeration */ - OMX_AUDIO_SBCALLOCMETHODTYPE eSBCAllocType; /**< SBC Allocation method type */ -} OMX_AUDIO_PARAM_SBCTYPE; - - -/** ADPCM stream format parameters */ -typedef struct OMX_AUDIO_PARAM_ADPCMTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_U32 nBitsPerSample; /**< Number of bits in each sample */ - OMX_U32 nSampleRate; /**< Sampling rate of the source data. Use 0 for - variable or unknown sampling rate. */ -} OMX_AUDIO_PARAM_ADPCMTYPE; - - -/** G723 rate */ -typedef enum OMX_AUDIO_G723RATE { - OMX_AUDIO_G723ModeUnused = 0, /**< AMRNB Mode unused / unknown */ - OMX_AUDIO_G723ModeLow, /**< 5300 bps */ - OMX_AUDIO_G723ModeHigh, /**< 6300 bps */ - OMX_AUDIO_G723ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_G723ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_G723ModeMax = 0x7FFFFFFF -} OMX_AUDIO_G723RATE; - - -/** G723 - Sample rate must be 8 KHz */ -typedef struct OMX_AUDIO_PARAM_G723TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_AUDIO_G723RATE eBitRate; /**< todo: Should this be moved to a config? */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ - OMX_BOOL bPostFilter; /**< Enable Post Filter */ -} OMX_AUDIO_PARAM_G723TYPE; - - -/** ITU G726 (ADPCM) rate */ -typedef enum OMX_AUDIO_G726MODE { - OMX_AUDIO_G726ModeUnused = 0, /**< G726 Mode unused / unknown */ - OMX_AUDIO_G726Mode16, /**< 16 kbps */ - OMX_AUDIO_G726Mode24, /**< 24 kbps */ - OMX_AUDIO_G726Mode32, /**< 32 kbps, most common rate, also G721 */ - OMX_AUDIO_G726Mode40, /**< 40 kbps */ - OMX_AUDIO_G726ModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_G726ModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_G726ModeMax = 0x7FFFFFFF -} OMX_AUDIO_G726MODE; - - -/** G.726 stream format parameters - must be at 8KHz */ -typedef struct OMX_AUDIO_PARAM_G726TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_G726MODE eG726Mode; -} OMX_AUDIO_PARAM_G726TYPE; - - -/** G729 coder type */ -typedef enum OMX_AUDIO_G729TYPE { - OMX_AUDIO_G729 = 0, /**< ITU G.729 encoded data */ - OMX_AUDIO_G729A, /**< ITU G.729 annex A encoded data */ - OMX_AUDIO_G729B, /**< ITU G.729 with annex B encoded data */ - OMX_AUDIO_G729AB, /**< ITU G.729 annexes A and B encoded data */ - OMX_AUDIO_G729KhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_G729VendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_G729Max = 0x7FFFFFFF -} OMX_AUDIO_G729TYPE; - - -/** G729 stream format parameters - fixed 6KHz sample rate */ -typedef struct OMX_AUDIO_PARAM_G729TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_AUDIO_G729TYPE eBitType; -} OMX_AUDIO_PARAM_G729TYPE; - - -/** AMR Frame format */ -typedef enum OMX_AUDIO_AMRFRAMEFORMATTYPE { - OMX_AUDIO_AMRFrameFormatConformance = 0, /**< Frame Format is AMR Conformance - (Standard) Format */ - OMX_AUDIO_AMRFrameFormatIF1, /**< Frame Format is AMR Interface - Format 1 */ - OMX_AUDIO_AMRFrameFormatIF2, /**< Frame Format is AMR Interface - Format 2*/ - OMX_AUDIO_AMRFrameFormatFSF, /**< Frame Format is AMR File Storage - Format */ - OMX_AUDIO_AMRFrameFormatRTPPayload, /**< Frame Format is AMR Real-Time - Transport Protocol Payload Format */ - OMX_AUDIO_AMRFrameFormatITU, /**< Frame Format is ITU Format (added at Motorola request) */ - OMX_AUDIO_AMRFrameFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AMRFrameFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AMRFrameFormatMax = 0x7FFFFFFF -} OMX_AUDIO_AMRFRAMEFORMATTYPE; - - -/** AMR band mode */ -typedef enum OMX_AUDIO_AMRBANDMODETYPE { - OMX_AUDIO_AMRBandModeUnused = 0, /**< AMRNB Mode unused / unknown */ - OMX_AUDIO_AMRBandModeNB0, /**< AMRNB Mode 0 = 4750 bps */ - OMX_AUDIO_AMRBandModeNB1, /**< AMRNB Mode 1 = 5150 bps */ - OMX_AUDIO_AMRBandModeNB2, /**< AMRNB Mode 2 = 5900 bps */ - OMX_AUDIO_AMRBandModeNB3, /**< AMRNB Mode 3 = 6700 bps */ - OMX_AUDIO_AMRBandModeNB4, /**< AMRNB Mode 4 = 7400 bps */ - OMX_AUDIO_AMRBandModeNB5, /**< AMRNB Mode 5 = 7950 bps */ - OMX_AUDIO_AMRBandModeNB6, /**< AMRNB Mode 6 = 10200 bps */ - OMX_AUDIO_AMRBandModeNB7, /**< AMRNB Mode 7 = 12200 bps */ - OMX_AUDIO_AMRBandModeWB0, /**< AMRWB Mode 0 = 6600 bps */ - OMX_AUDIO_AMRBandModeWB1, /**< AMRWB Mode 1 = 8850 bps */ - OMX_AUDIO_AMRBandModeWB2, /**< AMRWB Mode 2 = 12650 bps */ - OMX_AUDIO_AMRBandModeWB3, /**< AMRWB Mode 3 = 14250 bps */ - OMX_AUDIO_AMRBandModeWB4, /**< AMRWB Mode 4 = 15850 bps */ - OMX_AUDIO_AMRBandModeWB5, /**< AMRWB Mode 5 = 18250 bps */ - OMX_AUDIO_AMRBandModeWB6, /**< AMRWB Mode 6 = 19850 bps */ - OMX_AUDIO_AMRBandModeWB7, /**< AMRWB Mode 7 = 23050 bps */ - OMX_AUDIO_AMRBandModeWB8, /**< AMRWB Mode 8 = 23850 bps */ - OMX_AUDIO_AMRBandModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AMRBandModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AMRBandModeMax = 0x7FFFFFFF -} OMX_AUDIO_AMRBANDMODETYPE; - - -/** AMR Discontinuous Transmission mode */ -typedef enum OMX_AUDIO_AMRDTXMODETYPE { - OMX_AUDIO_AMRDTXModeOff = 0, /**< AMR Discontinuous Transmission Mode is disabled */ - OMX_AUDIO_AMRDTXModeOnVAD1, /**< AMR Discontinuous Transmission Mode using - Voice Activity Detector 1 (VAD1) is enabled */ - OMX_AUDIO_AMRDTXModeOnVAD2, /**< AMR Discontinuous Transmission Mode using - Voice Activity Detector 2 (VAD2) is enabled */ - OMX_AUDIO_AMRDTXModeOnAuto, /**< The codec will automatically select between - Off, VAD1 or VAD2 modes */ - - OMX_AUDIO_AMRDTXasEFR, /**< DTX as EFR instead of AMR standard (3GPP 26.101, frame type =8,9,10) */ - - OMX_AUDIO_AMRDTXModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_AMRDTXModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_AMRDTXModeMax = 0x7FFFFFFF -} OMX_AUDIO_AMRDTXMODETYPE; - - -/** AMR params */ -typedef struct OMX_AUDIO_PARAM_AMRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels */ - OMX_U32 nBitRate; /**< Bit rate read only field */ - OMX_AUDIO_AMRBANDMODETYPE eAMRBandMode; /**< AMR Band Mode enumeration */ - OMX_AUDIO_AMRDTXMODETYPE eAMRDTXMode; /**< AMR DTX Mode enumeration */ - OMX_AUDIO_AMRFRAMEFORMATTYPE eAMRFrameFormat; /**< AMR frame format enumeration */ -} OMX_AUDIO_PARAM_AMRTYPE; - - -/** GSM_FR (ETSI 06.10, 3GPP 46.010) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_GSMFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_GSMFRTYPE; - - -/** GSM-HR (ETSI 06.20, 3GPP 46.020) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_GSMHRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_GSMHRTYPE; - - -/** GSM-EFR (ETSI 06.60, 3GPP 46.060) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_GSMEFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_GSMEFRTYPE; - - -/** TDMA FR (TIA/EIA-136-420, VSELP 7.95kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_TDMAFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_TDMAFRTYPE; - - -/** TDMA EFR (TIA/EIA-136-410, ACELP 7.4kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_TDMAEFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_TDMAEFRTYPE; - - -/** PDC FR ( RCR-27, VSELP 6.7kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_PDCFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_PDCFRTYPE; - - -/** PDC EFR ( RCR-27, ACELP 6.7kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_PDCEFRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_PDCEFRTYPE; - -/** PDC HR ( RCR-27, PSI-CELP 3.45kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_PDCHRTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_BOOL bDTX; /**< Enable Discontinuous Transmisssion */ - OMX_BOOL bHiPassFilter; /**< Enable High Pass Filter */ -} OMX_AUDIO_PARAM_PDCHRTYPE; - - -/** CDMA Rate types */ -typedef enum OMX_AUDIO_CDMARATETYPE { - OMX_AUDIO_CDMARateBlank = 0, /**< CDMA encoded frame is blank */ - OMX_AUDIO_CDMARateFull, /**< CDMA encoded frame in full rate */ - OMX_AUDIO_CDMARateHalf, /**< CDMA encoded frame in half rate */ - OMX_AUDIO_CDMARateQuarter, /**< CDMA encoded frame in quarter rate */ - OMX_AUDIO_CDMARateEighth, /**< CDMA encoded frame in eighth rate (DTX)*/ - OMX_AUDIO_CDMARateErasure, /**< CDMA erasure frame */ - OMX_AUDIO_CDMARateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_CDMARateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_CDMARateMax = 0x7FFFFFFF -} OMX_AUDIO_CDMARATETYPE; - - -/** QCELP8 (TIA/EIA-96, up to 8kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_QCELP8TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_U32 nBitRate; /**< Bit rate of the input data. Use 0 for variable - rate or unknown bit rates */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */ -} OMX_AUDIO_PARAM_QCELP8TYPE; - - -/** QCELP13 ( CDMA, EIA/TIA-733, 13.3kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_QCELP13TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */ -} OMX_AUDIO_PARAM_QCELP13TYPE; - - -/** EVRC ( CDMA, EIA/TIA-127, RCELP up to 8.55kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_EVRCTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< actual Frame rate */ - OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this frame */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 */ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 */ - OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter */ - OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-processing */ - OMX_BOOL bPostFilter; /**< Enable decoder's post Filter */ -} OMX_AUDIO_PARAM_EVRCTYPE; - - -/** SMV ( up to 8.55kbps coder) stream format parameters */ -typedef struct OMX_AUDIO_PARAM_SMVTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannels; /**< Number of channels in the data stream (not - necessarily the same as the number of channels - to be rendered. */ - OMX_AUDIO_CDMARATETYPE eCDMARate; /**< Frame rate */ - OMX_BOOL bRATE_REDUCon; /**< RATE_REDUCtion is requested for this frame */ - OMX_U32 nMinBitRate; /**< minmal rate for the encoder = 1,2,3,4, default = 1 ??*/ - OMX_U32 nMaxBitRate; /**< maximal rate for the encoder = 1,2,3,4, default = 4 ??*/ - OMX_BOOL bHiPassFilter; /**< Enable encoder's High Pass Filter ??*/ - OMX_BOOL bNoiseSuppressor; /**< Enable encoder's noise suppressor pre-processing */ - OMX_BOOL bPostFilter; /**< Enable decoder's post Filter ??*/ -} OMX_AUDIO_PARAM_SMVTYPE; - - -/** MIDI Format - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDIFORMATTYPE -{ - OMX_AUDIO_MIDIFormatUnknown = 0, /**< MIDI Format unknown or don't care */ - OMX_AUDIO_MIDIFormatSMF0, /**< Standard MIDI File Type 0 */ - OMX_AUDIO_MIDIFormatSMF1, /**< Standard MIDI File Type 1 */ - OMX_AUDIO_MIDIFormatSMF2, /**< Standard MIDI File Type 2 */ - OMX_AUDIO_MIDIFormatSPMIDI, /**< SP-MIDI */ - OMX_AUDIO_MIDIFormatXMF0, /**< eXtensible Music Format type 0 */ - OMX_AUDIO_MIDIFormatXMF1, /**< eXtensible Music Format type 1 */ - OMX_AUDIO_MIDIFormatMobileXMF, /**< Mobile XMF (eXtensible Music Format type 2) */ - OMX_AUDIO_MIDIFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDIFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDIFormatMax = 0x7FFFFFFF -} OMX_AUDIO_MIDIFORMATTYPE; - - -/** MIDI params - * @ingroup midi - */ -typedef struct OMX_AUDIO_PARAM_MIDITYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nFileSize; /**< size of the MIDI file in bytes, where the entire - MIDI file passed in, otherwise if 0x0, the MIDI data - is merged and streamed (instead of passed as an - entire MIDI file) */ - OMX_BU32 sMaxPolyphony; /**< Specifies the maximum simultaneous polyphonic - voices. A value of zero indicates that the default - polyphony of the device is used */ - OMX_BOOL bLoadDefaultSound; /**< Whether to load default sound - bank at initialization */ - OMX_AUDIO_MIDIFORMATTYPE eMidiFormat; /**< Version of the MIDI file */ -} OMX_AUDIO_PARAM_MIDITYPE; - - -/** Type of the MIDI sound bank - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDISOUNDBANKTYPE { - OMX_AUDIO_MIDISoundBankUnused = 0, /**< unused/unknown soundbank type */ - OMX_AUDIO_MIDISoundBankDLS1, /**< DLS version 1 */ - OMX_AUDIO_MIDISoundBankDLS2, /**< DLS version 2 */ - OMX_AUDIO_MIDISoundBankMobileDLSBase, /**< Mobile DLS, using the base functionality */ - OMX_AUDIO_MIDISoundBankMobileDLSPlusOptions, /**< Mobile DLS, using the specification-defined optional feature set */ - OMX_AUDIO_MIDISoundBankKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDISoundBankVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDISoundBankMax = 0x7FFFFFFF -} OMX_AUDIO_MIDISOUNDBANKTYPE; - - -/** Bank Layout describes how bank MSB & LSB are used in the DLS instrument definitions sound bank - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE { - OMX_AUDIO_MIDISoundBankLayoutUnused = 0, /**< unused/unknown soundbank type */ - OMX_AUDIO_MIDISoundBankLayoutGM, /**< GS layout (based on bank MSB 0x00) */ - OMX_AUDIO_MIDISoundBankLayoutGM2, /**< General MIDI 2 layout (using MSB 0x78/0x79, LSB 0x00) */ - OMX_AUDIO_MIDISoundBankLayoutUser, /**< Does not conform to any bank numbering standards */ - OMX_AUDIO_MIDISoundBankLayoutKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDISoundBankLayoutVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDISoundBankLayoutMax = 0x7FFFFFFF -} OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE; - - -/** MIDI params to load/unload user soundbank - * @ingroup midi - */ -typedef struct OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nDLSIndex; /**< DLS file index to be loaded */ - OMX_U32 nDLSSize; /**< Size in bytes */ - OMX_PTR pDLSData; /**< Pointer to DLS file data */ - OMX_AUDIO_MIDISOUNDBANKTYPE eMidiSoundBank; /**< Midi sound bank type enumeration */ - OMX_AUDIO_MIDISOUNDBANKLAYOUTTYPE eMidiSoundBankLayout; /**< Midi sound bank layout enumeration */ -} OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE; - - -/** Structure for Live MIDI events and MIP messages. - * (MIP = Maximum Instantaneous Polyphony; part of the SP-MIDI standard.) - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nMidiEventSize; /**< Size of immediate MIDI events or MIP message in bytes */ - OMX_U8 nMidiEvents[1]; /**< MIDI event array to be rendered immediately, or an - array for the MIP message buffer, where the size is - indicated by nMidiEventSize */ -} OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE; - - -/** MIDI sound bank/ program pair in a given channel - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_U32 nChannel; /**< Valid channel values range from 1 to 16 */ - OMX_U16 nIDProgram; /**< Valid program ID range is 1 to 128 */ - OMX_U16 nIDSoundBank; /**< Sound bank ID */ - OMX_U32 nUserSoundBankIndex;/**< User soundbank index, easier to access soundbanks - by index if multiple banks are present */ -} OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE; - - -/** MIDI control - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDICONTROLTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BS32 sPitchTransposition; /**< Pitch transposition in semitones, stored as Q22.10 - format based on JAVA MMAPI (JSR-135) requirement */ - OMX_BU32 sPlayBackRate; /**< Relative playback rate, stored as Q14.17 fixed-point - number based on JSR-135 requirement */ - OMX_BU32 sTempo ; /**< Tempo in beats per minute (BPM), stored as Q22.10 - fixed-point number based on JSR-135 requirement */ - OMX_U32 nMaxPolyphony; /**< Specifies the maximum simultaneous polyphonic - voices. A value of zero indicates that the default - polyphony of the device is used */ - OMX_U32 nNumRepeat; /**< Number of times to repeat playback */ - OMX_U32 nStopTime; /**< Time in milliseconds to indicate when playback - will stop automatically. Set to zero if not used */ - OMX_U16 nChannelMuteMask; /**< 16 bit mask for channel mute status */ - OMX_U16 nChannelSoloMask; /**< 16 bit mask for channel solo status */ - OMX_U32 nTrack0031MuteMask; /**< 32 bit mask for track mute status. Note: This is for tracks 0-31 */ - OMX_U32 nTrack3263MuteMask; /**< 32 bit mask for track mute status. Note: This is for tracks 32-63 */ - OMX_U32 nTrack0031SoloMask; /**< 32 bit mask for track solo status. Note: This is for tracks 0-31 */ - OMX_U32 nTrack3263SoloMask; /**< 32 bit mask for track solo status. Note: This is for tracks 32-63 */ - -} OMX_AUDIO_CONFIG_MIDICONTROLTYPE; - - -/** MIDI Playback States - * @ingroup midi - */ -typedef enum OMX_AUDIO_MIDIPLAYBACKSTATETYPE { - OMX_AUDIO_MIDIPlayBackStateUnknown = 0, /**< Unknown state or state does not map to - other defined states */ - OMX_AUDIO_MIDIPlayBackStateClosedEngaged, /**< No MIDI resource is currently open. - The MIDI engine is currently processing - MIDI events. */ - OMX_AUDIO_MIDIPlayBackStateParsing, /**< A MIDI resource is open and is being - primed. The MIDI engine is currently - processing MIDI events. */ - OMX_AUDIO_MIDIPlayBackStateOpenEngaged, /**< A MIDI resource is open and primed but - not playing. The MIDI engine is currently - processing MIDI events. The transition to - this state is only possible from the - OMX_AUDIO_MIDIPlayBackStatePlaying state, - when the 'playback head' reaches the end - of media data or the playback stops due - to stop time set.*/ - OMX_AUDIO_MIDIPlayBackStatePlaying, /**< A MIDI resource is open and currently - playing. The MIDI engine is currently - processing MIDI events.*/ - OMX_AUDIO_MIDIPlayBackStatePlayingPartially, /**< Best-effort playback due to SP-MIDI/DLS - resource constraints */ - OMX_AUDIO_MIDIPlayBackStatePlayingSilently, /**< Due to system resource constraints and - SP-MIDI content constraints, there is - no audible MIDI content during playback - currently. The situation may change if - resources are freed later.*/ - OMX_AUDIO_MIDIPlayBackStateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_MIDIPlayBackStateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_MIDIPlayBackStateMax = 0x7FFFFFFF -} OMX_AUDIO_MIDIPLAYBACKSTATETYPE; - - -/** MIDI status - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDISTATUSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U16 nNumTracks; /**< Number of MIDI tracks in the file, read only field. - NOTE: May not return a meaningful value until the entire - file is parsed and buffered. */ - OMX_U32 nDuration; /**< The length of the currently open MIDI resource - in milliseconds. NOTE: May not return a meaningful value - until the entire file is parsed and buffered. */ - OMX_U32 nPosition; /**< Current Position of the MIDI resource being played - in milliseconds */ - OMX_BOOL bVibra; /**< Does Vibra track exist? NOTE: May not return a meaningful - value until the entire file is parsed and buffered. */ - OMX_U32 nNumMetaEvents; /**< Total number of MIDI Meta Events in the currently - open MIDI resource. NOTE: May not return a meaningful value - until the entire file is parsed and buffered. */ - OMX_U32 nNumActiveVoices; /**< Number of active voices in the currently playing - MIDI resource. NOTE: May not return a meaningful value until - the entire file is parsed and buffered. */ - OMX_AUDIO_MIDIPLAYBACKSTATETYPE eMIDIPlayBackState; /**< MIDI playback state enumeration, read only field */ -} OMX_AUDIO_CONFIG_MIDISTATUSTYPE; - - -/** MIDI Meta Event structure one per Meta Event. - * MIDI Meta Events are like audio metadata, except that they are interspersed - * with the MIDI content throughout the file and are not localized in the header. - * As such, it is necessary to retrieve information about these Meta Events from - * the engine, as it encounters these Meta Events within the MIDI content. - * For example, SMF files can have up to 14 types of MIDI Meta Events (copyright, - * author, default tempo, etc.) scattered throughout the file. - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nIndex; /**< Index of Meta Event */ - OMX_U8 nMetaEventType; /**< Meta Event Type, 7bits (i.e. 0 - 127) */ - OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */ - OMX_U32 nTrack; /**< track number for the meta event */ - OMX_U32 nPosition; /**< Position of the meta-event in milliseconds */ -} OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE; - - -/** MIDI Meta Event Data structure - one per Meta Event. - * @ingroup midi - */ -typedef struct OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nIndex; /**< Index of Meta Event */ - OMX_U32 nMetaEventSize; /**< size of the Meta Event in bytes */ - OMX_U8 nData[1]; /**< array of one or more bytes of meta data - as indicated by the nMetaEventSize field */ -} OMX_AUDIO_CONFIG__MIDIMETAEVENTDATATYPE; - - -/** Audio Volume adjustment for a port */ -typedef struct OMX_AUDIO_CONFIG_VOLUMETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's volume. Select the - output port to adjust the master - volume. */ - OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100) - or logarithmic scale (mB) */ - OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range, OR - Volume logarithmic setting for this port. The values - for volume are in mB (millibels = 1/100 dB) relative - to a gain of 1 (e.g. the output is the same as the - input level). Values are in mB from nMax - (maximum volume) to nMin mB (typically negative). - Since the volume is "voltage" - and not a "power", it takes a setting of - -600 mB to decrease the volume by 1/2. If - a component cannot accurately set the - volume to the requested value, it must - set the volume to the closest value BELOW - the requested value. When getting the - volume setting, the current actual volume - must be returned. */ -} OMX_AUDIO_CONFIG_VOLUMETYPE; - - -/** Audio Volume adjustment for a channel */ -typedef struct OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's volume. Select the - output port to adjust the master - volume. */ - OMX_U32 nChannel; /**< channel to select from 0 to N-1, - using OMX_ALL to apply volume settings - to all channels */ - OMX_BOOL bLinear; /**< Is the volume to be set in linear (0.100) or - logarithmic scale (mB) */ - OMX_BS32 sVolume; /**< Volume linear setting in the 0..100 range, OR - Volume logarithmic setting for this port. - The values for volume are in mB - (millibels = 1/100 dB) relative to a gain - of 1 (e.g. the output is the same as the - input level). Values are in mB from nMax - (maximum volume) to nMin mB (typically negative). - Since the volume is "voltage" - and not a "power", it takes a setting of - -600 mB to decrease the volume by 1/2. If - a component cannot accurately set the - volume to the requested value, it must - set the volume to the closest value BELOW - the requested value. When getting the - volume setting, the current actual volume - must be returned. */ - OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel, - FALSE otherwise */ -} OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE; - - -/** Audio balance setting */ -typedef struct OMX_AUDIO_CONFIG_BALANCETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's balance. Select the - output port to adjust the master - balance. */ - OMX_S32 nBalance; /**< balance setting for this port - (-100 to 100, where -100 indicates - all left, and no right */ -} OMX_AUDIO_CONFIG_BALANCETYPE; - - -/** Audio Port mute */ -typedef struct OMX_AUDIO_CONFIG_MUTETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port index indicating which port to - set. Select the input port to set - just that port's mute. Select the - output port to adjust the master - mute. */ - OMX_BOOL bMute; /**< Mute setting for this port */ -} OMX_AUDIO_CONFIG_MUTETYPE; - - -/** Audio Channel mute */ -typedef struct OMX_AUDIO_CONFIG_CHANNELMUTETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nChannel; /**< channel to select from 0 to N-1, - using OMX_ALL to apply mute settings - to all channels */ - OMX_BOOL bMute; /**< Mute setting for this channel */ - OMX_BOOL bIsMIDI; /**< TRUE if nChannel refers to a MIDI channel, - FALSE otherwise */ -} OMX_AUDIO_CONFIG_CHANNELMUTETYPE; - - - -/** Enable / Disable for loudness control, which boosts bass and to a - * smaller extent high end frequencies to compensate for hearing - * ability at the extreme ends of the audio spectrum - */ -typedef struct OMX_AUDIO_CONFIG_LOUDNESSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bLoudness; /**< Enable/disable for loudness */ -} OMX_AUDIO_CONFIG_LOUDNESSTYPE; - - -/** Enable / Disable for bass, which controls low frequencies - */ -typedef struct OMX_AUDIO_CONFIG_BASSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for bass control */ - OMX_S32 nBass; /**< bass setting for the port, as a - continuous value from -100 to 100 - (0 means no change in bass level)*/ -} OMX_AUDIO_CONFIG_BASSTYPE; - - -/** Enable / Disable for treble, which controls high frequencies tones - */ -typedef struct OMX_AUDIO_CONFIG_TREBLETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for treble control */ - OMX_S32 nTreble; /**< treble setting for the port, as a - continuous value from -100 to 100 - (0 means no change in treble level) */ -} OMX_AUDIO_CONFIG_TREBLETYPE; - - -/** An equalizer is typically used for two reasons: to compensate for an - * sub-optimal frequency response of a system to make it sound more natural - * or to create intentionally some unnatural coloring to the sound to create - * an effect. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_EQUALIZERTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for equalizer */ - OMX_BU32 sBandIndex; /**< Band number to be set. Upper Limit is - N-1, where N is the number of bands, lower limit is 0 */ - OMX_BU32 sCenterFreq; /**< Center frequecies in Hz. This is a - read only element and is used to determine - the lower, center and upper frequency of - this band. */ - OMX_BS32 sBandLevel; /**< band level in millibels */ -} OMX_AUDIO_CONFIG_EQUALIZERTYPE; - - -/** Stereo widening mode type - * @ingroup effects - */ -typedef enum OMX_AUDIO_STEREOWIDENINGTYPE { - OMX_AUDIO_StereoWideningHeadphones, /**< Stereo widening for loudspeakers */ - OMX_AUDIO_StereoWideningLoudspeakers, /**< Stereo widening for closely spaced loudspeakers */ - OMX_AUDIO_StereoWideningKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_StereoWideningVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_StereoWideningMax = 0x7FFFFFFF -} OMX_AUDIO_STEREOWIDENINGTYPE; - - -/** Control for stereo widening, which is a special 2-channel - * case of the audio virtualizer effect. For example, for 5.1-channel - * output, it translates to virtual surround sound. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for stereo widening control */ - OMX_AUDIO_STEREOWIDENINGTYPE eWideningType; /**< Stereo widening algorithm type */ - OMX_U32 nStereoWidening; /**< stereo widening setting for the port, - as a continuous value from 0 to 100 */ -} OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE; - - -/** The chorus effect (or ``choralizer'') is any signal processor which makes - * one sound source (such as a voice) sound like many such sources singing - * (or playing) in unison. Since performance in unison is never exact, chorus - * effects simulate this by making independently modified copies of the input - * signal. Modifications may include (1) delay, (2) frequency shift, and - * (3) amplitude modulation. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_CHORUSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for chorus */ - OMX_BU32 sDelay; /**< average delay in milliseconds */ - OMX_BU32 sModulationRate; /**< rate of modulation in millihertz */ - OMX_U32 nModulationDepth; /**< depth of modulation as a percentage of - delay (i.e. 0 to 100) */ - OMX_BU32 nFeedback; /**< Feedback from chorus output to input in percentage */ -} OMX_AUDIO_CONFIG_CHORUSTYPE; - - -/** Reverberation is part of the reflected sound that follows the early - * reflections. In a typical room, this consists of a dense succession of - * echoes whose energy decays exponentially. The reverberation effect structure - * as defined here includes both (early) reflections as well as (late) reverberations. - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_REVERBERATIONTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bEnable; /**< Enable/disable for reverberation control */ - OMX_BS32 sRoomLevel; /**< Intensity level for the whole room effect - (i.e. both early reflections and late - reverberation) in millibels */ - OMX_BS32 sRoomHighFreqLevel; /**< Attenuation at high frequencies - relative to the intensity at low - frequencies in millibels */ - OMX_BS32 sReflectionsLevel; /**< Intensity level of early reflections - (relative to room value), in millibels */ - OMX_BU32 sReflectionsDelay; /**< Delay time of the first reflection relative - to the direct path, in milliseconds */ - OMX_BS32 sReverbLevel; /**< Intensity level of late reverberation - relative to room level, in millibels */ - OMX_BU32 sReverbDelay; /**< Time delay from the first early reflection - to the beginning of the late reverberation - section, in milliseconds */ - OMX_BU32 sDecayTime; /**< Late reverberation decay time at low - frequencies, in milliseconds */ - OMX_BU32 nDecayHighFreqRatio; /**< Ratio of high frequency decay time relative - to low frequency decay time in percent */ - OMX_U32 nDensity; /**< Modal density in the late reverberation decay, - in percent (i.e. 0 - 100) */ - OMX_U32 nDiffusion; /**< Echo density in the late reverberation decay, - in percent (i.e. 0 - 100) */ - OMX_BU32 sReferenceHighFreq; /**< Reference high frequency in Hertz. This is - the frequency used as the reference for all - the high-frequency settings above */ - -} OMX_AUDIO_CONFIG_REVERBERATIONTYPE; - - -/** Possible settings for the Echo Cancelation structure to use - * @ingroup effects - */ -typedef enum OMX_AUDIO_ECHOCANTYPE { - OMX_AUDIO_EchoCanOff = 0, /**< Echo Cancellation is disabled */ - OMX_AUDIO_EchoCanNormal, /**< Echo Cancellation normal operation - - echo from plastics and face */ - OMX_AUDIO_EchoCanHFree, /**< Echo Cancellation optimized for - Hands Free operation */ - OMX_AUDIO_EchoCanCarKit, /**< Echo Cancellation optimized for - Car Kit (longer echo) */ - OMX_AUDIO_EchoCanKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_AUDIO_EchoCanVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_AUDIO_EchoCanMax = 0x7FFFFFFF -} OMX_AUDIO_ECHOCANTYPE; - - -/** Enable / Disable for echo cancelation, which removes undesired echo's - * from the audio - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_AUDIO_ECHOCANTYPE eEchoCancelation; /**< Echo cancelation settings */ -} OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE; - - -/** Enable / Disable for noise reduction, which undesired noise from - * the audio - * @ingroup effects - */ -typedef struct OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BOOL bNoiseReduction; /**< Enable/disable for noise reduction */ -} OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE; - -/** @} */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Broadcom.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Broadcom.h @@ -1,2516 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenMAX IL - Broadcom specific types - -#ifndef OMX_Broadcom_h -#define OMX_Broadcom_h - -#include "OMX_Component.h" - -// for use in buffer headers - marks the contained data -// as being a codec header -#define OMX_BUFFERFLAG_TIME_UNKNOWN 0x00000100 - -//for use in buffer headers - marks the buffer as being the -//snapshot preview image from a still capture. -//Mainly to be used with the DisplayFunction callback from camera. -#define OMX_BUFFERFLAG_CAPTURE_PREVIEW 0x00000200 - -/* Mark the end of a NAL unit produced by a video encoder. - */ -#define OMX_BUFFERFLAG_ENDOFNAL 0x00000400 - -/* Marks pBuffer in OMX_BUFFERHEADERTYPE as containing a fragment list instead of the actual buffer - */ -#define OMX_BUFFERFLAG_FRAGMENTLIST 0x00000800 - -/* Marks the start of a new sequence of data following any kind of seek operation. - */ -#define OMX_BUFFERFLAG_DISCONTINUITY 0x00001000 - -/** Codec side information Flag: -* OMX_BUFFERFLAG_CODECSIDEINFO is an optional flag that is set by an -* output port when all bytes in the buffer form part or all of a set of -* codec specific side information. For example, distortion information -* estimated by H.264 encoder can be sent using this flag to signal -* the decoder quality -*/ -#define OMX_BUFFERFLAG_CODECSIDEINFO 0x00002000 - -// for use in buffer headers - indicated the timestamp is a DTS rather than PTS -#define OMX_BUFFERFLAG_TIME_IS_DTS 0x000004000 - -/** - * Macros to convert to <code>OMX_TICKS</code> from a signed 64 bit value and - * vice-versa. These macros don't actually do anything unless <code>OMX_TICKS</code> - * is defined as a two-part structure (instead of a native signed 64-bit type). - **/ -#ifndef OMX_SKIP64BIT - #define omx_ticks_from_s64(s) (s) - #define omx_ticks_to_s64(t) (t) -#else - static inline OMX_TICKS omx_ticks_from_s64(signed long long s) { OMX_TICKS t; t.nLowPart = (OMX_U32)s; t.nHighPart = (OMX_U32)(s>>32); return t; } - #define omx_ticks_to_s64(t) ((t).nLowPart | ((uint64_t)((t).nHighPart) << 32)) -#endif /* OMX_SKIP64BIT */ - -/* Buffer fragment descriptor */ -typedef struct OMX_BUFFERFRAGMENTTYPE { - OMX_PTR pBuffer; /**< Pointer to actual block of memory that is acting as the fragment buffer */ - OMX_U32 nLen; /**< number of bytes in the buffer */ -} OMX_BUFFERFRAGMENTTYPE; - -/* OMX_IndexParamBrcmEnableIJGTableScaling: JPEG Quality Table Setting. */ -typedef struct OMX_PARAM_IJGSCALINGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; -} OMX_PARAM_IJGSCALINGTYPE; -/* -The boolean \code{bEnabled} value determines whether the component uses -the standard IJG quality tables when encoding images. -*/ - - -/* OMX_IndexConfigTimeInvalidStartTime: Invalid Start Times */ -/* -This allows clock clients to supply a start time notification to the -clock whilst indicating that this time is invalid. -*/ - -/* OMX_IndexParamBrcmMaxFrameSkips: Frame timestamp jumps */ -/* -This number represents the number of times a jump in frame timestamps -has been observed that is greater than expected. -*/ - -/* OMX_IndexConfigAsynchronousFailureURI: Asynchronous Failure Filename */ -/* -This allows the client to query for the filename that cause an asynchronous -output error. -*/ - -/* OMX_IndexParamAsynchronousOutput: Asynchronous Output */ -/* -The allows the client to specify to a component that is writing files -that this writing may happen asynchronously, including opening and closing -of files. -*/ - -/* OMX_IndexConfigClockAdjustment: Clock Adjustment */ -/* -This allows the client to read from the clock the total time -adjustment made to the clock whilst running by the reference clock. -If the reference clock sends a time that causes the media time to jump -this difference is added to the total, which can be reported via this -index. When the stream restarts by setting the clock state to -\code{OMX_TIME_ClockStateRunning} or -\code{OMX_TIME_ClockStateWaitingForStartTime} this adjustment total is -set to zero. -*/ - -/* OMX_IndexParamBrcmDataUnit: Data Unit */ -/* -The data unit is an indication to components connected to this -component of the type of data delivery available. -\code{OMX_DataUnitCodedPicture} indicates that we are able to give -framing information, using the \code{OMX_BUFFERFLAG_ENDOFFRAME} flag to -indicate that the data contained finishes a complete -frame. \code{OMX_DataUnitArbitraryStreamSection} indicates that no -end-of-frame markers will be present, and the decoder should perform -the steps necessary to decode the stream. The other enum values are -not used. -*/ - -/* OMX_IndexConfigPresentationOffset: Presentation Offset */ -/* -The value of \code{nTimestamp} is added to the offset requested for -each new input frame. Takes effect for all new input frames, and has -no effect on the offset used for currently-queued frames. A positive -value will make the requested port earlier relative to other streams, -a negative value will make the requested port later relative to other -streams. -*/ - -/* OMX_IndexConfigSingleStep: Single Step */ -/* -When setting this config on a paused clock, where the \code{nU32} -value is non-zero and \code{nPortIndex} is OMX_ALL, the media clock -will advance through the next \code{nU32} next requested media -times. A paused clock is in running state but has a time scale of -0. This will trigger the display of some video frames, so allowing -single-stepping functionality. This config can be set multiple times, -and will buffer up stepping requests until we have media requests to -fulfil, or the clock is stopped or un-paused. - -This config can also be used on some video output ports and, if -\code{nU32} is non-zero, requests that the output port forwards the -next \code{nU32} frames appending an EOS marker on the last frame, and -then ceases to forward data on this port. If \code{nU32} is zero, any -previous request to forward a limited number of frames is cancelled -and the default behaviour of this port will resume. -*/ - -/* OMX_IndexParamCameraCamplusId: Camera Subsystem Identification */ -/* -This parameter allows the configuration of the identifier to be used -to initialise the Broadcom Camplus subsystem that sits beneath the -camera component. If only one instance of the camera component is -used, the default value can be used. If more than one instance is -required, they must each have their own unique values for this -parameter. It is also used to tie the component to the image pool -created with \code{OMX_Set upCamPools}. -*/ - -/* OMX_IndexConfigAudioRenderingLatency: Audio Rendering Latency */ -/* -This config allows the client to query the current latency of audio -rendering. The latency is returned as the number of samples that -an audio rendering component has received but have not been played. -*/ - -/* OMX_IndexConfigBrcmPoolMemAllocSize: Pool memory usage values */ -/* -This config allows the client to query how much memory is being used by -the component for any image pools. -*/ - -/* OMX_IndexConfigDisplayRegion: Display Region */ -typedef enum OMX_DISPLAYTRANSFORMTYPE{ - OMX_DISPLAY_ROT0 = 0, - OMX_DISPLAY_MIRROR_ROT0 = 1, - OMX_DISPLAY_MIRROR_ROT180 = 2, - OMX_DISPLAY_ROT180 = 3, - OMX_DISPLAY_MIRROR_ROT90 = 4, - OMX_DISPLAY_ROT270 = 5, - OMX_DISPLAY_ROT90 = 6, - OMX_DISPLAY_MIRROR_ROT270 = 7, - OMX_DISPLAY_DUMMY = 0x7FFFFFFF -} OMX_DISPLAYTRANSFORMTYPE; - -typedef struct OMX_DISPLAYRECTTYPE { - OMX_S16 x_offset; - OMX_S16 y_offset; - OMX_S16 width; - OMX_S16 height; -} OMX_DISPLAYRECTTYPE; - -typedef enum OMX_DISPLAYMODETYPE { - OMX_DISPLAY_MODE_FILL = 0, - OMX_DISPLAY_MODE_LETTERBOX = 1, - // these allow a left eye source->dest to be specified and the right eye mapping will be inferred by symmetry - OMX_DISPLAY_MODE_STEREO_LEFT_TO_LEFT = 2, - OMX_DISPLAY_MODE_STEREO_TOP_TO_TOP = 3, - OMX_DISPLAY_MODE_STEREO_LEFT_TO_TOP = 4, - OMX_DISPLAY_MODE_STEREO_TOP_TO_LEFT = 5, - OMX_DISPLAY_MODE_DUMMY = 0x7FFFFFFF -} OMX_DISPLAYMODETYPE; - -typedef enum OMX_DISPLAYSETTYPE { - OMX_DISPLAY_SET_NONE = 0, - OMX_DISPLAY_SET_NUM = 1, - OMX_DISPLAY_SET_FULLSCREEN = 2, - OMX_DISPLAY_SET_TRANSFORM = 4, - OMX_DISPLAY_SET_DEST_RECT = 8, - OMX_DISPLAY_SET_SRC_RECT = 0x10, - OMX_DISPLAY_SET_MODE = 0x20, - OMX_DISPLAY_SET_PIXEL = 0x40, - OMX_DISPLAY_SET_NOASPECT = 0x80, - OMX_DISPLAY_SET_LAYER = 0x100, - OMX_DISPLAY_SET_COPYPROTECT = 0x200, - OMX_DISPLAY_SET_ALPHA = 0x400, - OMX_DISPLAY_SET_DUMMY = 0x7FFFFFFF -} OMX_DISPLAYSETTYPE; - -typedef struct OMX_CONFIG_DISPLAYREGIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_DISPLAYSETTYPE set; - OMX_U32 num; - OMX_BOOL fullscreen; - OMX_DISPLAYTRANSFORMTYPE transform; - OMX_DISPLAYRECTTYPE dest_rect; - OMX_DISPLAYRECTTYPE src_rect; - OMX_BOOL noaspect; - OMX_DISPLAYMODETYPE mode; - OMX_U32 pixel_x; - OMX_U32 pixel_y; - OMX_S32 layer; - OMX_BOOL copyprotect_required; - OMX_U32 alpha; - OMX_U32 wfc_context_width; - OMX_U32 wfc_context_height; -} OMX_CONFIG_DISPLAYREGIONTYPE; -/* -This config sets the output display device, as well as the region used -on the output display, any display transformation, and some flags to -indicate how to scale the image. - -The structure uses a bitfield, \code{set}, to indicate which fields are set -and should be used. All other fields will maintain their current -value. - -\code{num} describes the display output device, with 0 typically being -a directly connected LCD display. - -\code{fullscreen} indicates that we are using the full device screen -area, rather than a window of the display. If fullscreen is false, -then dest_rect is used to specify a region of the display to use. - -\code{transform} indicates any rotation or flipping used to map frames -onto the natural display orientation. - -The \code{src_rect} indicates which area of the frame to display. If -all values are zero, the whole frame will be used. - -The \code{noaspect} flag, if set, indicates that any display scaling -should disregard the aspect ratio of the frame region being displayed. - -\code{mode} indicates how the image should be scaled to fit the -display. \code{OMX_DISPLAY_MODE_FILL} indicates that the image should -fill the screen by potentially cropping the frames. Setting -\code{mode} to \code{OMX_DISPLAY_MODE_LETTERBOX} indicates that all -the source region should be displayed and black bars added if -necessary. - -The \code{pixel_x} and \code{pixel_y} values, if non-zero, are used to -describe the size of a source pixel. If values are zero, then pixels -default to being square. - -Set the \code{layer} that the image will appear on with the -\code{layer} field. -*/ - - - -/* OMX_IndexParamSource: Source Image Configuration */ -typedef enum OMX_SOURCETYPE { - OMX_SOURCE_WHITE = 0, // all white images - OMX_SOURCE_BLACK = 1, // all black images - OMX_SOURCE_DIAGONAL = 2, // greyscale diagonal stripes - OMX_SOURCE_NOISE = 3, // random pixel values - OMX_SOURCE_RANDOM = 4, // a shaded random pattern of colours - OMX_SOURCE_COLOUR = 5, // a solid colour determined by nParam - OMX_SOURCE_BLOCKS = 6, // random coloured blocks of 16x16 size - OMX_SOURCE_SWIRLY, // a swirly pattern used for encode testing - OMX_SOURCE_DUMMY = 0x7FFFFFFF -} OMX_SOURCETYPE; - -typedef struct OMX_PARAM_SOURCETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_SOURCETYPE eType; - OMX_U32 nParam; - OMX_U32 nFrameCount; - OMX_U32 xFrameRate; -} OMX_PARAM_SOURCETYPE; -/* -The source type determines the kind of image that is produced. Not all -combinations of source type and image type are supported. The -\code{OMX_SOURCE_SWIRLY} setting can only be used with YUV420 packed -planar image formats. When producing RGB565 image format, the -\code{OMX_SOURCE_DIAGONAL} and \code{OMX_SOURCE_RANDOM} modes are -treated as \code{OMX_SOURCE_NOISE}. - -The \code{nParam} field is used to specify the colour for the source -colour mode, and the offset of the diagonal pattern for diagonal mode. -For the blocks mode, \code{nParam} is used as the seed for the random -colour generator. - -The \code{nFrameCount} parameter determines how many frames to send. -If it is zero, then frames are sent continuously. For any other value, -it counts down until it has sent that many frames, and then stops, -sending out an EOS. The \code{xFrameRate} setting is used to determine -the timestamp for each frame produced, or can be set to zero if -timestamps should all remain at zero. -*/ - -/* OMX_IndexParamSourceSeed: Source Random Seed */ -typedef struct OMX_PARAM_SOURCESEEDTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U16 nData[16]; -} OMX_PARAM_SOURCESEEDTYPE; -/* -This structure sets the current state of the random number generator -used for \code{OMX_SOURCE_RANDOM} source type, allowing repeatable -random image creation. -*/ - -/* OMX_IndexParamResize: Resize Control */ -typedef enum OMX_RESIZEMODETYPE { - OMX_RESIZE_NONE, - OMX_RESIZE_CROP, - OMX_RESIZE_BOX, - OMX_RESIZE_BYTES, - OMX_RESIZE_DUMMY = 0x7FFFFFFF -} OMX_RESIZEMODETYPE; - -typedef struct OMX_PARAM_RESIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_RESIZEMODETYPE eMode; - OMX_U32 nMaxWidth; - OMX_U32 nMaxHeight; - OMX_U32 nMaxBytes; - OMX_BOOL bPreserveAspectRatio; - OMX_BOOL bAllowUpscaling; -} OMX_PARAM_RESIZETYPE; -/* -The mode determines the kind of resize. \code{OMX_RESIZE_BOX} allow -the \code{nMaxWidth} and \code{nMaxHeight} to set a bounding box into -which the output must fit. \code{OMX_RESIZE_BYTES} allows -\code{nMaxBytes} to set the maximum number of bytes into which the -full output frame must fit. Two flags aid the setting of the output -size. \code{bPreseveAspectRatio} sets whether the resize should -preserve the aspect ratio of the incoming -image. \code{bAllowUpscaling} sets whether the resize is allowed to -increase the size of the output image compared to the size of the -input image. -*/ - -typedef struct OMX_PARAM_TESTINTERFACETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bTest; - OMX_BOOL bSetExtra; - OMX_U32 nExtra; - OMX_BOOL bSetError; - OMX_BOOL stateError[2]; -} OMX_PARAM_TESTINTERFACETYPE; - -/* OMX_IndexConfigVisualisation: Visualisation Mode */ -typedef struct OMX_CONFIG_VISUALISATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U8 name[16]; - OMX_U8 property[64]; -} OMX_CONFIG_VISUALISATIONTYPE; - -/* -\code{name} is a string of characters specifying the type of -visualization. The component appends \code{"_vis.vll"} to the name -provided, and attempts to load a visualisation library contained in -this VLL. \code{property} contains configuration parameters and -values, which is interpreted by the visualisation library. Typically -all visualisations will accept a property string containing -\code{'mode=<number>'}, where \code{<number>} may be a random 32 bit -integer in decimal format. If provided, this may select a random mode -from that visualisation library. -*/ - -/* -This parameter is used when creating proprietary communication with -the display component, and provides the display function for passing -images to be displayed, together with a function used to flush all -pending image updates and release all images. -*/ - -/* OMX_IndexConfigBrcmAudioDestination: Audio Destination */ -typedef struct OMX_CONFIG_BRCMAUDIODESTINATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 sName[16]; -} OMX_CONFIG_BRCMAUDIODESTINATIONTYPE; -/* -This config sets the platform-specific audio destination or output -device for audio sink components (e.g. audio_render). - -\code{sName} describes the audio destination, with \code{"local"} -typically being directly connected to headphones. -*/ - -/* OMX_IndexConfigBrcmAudioSource: Audio Source */ -typedef struct OMX_CONFIG_BRCMAUDIOSOURCETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 sName[16]; -} OMX_CONFIG_BRCMAUDIOSOURCETYPE; -/* -This config sets the platform-specific audio source or input device -for audio source components (e.g. audio_capture). - -\code{sName} describes the audio source, with \code{"local"} -typically being directly connected to microphone. -*/ - -/* OMX_IndexConfigBrcmAudioDownmixCoefficients: Audio Downmix Coefficients */ -typedef struct OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 coeff[16]; -} OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS; -/* -This config sets the platform-specific audio downmixing coefficients for the -audio mixer component. The coefficients are 16.16 fixed point. -The even coefficients contribute to the left channel. -The odd coefficients contribute to the right channel. -L' = coeff[0] * sample[N] + coeff[2] * sample[N+1] + coeff[4] * sample[N+2] + coeff[6] * sample[N+3] - + coeff[8] * sample[N+4] + coeff[10] * sample[N+5] + coeff[12] * sample[N+6] + coeff[14] * sample[N+7] -R' = coeff[1] * sample[N] + coeff[3] * sample[N+1] + coeff[5] * sample[N+2] + coeff[7] * sample[N+3] - + coeff[9] * sample[N+4] + coeff[11] * sample[N+5] + coeff[13] * sample[N+6] + coeff[15] * sample[N+7] - -\code{coeff} describes the downmixing coefficients -*/ - -/* OMX_IndexConfigBrcmAudioDownmixCoefficients8x8: Audio Downmix Coefficients */ -typedef struct OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8 { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 coeff[64]; -} OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8; -/* -This config sets the platform-specific audio downmixing coefficients for the -audio mixer component. The coefficients are 16.16 fixed point. -The coefficients are a 8*8 mixing matrix from 8 input channels to 8 outputs channels - -\code{coeff} describes the downmixing coefficients -*/ - -/* OMX_IndexConfigBrcmAudioMaxSample: Maximum sample seen */ -typedef struct OMX_CONFIG_BRCMAUDIOMAXSAMPLE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nMaxSample; - OMX_TICKS nTimeStamp; -} OMX_CONFIG_BRCMAUDIOMAXSAMPLE; -/* -This gets the largest sample produced (after downmixing with OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8) -since this config was last read. The nTimestamp is the earliest timestamp processed. -This can be used for DRC schemes - -\code{coeff} maximum sample seen in current block -*/ - -/* OMX_IndexConfigPlayMode: Play Mode */ -typedef enum OMX_PLAYMODETYPE { - OMX_PLAYMODE_NORMAL, - OMX_PLAYMODE_FF, - OMX_PLAYMODE_REW, - OMX_PLAYMODE_DUMMY = 0x7FFFFFFF -} OMX_PLAYMODETYPE; - -typedef struct OMX_CONFIG_PLAYMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_PLAYMODETYPE eMode; -} OMX_CONFIG_PLAYMODETYPE; -/* -The playmode affects which frames are extracted from the media file -and passed on the output ports. \code{OMX_PLAYMODE_NORMAL} will -extract all frames, \code{OMX_PLAYMODE_FF} extracts only IDR frames -when video is present, or only occasional packets of audio if no video -is present. \code{OMX_PLAYMODE_REW} is similar to -\code{OMX_PLAYMODE_FF} but extracts packets in reverse time -order. -*/ - -typedef enum OMX_DELIVERYFORMATTYPE { - OMX_DELIVERYFORMAT_STREAM, // no framing information is known - OMX_DELIVERYFORMAT_SINGLE_PACKET, // packetised, at most one frame per buffer - OMX_DELIVERYFORMAT_DUMMY = 0x7FFFFFFF -} OMX_DELIVERYFORMATTYPE; - -typedef struct OMX_PARAM_DELIVERYFORMATTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_DELIVERYFORMATTYPE eFormat; -} OMX_PARAM_DELIVERYFORMATTYPE; - -/* OMX_IndexParamCodecConfig: Codec Configuration */ - -typedef struct OMX_PARAM_CODECCONFIGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 bCodecConfigIsComplete; - OMX_U8 nData[1]; -} OMX_PARAM_CODECCONFIGTYPE; - -/* -This parameter contains opaque data in a format specified by Broadcom -and allows out-of-band information such as cropping rectangles, aspect -ratio information, codec-specific header bytes, and other essential -information to be passed between connected components. - -\code{bCodecConfigIsCompete} specifies if the codec config is fully -contained in here and there is no need to wait for OMX_BUFFERFLAG_CODECCONFIG -buffers -*/ - -typedef struct OMX_PARAM_STILLSFUNCTIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bBuffer; - OMX_PTR (*pOpenFunc)(void); - OMX_PTR (*pCloseFunc)(void); - OMX_PTR (*pReadFunc)(void); - OMX_PTR (*pSeekFunc)(void); - OMX_PTR (*pWriteFunc)(void); -} OMX_PARAM_STILLSFUNCTIONTYPE; - -typedef void* OMX_BUFFERADDRESSHANDLETYPE; - -typedef struct OMX_PARAM_BUFFERADDRESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nAllocLen; - OMX_BUFFERADDRESSHANDLETYPE handle; -} OMX_PARAM_BUFFERADDRESSTYPE; - -typedef struct OMX_PARAM_TUNNELSETUPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_TUNNELSETUPTYPE sSetup; -} OMX_PARAM_TUNNELSETUPTYPE; - -/* OMX_IndexParamBrcmPortEGL: Used for querying whether a port is an EGL port or not. */ -typedef struct OMX_PARAM_BRCMPORTEGLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bPortIsEGL; -} OMX_PARAM_BRCMPORTEGLTYPE; -/* -*/ - -#define OMX_CONFIG_IMAGEFILTERPARAMS_MAXPARAMS 6 -/* OMX_IndexConfigCommonImageFilterParameters: Parameterized Image Filter */ -typedef struct OMX_CONFIG_IMAGEFILTERPARAMSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGEFILTERTYPE eImageFilter; - OMX_U32 nNumParams; - OMX_U32 nParams[OMX_CONFIG_IMAGEFILTERPARAMS_MAXPARAMS]; -} OMX_CONFIG_IMAGEFILTERPARAMSTYPE; -/* -This structure contains optional parameters for some image -filters. The following table lists all image filters that support -parameters. - -<table border="1" cellspacing="0" cellpadding="2"> -<tr><td>Filter<td>Parameters<td>Notes - -<tr><td>\code{OMX_ImageFilterSolarize} -<td>\code{[x0 y0 y1 y2]} -<td>Linear mapping of \code{[0,x0]} to \code{[0,y0>]} -and \code{[x0,255]} to \code{[y1,y2]}. -Default is \code{"128 128 128 0"}. - -<tr><td>\code{OMX_ImageFilterSharpen} -<td>\code{[sz [str [th]]} -<td>\code{sz} size of filter, either 1 or 2. -\code{str} strength of filter. -\code{th} threshold of filter. -Default is \code{"1 40 20"}. - -<tr><td>\code{OMX_ImageFilterFilm} -<td>\code{[[str] [u v]]} -<td>\code{str} strength of effect. -\code{u} sets u to constant value. -\code{v} sets v to constant value. -Default is \code{"24"}. - -<tr><td>\code{OMX_ImageFilterBlur} -<td>\code{[sz]} -<td>\code{sz} size of filter, either 1 or 2. -Default is \code{"2"}. - -<tr><td>\code{OMX_ImageFilterSaturation} -<td>\code{[str]} -<td>\code{str} strength of effect, in 8.8 fixed point format. u/v value -differences from 128 are multiplied by \code{str}. -Default is \code{"272"}. -</table> -*/ - - -/* OMX_IndexConfigTransitionControl: Transition Control */ -typedef struct OMX_CONFIG_TRANSITIONCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nPosStart; - OMX_U32 nPosEnd; - OMX_S32 nPosIncrement; - OMX_TICKS nFrameIncrement; - OMX_BOOL bSwapInputs; - OMX_U8 name[16]; - OMX_U8 property[64]; -} OMX_CONFIG_TRANSITIONCONTROLTYPE; -/* -This structure represents the internal configuration of the -transition. Transitions are generated by a loadable plug-in described -by the \code{name} field. The component appends \code{"_tran.vll"} to -the name provided, and attempts to load a transition library contained -in this VLL. The exact type of transition is configured in a -plug-in-dependent manner with the \code{property} field. All plug-ins -should accept a \code{property} field equal to -\code{"flags=<number>"}, where \code{<number>} can be a random 32 bit -number. If \code{bSwapInputs} is false, then the start image is on -port 210, the stop image on port 211. These are reversed if -\code{bSwapInputs} is true. - -Transition frames are generated from the plug-in by referencing a -frame position in [0,65536], where position 0 is the start image, -position 65536 is the stop image. The first frame position generated -is \code{nPosStart}. The last frame position generated is -\code{nPosEnd}. Each frame will increment the position by -\code{nPosIncrement}. The timestamp attached to each frame will -increment by \code{nFrameIncrement}. -*/ - - -/* -This parameter is used to provide a callback function pointer for -release events. It is used for internal clients on VideoCore. -*/ - - -/* OMX_IndexConfigAudioMonoTrackControl: Dual Mono Control */ -typedef enum OMX_AUDIOMONOTRACKOPERATIONSTYPE { - OMX_AUDIOMONOTRACKOPERATIONS_NOP, - OMX_AUDIOMONOTRACKOPERATIONS_L_TO_R, - OMX_AUDIOMONOTRACKOPERATIONS_R_TO_L, - OMX_AUDIOMONOTRACKOPERATIONS_DUMMY = 0x7FFFFFFF -} OMX_AUDIOMONOTRACKOPERATIONSTYPE ; - -typedef struct OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_AUDIOMONOTRACKOPERATIONSTYPE eMode; -} OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE; -/* -This config controls the options to support dual mono audio -streams. The output can be unchanged, or the left channel copied over -the right channel, or the right channel copied over the left -channel. This config can be applied at any time with stereo -16-bit-per-sample data. Since audio output is typically buffered, any -change will not be audible until that buffering has been played out. -*/ - -/* OMX_IndexParamCameraImagePool: Camera Image Pools */ -typedef enum OMX_CAMERAIMAGEPOOLINPUTMODETYPE { - OMX_CAMERAIMAGEPOOLINPUTMODE_ONEPOOL, /*All input images are allocated from one pool - Works for simple stills capture use cases - Can not be used with parallel stills capture - and video encode, as the pool will be sized for - capture or viewfinder, not both simultaneously. - The pool wouldn't divide sensibly in this mode - anyway. - */ - OMX_CAMERAIMAGEPOOLINPUTMODE_TWOPOOLS, /*All stills & video input images are allocated - from two seperate pools. - This ensures that parallel capture can work, but - would consume more memory if used on a simple - stills capture use case. - */ -} OMX_CAMERAIMAGEPOOLINPUTMODETYPE; - -typedef struct OMX_PARAM_CAMERAIMAGEPOOLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nNumHiResVideoFrames; - OMX_U32 nHiResVideoWidth; - OMX_U32 nHiResVideoHeight; - OMX_COLOR_FORMATTYPE eHiResVideoType; - OMX_U32 nNumHiResStillsFrames; - OMX_U32 nHiResStillsWidth; - OMX_U32 nHiResStillsHeight; - OMX_COLOR_FORMATTYPE eHiResStillsType; - OMX_U32 nNumLoResFrames; - OMX_U32 nLoResWidth; - OMX_U32 nLoResHeight; - OMX_COLOR_FORMATTYPE eLoResType; - OMX_U32 nNumSnapshotFrames; - OMX_COLOR_FORMATTYPE eSnapshotType; - OMX_CAMERAIMAGEPOOLINPUTMODETYPE eInputPoolMode; - OMX_U32 nNumInputVideoFrames; - OMX_U32 nInputVideoWidth; - OMX_U32 nInputVideoHeight; - OMX_COLOR_FORMATTYPE eInputVideoType; - OMX_U32 nNumInputStillsFrames; - OMX_U32 nInputStillsWidth; - OMX_U32 nInputStillsHeight; - OMX_COLOR_FORMATTYPE eInputStillsType; -} OMX_PARAM_CAMERAIMAGEPOOLTYPE; -/* -\sloppy This parameter specifies the size, type, and number, of images to -allow in the images pools required by Camplus. Supported types are -\code{OMX_COLOR_FormatYUV420PackedPlanar}, -\code{OMX_COLOR_FormatYUV422PackedPlanar}, -\code{OMX_COLOR_FormatRawBayer8bit}, -\code{OMX_COLOR_FormatRawBayer10bit}, -\code{OMX_COLOR_FormatRawBayer8bitcompressed}, and 0 (reserved for the -Broadcom-specific format required by the video encoder). The input -pool width, height, and type can be set as 0 to make the component -query Camplus for the sensor mode that would correspond to the largest -of the viewfinder port definition, the capture port definition, or the -high resolution image pool. -*/ - -/* OMX_IndexParamImagePoolSize: Specifying Image Pool Properties */ -typedef struct OMX_PARAM_IMAGEPOOLSIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 width; - OMX_U32 height; - OMX_U32 num_pages; -} OMX_PARAM_IMAGEPOOLSIZETYPE; -/* -This parameter is used to control the size of pool that the component -will allocate in the absence of setting an external pool. The default -can be reset by setting this parameter with all three fields set to -zero. -*/ - - -/* OMX_IndexParamImagePoolExternal: Client Allocated Image Pools */ -struct opaque_vc_pool_s; -typedef struct opaque_vc_pool_s OMX_BRCM_POOL_T; - -typedef struct OMX_PARAM_IMAGEPOOLEXTERNALTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BRCM_POOL_T *image_pool; - OMX_BRCM_POOL_T *image_pool2; - OMX_BRCM_POOL_T *image_pool3; - OMX_BRCM_POOL_T *image_pool4; - OMX_BRCM_POOL_T *image_pool5; -} OMX_PARAM_IMAGEPOOLEXTERNALTYPE; -/* -This config allows the client to pass in handles to pre-allocated -image pools for use within the component. -*/ - - -struct _IL_FIFO_T; -typedef struct OMX_PARAM_RUTILFIFOINFOTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - struct _IL_FIFO_T *pILFifo; -} OMX_PARAM_RUTILFIFOINFOTYPE; - -/* OMX_IndexParamILFifoConfig: Allows configuration of the FIFO settings. */ -typedef struct OMX_PARAM_ILFIFOCONFIG { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nDataSize; /**< The size of the FIFO's data area */ - OMX_U32 nHeaderCount; /**< The number of headers allocated */ -} OMX_PARAM_ILFIFOCONFIG; -/** - * Allows configuring the size of the ILFIFO used in a component. - */ - -/* OMX_IndexConfigCameraSensorModes: Camera Sensor Mode */ -typedef struct OMX_CONFIG_CAMERASENSORMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nModeIndex; - OMX_U32 nNumModes; - OMX_U32 nWidth; - OMX_U32 nHeight; - OMX_U32 nPaddingRight; - OMX_U32 nPaddingDown; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_U32 nFrameRateMax; - OMX_U32 nFrameRateMin; -} OMX_CONFIG_CAMERASENSORMODETYPE; -/* -This parameter is used by clients to determine the sensor mode, and -hence the memory usage, of the camera module. This is primarily used -for determining the size of the input image pool. - -It can be used in two ways dependent on \code{nPortIndex}. If -\code{nPortIndex} is \code{OMX_ALL}, it returns the sensor mode -corresponding to \code{nModeIndex}, and the number of modes in -\code{nNumModes}. If \code{nModeIndex} is greater than or equal to -\code{nNumModes} only \code{nNumModes} is returned. If -\code{nPortIndex} is equal to a camera video output port index, it -returns the sensor mode that would be selected for the values -currently in \code{OMX_IndexParamPortDefinition} for that port. - -The \code{nPaddingRight} and \code{nPaddingDown} values determine the -extra padding the sensor adds to the image. These values must be added -to \code{nWidth} and \code{nHeight} respectively if the client is -specifying the input image pool size. -*/ - -typedef struct OMX_BRCMBUFFERSTATSTYPE { - OMX_U32 nOrdinal; - OMX_TICKS nTimeStamp; - OMX_U32 nFilledLen; - OMX_U32 nFlags; - union - { - OMX_U32 nU32; - struct - { - OMX_U32 nYpart; - OMX_U32 nUVpart; - } image; - } crc; -} OMX_BRCMBUFFERSTATSTYPE; - -/* -Ports that gather statistics for debugging and diagnostics -might also collect information about buffer header fields -and data. - -Note that: - -The \code{nOrdinal} field increases monotonically whenever -a new buffer is received or emitted and shall not be reset -upon a port flush. - -The \code{nFilledLen} might indicate the size of a data area -larger than the data area that actually contributed to the -checksums (e.g. when image data is provided with cropping -information). -*/ - -/* OMX_IndexConfigBrcmPortBufferStats: Query port buffer stats history */ -typedef struct OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nCount; - OMX_BRCMBUFFERSTATSTYPE sData[1]; -} OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE; -/* -Ports that gather statistics for debugging and diagnostics -might also collect information about buffer header fields -and data. - -The \code{sStatsData} field is a variable length array and -the number of items is denoted by \code{nStatsCount}. -*/ - -/* OMX_IndexConfigBrcmPortStats: Query port statistics */ -typedef struct OMX_CONFIG_BRCMPORTSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nImageCount; - OMX_U32 nBufferCount; - OMX_U32 nFrameCount; - OMX_U32 nFrameSkips; - OMX_U32 nDiscards; - OMX_U32 nEOS; - OMX_U32 nMaxFrameSize; - - OMX_TICKS nByteCount; - OMX_TICKS nMaxTimeDelta; - OMX_U32 nCorruptMBs; /**< Number of corrupt macroblocks in the stream */ -} OMX_CONFIG_BRCMPORTSTATSTYPE; -/* -Some ports gather various statistics that can be used by clients for -debugging purposes. This structure is the set of all statistics that -are gathered. - -The \code{nFrameSkips} field indicates the number of frames that did -not have an expected PTS value based on the port frame rate. - -The \code{nByteCount} field is a 64 bit value, that will either use a -64 bit type or two 32 bit types, similarly to \code{OMX_TICKS}. -*/ - -/* OMX_IndexConfigBrcmClockMissCount: Missed clock request accounting */ -/* -For each port on the clock component, requests for media times may be -made. These are typically done one per video frame to allow for -scheduling the display of that frame at the correct time. If a -request is made after the time has occured, then that frame will be -displayed late, and the clock component keeps a per-port record of the -number of times this occurs. This record can be read using this -index. -*/ - -typedef struct OMX_CONFIG_BRCMCAMERASTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nOutFrameCount; - OMX_U32 nDroppedFrameCount; -} OMX_CONFIG_BRCMCAMERASTATSTYPE; - -// for backward compatibility -typedef struct OMX_CONFIG_BRCMCAMERASTATSTYPE OMX_CONFIG_BRCMCAMERASTATS; - - -#define OMX_BRCM_MAXIOPERFBANDS 10 -typedef struct { - OMX_U32 count[OMX_BRCM_MAXIOPERFBANDS]; - OMX_U32 num[OMX_BRCM_MAXIOPERFBANDS]; -} OMX_BRCM_PERFSTATS; - -/* OMX_IndexConfigBrcmIOPerfStats: Query I/O performance statistics */ -typedef struct OMX_CONFIG_BRCMIOPERFSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnabled; /**< Enable/disable I/O performance statistics */ - OMX_BRCM_PERFSTATS write; /**< count:bytes num:microseconds */ - OMX_BRCM_PERFSTATS flush; /**< count:frequency num:microseconds waiting to flush data */ - OMX_BRCM_PERFSTATS wait; /**< count:frequency num:microseconds waiting in calling function */ -} OMX_CONFIG_BRCMIOPERFSTATSTYPE; -/* -A sink component can gather various statistics about I/O (eg. file media) performance that can be used by -clients for debugging purposes. The \code{bEnabled} field is used to turn the gathering of statistics -on/off. -*/ - -typedef struct OMX_CONFIG_SHARPNESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nSharpness; -} OMX_CONFIG_SHARPNESSTYPE; - -/* OMX_IndexConfigCommonFlickerCancellation: Flicker cancellation */ -typedef enum OMX_COMMONFLICKERCANCELTYPE { - OMX_COMMONFLICKERCANCEL_OFF, - OMX_COMMONFLICKERCANCEL_AUTO, - OMX_COMMONFLICKERCANCEL_50, - OMX_COMMONFLICKERCANCEL_60, - OMX_COMMONFLICKERCANCEL_DUMMY = 0x7FFFFFFF -} OMX_COMMONFLICKERCANCELTYPE; - -typedef struct OMX_CONFIG_FLICKERCANCELTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_COMMONFLICKERCANCELTYPE eFlickerCancel; -} OMX_CONFIG_FLICKERCANCELTYPE; -/* -Query / set the flicker cancellation frequency. Values are defined for Off, -50Hz, 60Hz, or auto. The method for auto detecting the flicker frequency is -not defined, and currently results in the feature being turned off. -*/ - -/* OMX_IndexConfigCommonRedEyeRemoval: Red eye removal/reduction */ -typedef enum OMX_REDEYEREMOVALTYPE { - OMX_RedEyeRemovalNone, /**< No red eye removal */ - OMX_RedEyeRemovalOn, /**< Red eye removal on */ - OMX_RedEyeRemovalAuto, /**< Red eye removal will be done automatically when detected */ - OMX_RedEyeRemovalKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_RedEyeRemovalVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_RedEyeRemovalSimple, /**< Use simple red eye reduction mechanism if supported by algorithm */ - OMX_RedEyeRemovalMax = 0x7FFFFFFF -} OMX_REDEYEREMOVALTYPE; - -typedef struct OMX_CONFIG_REDEYEREMOVALTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_REDEYEREMOVALTYPE eMode; -} OMX_CONFIG_REDEYEREMOVALTYPE; -/* - Configures the red eye reduction algorithm in the camera processing - pipeline. The stage is only enabled if the flash mode is not FlashOff. - The OMX_RedEyeRemovalSimple mode requests that the algorithm uses a - reduced complexity algorithm to reduce the processing time. -*/ - - -typedef enum OMX_FACEDETECTIONCONTROLTYPE { - OMX_FaceDetectionControlNone, /**< Disables face detection */ - OMX_FaceDetectionControlOn, /**< Enables face detection */ - OMX_FaceDetectionControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_FaceDetectionControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_FaceDetectionControlMax = 0x7FFFFFFF -} OMX_FACEDETECTIONCONTROLTYPE; - -typedef struct OMX_CONFIG_FACEDETECTIONCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_FACEDETECTIONCONTROLTYPE eMode; - OMX_U32 nFrames; /**< number of frames to apply this setting for, - 0 for unlimited */ - OMX_U32 nMaxRegions; /**< maximum number of regions to detect, 0 for unlimited */ - OMX_U32 nQuality; /**< hint for algorithmic complexity, range is 0-100. - 0 for simplest algorithm, 100 for best quality */ -} OMX_CONFIG_FACEDETECTIONCONTROLTYPE; - -typedef enum OMX_FACEREGIONFLAGSTYPE { - OMX_FaceRegionFlagsNone = 0, - OMX_FaceRegionFlagsBlink = 1, - OMX_FaceRegionFlagsSmile = 2, - OMX_FaceRegionFlagsKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_FaceRegionFlagsVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_FaceRegionFlagsMax = 0x7FFFFFFF -} OMX_FACEREGIONFLAGSTYPE; - -typedef struct OMX_FACEREGIONTYPE { - OMX_S16 nLeft; /**< X Coordinate of the top left corner of the rectangle */ - OMX_S16 nTop; /**< Y Coordinate of the top left corner of the rectangle */ - OMX_U16 nWidth; /**< Width of the rectangle */ - OMX_U16 nHeight; /**< Height of the rectangle */ - OMX_FACEREGIONFLAGSTYPE nFlags; /**< Flags for the region */ -#ifndef OMX_SKIP64BIT - OMX_U64 nFaceRecognitionId; /**< ID returned by face recognition for this face */ -#else - struct - { - OMX_U32 nLowPart; /**< low bits of the signed 64 bit value */ - OMX_U32 nHighPart; /**< high bits of the signed 64 bit value */ - } nFaceRecognitionId; -#endif -} OMX_FACEREGIONTYPE; - -typedef struct OMX_CONFIG_FACEDETECTIONREGIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< index of port with face detection enabled */ - OMX_U32 nIndex; /**< first requested region number, allowing retrieval of many regions - over several requests */ - OMX_U32 nDetectedRegions; /**< total number of detected regions */ - OMX_S32 nValidRegions; /**< number of valid regions in sRegion array - When getting, the client sets this to the number of regions available. - The component writes region data and updates this field with how many - regions have been written to. */ - OMX_U32 nImageWidth; /**< Width of the image, hence reference for the face coordinates */ - OMX_U32 nImageHeight; /**< Height of the image, hence reference for the face coordinates */ - OMX_FACEREGIONTYPE sRegion[1]; /**< variable length array of face regions */ -} OMX_CONFIG_FACEDETECTIONREGIONTYPE; - -typedef enum OMX_INTERLACETYPE { - OMX_InterlaceProgressive, /**< The data is not interlaced, it is progressive scan */ - OMX_InterlaceFieldSingleUpperFirst, /**< The data is interlaced, fields sent - separately in temporal order, with upper field first */ - OMX_InterlaceFieldSingleLowerFirst, /**< The data is interlaced, fields sent - separately in temporal order, with lower field first */ - OMX_InterlaceFieldsInterleavedUpperFirst, /**< The data is interlaced, two fields sent together line - interleaved, with the upper field temporally earlier */ - OMX_InterlaceFieldsInterleavedLowerFirst, /**< The data is interlaced, two fields sent together line - interleaved, with the lower field temporally earlier */ - OMX_InterlaceMixed, /**< The stream may contain a mixture of progressive - and interlaced frames */ - OMX_InterlaceKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_InterlaceVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_InterlaceMax = 0x7FFFFFFF -} OMX_INTERLACETYPE; - -typedef struct OMX_CONFIG_INTERLACETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< index of port emitting or accepting the content */ - OMX_INTERLACETYPE eMode; /**< The interlace type of the content */ - OMX_BOOL bRepeatFirstField; /**< Whether to repeat the first field */ -} OMX_CONFIG_INTERLACETYPE; - -/* OMX_IndexParamIspTuner: Custom ISP tuner */ -typedef struct OMX_PARAM_CAMERAISPTUNERTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 tuner_name[64]; -} OMX_PARAM_CAMERAISPTUNERTYPE; -/* -This parameter allows a custom ISP tuner to be loaded instead of -the default one specified for the camera module. Setting an empty -string uses the default value. -*/ - -/* OMX_IndexConfigCameraInputFrame: Pointer to the raw input image */ -typedef struct OMX_CONFIG_IMAGEPTRTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_PTR pImage; -} OMX_CONFIG_IMAGEPTRTYPE; -/* -This parameter parameter allows the return of a pointer to a -VideoCore image resource. -*/ - -/* OMX_IndexConfigAFAssistLight: Autofocus assist light mode selection */ -typedef enum OMX_AFASSISTTYPE { - OMX_AFAssistAuto, - OMX_AFAssistOn, - OMX_AFAssistOff, - OMX_AFAssistTorch, - OMX_AFAssistKhronosExtensions = 0x6F000000, - OMX_AFAssistVendorStartUnused = 0x7F000000, - OMX_AFAssistMax = 0x7FFFFFFF -} OMX_AFASSISTTYPE; - -typedef struct OMX_CONFIG_AFASSISTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_AFASSISTTYPE eMode; -} OMX_CONFIG_AFASSISTTYPE; -/* -Set the mode to adopt for the autofocus assist light. -\code{OMX_AFAssistTorch} will turn the AF assist light on permanently, allowing -it to be used as a torch. -*/ - -/* OMX_IndexConfigInputCropPercentage: Specify input crop as a percentage */ -typedef struct OMX_CONFIG_INPUTCROPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 xLeft; /**< Fraction of the width for the top left corner of the rectangle */ - OMX_U32 xTop; /**< Fraction of the height for the top left corner of the rectangle */ - OMX_U32 xWidth; /**< Fraction of the image width desired */ - OMX_U32 xHeight; /**< Fraction of the image height desired */ -} OMX_CONFIG_INPUTCROPTYPE; -/* -This parameter allows the input cropping to be specified as a -percentage of the current width/height. Required for the camera -component where the output resolution varies dependent on the port. -All percentage values are as 16p16 fixed point numbers (0x10000 = -100\%) -*/ - -/* OMX_IndexParamCodecRequirements: Advanced codec requirements */ -typedef struct OMX_PARAM_CODECREQUIREMENTSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nCallbackID; - OMX_BOOL bTryHWCodec; -} OMX_PARAM_CODECREQUIREMENTSTYPE; -/* -This parameter allows internal users of RIL components controlling -video codecs to request that the component loads the component and -queries for requirements. The component will perform a callback with -the given nCallbackID value passing a pointer to the requirements -structure as the data field. -*/ - -/* OMX_IndexConfigBrcmEGLImageMemHandle: Mapping from an EGLImage to a VideoCore mem handle */ -typedef struct OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_PTR eglImage; - OMX_PTR memHandle; -} OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE; -/* -This config allows the EGL server to notify a RIL component that an -EGLImage is available for rendering into and to provide a mapping from -an EGLImage to a mem handle. -*/ - -/* OMX_IndexConfigPrivacyIndicator: Privacy indicator control */ -typedef enum OMX_PRIVACYINDICATORTYPE { - OMX_PrivacyIndicatorOff, - OMX_PrivacyIndicatorOn, - OMX_PrivacyIndicatorForceOn, - OMX_PrivacyIndicatorKhronosExtensions = 0x6F000000, - OMX_PrivacyIndicatorVendorStartUnused = 0x7F000000, - OMX_PrivacyIndicatorMax = 0x7FFFFFFF -} OMX_PRIVACYINDICATORTYPE; - -typedef struct OMX_CONFIG_PRIVACYINDICATORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_PRIVACYINDICATORTYPE ePrivacyIndicatorMode; -} OMX_CONFIG_PRIVACYINDICATORTYPE; -/* -This config allows control over the privacy indicator light. This -light indicates when a capture is in progress. - -\code{OMX_PrivacyIndicatorOff} indicator is disabled. - -\code{OMX_PrivacyIndicatorOn} indicator will be -turned on whenever an image is being captured as determined by the -capturing bit. Minimum on duration of approx 200ms. - -\code{OMX_PrivacyIndicatorForceOn} results in turning the indicator on -immediately, whether an image is being captured or not. The mode will -automatically revert to \code{OMX_PrivacyIndicatorOff} once the -indicator has been turned on, so \code{OMX_PrivacyIndicatorForceOn} -must be requested at least every 200ms if the indicator is to remain -on. -*/ - - -/* OMX_IndexParamCameraFlashType: Select flash type */ -typedef enum OMX_CAMERAFLASHTYPE { - OMX_CameraFlashDefault, - OMX_CameraFlashXenon, - OMX_CameraFlashLED, - OMX_CameraFlashNone, - OMX_CameraFlashKhronosExtensions = 0x6F000000, - OMX_CameraFlashVendorStartUnused = 0x7F000000, - OMX_CameraFlashMax = 0x7FFFFFFF -} OMX_CAMERAFLASHTYPE; - -typedef struct OMX_PARAM_CAMERAFLASHTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_CAMERAFLASHTYPE eFlashType; - OMX_BOOL bRedEyeUsesTorchMode; -} OMX_PARAM_CAMERAFLASHTYPE; -/* -This parameter allows the selection of xenon or LED flash devices -to be used with the currently selected camera. If that device is not -available, then the component will revert back to whatever flash -device is available for that camera. -\code{bRedEyeUsesTorchMode} allows the blinking for red eye reduction to -be switched between using the indicator mode, and the torch mode for the -flash driver. -*/ - -/* OMX_IndexConfigCameraFlashConfig: Flash cycle configuration */ -typedef enum OMX_CAMERAFLASHCONFIGSYNCTYPE { - OMX_CameraFlashConfigSyncFrontSlow, - OMX_CameraFlashConfigSyncRearSlow, - OMX_CameraFlashConfigSyncFrontFast, - OMX_CameraFlashConfigSyncKhronosExtensions = 0x6F000000, - OMX_CameraFlashConfigSyncVendorStartUnused = 0x7F000000, - OMX_CameraFlashConfigSyncMax = 0x7FFFFFFF -} OMX_CAMERAFLASHCONFIGSYNCTYPE; - -typedef struct OMX_CONFIG_CAMERAFLASHCONFIGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bUsePreFlash; - OMX_BOOL bUseFocusDistanceInfo; - OMX_CAMERAFLASHCONFIGSYNCTYPE eFlashSync; - OMX_BOOL bIgnoreChargeState; -} OMX_CONFIG_CAMERAFLASHCONFIGTYPE; -/* -This parameter allows the configuration of various parameters relating to -the flash cycle. Some of the options are only applicable to xenon flash. - -\code{bUsePreFlash} uses a low intensity pre-flash to determine flash intensity. This setting -is recommended for almost all flash situations. - -\code{bUseFocusDistanceInfo} uses the distance of the subject, as measured by the AF algorithm -to set the intensity of the flash. - -\code{eFlashSync} configures which edge of the shutter is used to synchronise the flash, and -the duration of the exposure. - -\code{eIgnoreChargeState} will make the flash fire, even if it is not fully charged. -*/ - -/* OMX_IndexConfigBrcmAudioTrackGaplessPlayback: Encoder/decoder delay and padding information for gapless playback. */ -typedef struct OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nDelay; /**< number of samples delay added by the codec */ - OMX_U32 nPadding; /**< number of silent samples added to the end */ -} OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE; -/* -This config allows communication between components to facilitate gapless playback. -*/ - - -/* OMX_IndexConfigBrcmAudioTrackChangeControl: Configure gapless/crossfaded audio track change. */ -typedef struct OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nSrcPortIndex; - OMX_U32 nDstPortIndex; - OMX_U32 nXFade; -} OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE; -/* -This config allows the client to specify the gapless or crossfade -parameters to be used on a track change. If \code{nXFade} is 0, then -a normal or gapless track change will result, otherwise a crossfade of -\code{nXFade} ms is used. -*/ - -/* OMX_IndexParamBrcmPixelValueRange: Describing the pixel value range */ -typedef enum OMX_BRCMPIXELVALUERANGETYPE -{ - OMX_PixelValueRangeUnspecified = 0, - OMX_PixelValueRangeITU_R_BT601, - OMX_PixelValueRangeFull8Bit, - OMX_PixelValueRangeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_PixelValueRangeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_PixelValueRangeMax = 0x7FFFFFFF -} OMX_BRCMPIXELVALUERANGETYPE; - -typedef struct OMX_PARAM_BRCMPIXELVALUERANGETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BRCMPIXELVALUERANGETYPE ePixelValueRange; -} OMX_PARAM_BRCMPIXELVALUERANGETYPE; -/* -This structure allows a description of the range that pixel values may -have. This is typically useful since some standards use the full 8 -bit range, whereas others introduce pedastals which reduce the range -at the top and bottom end. -*/ - -/* OMX_IndexParamCameraDisableAlgorithm: Disabling camera processing stages. */ -typedef enum OMX_CAMERADISABLEALGORITHMTYPE { - OMX_CameraDisableAlgorithmFacetracking, - OMX_CameraDisableAlgorithmRedEyeReduction, - OMX_CameraDisableAlgorithmVideoStabilisation, - OMX_CameraDisableAlgorithmWriteRaw, - OMX_CameraDisableAlgorithmVideoDenoise, - OMX_CameraDisableAlgorithmStillsDenoise, - OMX_CameraDisableAlgorithmAntiShake, - OMX_CameraDisableAlgorithmImageEffects, - OMX_CameraDisableAlgorithmDarkSubtract, - OMX_CameraDisableAlgorithmDynamicRangeExpansion, - OMX_CameraDisableAlgorithmFaceRecognition, - OMX_CameraDisableAlgorithmFaceBeautification, - OMX_CameraDisableAlgorithmSceneDetection, - OMX_CameraDisableAlgorithmHighDynamicRange, - OMX_CameraDisableAlgorithmKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CameraDisableAlgorithmVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CameraDisableAlgorithmMax = 0x7FFFFFFF -} OMX_CAMERADISABLEALGORITHMTYPE; - -typedef struct OMX_PARAM_CAMERADISABLEALGORITHMTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_CAMERADISABLEALGORITHMTYPE eAlgorithm; - OMX_BOOL bDisabled; -} OMX_PARAM_CAMERADISABLEALGORITHMTYPE; -/* -Allows plugin algorithms to be disabled to save memory -within the camera component -*/ - -/* OMX_IndexConfigBrcmAudioEffectControl: Audio Effect Control */ -typedef struct OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; - OMX_U8 name[16]; - OMX_U8 property[256]; -} OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE; -/* -This structure represents the internal configuration of an audio effect. -The audio effect is provided by a loadable plug-in described -in the \code{name} field and is configured in a plug-in-dependent -manner with the \code{property} field. The \code{bEnable} field is used to -turn the effect on/off. -*/ - -/* OMX_IndexConfigBrcmMinimumProcessingLatency: Processing Latency Bound */ -typedef struct OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_TICKS nOffset; -} OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY; -/* -Query/set the difference between the actual media time and when the -component receives request fulfillments for media time requests. This -can be used with e.g. splitter/mixer components to control when the -component stops waiting for input or output packets from active -streams and continues with processing (to maintain a constant -processing rate). -*/ - -/** Enable or disable Supplemental Enhancment Information (SEI) messages to be inserted in - * the H.264 bitstream. - */ -typedef struct OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; -} OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE; - -/* OMX_IndexParamBrcmAllowMemChange: Allowing changing memory allocation on state transition */ -typedef struct OMX_PARAM_BRCMALLOWMEMCHANGETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnable; -} OMX_PARAM_BRCMALLOWMEMCHANGETYPE; -/* -Let the component change the amount of memory it has allocated when -going from LOADED to IDLE. By default this is enabled, but if it is -disabled the component will fail to transition to IDLE if the -component requires more memory than has already been allocated. This -might occur if (for example) the component was configured, taken to -IDLE, then taken back to LOADED, the profile increased and the -component taken back to IDLE. -*/ - -typedef enum OMX_CONFIG_CAMERAUSECASE { - OMX_CameraUseCaseAuto, - OMX_CameraUseCaseVideo, - OMX_CameraUseCaseStills, - OMX_CameraUseCaseKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CameraUseCaseVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CameraUseCaseMax = 0x7FFFFFFF -} OMX_CONFIG_CAMERAUSECASE; - -typedef struct OMX_CONFIG_CAMERAUSECASETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_CONFIG_CAMERAUSECASE eUseCase; -} OMX_CONFIG_CAMERAUSECASETYPE; - -/* OMX_IndexParamBrcmDisableProprietaryTunnels: Disabling proprietary tunnelling */ -typedef struct OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bUseBuffers; -} OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE; -/* -Tell a source component to refuse to support proprietary tunnelling. Buffers will be used instead. -*/ - - -// -// Control for memory allocation and component-internal buffering -// - -/* OMX_IndexParamBrcmRetainMemory: Controlling memory use on state transition */ -typedef struct OMX_PARAM_BRCMRETAINMEMORYTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnable; -} OMX_PARAM_BRCMRETAINMEMORYTYPE; -/* -Ask a component to retain its memory when going from IDLE to LOADED, if possible. -This has the benefit that you are then guaranteed that the transition to IDLE cannot -fail due to lack of memory, but has the disadvantage that you cannot leave the component -lying around in LOADED, unused, since it is using significant amounts of memory. -*/ - -/** Tell write media how large the output buffer should be. This is a hint, and - * may be ignored. A good size is bandwidth*<SDcard-delay>, which works out at - * around 1Mbyte for up to 16Mbit/s. Sizes may (and probably will) be rounded down - * to the nearest power of 2. - */ -typedef struct OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nBufferSize; -} OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE; - -/* OMX_IndexConfigCameraInfo: Camera device driver information */ -#define OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN 16 -typedef struct OMX_CONFIG_LENSCALIBRATIONVALUETYPE -{ - OMX_U16 nShutterDelayTime; - OMX_U16 nNdTransparency; - OMX_U16 nPwmPulseNearEnd; /**< Num pulses to move lens 1um at near end */ - OMX_U16 nPwmPulseFarEnd; /**< Num pulses to move lens 1um at far end */ - OMX_U16 nVoltagePIOutNearEnd[3]; - OMX_U16 nVoltagePIOut10cm[3]; - OMX_U16 nVoltagePIOutInfinity[3]; - OMX_U16 nVoltagePIOutFarEnd[3]; - OMX_U32 nAdcConversionNearEnd; - OMX_U32 nAdcConversionFarEnd; -} OMX_CONFIG_LENSCALIBRATIONVALUETYPE; -/* -Ask the camera component for the driver info on the current camera device -*/ - -#define OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN 16 -#define OMX_CONFIG_CAMERAINFOTYPE_SERIALNUM_LEN 20 -#define OMX_CONFIG_CAMERAINFOTYPE_EPROMVER_LEN 8 -typedef struct OMX_CONFIG_CAMERAINFOTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 cameraname[OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN]; - OMX_U8 lensname[OMX_CONFIG_CAMERAINFOTYPE_NAME_LEN]; - OMX_U16 nModelId; - OMX_U8 nManufacturerId; - OMX_U8 nRevNum; - OMX_U8 sSerialNumber[OMX_CONFIG_CAMERAINFOTYPE_SERIALNUM_LEN]; - OMX_U8 sEpromVersion[OMX_CONFIG_CAMERAINFOTYPE_EPROMVER_LEN]; - OMX_CONFIG_LENSCALIBRATIONVALUETYPE sLensCalibration; - OMX_U32 xFNumber; - OMX_U32 xFocalLength; -} OMX_CONFIG_CAMERAINFOTYPE; - - -typedef enum OMX_CONFIG_CAMERAFEATURESSHUTTER { - OMX_CameraFeaturesShutterUnknown, - OMX_CameraFeaturesShutterNotPresent, - OMX_CameraFeaturesShutterPresent, - OMX_CameraFeaturesShutterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CameraFeaturesShutterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CameraFeaturesShutterMax = 0x7FFFFFFF -} OMX_CONFIG_CAMERAFEATURESSHUTTER; - -typedef struct OMX_CONFIG_CAMERAFEATURESTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_CONFIG_CAMERAFEATURESSHUTTER eHasMechanicalShutter; - OMX_BOOL bHasLens; -} OMX_CONFIG_CAMERAFEATURESTYPE; - - -//Should be added to the spec as part of IL416c -/* OMX_IndexConfigRequestCallback: Enable config change notifications. */ -typedef struct OMX_CONFIG_REQUESTCALLBACKTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_INDEXTYPE nIndex; - OMX_BOOL bEnable; -} OMX_CONFIG_REQUESTCALLBACKTYPE; -/* -This config implements IL416c to allow clients to request notification -of when a config or parameter is changed. When the parameter specified -in \code{nIndex} for port \code{nPortIndex} changes, an -\code{OMX_EventParamOrConfigChanged} event is generated for the client. -*/ - -/* OMX_IndexConfigCommonFocusRegionXY: Define focus regions */ -typedef enum OMX_FOCUSREGIONTYPE { - OMX_FocusRegionNormal, - OMX_FocusRegionFace, - OMX_FocusRegionMax -} OMX_FOCUSREGIONTYPE; - -typedef struct OMX_FOCUSREGIONXY { - OMX_U32 xLeft; - OMX_U32 xTop; - OMX_U32 xWidth; - OMX_U32 xHeight; - OMX_U32 nWeight; - OMX_U32 nMask; - OMX_FOCUSREGIONTYPE eType; -} OMX_FOCUSREGIONXY; - -typedef struct OMX_CONFIG_FOCUSREGIONXYTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_U32 nTotalRegions; - OMX_S32 nValidRegions; - OMX_BOOL bLockToFaces; - OMX_U32 xFaceTolerance; - OMX_FOCUSREGIONXY sRegion[1]; -} OMX_CONFIG_FOCUSREGIONXYTYPE; -/* -Query / set the focus regions to use as a set of x/y/width/height boxes relative -to the overall image. - -\code{nIndex} - first region number being set/read, allowing retrieval/setting -of many regions over several requests. - -\code{nTotalRegions} - total number of regions currently defined. - -\code{nValidRegions} - number of valid regions in the \code{sRegion} array. -When getting, the client sets this to the number of regions available. -The component writes region data and updates this field with how many -regions have been written to. -When setting, this is the number of regions defined with this structure - -\code{bLockToFaces} - compare the region(s) given to the latest face tracking results. -If a face is found within xFaceTolerance of the defined region, then amend the -region to correspond to the face. - -\code{xFaceTolerance} - 0p16 value to define the max difference between the region centre -and face tracking result centre to take the FT results - -\code{sRegions} - variable length array of focus regions. -*/ - -typedef struct OMX_CONFIG_U8TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U8 nU8; /**< U8 value */ -} OMX_PARAM_U8TYPE; - -typedef struct OMX_CONFIG_CAMERASETTINGSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nExposure; - OMX_U32 nAnalogGain; - OMX_U32 nDigitalGain; - OMX_U32 nLux; - OMX_U32 nRedGain; - OMX_U32 nBlueGain; - OMX_U32 nFocusPosition; -} OMX_CONFIG_CAMERASETTINGSTYPE; - -/* OMX_IndexConfigDrawBoxLineParams: Face box style parameters. */ -typedef struct OMX_YUVCOLOUR { - OMX_U8 nY; - OMX_U8 nU; - OMX_U8 nV; -} OMX_YUVCOLOUR; - -typedef struct OMX_CONFIG_DRAWBOXLINEPARAMS { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port to which this config applies */ - OMX_U32 xCornerSize; /**< Size of the corners as a fraction of the complete side */ - OMX_U32 nPrimaryFaceLineWidth; /**< Width of the box line for the primary face in pixels */ - OMX_U32 nOtherFaceLineWidth; /**< Width of the box line for other faces in pixels */ - OMX_U32 nFocusRegionLineWidth; /**< Width of the box line for focus regions in pixels */ - OMX_YUVCOLOUR sPrimaryFaceColour; /**< YUV colour for the primary face */ - OMX_YUVCOLOUR sPrimaryFaceSmileColour; /**< YUV colour for the primary face if smiling */ - OMX_YUVCOLOUR sPrimaryFaceBlinkColour; /**< YUV colour for the primary face if blinking */ - OMX_YUVCOLOUR sOtherFaceColour; /**< YUV colour for the all other faces */ - OMX_YUVCOLOUR sOtherFaceSmileColour; /**< YUV colour for the all other faces if smiling */ - OMX_YUVCOLOUR sOtherFaceBlinkColour; /**< YUV colour for the all other faces if blinking */ - OMX_BOOL bShowFocusRegionsWhenIdle; /**< Are focus regions displayed when just in viewfinder/AF idle */ - OMX_YUVCOLOUR sFocusRegionColour; /**< YUV colour for focus regions */ - OMX_BOOL bShowAfState; /**< Change to the colours specified below if AF cycle has run */ - OMX_BOOL bShowOnlyPrimaryAfState; /**< Only show the primary face when displaying the AF status */ - OMX_BOOL bCombineNonFaceRegions; /**< Combine all regions not defined as faces into one single box covering them all */ - OMX_YUVCOLOUR sAfLockPrimaryFaceColour; /**< YUV colour for the primary face */ - OMX_YUVCOLOUR sAfLockOtherFaceColour; /**< YUV colour for the all other faces */ - OMX_YUVCOLOUR sAfLockFocusRegionColour; /**< YUV colour for focus regions */ - OMX_YUVCOLOUR sAfFailPrimaryFaceColour; /**< YUV colour for the primary face */ - OMX_YUVCOLOUR sAfFailOtherFaceColour; /**< YUV colour for the all other faces */ - OMX_YUVCOLOUR sAfFailFocusRegionColour; /**< YUV colour for focus regions */ - } OMX_CONFIG_DRAWBOXLINEPARAMS; -/* -Query / set the parameters for the box to be drawn around faces/focus regions. -*/ - - #define OMX_PARAM_CAMERARMITYPE_RMINAME_LEN 16 - //OMX_IndexParamCameraRmiControl - typedef struct OMX_PARAM_CAMERARMITYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnabled; - OMX_U8 sRmiName[OMX_PARAM_CAMERARMITYPE_RMINAME_LEN]; - OMX_U32 nInputBufferHeight; - OMX_U32 nRmiBufferSize; - OMX_BRCM_POOL_T *pImagePool; - } OMX_PARAM_CAMERARMITYPE; - -/* OMX_IndexConfigBrcmSyncOutput: Forcing a write sync */ -typedef struct OMX_CONFIG_BRCMSYNCOUTPUTTYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ -} OMX_CONFIG_BRCMSYNCOUTPUTTYPE; -/* -Setting this config forces a sync of data to the filesystem. -*/ - -/* OMX_IndexConfigDrmView: View information for DRM rental files */ -typedef struct OMX_CONFIG_DRMVIEWTYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nCurrentView; /**< Current view count */ - OMX_U32 nMaxView; /**< Max. no. of view allowed */ -} OMX_CONFIG_DRMVIEWTYPE; -/* -This structure contains information about the number of available -views in the selected DRM rental file, which typically have a given -maximum view count. It allows the user to explicitly agree to playing -the file, which will increment the number of current views the file -has had. -*/ - -typedef struct OMX_PARAM_BRCMU64TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nLowPart; /**< low bits of the unsigned 64 bit value */ - OMX_U32 nHighPart; /**< high bits of the unsigned 64 bit value */ -} OMX_PARAM_BRCMU64TYPE; - -/* OMX_IndexParamBrcmDisableEXIF: Disable generation of EXIF data */ -/* -This parameter is used by clients to control the generation of exif -data in JPEG images. -*/ - -/* OMX_IndexParamBrcmThumbnail: Control generation of thumbnail */ -typedef struct OMX_PARAM_BRCMTHUMBNAILTYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_BOOL bEnable; /**< Enable generation of thumbnails during still capture */ - OMX_BOOL bUsePreview; /**< Use the preview image (as is) as thumbnail */ - OMX_U32 nWidth; /**< Desired width of the thumbnail */ - OMX_U32 nHeight; /**< Desired height of the thumbnail */ -} OMX_PARAM_BRCMTHUMBNAILTYPE; -/* -This parameter is used by clients to control how thumbnails are -generated when creating still images. - -Thumbnail generation will be turned on or off depending on the -\code{bEnable} field. - -The \code{bUsePreview} field will let the component know whether it -should use the low resolution preview image (if the component has one -available) as is for the thumbnail. When this is set to true, it should -make the generation of thumbnails faster (if a preview image is available) -and should use less memory as well. - -The \code{nWidth} and \code{nHeight} fields allow the client to -specify the dimensions of the thumbnail. If both \code{nWidth} and -\code{nHeight} are 0, we will calculate a sensible size for the -thumbnail. -*/ - -typedef struct OMX_PARAM_BRCMASPECTRATIOTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nWidth; - OMX_U32 nHeight; -} OMX_PARAM_BRCMASPECTRATIOTYPE; - -/* OMX_IndexParamBrcmVideoDecodeErrorConcealment: Control error concealment for video decode */ -typedef struct OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bStartWithValidFrame; /**< Decoder will only start emitting frames from a non-corrupted frame */ -} OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE; -/* - This parameter is used by clients to control the type of error concealment - that will be done by the video decoder. - */ - -#define OMX_CONFIG_FLASHINFOTYPE_NAME_LEN 16 -typedef struct OMX_CONFIG_FLASHINFOTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U8 sFlashName[OMX_CONFIG_FLASHINFOTYPE_NAME_LEN]; - OMX_CAMERAFLASHTYPE eFlashType; - OMX_U8 nDeviceId; - OMX_U8 nDeviceVersion; -} OMX_CONFIG_FLASHINFOTYPE; - -/* OMX_IndexParamBrcmInterpolateMissingTimestamps: Configure component to interpolate missing timestamps */ -/* -Configures a component so that it tries to timestamp all the buffers it outputs. -If the timestamp information is missing from the original buffer, the -component will try its best to interpolate a value for the missing timestamp. - */ - -/* OMX_IndexParamBrcmSetCodecPerformanceMonitoring: Configure component to output performance statistics */ -/* -Configures a codec component so that it outputs performance statistics to -the given DECODE_PROGRESS_REPORT_T structure (passed as a pointer). -This structure can then be read by the client to find out where the codec is -at in its processing. - */ - -/* OMX_IndexConfigDynamicRangeExpansion: Configure image dynamic range expansion processing */ -typedef enum OMX_DYNAMICRANGEEXPANSIONMODETYPE { - OMX_DynRangeExpOff, - OMX_DynRangeExpLow, - OMX_DynRangeExpMedium, - OMX_DynRangeExpHigh, - OMX_DynRangeExpKhronosExtensions = 0x6F000000, - OMX_DynRangeExpVendorStartUnused = 0x7F000000, - OMX_DynRangeExpMax = 0x7FFFFFFF -} OMX_DYNAMICRANGEEXPANSIONMODETYPE; - -typedef struct OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_DYNAMICRANGEEXPANSIONMODETYPE eMode; -} OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE; -/* -Configures the intensity of an image dynamic range expansion processing stage -*/ - -/* OMX_IndexParamBrcmTransposeBufferCount: Configure the number of pre-allocated transpose buffers */ -/* -This config allows the client to explicitly set the number of destination buffers pre-allocated for -ports that support 90/270 degree rotation (e.g. in video_render). The buffers will be pre-allocated during -a state transition from LOADED to IDLE (the transition will fail if there is not enough memory available -for the buffers). -. -*/ - - -/* OMX_IndexParamBrcmThreadAffinity: Control the CPU affinity of component thread(s) */ -typedef enum OMX_BRCMTHREADAFFINITYTYPE { - OMX_BrcmThreadAffinityCPU0, - OMX_BrcmThreadAffinityCPU1, - OMX_BrcmThreadAffinityMax = 0x7FFFFFFF -} OMX_BRCMTHREADAFFINITYTYPE; - -typedef struct OMX_PARAM_BRCMTHREADAFFINITYTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BRCMTHREADAFFINITYTYPE eAffinity; /**< Thread CPU affinity */ -} OMX_PARAM_BRCMTHREADAFFINITYTYPE; -/* - This parameter is used by clients to hint the CPU that a component thread should run on. - */ - - /* OMX_IndexConfigCommonSceneDetected: Reports the scene type detected by a scene detection algorithm. */ -typedef enum OMX_SCENEDETECTTYPE { - OMX_SceneDetectUnknown, - OMX_SceneDetectLandscape, - OMX_SceneDetectPortrait, - OMX_SceneDetectMacro, - OMX_SceneDetectNight, - OMX_SceneDetectPortraitNight, - OMX_SceneDetectBacklit, - OMX_SceneDetectPortraitBacklit, - OMX_SceneDetectSunset, - OMX_SceneDetectBeach, - OMX_SceneDetectSnow, - OMX_SceneDetectFireworks, - OMX_SceneDetectMax = 0x7FFFFFFF -} OMX_SCENEDETECTTYPE; - -/* OMX_IndexConfigCommonSceneDetected: Reports the scene type detected by a scene detection algorithm. */ -typedef struct OMX_CONFIG_SCENEDETECTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_SCENEDETECTTYPE eScene; /**< Scene type detected */ -} OMX_CONFIG_SCENEDETECTTYPE; -/* - This config is used to report to clients the scene type that has been detected. - */ - -/* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */ -typedef enum OMX_INDEXEXTTYPE { - /* Video parameters and configurations */ - OMX_IndexExtVideoStartUnused = OMX_IndexKhronosExtensions + 0x00600000, - OMX_IndexParamNalStreamFormatSupported, /**< reference: OMX_NALSTREAMFORMATTYPE */ - OMX_IndexParamNalStreamFormat, /**< reference: OMX_NALSTREAMFORMATTYPE */ - OMX_IndexParamNalStreamFormatSelect, /**< reference: OMX_NALSTREAMFORMATTYPE */ - - OMX_IndexExtMax = 0x7FFFFFFF -} OMX_INDEXEXTTYPE; - -/* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */ -typedef enum OMX_NALUFORMATSTYPE { - OMX_NaluFormatStartCodes = 1, - OMX_NaluFormatOneNaluPerBuffer = 2, - OMX_NaluFormatOneByteInterleaveLength = 4, - OMX_NaluFormatTwoByteInterleaveLength = 8, - OMX_NaluFormatFourByteInterleaveLength = 16, - OMX_NaluFormatCodingMax = 0x7FFFFFFF -} OMX_NALUFORMATSTYPE; - -/* OMX_IndexParamNalStreamFormat: Control the NAL unit packaging. This is a Khronos extension. */ -typedef struct OMX_NALSTREAMFORMATTYPE{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_NALUFORMATSTYPE eNaluFormat; -} OMX_NALSTREAMFORMATTYPE; -/* - This parameter is used to control the NAL unit packaging of an H264 video port. - */ - -/* OMX_IndexParamVideoMvc: MVC codec parameters */ -typedef struct OMX_VIDEO_PARAM_AVCTYPE OMX_VIDEO_PARAM_MVCTYPE; -/* -This parameter is currently identical to the AVC parameter type. -*/ - - /* OMX_IndexConfigBrcmDrawStaticBox: Define static box to be drawn */ -typedef enum OMX_STATICBOXTYPE { - OMX_StaticBoxNormal, - OMX_StaticBoxPrimaryFaceAfIdle, - OMX_StaticBoxNonPrimaryFaceAfIdle, - OMX_StaticBoxFocusRegionAfIdle, - OMX_StaticBoxPrimaryFaceAfSuccess, - OMX_StaticBoxNonPrimaryFaceAfSuccess, - OMX_StaticBoxFocusRegionAfSuccess, - OMX_StaticBoxPrimaryFaceAfFail, - OMX_StaticBoxNonPrimaryFaceAfFail, - OMX_StaticBoxFocusRegionAfFail, - OMX_StaticBoxMax -} OMX_STATICBOXTYPE; - -typedef struct OMX_STATICBOX { - OMX_U32 xLeft; - OMX_U32 xTop; - OMX_U32 xWidth; - OMX_U32 xHeight; - OMX_STATICBOXTYPE eType; -} OMX_STATICBOX; - -typedef struct OMX_CONFIG_STATICBOXTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_U32 nTotalBoxes; - OMX_S32 nValidBoxes; - OMX_BOOL bDrawOtherBoxes; - OMX_STATICBOX sBoxes[1]; -} OMX_CONFIG_STATICBOXTYPE; -/* -Query / set the parameters for a box to always be drawn on viewfinder images -The x/y/width/height values for the boxes are relative to the overall image. - -\code{nIndex} - first box number being set/read, allowing retrieval/setting -of many boxes over several requests. - -\code{nValidBoxes} - total number of boxes currently defined. - -\code{nValidBoxes} - number of valid boxes in the \code{sBoxes} array. -When getting, the client sets this to the number of boxes available. -The component writes box data and updates this field with how many -boxes have been written to. -When setting, this is the number of boxes defined with this structure - -\code{sBoxes} - variable length array of static boxes. -*/ - -/* OMX_IndexConfigPortCapturing: Per-port capturing state */ -typedef struct OMX_CONFIG_PORTBOOLEANTYPE{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; -} OMX_CONFIG_PORTBOOLEANTYPE; -/* -This is proposed in IL533f for controlling -which ports of a multi-port camera component are capturing frames. -*/ - -/* OMX_IndexConfigCaptureMode: Capturing mode type */ -typedef enum OMX_CAMERACAPTUREMODETYPE { - OMX_CameraCaptureModeWaitForCaptureEnd, - OMX_CameraCaptureModeWaitForCaptureEndAndUsePreviousInputImage, - OMX_CameraCaptureModeResumeViewfinderImmediately, - OMX_CameraCaptureModeMax, -} OMX_CAMERACAPTUREMODETYPE; - -typedef struct OMX_PARAM_CAMERACAPTUREMODETYPE{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_CAMERACAPTUREMODETYPE eMode; -} OMX_PARAM_CAMERACAPTUREMODETYPE; -/* -This controls the mode of operation for -still image capture in the camera component. -*/ - -/* OMX_IndexParamBrcmDrmEncryption: Set DRM encryption scheme */ -typedef enum OMX_BRCMDRMENCRYPTIONTYPE -{ - OMX_DrmEncryptionNone = 0, - OMX_DrmEncryptionHdcp2, - OMX_DrmEncryptionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DrmEncryptionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DrmEncryptionRangeMax = 0x7FFFFFFF -} OMX_BRCMDRMENCRYPTIONTYPE; - -typedef struct OMX_PARAM_BRCMDRMENCRYPTIONTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BRCMDRMENCRYPTIONTYPE eEncryption; - OMX_U32 nConfigDataLen; - OMX_U8 configData[1]; -} OMX_PARAM_BRCMDRMENCRYPTIONTYPE; -/* -Query/set the DRM encryption scheme used by a port writing out data. -*/ - - -/* OMX_IndexConfigBufferStall: Advertise buffer stall state */ -typedef struct OMX_CONFIG_BUFFERSTALLTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bStalled; /**< Whether we are stalled */ - OMX_U32 nDelay; /**< Delay in real time (us) from last buffer to current time */ -} OMX_CONFIG_BUFFERSTALLTYPE; -/* -Query/set the buffer stall threashold. When set the \code{nDelay} -parameter specifies a time to class whether buffer output is stalled. -When get, the \code{nDelay} parameter indicates the current buffer -delay, and the {bStalled} parameter indicates whether this time is -over a previously set threashold. When -\code{OMX_IndexConfigRequestCallback} is used with this index, a -notification is given when \code{bStalled} changes. -*/ - -/* OMX_IndexConfigLatencyTarget: Maintain target latency by adjusting clock speed */ -typedef struct OMX_CONFIG_LATENCYTARGETTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; /**< whether this mode is enabled */ - OMX_U32 nFilter; /**< number of latency samples to filter on, good value: 1 */ - OMX_U32 nTarget; /**< target latency, us */ - OMX_U32 nShift; /**< shift for storing latency values, good value: 7 */ - OMX_S32 nSpeedFactor; /**< multiplier for speed changes, in 24.8 format, good value: 256-512 */ - OMX_S32 nInterFactor; /**< divider for comparing latency versus gradiant, good value: 300 */ - OMX_S32 nAdjCap; /**< limit for speed change before nSpeedFactor is applied, good value: 100 */ -} OMX_CONFIG_LATENCYTARGETTYPE; -/* -Query/set parameters used when adjusting clock speed to match the -measured latency to a specified value. -*/ - -/* OMX_IndexConfigBrcmUseProprietaryCallback: Force use of proprietary callback */ -typedef struct OMX_CONFIG_BRCMUSEPROPRIETARYCALLBACKTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; -} OMX_CONFIG_BRCMUSEPROPRIETARYCALLBACKTYPE; -/* -Disable/enable the use of proprietary callbacks rather than OpenMAX IL buffer handling. -*/ - -/* OMX_IndexParamCommonUseStcTimestamps: Select timestamp mode */ -typedef enum OMX_TIMESTAMPMODETYPE -{ - OMX_TimestampModeZero = 0, /**< Use a timestamp of 0 */ - OMX_TimestampModeRawStc, /**< Use the raw STC as the timestamp */ - OMX_TimestampModeResetStc, /**< Store the STC when video capture port goes active, and subtract that from STC for the timestamp */ - OMX_TimestampModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TimestampModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TimestampModeMax = 0x7FFFFFFF -} OMX_TIMESTAMPMODETYPE; - -typedef struct OMX_PARAM_TIMESTAMPMODETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_TIMESTAMPMODETYPE eTimestampMode; -} OMX_PARAM_TIMESTAMPMODETYPE; -/* - Specifies what to use as timestamps in the abscence of a clock component. -*/ - -/* EGL image buffer for passing to video port. - * Used when port color format is OMX_COLOR_FormatBRCMEGL. - */ -typedef struct OMX_BRCMVEGLIMAGETYPE -{ - /* Passed between ARM + VC; use fixed width types. */ - OMX_U32 nWidth; - OMX_U32 nHeight; - OMX_U32 nStride; - OMX_U32 nUmemHandle; - OMX_U32 nUmemOffset; - OMX_U32 nFlipped; /* Non-zero -> vertically flipped image */ -} OMX_BRCMVEGLIMAGETYPE; - -/* Provides field of view - */ -typedef struct OMX_CONFIG_BRCMFOVTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 xFieldOfViewHorizontal; /**< Horizontal field of view in degrees. 16p16 value */ - OMX_U32 xFieldOfViewVertical; /**< Vertical field of view in degrees. 16p16 value */ -} OMX_CONFIG_BRCMFOVTYPE; - -/* OMX_IndexConfigBrcmDecoderPassThrough: Enabling Audio Passthrough */ -/* -This allows an audio decoder to disable decoding the stream and pass through correctly framed -data to enable playback of compressed audio to supported output devices. -*/ - -/* OMX_IndexConfigBrcmClockReferenceSource: Select Clock Reference Source */ -/* -This control allows communicating directly to an audio renderer component whether it should -act as a clock reference source or act as a slave. -*/ - -/* OMX_IndexConfigEncLevelExtension: AVC Override encode capabilities */ -typedef struct OMX_VIDEO_CONFIG_LEVEL_EXTEND { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nCustomMaxMBPS; /**< Specifies maximum macro-blocks per second */ - OMX_U32 nCustomMaxFS; /**< Specifies maximum frame size (macro-blocks per frame) */ - OMX_U32 nCustomMaxBRandCPB; /**< Specifies maximum bitrate in units of 1000 bits/s and Codec Picture Buffer (CPB derived from bitrate) */ -} OMX_VIDEO_CONFIG_LEVEL_EXTEND; -/* -This allows finer control of the H264 encode internal parameters. -*/ - -/* OMX_IndexParamBrcmEEDEEnable: Enable/Disable end to end distortion estimator */ -typedef struct OMX_VIDEO_EEDE_ENABLE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 enable; -} OMX_VIDEO_EEDE_ENABLE; -/* -This enables or disables the use of end to end distortion estimation. -*/ - -/* OMX_IndexParamBrcmEEDELossRate: Loss rate configuration for end to end distortion */ -typedef struct OMX_VIDEO_EEDE_LOSSRATE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 loss_rate; /**< loss rate, 5 means 5% */ -} OMX_VIDEO_EEDE_LOSSRATE; -/* -Set the packet loss rate used by the end to end distortion estimator. -*/ - -/* OMX_IndexParamColorSpace: Colour space information */ -typedef enum OMX_COLORSPACETYPE -{ - OMX_COLORSPACE_UNKNOWN, - OMX_COLORSPACE_JPEG_JFIF, - OMX_COLORSPACE_ITU_R_BT601, - OMX_COLORSPACE_ITU_R_BT709, - OMX_COLORSPACE_FCC, - OMX_COLORSPACE_SMPTE240M, - OMX_COLORSPACE_BT470_2_M, - OMX_COLORSPACE_BT470_2_BG, - OMX_COLORSPACE_JFIF_Y16_255, - OMX_COLORSPACE_MAX = 0x7FFFFFFF -} OMX_COLORSPACETYPE; - -typedef struct OMX_PARAM_COLORSPACETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_COLORSPACETYPE eColorSpace; -} OMX_PARAM_COLORSPACETYPE; - -typedef enum OMX_CAPTURESTATETYPE -{ - OMX_NotCapturing, - OMX_CaptureStarted, - OMX_CaptureComplete, - OMX_CaptureMax = 0x7FFFFFFF -} OMX_CAPTURESTATETYPE; - -typedef struct OMX_PARAM_CAPTURESTATETYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_CAPTURESTATETYPE eCaptureState; -} OMX_PARAM_CAPTURESTATETYPE; - -/* -Provides information on the colour space that's in use during image/video processing. -*/ - -/* OMX_IndexConfigMinimiseFragmentation: Minimising Fragmentation */ -/* -This control can be supported to enable the client to request that the component works -to minimise fragmentation of output buffers. -*/ - -/* OMX_IndexConfigBrcmBufferFlagFilter: Filters buffers based on flags */ -/* -This control can be set to request that buffers are conditionally forwarded on -output ports based on matching flags set on that buffer. -*/ - -/* OMX_IndexParamPortMaxFrameSize: Specifying maximum frame size */ -/* -This control can be used to control the maximum frame size allowed on an output port. -*/ - -/* OMX_IndexConfigBrcmCameraRnDPreprocess: Enable use of development ISP software stage */ -/* -This control can be used to enable a developmental software stage to be inserted into -the preprocessor stage of the ISP. -*/ - -/* OMX_IndexConfigBrcmCameraRnDPostprocess: Enable use of development ISP software stage */ -/* -This control can be used to enable a developmental software stage to be inserted into -the postprocessor stage of the ISP. -*/ - -/* OMX_IndexParamDisableVllPool: Controlling use of memory for loadable modules */ -/* -This control can be used to control whether loadable modules used a dedicated memory -pool or use heap allocated memory. -*/ - -typedef struct OMX_PARAM_BRCMCONFIGFILETYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - actual URI name */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 fileSize; /**< Size of complete file data */ -} OMX_PARAM_BRCMCONFIGFILETYPE; - -typedef struct OMX_PARAM_BRCMCONFIGFILECHUNKTYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - actual chunk data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 size; /**< Number of bytes being transferred in this chunk */ - OMX_U32 offset; /**< Offset of this chunk in the file */ - OMX_U8 data[1]; /**< Chunk data */ -} OMX_PARAM_BRCMCONFIGFILECHUNKTYPE; - -typedef struct OMX_PARAM_BRCMFRAMERATERANGETYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - actual chunk data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; - OMX_U32 xFramerateLow; /**< Low end of framerate range. Q16 format */ - OMX_U32 xFramerateHigh; /**< High end of framerate range. Q16 format */ -} OMX_PARAM_BRCMFRAMERATERANGETYPE; - -typedef struct OMX_PARAM_S32TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_S32 nS32; /**< S32 value */ -} OMX_PARAM_S32TYPE; - -typedef struct OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 size_wanted; /**< Input. Zero size means internal video decoder buffer, - mem_handle and phys_addr not returned in this case */ - OMX_U32 protect; /**< Input. 1 = protect, 0 = unprotect */ - - OMX_U32 mem_handle; /**< Output. Handle for protected buffer */ - OMX_PTR phys_addr; /**< Output. Physical memory address of protected buffer */ -} OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE; - -typedef struct OMX_CONFIG_ZEROSHUTTERLAGTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 bZeroShutterMode; /**< Select ZSL mode from the camera. */ - OMX_U32 bConcurrentCapture; /**< Perform concurrent captures for full ZSL. */ - -} OMX_CONFIG_ZEROSHUTTERLAGTYPE; - -typedef struct OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - configuration data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8 config[1]; /**< Configuration data (a VD3_CONFIGURE_T) */ -} OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE; - -typedef struct OMX_CONFIG_CUSTOMAWBGAINSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes, including - configuration data */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 xGainR; /**< Red gain - 16p16 */ - OMX_U32 xGainB; /**< Blue gain - 16p16 */ -} OMX_CONFIG_CUSTOMAWBGAINSTYPE; - -/* OMX_IndexConfigBrcmRenderStats: Query port statistics */ -typedef struct OMX_CONFIG_BRCMRENDERSTATSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL nValid; - OMX_U32 nMatch; - OMX_U32 nPeriod; - OMX_U32 nPhase; - OMX_U32 nPixelClockNominal; - OMX_U32 nPixelClock; - OMX_U32 nHvsStatus; - OMX_U32 dummy0[2]; -} OMX_CONFIG_BRCMRENDERSTATSTYPE; - -#define OMX_BRCM_MAXANNOTATETEXTLEN 256 -typedef struct OMX_CONFIG_BRCMANNOTATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnable; - OMX_BOOL bShowShutter; - OMX_BOOL bShowAnalogGain; - OMX_BOOL bShowLens; - OMX_BOOL bShowCaf; - OMX_BOOL bShowMotion; - OMX_BOOL bShowFrameNum; - OMX_BOOL bEnableBackground; - OMX_BOOL bCustomBackgroundColour; - OMX_U8 nBackgroundY; - OMX_U8 nBackgroundU; - OMX_U8 nBackgroundV; - OMX_U8 dummy1; - OMX_BOOL bCustomTextColour; - OMX_U8 nTextY; - OMX_U8 nTextU; - OMX_U8 nTextV; - OMX_U8 nTextSize; /**< Text size: 6-150 pixels */ - OMX_U8 sText[OMX_BRCM_MAXANNOTATETEXTLEN]; -} OMX_CONFIG_BRCMANNOTATETYPE; - -typedef enum OMX_BRCMSTEREOSCOPICMODETYPE { - OMX_STEREOSCOPIC_NONE = 0, - OMX_STEREOSCOPIC_SIDEBYSIDE = 1, - OMX_STEREOSCOPIC_TOPBOTTOM = 2, - OMX_STEREOSCOPIC_MAX = 0x7FFFFFFF, -} OMX_BRCMSTEREOSCOPICMODETYPE; - -typedef struct OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BRCMSTEREOSCOPICMODETYPE eMode; /**< Packing mode */ - OMX_BOOL bDecimate; /**< Half/half mode - (pixel aspect ratio = 1:2 or 2:1 if set. 1:1 if not set) */ - OMX_BOOL bSwapEyes; /**< False = left eye first. True = right eye first. */ -} OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE; - -typedef enum OMX_CAMERAINTERFACETYPE { - OMX_CAMERAINTERFACE_CSI = 0, - OMX_CAMERAINTERFACE_CCP2 = 1, - OMX_CAMERAINTERFACE_CPI = 2, - OMX_CAMERAINTERFACE_MAX = 0x7FFFFFFF, -} OMX_CAMERAINTERFACETYPE; - -typedef struct OMX_PARAM_CAMERAINTERFACETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_CAMERAINTERFACETYPE eMode; /**< Interface mode */ -} OMX_PARAM_CAMERAINTERFACETYPE; - -typedef enum OMX_CAMERACLOCKINGMODETYPE { - OMX_CAMERACLOCKINGMODE_STROBE = 0, - OMX_CAMERACLOCKINGMODE_CLOCK = 1, - OMX_CAMERACLOCKINGMODE_MAX = 0x7FFFFFFF, -} OMX_CAMERACLOCKINGMODETYPE; - -typedef struct OMX_PARAM_CAMERACLOCKINGMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_CAMERACLOCKINGMODETYPE eMode; /**< Clocking mode */ -} OMX_PARAM_CAMERACLOCKINGMODETYPE; - -typedef enum OMX_CAMERARXDECODETYPE { - OMX_CAMERARXDECODE_NONE = 0, - OMX_CAMERARXDECODE_DPCM8TO10 = 1, - OMX_CAMERARXDECODE_DPCM7TO10 = 2, - OMX_CAMERARXDECODE_DPCM6TO10 = 3, - OMX_CAMERARXDECODE_DPCM8TO12 = 4, - OMX_CAMERARXDECODE_DPCM7TO12 = 5, - OMX_CAMERARXDECODE_DPCM6TO12 = 6, - OMX_CAMERARXDECODE_DPCM10TO14 = 7, - OMX_CAMERARXDECODE_DPCM8TO14 = 8, - OMX_CAMERARXDECODE_DPCM12TO16 = 9, - OMX_CAMERARXDECODE_DPCM10TO16 = 10, - OMX_CAMERARXDECODE_DPCM8TO16 = 11, - OMX_CAMERARXDECODE_MAX = 0x7FFFFFFF -} OMX_CAMERARXDECODETYPE; - -typedef enum OMX_CAMERARXENCODETYPE { - OMX_CAMERARXENCODE_NONE = 0, - OMX_CAMERARXENCODE_DPCM10TO8 = 1, - OMX_CAMERARXENCODE_DPCM12TO8 = 2, - OMX_CAMERARXENCODE_DPCM14TO8 = 3, - OMX_CAMERARXENCODE_MAX = 0x7FFFFFFF -} OMX_CAMERARXENCODETYPE; - -typedef enum OMX_CAMERARXUNPACKTYPE { - OMX_CAMERARXUNPACK_NONE = 0, - OMX_CAMERARXUNPACK_6 = 1, - OMX_CAMERARXUNPACK_7 = 2, - OMX_CAMERARXUNPACK_8 = 3, - OMX_CAMERARXUNPACK_10 = 4, - OMX_CAMERARXUNPACK_12 = 5, - OMX_CAMERARXUNPACK_14 = 6, - OMX_CAMERARXUNPACK_16 = 7, - OMX_CAMERARXUNPACK_MAX = 0x7FFFFFFF -} OMX_CAMERARXUNPACKYPE; - -typedef enum OMX_CAMERARXPACKTYPE { - OMX_CAMERARXPACK_NONE = 0, - OMX_CAMERARXPACK_8 = 1, - OMX_CAMERARXPACK_10 = 2, - OMX_CAMERARXPACK_12 = 3, - OMX_CAMERARXPACK_14 = 4, - OMX_CAMERARXPACK_16 = 5, - OMX_CAMERARXPACK_RAW10 = 6, - OMX_CAMERARXPACK_RAW12 = 7, - OMX_CAMERARXPACK_MAX = 0x7FFFFFFF -} OMX_CAMERARXPACKTYPE; - -typedef struct OMX_PARAM_CAMERARXCONFIG_TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_CAMERARXDECODETYPE eDecode; - OMX_CAMERARXENCODETYPE eEncode; - OMX_CAMERARXUNPACKYPE eUnpack; - OMX_CAMERARXPACKTYPE ePack; - OMX_U32 nDataLanes; - OMX_U32 nEncodeBlockLength; - OMX_U32 nEmbeddedDataLines; - OMX_U32 nImageId; -} OMX_PARAM_CAMERARXCONFIG_TYPE; - -typedef struct OMX_PARAM_CAMERARXTIMING_TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nTiming1; - OMX_U32 nTiming2; - OMX_U32 nTiming3; - OMX_U32 nTiming4; - OMX_U32 nTiming5; - OMX_U32 nTerm1; - OMX_U32 nTerm2; - OMX_U32 nCpiTiming1; - OMX_U32 nCpiTiming2; -} OMX_PARAM_CAMERARXTIMING_TYPE; -#endif -/* File EOF */ diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Component.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Component.h @@ -1,579 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** OMX_Component.h - OpenMax IL version 1.1.2 - * The OMX_Component header file contains the definitions used to define - * the public interface of a component. This header file is intended to - * be used by both the application and the component. - */ - -#ifndef OMX_Component_h -#define OMX_Component_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Audio.h" -#include "OMX_Video.h" -#include "OMX_Image.h" -#include "OMX_Other.h" - -/** @ingroup comp */ -typedef enum OMX_PORTDOMAINTYPE { - OMX_PortDomainAudio, - OMX_PortDomainVideo, - OMX_PortDomainImage, - OMX_PortDomainOther, - OMX_PortDomainKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_PortDomainVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_PortDomainMax = 0x7ffffff -} OMX_PORTDOMAINTYPE; - -/** @ingroup comp */ -typedef struct OMX_PARAM_PORTDEFINITIONTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port number the structure applies to */ - OMX_DIRTYPE eDir; /**< Direction (input or output) of this port */ - OMX_U32 nBufferCountActual; /**< The actual number of buffers allocated on this port */ - OMX_U32 nBufferCountMin; /**< The minimum number of buffers this port requires */ - OMX_U32 nBufferSize; /**< Size, in bytes, for buffers to be used for this channel */ - OMX_BOOL bEnabled; /**< Ports default to enabled and are enabled/disabled by - OMX_CommandPortEnable/OMX_CommandPortDisable. - When disabled a port is unpopulated. A disabled port - is not populated with buffers on a transition to IDLE. */ - OMX_BOOL bPopulated; /**< Port is populated with all of its buffers as indicated by - nBufferCountActual. A disabled port is always unpopulated. - An enabled port is populated on a transition to OMX_StateIdle - and unpopulated on a transition to loaded. */ - OMX_PORTDOMAINTYPE eDomain; /**< Domain of the port. Determines the contents of metadata below. */ - union { - OMX_AUDIO_PORTDEFINITIONTYPE audio; - OMX_VIDEO_PORTDEFINITIONTYPE video; - OMX_IMAGE_PORTDEFINITIONTYPE image; - OMX_OTHER_PORTDEFINITIONTYPE other; - } format; - OMX_BOOL bBuffersContiguous; - OMX_U32 nBufferAlignment; -} OMX_PARAM_PORTDEFINITIONTYPE; - -/** @ingroup comp */ -typedef struct OMX_PARAM_U32TYPE { - OMX_U32 nSize; /**< Size of this structure, in Bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_U32 nU32; /**< U32 value */ -} OMX_PARAM_U32TYPE; - -/** @ingroup rpm */ -typedef enum OMX_SUSPENSIONPOLICYTYPE { - OMX_SuspensionDisabled, /**< No suspension; v1.0 behavior */ - OMX_SuspensionEnabled, /**< Suspension allowed */ - OMX_SuspensionPolicyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_SuspensionPolicyStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_SuspensionPolicyMax = 0x7fffffff -} OMX_SUSPENSIONPOLICYTYPE; - -/** @ingroup rpm */ -typedef struct OMX_PARAM_SUSPENSIONPOLICYTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_SUSPENSIONPOLICYTYPE ePolicy; -} OMX_PARAM_SUSPENSIONPOLICYTYPE; - -/** @ingroup rpm */ -typedef enum OMX_SUSPENSIONTYPE { - OMX_NotSuspended, /**< component is not suspended */ - OMX_Suspended, /**< component is suspended */ - OMX_SuspensionKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_SuspensionVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_SuspendMax = 0x7FFFFFFF -} OMX_SUSPENSIONTYPE; - -/** @ingroup rpm */ -typedef struct OMX_PARAM_SUSPENSIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_SUSPENSIONTYPE eType; -} OMX_PARAM_SUSPENSIONTYPE ; - -typedef struct OMX_CONFIG_BOOLEANTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bEnabled; -} OMX_CONFIG_BOOLEANTYPE; - -/* Parameter specifying the content uri to use. */ -/** @ingroup cp */ -typedef struct OMX_PARAM_CONTENTURITYPE -{ - OMX_U32 nSize; /**< size of the structure in bytes, including - actual URI name */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8 contentURI[1]; /**< The URI name */ -} OMX_PARAM_CONTENTURITYPE; - -/* Parameter specifying the pipe to use. */ -/** @ingroup cp */ -typedef struct OMX_PARAM_CONTENTPIPETYPE -{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_HANDLETYPE hPipe; /**< The pipe handle*/ -} OMX_PARAM_CONTENTPIPETYPE; - -/** @ingroup rpm */ -typedef struct OMX_RESOURCECONCEALMENTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_BOOL bResourceConcealmentForbidden; /**< disallow the use of resource concealment - methods (like degrading algorithm quality to - lower resource consumption or functional bypass) - on a component as a resolution to resource conflicts. */ -} OMX_RESOURCECONCEALMENTTYPE; - - -/** @ingroup metadata */ -typedef enum OMX_METADATACHARSETTYPE { - OMX_MetadataCharsetUnknown = 0, - OMX_MetadataCharsetASCII, - OMX_MetadataCharsetBinary, - OMX_MetadataCharsetCodePage1252, - OMX_MetadataCharsetUTF8, - OMX_MetadataCharsetJavaConformantUTF8, - OMX_MetadataCharsetUTF7, - OMX_MetadataCharsetImapUTF7, - OMX_MetadataCharsetUTF16LE, - OMX_MetadataCharsetUTF16BE, - OMX_MetadataCharsetGB12345, - OMX_MetadataCharsetHZGB2312, - OMX_MetadataCharsetGB2312, - OMX_MetadataCharsetGB18030, - OMX_MetadataCharsetGBK, - OMX_MetadataCharsetBig5, - OMX_MetadataCharsetISO88591, - OMX_MetadataCharsetISO88592, - OMX_MetadataCharsetISO88593, - OMX_MetadataCharsetISO88594, - OMX_MetadataCharsetISO88595, - OMX_MetadataCharsetISO88596, - OMX_MetadataCharsetISO88597, - OMX_MetadataCharsetISO88598, - OMX_MetadataCharsetISO88599, - OMX_MetadataCharsetISO885910, - OMX_MetadataCharsetISO885913, - OMX_MetadataCharsetISO885914, - OMX_MetadataCharsetISO885915, - OMX_MetadataCharsetShiftJIS, - OMX_MetadataCharsetISO2022JP, - OMX_MetadataCharsetISO2022JP1, - OMX_MetadataCharsetISOEUCJP, - OMX_MetadataCharsetSMS7Bit, - OMX_MetadataCharsetKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MetadataCharsetVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MetadataCharsetTypeMax= 0x7FFFFFFF -} OMX_METADATACHARSETTYPE; - -/** @ingroup metadata */ -typedef enum OMX_METADATASCOPETYPE -{ - OMX_MetadataScopeAllLevels, - OMX_MetadataScopeTopLevel, - OMX_MetadataScopePortLevel, - OMX_MetadataScopeNodeLevel, - OMX_MetadataScopeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MetadataScopeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MetadataScopeTypeMax = 0x7fffffff -} OMX_METADATASCOPETYPE; - -/** @ingroup metadata */ -typedef enum OMX_METADATASEARCHMODETYPE -{ - OMX_MetadataSearchValueSizeByIndex, - OMX_MetadataSearchItemByIndex, - OMX_MetadataSearchNextItemByKey, - OMX_MetadataSearchKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MetadataSearchVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MetadataSearchTypeMax = 0x7fffffff -} OMX_METADATASEARCHMODETYPE; -/** @ingroup metadata */ -typedef struct OMX_CONFIG_METADATAITEMCOUNTTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_METADATASCOPETYPE eScopeMode; - OMX_U32 nScopeSpecifier; - OMX_U32 nMetadataItemCount; -} OMX_CONFIG_METADATAITEMCOUNTTYPE; - -/** @ingroup metadata */ -typedef struct OMX_CONFIG_METADATAITEMTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_METADATASCOPETYPE eScopeMode; - OMX_U32 nScopeSpecifier; - OMX_U32 nMetadataItemIndex; - OMX_METADATASEARCHMODETYPE eSearchMode; - OMX_METADATACHARSETTYPE eKeyCharset; - OMX_U8 nKeySizeUsed; - OMX_U8 nKey[128]; - OMX_METADATACHARSETTYPE eValueCharset; - OMX_STRING sLanguageCountry; - OMX_U32 nValueMaxSize; - OMX_U32 nValueSizeUsed; - OMX_U8 nValue[1]; -} OMX_CONFIG_METADATAITEMTYPE; - -/* @ingroup metadata */ -typedef struct OMX_CONFIG_CONTAINERNODECOUNTTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bAllKeys; - OMX_U32 nParentNodeID; - OMX_U32 nNumNodes; -} OMX_CONFIG_CONTAINERNODECOUNTTYPE; - -/** @ingroup metadata */ -typedef struct OMX_CONFIG_CONTAINERNODEIDTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bAllKeys; - OMX_U32 nParentNodeID; - OMX_U32 nNodeIndex; - OMX_U32 nNodeID; - OMX_STRING cNodeName; - OMX_BOOL bIsLeafType; -} OMX_CONFIG_CONTAINERNODEIDTYPE; - -/** @ingroup metadata */ -typedef struct OMX_PARAM_METADATAFILTERTYPE -{ - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_BOOL bAllKeys; /* if true then this structure refers to all keys and - * the three key fields below are ignored */ - OMX_METADATACHARSETTYPE eKeyCharset; - OMX_U32 nKeySizeUsed; - OMX_U8 nKey [128]; - OMX_U32 nLanguageCountrySizeUsed; - OMX_U8 nLanguageCountry[128]; - OMX_BOOL bEnabled; /* if true then key is part of filter (e.g. - * retained for query later). If false then - * key is not part of filter */ -} OMX_PARAM_METADATAFILTERTYPE; - -/** The OMX_HANDLETYPE structure defines the component handle. The component - * handle is used to access all of the component's public methods and also - * contains pointers to the component's private data area. The component - * handle is initialized by the OMX core (with help from the component) - * during the process of loading the component. After the component is - * successfully loaded, the application can safely access any of the - * component's public functions (although some may return an error because - * the state is inappropriate for the access). - * - * @ingroup comp - */ -typedef struct OMX_COMPONENTTYPE -{ - /** The size of this structure, in bytes. It is the responsibility - of the allocator of this structure to fill in this value. Since - this structure is allocated by the GetHandle function, this - function will fill in this value. */ - OMX_U32 nSize; - - /** nVersion is the version of the OMX specification that the structure - is built against. It is the responsibility of the creator of this - structure to initialize this value and every user of this structure - should verify that it knows how to use the exact version of - this structure found herein. */ - OMX_VERSIONTYPE nVersion; - - /** pComponentPrivate is a pointer to the component private data area. - This member is allocated and initialized by the component when the - component is first loaded. The application should not access this - data area. */ - OMX_PTR pComponentPrivate; - - /** pApplicationPrivate is a pointer that is a parameter to the - OMX_GetHandle method, and contains an application private value - provided by the IL client. This application private data is - returned to the IL Client by OMX in all callbacks */ - OMX_PTR pApplicationPrivate; - - /** refer to OMX_GetComponentVersion in OMX_core.h or the OMX IL - specification for details on the GetComponentVersion method. - */ - OMX_ERRORTYPE (*GetComponentVersion)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_OUT OMX_STRING pComponentName, - OMX_OUT OMX_VERSIONTYPE* pComponentVersion, - OMX_OUT OMX_VERSIONTYPE* pSpecVersion, - OMX_OUT OMX_UUIDTYPE* pComponentUUID); - - /** refer to OMX_SendCommand in OMX_core.h or the OMX IL - specification for details on the SendCommand method. - */ - OMX_ERRORTYPE (*SendCommand)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_COMMANDTYPE Cmd, - OMX_IN OMX_U32 nParam1, - OMX_IN OMX_PTR pCmdData); - - /** refer to OMX_GetParameter in OMX_core.h or the OMX IL - specification for details on the GetParameter method. - */ - OMX_ERRORTYPE (*GetParameter)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nParamIndex, - OMX_INOUT OMX_PTR pComponentParameterStructure); - - - /** refer to OMX_SetParameter in OMX_core.h or the OMX IL - specification for details on the SetParameter method. - */ - OMX_ERRORTYPE (*SetParameter)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nIndex, - OMX_IN OMX_PTR pComponentParameterStructure); - - - /** refer to OMX_GetConfig in OMX_core.h or the OMX IL - specification for details on the GetConfig method. - */ - OMX_ERRORTYPE (*GetConfig)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nIndex, - OMX_INOUT OMX_PTR pComponentConfigStructure); - - - /** refer to OMX_SetConfig in OMX_core.h or the OMX IL - specification for details on the SetConfig method. - */ - OMX_ERRORTYPE (*SetConfig)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_INDEXTYPE nIndex, - OMX_IN OMX_PTR pComponentConfigStructure); - - - /** refer to OMX_GetExtensionIndex in OMX_core.h or the OMX IL - specification for details on the GetExtensionIndex method. - */ - OMX_ERRORTYPE (*GetExtensionIndex)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_STRING cParameterName, - OMX_OUT OMX_INDEXTYPE* pIndexType); - - - /** refer to OMX_GetState in OMX_core.h or the OMX IL - specification for details on the GetState method. - */ - OMX_ERRORTYPE (*GetState)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_OUT OMX_STATETYPE* pState); - - - /** The ComponentTunnelRequest method will interact with another OMX - component to determine if tunneling is possible and to setup the - tunneling. The return codes for this method can be used to - determine if tunneling is not possible, or if tunneling is not - supported. - - Base profile components (i.e. non-interop) do not support this - method and should return OMX_ErrorNotImplemented - - The interop profile component MUST support tunneling to another - interop profile component with a compatible port parameters. - A component may also support proprietary communication. - - If proprietary communication is supported the negotiation of - proprietary communication is done outside of OMX in a vendor - specific way. It is only required that the proper result be - returned and the details of how the setup is done is left - to the component implementation. - - When this method is invoked when nPort in an output port, the - component will: - 1. Populate the pTunnelSetup structure with the output port's - requirements and constraints for the tunnel. - - When this method is invoked when nPort in an input port, the - component will: - 1. Query the necessary parameters from the output port to - determine if the ports are compatible for tunneling - 2. If the ports are compatible, the component should store - the tunnel step provided by the output port - 3. Determine which port (either input or output) is the buffer - supplier, and call OMX_SetParameter on the output port to - indicate this selection. - - The component will return from this call within 5 msec. - - @param [in] hComp - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle method. - @param [in] nPort - nPort is used to select the port on the component to be used - for tunneling. - @param [in] hTunneledComp - Handle of the component to tunnel with. This is the component - handle returned by the call to the OMX_GetHandle method. When - this parameter is 0x0 the component should setup the port for - communication with the application / IL Client. - @param [in] nPortOutput - nPortOutput is used indicate the port the component should - tunnel with. - @param [in] pTunnelSetup - Pointer to the tunnel setup structure. When nPort is an output port - the component should populate the fields of this structure. When - When nPort is an input port the component should review the setup - provided by the component with the output port. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup tun - */ - - OMX_ERRORTYPE (*ComponentTunnelRequest)( - OMX_IN OMX_HANDLETYPE hComp, - OMX_IN OMX_U32 nPort, - OMX_IN OMX_HANDLETYPE hTunneledComp, - OMX_IN OMX_U32 nTunneledPort, - OMX_INOUT OMX_TUNNELSETUPTYPE* pTunnelSetup); - - /** refer to OMX_UseBuffer in OMX_core.h or the OMX IL - specification for details on the UseBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*UseBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_PTR pAppPrivate, - OMX_IN OMX_U32 nSizeBytes, - OMX_IN OMX_U8* pBuffer); - - /** refer to OMX_AllocateBuffer in OMX_core.h or the OMX IL - specification for details on the AllocateBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*AllocateBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_INOUT OMX_BUFFERHEADERTYPE** ppBuffer, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_PTR pAppPrivate, - OMX_IN OMX_U32 nSizeBytes); - - /** refer to OMX_FreeBuffer in OMX_core.h or the OMX IL - specification for details on the FreeBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*FreeBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** refer to OMX_EmptyThisBuffer in OMX_core.h or the OMX IL - specification for details on the EmptyThisBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*EmptyThisBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** refer to OMX_FillThisBuffer in OMX_core.h or the OMX IL - specification for details on the FillThisBuffer method. - @ingroup buf - */ - OMX_ERRORTYPE (*FillThisBuffer)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** The SetCallbacks method is used by the core to specify the callback - structure from the application to the component. This is a blocking - call. The component will return from this call within 5 msec. - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @param [in] pCallbacks - pointer to an OMX_CALLBACKTYPE structure used to provide the - callback information to the component - @param [in] pAppData - pointer to an application defined value. It is anticipated that - the application will pass a pointer to a data structure or a "this - pointer" in this area to allow the callback (in the application) - to determine the context of the call - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - */ - OMX_ERRORTYPE (*SetCallbacks)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_CALLBACKTYPE* pCallbacks, - OMX_IN OMX_PTR pAppData); - - /** ComponentDeInit method is used to deinitialize the component - providing a means to free any resources allocated at component - initialization. NOTE: After this call the component handle is - not valid for further use. - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - */ - OMX_ERRORTYPE (*ComponentDeInit)( - OMX_IN OMX_HANDLETYPE hComponent); - - /** @ingroup buf */ - OMX_ERRORTYPE (*UseEGLImage)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_INOUT OMX_BUFFERHEADERTYPE** ppBufferHdr, - OMX_IN OMX_U32 nPortIndex, - OMX_IN OMX_PTR pAppPrivate, - OMX_IN void* eglImage); - - OMX_ERRORTYPE (*ComponentRoleEnum)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_OUT OMX_U8 *cRole, - OMX_IN OMX_U32 nIndex); - -} OMX_COMPONENTTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Core.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Core.h @@ -1,1456 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** OMX_Core.h - OpenMax IL version 1.1.2 - * The OMX_Core header file contains the definitions used by both the - * application and the component to access common items. - */ - -#ifndef OMX_Core_h -#define OMX_Core_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header shall include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Index.h" - - -/** The OMX_COMMANDTYPE enumeration is used to specify the action in the - * OMX_SendCommand macro. - * @ingroup core - */ -typedef enum OMX_COMMANDTYPE -{ - OMX_CommandStateSet, /**< Change the component state */ - OMX_CommandFlush, /**< Flush the data queue(s) of a component */ - OMX_CommandPortDisable, /**< Disable a port on a component. */ - OMX_CommandPortEnable, /**< Enable a port on a component. */ - OMX_CommandMarkBuffer, /**< Mark a component/buffer for observation */ - OMX_CommandKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_CommandVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_CommandMax = 0X7FFFFFFF -} OMX_COMMANDTYPE; - - - -/** The OMX_STATETYPE enumeration is used to indicate or change the component - * state. This enumeration reflects the current state of the component when - * used with the OMX_GetState macro or becomes the parameter in a state change - * command when used with the OMX_SendCommand macro. - * - * The component will be in the Loaded state after the component is initially - * loaded into memory. In the Loaded state, the component is not allowed to - * allocate or hold resources other than to build it's internal parameter - * and configuration tables. The application will send one or more - * SetParameters/GetParameters and SetConfig/GetConfig commands to the - * component and the component will record each of these parameter and - * configuration changes for use later. When the application sends the - * Idle command, the component will acquire the resources needed for the - * specified configuration and will transition to the idle state if the - * allocation is successful. If the component cannot successfully - * transition to the idle state for any reason, the state of the component - * shall be fully rolled back to the Loaded state (e.g. all allocated - * resources shall be released). When the component receives the command - * to go to the Executing state, it shall begin processing buffers by - * sending all input buffers it holds to the application. While - * the component is in the Idle state, the application may also send the - * Pause command. If the component receives the pause command while in the - * Idle state, the component shall send all input buffers it holds to the - * application, but shall not begin processing buffers. This will allow the - * application to prefill buffers. - * - * @ingroup comp - */ - -typedef enum OMX_STATETYPE -{ - OMX_StateInvalid, /**< component has detected that it's internal data - structures are corrupted to the point that - it cannot determine it's state properly */ - OMX_StateLoaded, /**< component has been loaded but has not completed - initialization. The OMX_SetParameter macro - and the OMX_GetParameter macro are the only - valid macros allowed to be sent to the - component in this state. */ - OMX_StateIdle, /**< component initialization has been completed - successfully and the component is ready to - to start. */ - OMX_StateExecuting, /**< component has accepted the start command and - is processing data (if data is available) */ - OMX_StatePause, /**< component has received pause command */ - OMX_StateWaitForResources, /**< component is waiting for resources, either after - preemption or before it gets the resources requested. - See specification for complete details. */ - OMX_StateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_StateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_StateMax = 0X7FFFFFFF -} OMX_STATETYPE; - -/** The OMX_ERRORTYPE enumeration defines the standard OMX Errors. These - * errors should cover most of the common failure cases. However, - * vendors are free to add additional error messages of their own as - * long as they follow these rules: - * 1. Vendor error messages shall be in the range of 0x90000000 to - * 0x9000FFFF. - * 2. Vendor error messages shall be defined in a header file provided - * with the component. No error messages are allowed that are - * not defined. - */ -typedef enum OMX_ERRORTYPE -{ - OMX_ErrorNone = 0, - - /** There were insufficient resources to perform the requested operation */ - OMX_ErrorInsufficientResources = (OMX_S32) 0x80001000, - - /** There was an error, but the cause of the error could not be determined */ - OMX_ErrorUndefined = (OMX_S32) 0x80001001, - - /** The component name string was not valid */ - OMX_ErrorInvalidComponentName = (OMX_S32) 0x80001002, - - /** No component with the specified name string was found */ - OMX_ErrorComponentNotFound = (OMX_S32) 0x80001003, - - /** The component specified did not have a "OMX_ComponentInit" or - "OMX_ComponentDeInit entry point */ - OMX_ErrorInvalidComponent = (OMX_S32) 0x80001004, - - /** One or more parameters were not valid */ - OMX_ErrorBadParameter = (OMX_S32) 0x80001005, - - /** The requested function is not implemented */ - OMX_ErrorNotImplemented = (OMX_S32) 0x80001006, - - /** The buffer was emptied before the next buffer was ready */ - OMX_ErrorUnderflow = (OMX_S32) 0x80001007, - - /** The buffer was not available when it was needed */ - OMX_ErrorOverflow = (OMX_S32) 0x80001008, - - /** The hardware failed to respond as expected */ - OMX_ErrorHardware = (OMX_S32) 0x80001009, - - /** The component is in the state OMX_StateInvalid */ - OMX_ErrorInvalidState = (OMX_S32) 0x8000100A, - - /** Stream is found to be corrupt */ - OMX_ErrorStreamCorrupt = (OMX_S32) 0x8000100B, - - /** Ports being connected are not compatible */ - OMX_ErrorPortsNotCompatible = (OMX_S32) 0x8000100C, - - /** Resources allocated to an idle component have been - lost resulting in the component returning to the loaded state */ - OMX_ErrorResourcesLost = (OMX_S32) 0x8000100D, - - /** No more indicies can be enumerated */ - OMX_ErrorNoMore = (OMX_S32) 0x8000100E, - - /** The component detected a version mismatch */ - OMX_ErrorVersionMismatch = (OMX_S32) 0x8000100F, - - /** The component is not ready to return data at this time */ - OMX_ErrorNotReady = (OMX_S32) 0x80001010, - - /** There was a timeout that occurred */ - OMX_ErrorTimeout = (OMX_S32) 0x80001011, - - /** This error occurs when trying to transition into the state you are already in */ - OMX_ErrorSameState = (OMX_S32) 0x80001012, - - /** Resources allocated to an executing or paused component have been - preempted, causing the component to return to the idle state */ - OMX_ErrorResourcesPreempted = (OMX_S32) 0x80001013, - - /** A non-supplier port sends this error to the IL client (via the EventHandler callback) - during the allocation of buffers (on a transition from the LOADED to the IDLE state or - on a port restart) when it deems that it has waited an unusually long time for the supplier - to send it an allocated buffer via a UseBuffer call. */ - OMX_ErrorPortUnresponsiveDuringAllocation = (OMX_S32) 0x80001014, - - /** A non-supplier port sends this error to the IL client (via the EventHandler callback) - during the deallocation of buffers (on a transition from the IDLE to LOADED state or - on a port stop) when it deems that it has waited an unusually long time for the supplier - to request the deallocation of a buffer header via a FreeBuffer call. */ - OMX_ErrorPortUnresponsiveDuringDeallocation = (OMX_S32) 0x80001015, - - /** A supplier port sends this error to the IL client (via the EventHandler callback) - during the stopping of a port (either on a transition from the IDLE to LOADED - state or a port stop) when it deems that it has waited an unusually long time for - the non-supplier to return a buffer via an EmptyThisBuffer or FillThisBuffer call. */ - OMX_ErrorPortUnresponsiveDuringStop = (OMX_S32) 0x80001016, - - /** Attempting a state transtion that is not allowed */ - OMX_ErrorIncorrectStateTransition = (OMX_S32) 0x80001017, - - /* Attempting a command that is not allowed during the present state. */ - OMX_ErrorIncorrectStateOperation = (OMX_S32) 0x80001018, - - /** The values encapsulated in the parameter or config structure are not supported. */ - OMX_ErrorUnsupportedSetting = (OMX_S32) 0x80001019, - - /** The parameter or config indicated by the given index is not supported. */ - OMX_ErrorUnsupportedIndex = (OMX_S32) 0x8000101A, - - /** The port index supplied is incorrect. */ - OMX_ErrorBadPortIndex = (OMX_S32) 0x8000101B, - - /** The port has lost one or more of its buffers and it thus unpopulated. */ - OMX_ErrorPortUnpopulated = (OMX_S32) 0x8000101C, - - /** Component suspended due to temporary loss of resources */ - OMX_ErrorComponentSuspended = (OMX_S32) 0x8000101D, - - /** Component suspended due to an inability to acquire dynamic resources */ - OMX_ErrorDynamicResourcesUnavailable = (OMX_S32) 0x8000101E, - - /** When the macroblock error reporting is enabled the component returns new error - for every frame that has errors */ - OMX_ErrorMbErrorsInFrame = (OMX_S32) 0x8000101F, - - /** A component reports this error when it cannot parse or determine the format of an input stream. */ - OMX_ErrorFormatNotDetected = (OMX_S32) 0x80001020, - - /** The content open operation failed. */ - OMX_ErrorContentPipeOpenFailed = (OMX_S32) 0x80001021, - - /** The content creation operation failed. */ - OMX_ErrorContentPipeCreationFailed = (OMX_S32) 0x80001022, - - /** Separate table information is being used */ - OMX_ErrorSeperateTablesUsed = (OMX_S32) 0x80001023, - - /** Tunneling is unsupported by the component*/ - OMX_ErrorTunnelingUnsupported = (OMX_S32) 0x80001024, - - OMX_ErrorKhronosExtensions = (OMX_S32)0x8F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ErrorVendorStartUnused = (OMX_S32)0x90000000, /**< Reserved region for introducing Vendor Extensions */ - - /** Disk Full error */ - OMX_ErrorDiskFull = (OMX_S32) 0x90000001, - - /** Max file size is reached */ - OMX_ErrorMaxFileSize = (OMX_S32) 0x90000002, - - /** Unauthorised to play a DRM protected file */ - OMX_ErrorDrmUnauthorised = (OMX_S32) 0x90000003, - - /** The DRM protected file has expired */ - OMX_ErrorDrmExpired = (OMX_S32) 0x90000004, - - /** Some other DRM library error */ - OMX_ErrorDrmGeneral = (OMX_S32) 0x90000005, - - OMX_ErrorMax = 0x7FFFFFFF -} OMX_ERRORTYPE; - -/** @ingroup core */ -typedef OMX_ERRORTYPE (* OMX_COMPONENTINITTYPE)(OMX_IN OMX_HANDLETYPE hComponent); - -/** @ingroup core */ -typedef struct OMX_COMPONENTREGISTERTYPE -{ - const char * pName; /* Component name, 128 byte limit (including '\0') applies */ - OMX_COMPONENTINITTYPE pInitialize; /* Component instance initialization function */ -} OMX_COMPONENTREGISTERTYPE; - -/** @ingroup core */ -extern OMX_COMPONENTREGISTERTYPE OMX_ComponentRegistered[]; - -/** @ingroup rpm */ -typedef struct OMX_PRIORITYMGMTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nGroupPriority; /**< Priority of the component group */ - OMX_U32 nGroupID; /**< ID of the component group */ -} OMX_PRIORITYMGMTTYPE; - -/* Component name and Role names are limited to 128 characters including the terminating '\0'. */ -#define OMX_MAX_STRINGNAME_SIZE 128 - -/** @ingroup comp */ -typedef struct OMX_PARAM_COMPONENTROLETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8 cRole[OMX_MAX_STRINGNAME_SIZE]; /**< name of standard component which defines component role */ -} OMX_PARAM_COMPONENTROLETYPE; - -/** End of Stream Buffer Flag: - * - * A component sets EOS when it has no more data to emit on a particular - * output port. Thus an output port shall set EOS on the last buffer it - * emits. A component's determination of when an output port should - * cease sending data is implemenation specific. - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_EOS 0x00000001 - -/** Start Time Buffer Flag: - * - * The source of a stream (e.g. a demux component) sets the STARTTIME - * flag on the buffer that contains the starting timestamp for the - * stream. The starting timestamp corresponds to the first data that - * should be displayed at startup or after a seek. - * The first timestamp of the stream is not necessarily the start time. - * For instance, in the case of a seek to a particular video frame, - * the target frame may be an interframe. Thus the first buffer of - * the stream will be the intra-frame preceding the target frame and - * the starttime will occur with the target frame (with any other - * required frames required to reconstruct the target intervening). - * - * The STARTTIME flag is directly associated with the buffer's - * timestamp ' thus its association to buffer data and its - * propagation is identical to the timestamp's. - * - * When a Sync Component client receives a buffer with the - * STARTTIME flag it shall perform a SetConfig on its sync port - * using OMX_ConfigTimeClientStartTime and passing the buffer's - * timestamp. - * - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_STARTTIME 0x00000002 - - - -/** Decode Only Buffer Flag: - * - * The source of a stream (e.g. a demux component) sets the DECODEONLY - * flag on any buffer that should shall be decoded but should not be - * displayed. This flag is used, for instance, when a source seeks to - * a target interframe that requires the decode of frames preceding the - * target to facilitate the target's reconstruction. In this case the - * source would emit the frames preceding the target downstream - * but mark them as decode only. - * - * The DECODEONLY is associated with buffer data and propagated in a - * manner identical to the buffer timestamp. - * - * A component that renders data should ignore all buffers with - * the DECODEONLY flag set. - * - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_DECODEONLY 0x00000004 - - -/* Data Corrupt Flag: This flag is set when the IL client believes the data in the associated buffer is corrupt - * @ingroup buf - */ - -#define OMX_BUFFERFLAG_DATACORRUPT 0x00000008 - -/* End of Frame: The buffer contains exactly one end of frame and no data - * occurs after the end of frame. This flag is an optional hint. The absence - * of this flag does not imply the absence of an end of frame within the buffer. - * @ingroup buf -*/ -#define OMX_BUFFERFLAG_ENDOFFRAME 0x00000010 - -/* Sync Frame Flag: This flag is set when the buffer content contains a coded sync frame ' - * a frame that has no dependency on any other frame information - * @ingroup buf - */ -#define OMX_BUFFERFLAG_SYNCFRAME 0x00000020 - -/* Extra data present flag: there is extra data appended to the data stream - * residing in the buffer - * @ingroup buf - */ -#define OMX_BUFFERFLAG_EXTRADATA 0x00000040 - -/** Codec Config Buffer Flag: -* OMX_BUFFERFLAG_CODECCONFIG is an optional flag that is set by an -* output port when all bytes in the buffer form part or all of a set of -* codec specific configuration data. Examples include SPS/PPS nal units -* for OMX_VIDEO_CodingAVC or AudioSpecificConfig data for -* OMX_AUDIO_CodingAAC. Any component that for a given stream sets -* OMX_BUFFERFLAG_CODECCONFIG shall not mix codec configuration bytes -* with frame data in the same buffer, and shall send all buffers -* containing codec configuration bytes before any buffers containing -* frame data that those configurations bytes describe. -* If the stream format for a particular codec has a frame specific -* header at the start of each frame, for example OMX_AUDIO_CodingMP3 or -* OMX_AUDIO_CodingAAC in ADTS mode, then these shall be presented as -* normal without setting OMX_BUFFERFLAG_CODECCONFIG. - * @ingroup buf - */ -#define OMX_BUFFERFLAG_CODECCONFIG 0x00000080 - - - -/** @ingroup buf */ -typedef struct OMX_BUFFERHEADERTYPE -{ - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U8* pBuffer; /**< Pointer to actual block of memory - that is acting as the buffer */ - OMX_U32 nAllocLen; /**< size of the buffer allocated, in bytes */ - OMX_U32 nFilledLen; /**< number of bytes currently in the - buffer */ - OMX_U32 nOffset; /**< start offset of valid data in bytes from - the start of the buffer */ - OMX_PTR pAppPrivate; /**< pointer to any data the application - wants to associate with this buffer */ - OMX_PTR pPlatformPrivate; /**< pointer to any data the platform - wants to associate with this buffer */ - OMX_PTR pInputPortPrivate; /**< pointer to any data the input port - wants to associate with this buffer */ - OMX_PTR pOutputPortPrivate; /**< pointer to any data the output port - wants to associate with this buffer */ - OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will generate a - mark event upon processing this buffer. */ - OMX_PTR pMarkData; /**< Application specific data associated with - the mark sent on a mark event to disambiguate - this mark from others. */ - OMX_U32 nTickCount; /**< Optional entry that the component and - application can update with a tick count - when they access the component. This - value should be in microseconds. Since - this is a value relative to an arbitrary - starting point, this value cannot be used - to determine absolute time. This is an - optional entry and not all components - will update it.*/ - OMX_TICKS nTimeStamp; /**< Timestamp corresponding to the sample - starting at the first logical sample - boundary in the buffer. Timestamps of - successive samples within the buffer may - be inferred by adding the duration of the - of the preceding buffer to the timestamp - of the preceding buffer.*/ - OMX_U32 nFlags; /**< buffer specific flags */ - OMX_U32 nOutputPortIndex; /**< The index of the output port (if any) using - this buffer */ - OMX_U32 nInputPortIndex; /**< The index of the input port (if any) using - this buffer */ -} OMX_BUFFERHEADERTYPE; - -/** The OMX_EXTRADATATYPE enumeration is used to define the - * possible extra data payload types. - * NB: this enum is binary backwards compatible with the previous - * OMX_EXTRADATA_QUANT define. This should be replaced with - * OMX_ExtraDataQuantization. - */ -typedef enum OMX_EXTRADATATYPE -{ - OMX_ExtraDataNone = 0, /**< Indicates that no more extra data sections follow */ - OMX_ExtraDataQuantization, /**< The data payload contains quantization data */ - OMX_ExtraDataKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ExtraDataVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_ExtraDataSequenceGap, /**< Indicates a gap in sequence numbers, data is uint32_t - saying how many frames were lost */ - OMX_ExtraDataDecodeOnlyUntil, /**< Indicates a timestamp until which all data should be - decoded only, and the first packets after should generate - a client start time flag. data is int32_t of seek time - in milliseconds */ - - OMX_ExtraDataMax = 0x7FFFFFFF -} OMX_EXTRADATATYPE; - - -typedef struct OMX_OTHER_EXTRADATATYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_EXTRADATATYPE eType; /* Extra Data type */ - OMX_U32 nDataSize; /* Size of the supporting data to follow */ - OMX_U8 data[1]; /* Supporting data hint */ -} OMX_OTHER_EXTRADATATYPE; - -/** @ingroup comp */ -typedef struct OMX_PORT_PARAM_TYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPorts; /**< The number of ports for this component */ - OMX_U32 nStartPortNumber; /** first port number for this type of port */ -} OMX_PORT_PARAM_TYPE; - -/** @ingroup comp */ -typedef enum OMX_EVENTTYPE -{ - OMX_EventCmdComplete, /**< component has sucessfully completed a command */ - OMX_EventError, /**< component has detected an error condition */ - OMX_EventMark, /**< component has detected a buffer mark */ - OMX_EventPortSettingsChanged, /**< component is reported a port settings change */ - OMX_EventBufferFlag, /**< component has detected an EOS */ - OMX_EventResourcesAcquired, /**< component has been granted resources and is - automatically starting the state change from - OMX_StateWaitForResources to OMX_StateIdle. */ - OMX_EventComponentResumed, /**< Component resumed due to reacquisition of resources */ - OMX_EventDynamicResourcesAvailable, /**< Component has acquired previously unavailable dynamic resources */ - OMX_EventPortFormatDetected, /**< Component has detected a supported format. */ - OMX_EventKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_EventVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_EventParamOrConfigChanged, /* Should be added to the main spec as part of IL416c */ - OMX_EventMax = 0x7FFFFFFF -} OMX_EVENTTYPE; - -typedef struct OMX_CALLBACKTYPE -{ - /** The EventHandler method is used to notify the application when an - event of interest occurs. Events are defined in the OMX_EVENTTYPE - enumeration. Please see that enumeration for details of what will - be returned for each type of event. Callbacks should not return - an error to the component, so if an error occurs, the application - shall handle it internally. This is a blocking call. - - The application should return from this call within 5 msec to avoid - blocking the component for an excessively long period of time. - - @param hComponent - handle of the component to access. This is the component - handle returned by the call to the GetHandle function. - @param pAppData - pointer to an application defined value that was provided in the - pAppData parameter to the OMX_GetHandle method for the component. - This application defined value is provided so that the application - can have a component specific context when receiving the callback. - @param eEvent - Event that the component wants to notify the application about. - @param nData1 - nData will be the OMX_ERRORTYPE for an error event and will be - an OMX_COMMANDTYPE for a command complete event and OMX_INDEXTYPE for a OMX_PortSettingsChanged event. - @param nData2 - nData2 will hold further information related to the event. Can be OMX_STATETYPE for - a OMX_CommandStateSet command or port index for a OMX_PortSettingsChanged event. - Default value is 0 if not used. ) - @param pEventData - Pointer to additional event-specific data (see spec for meaning). - */ - - OMX_ERRORTYPE (*EventHandler)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_EVENTTYPE eEvent, - OMX_IN OMX_U32 nData1, - OMX_IN OMX_U32 nData2, - OMX_IN OMX_PTR pEventData); - - /** The EmptyBufferDone method is used to return emptied buffers from an - input port back to the application for reuse. This is a blocking call - so the application should not attempt to refill the buffers during this - call, but should queue them and refill them in another thread. There - is no error return, so the application shall handle any errors generated - internally. - - The application should return from this call within 5 msec. - - @param hComponent - handle of the component to access. This is the component - handle returned by the call to the GetHandle function. - @param pAppData - pointer to an application defined value that was provided in the - pAppData parameter to the OMX_GetHandle method for the component. - This application defined value is provided so that the application - can have a component specific context when receiving the callback. - @param pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer indicating the buffer that was emptied. - @ingroup buf - */ - OMX_ERRORTYPE (*EmptyBufferDone)( - OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); - - /** The FillBufferDone method is used to return filled buffers from an - output port back to the application for emptying and then reuse. - This is a blocking call so the application should not attempt to - empty the buffers during this call, but should queue the buffers - and empty them in another thread. There is no error return, so - the application shall handle any errors generated internally. The - application shall also update the buffer header to indicate the - number of bytes placed into the buffer. - - The application should return from this call within 5 msec. - - @param hComponent - handle of the component to access. This is the component - handle returned by the call to the GetHandle function. - @param pAppData - pointer to an application defined value that was provided in the - pAppData parameter to the OMX_GetHandle method for the component. - This application defined value is provided so that the application - can have a component specific context when receiving the callback. - @param pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer indicating the buffer that was filled. - @ingroup buf - */ - OMX_ERRORTYPE (*FillBufferDone)( - OMX_OUT OMX_HANDLETYPE hComponent, - OMX_OUT OMX_PTR pAppData, - OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); - -} OMX_CALLBACKTYPE; - -/** The OMX_BUFFERSUPPLIERTYPE enumeration is used to dictate port supplier - preference when tunneling between two ports. - @ingroup tun buf -*/ -typedef enum OMX_BUFFERSUPPLIERTYPE -{ - OMX_BufferSupplyUnspecified = 0x0, /**< port supplying the buffers is unspecified, - or don't care */ - OMX_BufferSupplyInput, /**< input port supplies the buffers */ - OMX_BufferSupplyOutput, /**< output port supplies the buffers */ - OMX_BufferSupplyKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_BufferSupplyVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_BufferSupplyMax = 0x7FFFFFFF -} OMX_BUFFERSUPPLIERTYPE; - - -/** buffer supplier parameter - * @ingroup tun - */ -typedef struct OMX_PARAM_BUFFERSUPPLIERTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_BUFFERSUPPLIERTYPE eBufferSupplier; /**< buffer supplier */ -} OMX_PARAM_BUFFERSUPPLIERTYPE; - - -/**< indicates that buffers received by an input port of a tunnel - may not modify the data in the buffers - @ingroup tun - */ -#define OMX_PORTTUNNELFLAG_READONLY 0x00000001 - - -/** The OMX_TUNNELSETUPTYPE structure is used to pass data from an output - port to an input port as part the two ComponentTunnelRequest calls - resulting from a OMX_SetupTunnel call from the IL Client. - @ingroup tun - */ -typedef struct OMX_TUNNELSETUPTYPE -{ - OMX_U32 nTunnelFlags; /**< bit flags for tunneling */ - OMX_BUFFERSUPPLIERTYPE eSupplier; /**< supplier preference */ -} OMX_TUNNELSETUPTYPE; - -/* OMX Component headers is included to enable the core to use - macros for functions into the component for OMX release 1.0. - Developers should not access any structures or data from within - the component header directly */ -/* TO BE REMOVED - #include <OMX_Component.h> */ - -/** GetComponentVersion will return information about the component. - This is a blocking call. This macro will go directly from the - application to the component (via a core macro). The - component will return from this call within 5 msec. - @param [in] hComponent - handle of component to execute the command - @param [out] pComponentName - pointer to an empty string of length 128 bytes. The component - will write its name into this string. The name will be - terminated by a single zero byte. The name of a component will - be 127 bytes or less to leave room for the trailing zero byte. - An example of a valid component name is "OMX.ABC.ChannelMixer\0". - @param [out] pComponentVersion - pointer to an OMX Version structure that the component will fill - in. The component will fill in a value that indicates the - component version. NOTE: the component version is NOT the same - as the OMX Specification version (found in all structures). The - component version is defined by the vendor of the component and - its value is entirely up to the component vendor. - @param [out] pSpecVersion - pointer to an OMX Version structure that the component will fill - in. The SpecVersion is the version of the specification that the - component was built against. Please note that this value may or - may not match the structure's version. For example, if the - component was built against the 2.0 specification, but the - application (which creates the structure is built against the - 1.0 specification the versions would be different. - @param [out] pComponentUUID - pointer to the UUID of the component which will be filled in by - the component. The UUID is a unique identifier that is set at - RUN time for the component and is unique to each instantion of - the component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetComponentVersion( \ - hComponent, \ - pComponentName, \ - pComponentVersion, \ - pSpecVersion, \ - pComponentUUID) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetComponentVersion( \ - hComponent, \ - pComponentName, \ - pComponentVersion, \ - pSpecVersion, \ - pComponentUUID) /* Macro End */ - - -/** Send a command to the component. This call is a non-blocking call. - The component should check the parameters and then queue the command - to the component thread to be executed. The component thread shall - send the EventHandler() callback at the conclusion of the command. - This macro will go directly from the application to the component (via - a core macro). The component will return from this call within 5 msec. - - When the command is "OMX_CommandStateSet" the component will queue a - state transition to the new state idenfied in nParam. - - When the command is "OMX_CommandFlush", to flush a port's buffer queues, - the command will force the component to return all buffers NOT CURRENTLY - BEING PROCESSED to the application, in the order in which the buffers - were received. - - When the command is "OMX_CommandPortDisable" or - "OMX_CommandPortEnable", the component's port (given by the value of - nParam) will be stopped or restarted. - - When the command "OMX_CommandMarkBuffer" is used to mark a buffer, the - pCmdData will point to a OMX_MARKTYPE structure containing the component - handle of the component to examine the buffer chain for the mark. nParam1 - contains the index of the port on which the buffer mark is applied. - - Specification text for more details. - - @param [in] hComponent - handle of component to execute the command - @param [in] Cmd - Command for the component to execute - @param [in] nParam - Parameter for the command to be executed. When Cmd has the value - OMX_CommandStateSet, value is a member of OMX_STATETYPE. When Cmd has - the value OMX_CommandFlush, value of nParam indicates which port(s) - to flush. -1 is used to flush all ports a single port index will - only flush that port. When Cmd has the value "OMX_CommandPortDisable" - or "OMX_CommandPortEnable", the component's port is given by - the value of nParam. When Cmd has the value "OMX_CommandMarkBuffer" - the components pot is given by the value of nParam. - @param [in] pCmdData - Parameter pointing to the OMX_MARKTYPE structure when Cmd has the value - "OMX_CommandMarkBuffer". - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_SendCommand( \ - hComponent, \ - Cmd, \ - nParam, \ - pCmdData) \ - ((OMX_COMPONENTTYPE*)hComponent)->SendCommand( \ - hComponent, \ - Cmd, \ - nParam, \ - pCmdData) /* Macro End */ - - -/** The OMX_GetParameter macro will get one of the current parameter - settings from the component. This macro cannot only be invoked when - the component is in the OMX_StateInvalid state. The nParamIndex - parameter is used to indicate which structure is being requested from - the component. The application shall allocate the correct structure - and shall fill in the structure size and version information before - invoking this macro. When the parameter applies to a port, the - caller shall fill in the appropriate nPortIndex value indicating the - port on which the parameter applies. If the component has not had - any settings changed, then the component should return a set of - valid DEFAULT parameters for the component. This is a blocking - call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nParamIndex - Index of the structure to be filled. This value is from the - OMX_INDEXTYPE enumeration. - @param [in,out] pComponentParameterStructure - Pointer to application allocated structure to be filled by the - component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) /* Macro End */ - - -/** The OMX_SetParameter macro will send an initialization parameter - structure to a component. Each structure shall be sent one at a time, - in a separate invocation of the macro. This macro can only be - invoked when the component is in the OMX_StateLoaded state, or the - port is disabled (when the parameter applies to a port). The - nParamIndex parameter is used to indicate which structure is being - passed to the component. The application shall allocate the - correct structure and shall fill in the structure size and version - information (as well as the actual data) before invoking this macro. - The application is free to dispose of this structure after the call - as the component is required to copy any data it shall retain. This - is a blocking call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nIndex - Index of the structure to be sent. This value is from the - OMX_INDEXTYPE enumeration. - @param [in] pComponentParameterStructure - pointer to application allocated structure to be used for - initialization by the component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_SetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->SetParameter( \ - hComponent, \ - nParamIndex, \ - pComponentParameterStructure) /* Macro End */ - - -/** The OMX_GetConfig macro will get one of the configuration structures - from a component. This macro can be invoked anytime after the - component has been loaded. The nParamIndex call parameter is used to - indicate which structure is being requested from the component. The - application shall allocate the correct structure and shall fill in the - structure size and version information before invoking this macro. - If the component has not had this configuration parameter sent before, - then the component should return a set of valid DEFAULT values for the - component. This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nIndex - Index of the structure to be filled. This value is from the - OMX_INDEXTYPE enumeration. - @param [in,out] pComponentConfigStructure - pointer to application allocated structure to be filled by the - component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp -*/ -#define OMX_GetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) /* Macro End */ - - -/** The OMX_SetConfig macro will send one of the configuration - structures to a component. Each structure shall be sent one at a time, - each in a separate invocation of the macro. This macro can be invoked - anytime after the component has been loaded. The application shall - allocate the correct structure and shall fill in the structure size - and version information (as well as the actual data) before invoking - this macro. The application is free to dispose of this structure after - the call as the component is required to copy any data it shall retain. - This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nConfigIndex - Index of the structure to be sent. This value is from the - OMX_INDEXTYPE enumeration above. - @param [in] pComponentConfigStructure - pointer to application allocated structure to be used for - initialization by the component. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_SetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) \ - ((OMX_COMPONENTTYPE*)hComponent)->SetConfig( \ - hComponent, \ - nConfigIndex, \ - pComponentConfigStructure) /* Macro End */ - - -/** The OMX_GetExtensionIndex macro will invoke a component to translate - a vendor specific configuration or parameter string into an OMX - structure index. There is no requirement for the vendor to support - this command for the indexes already found in the OMX_INDEXTYPE - enumeration (this is done to save space in small components). The - component shall support all vendor supplied extension indexes not found - in the master OMX_INDEXTYPE enumeration. This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @param [in] cParameterName - OMX_STRING that shall be less than 128 characters long including - the trailing null byte. This is the string that will get - translated by the component into a configuration index. - @param [out] pIndexType - a pointer to a OMX_INDEXTYPE to receive the index value. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetExtensionIndex( \ - hComponent, \ - cParameterName, \ - pIndexType) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetExtensionIndex( \ - hComponent, \ - cParameterName, \ - pIndexType) /* Macro End */ - - -/** The OMX_GetState macro will invoke the component to get the current - state of the component and place the state value into the location - pointed to by pState. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] pState - pointer to the location to receive the state. The value returned - is one of the OMX_STATETYPE members - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp - */ -#define OMX_GetState( \ - hComponent, \ - pState) \ - ((OMX_COMPONENTTYPE*)hComponent)->GetState( \ - hComponent, \ - pState) /* Macro End */ - - -/** The OMX_UseBuffer macro will request that the component use - a buffer (and allocate its own buffer header) already allocated - by another component, or by the IL Client. This is a blocking - call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] ppBuffer - pointer to an OMX_BUFFERHEADERTYPE structure used to receive the - pointer to the buffer header - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ - -#define OMX_UseBuffer( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->UseBuffer( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes, \ - pBuffer) - - -/** The OMX_AllocateBuffer macro will request that the component allocate - a new buffer and buffer header. The component will allocate the - buffer and the buffer header and return a pointer to the buffer - header. This is a blocking call. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] ppBuffer - pointer to an OMX_BUFFERHEADERTYPE structure used to receive - the pointer to the buffer header - @param [in] nPortIndex - nPortIndex is used to select the port on the component the buffer will - be used with. The port can be found by using the nPortIndex - value as an index into the Port Definition array of the component. - @param [in] pAppPrivate - pAppPrivate is used to initialize the pAppPrivate member of the - buffer header structure. - @param [in] nSizeBytes - size of the buffer to allocate. Used when bAllocateNew is true. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_AllocateBuffer( \ - hComponent, \ - ppBuffer, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes) \ - ((OMX_COMPONENTTYPE*)hComponent)->AllocateBuffer( \ - hComponent, \ - ppBuffer, \ - nPortIndex, \ - pAppPrivate, \ - nSizeBytes) /* Macro End */ - - -/** The OMX_FreeBuffer macro will release a buffer header from the component - which was allocated using either OMX_AllocateBuffer or OMX_UseBuffer. If - the component allocated the buffer (see the OMX_UseBuffer macro) then - the component shall free the buffer and buffer header. This is a - blocking call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] nPortIndex - nPortIndex is used to select the port on the component the buffer will - be used with. - @param [in] pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_FreeBuffer( \ - hComponent, \ - nPortIndex, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->FreeBuffer( \ - hComponent, \ - nPortIndex, \ - pBuffer) /* Macro End */ - - -/** The OMX_EmptyThisBuffer macro will send a buffer full of data to an - input port of a component. The buffer will be emptied by the component - and returned to the application via the EmptyBufferDone call back. - This is a non-blocking call in that the component will record the buffer - and return immediately and then empty the buffer, later, at the proper - time. As expected, this macro may be invoked only while the component - is in the OMX_StateExecuting. If nPortIndex does not specify an input - port, the component shall return an error. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_EmptyThisBuffer( \ - hComponent, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->EmptyThisBuffer( \ - hComponent, \ - pBuffer) /* Macro End */ - - -/** The OMX_FillThisBuffer macro will send an empty buffer to an - output port of a component. The buffer will be filled by the component - and returned to the application via the FillBufferDone call back. - This is a non-blocking call in that the component will record the buffer - and return immediately and then fill the buffer, later, at the proper - time. As expected, this macro may be invoked only while the component - is in the OMX_ExecutingState. If nPortIndex does not specify an output - port, the component shall return an error. - - The component should return from this call within 5 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [in] pBuffer - pointer to an OMX_BUFFERHEADERTYPE structure allocated with UseBuffer - or AllocateBuffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_FillThisBuffer( \ - hComponent, \ - pBuffer) \ - ((OMX_COMPONENTTYPE*)hComponent)->FillThisBuffer( \ - hComponent, \ - pBuffer) /* Macro End */ - - - -/** The OMX_UseEGLImage macro will request that the component use - a EGLImage provided by EGL (and allocate its own buffer header) - This is a blocking call. - - The component should return from this call within 20 msec. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the OMX_GetHandle function. - @param [out] ppBuffer - pointer to an OMX_BUFFERHEADERTYPE structure used to receive the - pointer to the buffer header. Note that the memory location used - for this buffer is NOT visible to the IL Client. - @param [in] nPortIndex - nPortIndex is used to select the port on the component the buffer will - be used with. The port can be found by using the nPortIndex - value as an index into the Port Definition array of the component. - @param [in] pAppPrivate - pAppPrivate is used to initialize the pAppPrivate member of the - buffer header structure. - @param [in] eglImage - eglImage contains the handle of the EGLImage to use as a buffer on the - specified port. The component is expected to validate properties of - the EGLImage against the configuration of the port to ensure the component - can use the EGLImage as a buffer. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup comp buf - */ -#define OMX_UseEGLImage( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - eglImage) \ - ((OMX_COMPONENTTYPE*)hComponent)->UseEGLImage( \ - hComponent, \ - ppBufferHdr, \ - nPortIndex, \ - pAppPrivate, \ - eglImage) - -/** The OMX_Init method is used to initialize the OMX core. It shall be the - first call made into OMX and it should only be executed one time without - an interviening OMX_Deinit call. - - The core should return from this call within 20 msec. - - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void); - - -/** The OMX_Deinit method is used to deinitialize the OMX core. It shall be - the last call made into OMX. In the event that the core determines that - thare are components loaded when this call is made, the core may return - with an error rather than try to unload the components. - - The core should return from this call within 20 msec. - - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void); - - -/** The OMX_ComponentNameEnum method will enumerate through all the names of - recognised valid components in the system. This function is provided - as a means to detect all the components in the system run-time. There is - no strict ordering to the enumeration order of component names, although - each name will only be enumerated once. If the OMX core supports run-time - installation of new components, it is only requried to detect newly - installed components when the first call to enumerate component names - is made (i.e. when nIndex is 0x0). - - The core should return from this call in 20 msec. - - @param [out] cComponentName - pointer to a null terminated string with the component name. The - names of the components are strings less than 127 bytes in length - plus the trailing null for a maximum size of 128 bytes. An example - of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are - assigned by the vendor, but shall start with "OMX." and then have - the Vendor designation next. - @param [in] nNameLength - number of characters in the cComponentName string. With all - component name strings restricted to less than 128 characters - (including the trailing null) it is recomended that the caller - provide a input string for the cComponentName of 128 characters. - @param [in] nIndex - number containing the enumeration index for the component. - Multiple calls to OMX_ComponentNameEnum with increasing values - of nIndex will enumerate through the component names in the - system until OMX_ErrorNoMore is returned. The value of nIndex - is 0 to (N-1), where N is the number of valid installed components - in the system. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. When the value of nIndex exceeds the number of - components in the system minus 1, OMX_ErrorNoMore will be - returned. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( - OMX_OUT OMX_STRING cComponentName, - OMX_IN OMX_U32 nNameLength, - OMX_IN OMX_U32 nIndex); - - -/** The OMX_GetHandle method will locate the component specified by the - component name given, load that component into memory and then invoke - the component's methods to create an instance of the component. - - The core should return from this call within 20 msec. - - @param [out] pHandle - pointer to an OMX_HANDLETYPE pointer to be filled in by this method. - @param [in] cComponentName - pointer to a null terminated string with the component name. The - names of the components are strings less than 127 bytes in length - plus the trailing null for a maximum size of 128 bytes. An example - of a valid component name is "OMX.TI.AUDIO.DSP.MIXER\0". Names are - assigned by the vendor, but shall start with "OMX." and then have - the Vendor designation next. - @param [in] pAppData - pointer to an application defined value that will be returned - during callbacks so that the application can identify the source - of the callback. - @param [in] pCallBacks - pointer to a OMX_CALLBACKTYPE structure that will be passed to the - component to initialize it with. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( - OMX_OUT OMX_HANDLETYPE* pHandle, - OMX_IN OMX_STRING cComponentName, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_CALLBACKTYPE* pCallBacks); - - -/** The OMX_FreeHandle method will free a handle allocated by the OMX_GetHandle - method. If the component reference count goes to zero, the component will - be unloaded from memory. - - The core should return from this call within 20 msec when the component is - in the OMX_StateLoaded state. - - @param [in] hComponent - Handle of the component to be accessed. This is the component - handle returned by the call to the GetHandle function. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( - OMX_IN OMX_HANDLETYPE hComponent); - - - -/** The OMX_SetupTunnel method will handle the necessary calls to the components - to setup the specified tunnel the two components. NOTE: This is - an actual method (not a #define macro). This method will make calls into - the component ComponentTunnelRequest method to do the actual tunnel - connection. - - The ComponentTunnelRequest method on both components will be called. - This method shall not be called unless the component is in the - OMX_StateLoaded state except when the ports used for the tunnel are - disabled. In this case, the component may be in the OMX_StateExecuting, - OMX_StatePause, or OMX_StateIdle states. - - The core should return from this call within 20 msec. - - @param [in] hOutput - Handle of the component to be accessed. Also this is the handle - of the component whose port, specified in the nPortOutput parameter - will be used the source for the tunnel. This is the component handle - returned by the call to the OMX_GetHandle function. There is a - requirement that hOutput be the source for the data when - tunelling (i.e. nPortOutput is an output port). If 0x0, the component - specified in hInput will have it's port specified in nPortInput - setup for communication with the application / IL client. - @param [in] nPortOutput - nPortOutput is used to select the source port on component to be - used in the tunnel. - @param [in] hInput - This is the component to setup the tunnel with. This is the handle - of the component whose port, specified in the nPortInput parameter - will be used the destination for the tunnel. This is the component handle - returned by the call to the OMX_GetHandle function. There is a - requirement that hInput be the destination for the data when - tunelling (i.e. nPortInut is an input port). If 0x0, the component - specified in hOutput will have it's port specified in nPortPOutput - setup for communication with the application / IL client. - @param [in] nPortInput - nPortInput is used to select the destination port on component to be - used in the tunnel. - @return OMX_ERRORTYPE - If the command successfully executes, the return code will be - OMX_ErrorNone. Otherwise the appropriate OMX error will be returned. - When OMX_ErrorNotImplemented is returned, one or both components is - a non-interop component and does not support tunneling. - - On failure, the ports of both components are setup for communication - with the application / IL Client. - @ingroup core tun - */ -OMX_API OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( - OMX_IN OMX_HANDLETYPE hOutput, - OMX_IN OMX_U32 nPortOutput, - OMX_IN OMX_HANDLETYPE hInput, - OMX_IN OMX_U32 nPortInput); - -/** @ingroup cp */ -OMX_API OMX_ERRORTYPE OMX_GetContentPipe( - OMX_OUT OMX_HANDLETYPE *hPipe, - OMX_IN OMX_STRING szURI); - -/** The OMX_GetComponentsOfRole method will return the number of components that support the given - role and (if the compNames field is non-NULL) the names of those components. The call will fail if - an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the - client should: - * first call this function with the compNames field NULL to determine the number of component names - * second call this function with the compNames field pointing to an array of names allocated - according to the number returned by the first call. - - The core should return from this call within 5 msec. - - @param [in] role - This is generic standard component name consisting only of component class - name and the type within that class (e.g. 'audio_decoder.aac'). - @param [inout] pNumComps - This is used both as input and output. - - If compNames is NULL, the input is ignored and the output specifies how many components support - the given role. - - If compNames is not NULL, on input it bounds the size of the input structure and - on output, it specifies the number of components string names listed within the compNames parameter. - @param [inout] compNames - If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings which accepts - a list of the names of all physical components that implement the specified standard component name. - Each name is NULL terminated. numComps indicates the number of names. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_GetComponentsOfRole ( - OMX_IN OMX_STRING role, - OMX_INOUT OMX_U32 *pNumComps, - OMX_INOUT OMX_U8 **compNames); - -/** The OMX_GetRolesOfComponent method will return the number of roles supported by the given - component and (if the roles field is non-NULL) the names of those roles. The call will fail if - an insufficiently sized array of names is supplied. To ensure the array is sufficiently sized the - client should: - * first call this function with the roles field NULL to determine the number of role names - * second call this function with the roles field pointing to an array of names allocated - according to the number returned by the first call. - - The core should return from this call within 5 msec. - - @param [in] compName - This is the name of the component being queried about. - @param [inout] pNumRoles - This is used both as input and output. - - If roles is NULL, the input is ignored and the output specifies how many roles the component supports. - - If compNames is not NULL, on input it bounds the size of the input structure and - on output, it specifies the number of roles string names listed within the roles parameter. - @param [out] roles - If NULL this field is ignored. If non-NULL this points to an array of 128-byte strings - which accepts a list of the names of all standard components roles implemented on the - specified component name. numComps indicates the number of names. - @ingroup core - */ -OMX_API OMX_ERRORTYPE OMX_GetRolesOfComponent ( - OMX_IN OMX_STRING compName, - OMX_INOUT OMX_U32 *pNumRoles, - OMX_OUT OMX_U8 **roles); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_ILCS.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_ILCS.h @@ -1,65 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenMAX IL - ILCS specific types - -#ifndef OMX_ILCS_h -#define OMX_ILCS_h - -typedef struct OMX_PARAM_PORTSUMMARYTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nNumPorts; /**< Total number of ports */ - OMX_U32 reqSet; /**< Which set of ports is details below, portIndex[0] is port reqSet*32 */ - OMX_U32 portDir; /**< Bitfield, 1 if output port, 0 if input port, max 256 ports */ - OMX_U32 portIndex[32]; /**< Port Indexes */ -} OMX_PARAM_PORTSUMMARYTYPE; - -typedef struct OMX_PARAM_MARKCOMPARISONTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_PTR mark; /**< Pointer to be used for mark comparisons */ -} OMX_PARAM_MARKCOMPARISONTYPE; - -typedef struct OMX_PARAM_BRCMRECURSIONUNSAFETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_S32 (*pRecursionUnsafe)(OMX_PTR param); - OMX_PTR param; -} OMX_PARAM_BRCMRECURSIONUNSAFETYPE; - -typedef struct OMX_PARAM_TUNNELSTATUSTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port being queried */ - OMX_U32 nIndex; /**< Query the nIndex'th port and fill in nPortIndex */ - OMX_BOOL bUseIndex; /**< If OMX_TRUE read nIndex, otherwise read nPortIndex */ - OMX_PTR hTunneledComponent; /**< Component currently tunnelling with */ - OMX_U32 nTunneledPort; /**< Port on tunnelled component */ -} OMX_PARAM_TUNNELSTATUSTYPE; - -#endif diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_IVCommon.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_IVCommon.h @@ -1,1096 +0,0 @@ -/** - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** - * @file OMX_IVCommon.h - OpenMax IL version 1.1.2 - * The structures needed by Video and Image components to exchange - * parameters and configuration data with the components. - */ -#ifndef OMX_IVCommon_h -#define OMX_IVCommon_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** - * Each OMX header must include all required header files to allow the header - * to compile without errors. The includes below are required for this header - * file to compile successfully - */ - -#include "OMX_Core.h" - -/** @defgroup iv OpenMAX IL Imaging and Video Domain - * Common structures for OpenMAX IL Imaging and Video domains - * @{ - */ - - -/** - * Enumeration defining possible uncompressed image/video formats. - * - * ENUMS: - * Unused : Placeholder value when format is N/A - * Monochrome : black and white - * 8bitRGB332 : Red 7:5, Green 4:2, Blue 1:0 - * 12bitRGB444 : Red 11:8, Green 7:4, Blue 3:0 - * 16bitARGB4444 : Alpha 15:12, Red 11:8, Green 7:4, Blue 3:0 - * 16bitARGB1555 : Alpha 15, Red 14:10, Green 9:5, Blue 4:0 - * 16bitRGB565 : Red 15:11, Green 10:5, Blue 4:0 - * 16bitBGR565 : Blue 15:11, Green 10:5, Red 4:0 - * 18bitRGB666 : Red 17:12, Green 11:6, Blue 5:0 - * 18bitARGB1665 : Alpha 17, Red 16:11, Green 10:5, Blue 4:0 - * 19bitARGB1666 : Alpha 18, Red 17:12, Green 11:6, Blue 5:0 - * 24bitRGB888 : Red 24:16, Green 15:8, Blue 7:0 - * 24bitBGR888 : Blue 24:16, Green 15:8, Red 7:0 - * 24bitARGB1887 : Alpha 23, Red 22:15, Green 14:7, Blue 6:0 - * 25bitARGB1888 : Alpha 24, Red 23:16, Green 15:8, Blue 7:0 - * 32bitBGRA8888 : Blue 31:24, Green 23:16, Red 15:8, Alpha 7:0 - * 32bitARGB8888 : Alpha 31:24, Red 23:16, Green 15:8, Blue 7:0 - * YUV411Planar : U,Y are subsampled by a factor of 4 horizontally - * YUV411PackedPlanar : packed per payload in planar slices - * YUV420Planar : Three arrays Y,U,V. - * YUV420PackedPlanar : packed per payload in planar slices - * YUV420SemiPlanar : Two arrays, one is all Y, the other is U and V - * YUV422Planar : Three arrays Y,U,V. - * YUV422PackedPlanar : packed per payload in planar slices - * YUV422SemiPlanar : Two arrays, one is all Y, the other is U and V - * YCbYCr : Organized as 16bit YUYV (i.e. YCbYCr) - * YCrYCb : Organized as 16bit YVYU (i.e. YCrYCb) - * CbYCrY : Organized as 16bit UYVY (i.e. CbYCrY) - * CrYCbY : Organized as 16bit VYUY (i.e. CrYCbY) - * YUV444Interleaved : Each pixel contains equal parts YUV - * RawBayer8bit : SMIA camera output format - * RawBayer10bit : SMIA camera output format - * RawBayer8bitcompressed : SMIA camera output format - Vendor extensions - * 32bitABGR888 : Alpha 31:24, Blue 23:16, Green 15:8, Red 7:0 - */ -typedef enum OMX_COLOR_FORMATTYPE { - OMX_COLOR_FormatUnused, - OMX_COLOR_FormatMonochrome, - OMX_COLOR_Format8bitRGB332, - OMX_COLOR_Format12bitRGB444, - OMX_COLOR_Format16bitARGB4444, - OMX_COLOR_Format16bitARGB1555, - OMX_COLOR_Format16bitRGB565, - OMX_COLOR_Format16bitBGR565, - OMX_COLOR_Format18bitRGB666, - OMX_COLOR_Format18bitARGB1665, - OMX_COLOR_Format19bitARGB1666, - OMX_COLOR_Format24bitRGB888, - OMX_COLOR_Format24bitBGR888, - OMX_COLOR_Format24bitARGB1887, - OMX_COLOR_Format25bitARGB1888, - OMX_COLOR_Format32bitBGRA8888, - OMX_COLOR_Format32bitARGB8888, - OMX_COLOR_FormatYUV411Planar, - OMX_COLOR_FormatYUV411PackedPlanar, - OMX_COLOR_FormatYUV420Planar, - OMX_COLOR_FormatYUV420PackedPlanar, - OMX_COLOR_FormatYUV420SemiPlanar, - OMX_COLOR_FormatYUV422Planar, - OMX_COLOR_FormatYUV422PackedPlanar, - OMX_COLOR_FormatYUV422SemiPlanar, - OMX_COLOR_FormatYCbYCr, - OMX_COLOR_FormatYCrYCb, - OMX_COLOR_FormatCbYCrY, - OMX_COLOR_FormatCrYCbY, - OMX_COLOR_FormatYUV444Interleaved, - OMX_COLOR_FormatRawBayer8bit, - OMX_COLOR_FormatRawBayer10bit, - OMX_COLOR_FormatRawBayer8bitcompressed, - OMX_COLOR_FormatL2, - OMX_COLOR_FormatL4, - OMX_COLOR_FormatL8, - OMX_COLOR_FormatL16, - OMX_COLOR_FormatL24, - OMX_COLOR_FormatL32, - OMX_COLOR_FormatYUV420PackedSemiPlanar, - OMX_COLOR_FormatYUV422PackedSemiPlanar, - OMX_COLOR_Format18BitBGR666, - OMX_COLOR_Format24BitARGB6666, - OMX_COLOR_Format24BitABGR6666, - OMX_COLOR_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_COLOR_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_COLOR_Format32bitABGR8888, - OMX_COLOR_Format8bitPalette, - OMX_COLOR_FormatYUVUV128, - OMX_COLOR_FormatRawBayer12bit, - OMX_COLOR_FormatBRCMEGL, - OMX_COLOR_FormatBRCMOpaque, - OMX_COLOR_FormatYVU420PackedPlanar, - OMX_COLOR_FormatYVU420PackedSemiPlanar, - OMX_COLOR_FormatRawBayer16bit, - OMX_COLOR_FormatMax = 0x7FFFFFFF -} OMX_COLOR_FORMATTYPE; - - -/** - * Defines the matrix for conversion from RGB to YUV or vice versa. - * iColorMatrix should be initialized with the fixed point values - * used in converting between formats. - */ -typedef struct OMX_CONFIG_COLORCONVERSIONTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version info */ - OMX_U32 nPortIndex; /**< Port that this struct applies to */ - OMX_S32 xColorMatrix[3][3]; /**< Stored in signed Q16 format */ - OMX_S32 xColorOffset[4]; /**< Stored in signed Q16 format */ -}OMX_CONFIG_COLORCONVERSIONTYPE; - - -/** - * Structure defining percent to scale each frame dimension. For example: - * To make the width 50% larger, use fWidth = 1.5 and to make the width - * 1/2 the original size, use fWidth = 0.5 - */ -typedef struct OMX_CONFIG_SCALEFACTORTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version info */ - OMX_U32 nPortIndex; /**< Port that this struct applies to */ - OMX_S32 xWidth; /**< Fixed point value stored as Q16 */ - OMX_S32 xHeight; /**< Fixed point value stored as Q16 */ -}OMX_CONFIG_SCALEFACTORTYPE; - - -/** - * Enumeration of possible image filter types - */ -typedef enum OMX_IMAGEFILTERTYPE { - OMX_ImageFilterNone, - OMX_ImageFilterNoise, - OMX_ImageFilterEmboss, - OMX_ImageFilterNegative, - OMX_ImageFilterSketch, - OMX_ImageFilterOilPaint, - OMX_ImageFilterHatch, - OMX_ImageFilterGpen, - OMX_ImageFilterAntialias, - OMX_ImageFilterDeRing, - OMX_ImageFilterSolarize, - OMX_ImageFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ImageFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - /* Broadcom specific image filters */ - OMX_ImageFilterWatercolor, - OMX_ImageFilterPastel, - OMX_ImageFilterSharpen, - OMX_ImageFilterFilm, - OMX_ImageFilterBlur, - OMX_ImageFilterSaturation, - - OMX_ImageFilterDeInterlaceLineDouble, - OMX_ImageFilterDeInterlaceAdvanced, - - OMX_ImageFilterColourSwap, - OMX_ImageFilterWashedOut, - OMX_ImageFilterColourPoint, - OMX_ImageFilterPosterise, - OMX_ImageFilterColourBalance, - OMX_ImageFilterCartoon, - - OMX_ImageFilterAnaglyph, - OMX_ImageFilterDeInterlaceFast, - OMX_ImageFilterMax = 0x7FFFFFFF -} OMX_IMAGEFILTERTYPE; - -typedef enum OMX_IMAGEFILTERANAGLYPHTYPE { - OMX_ImageFilterAnaglyphNone, - OMX_ImageFilterAnaglyphSBStoRedCyan, - OMX_ImageFilterAnaglyphSBStoCyanRed, - OMX_ImageFilterAnaglyphSBStoGreenMagenta, - OMX_ImageFilterAnaglyphSBStoMagentaGreen, - OMX_ImageFilterAnaglyphTABtoRedCyan, - OMX_ImageFilterAnaglyphTABtoCyanRed, - OMX_ImageFilterAnaglyphTABtoGreenMagenta, - OMX_ImageFilterAnaglyphTABtoMagentaGreen, -} OMX_IMAGEFILTERANAGLYPHTYPE; - -/** - * Image filter configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eImageFilter : Image filter type enumeration - */ -typedef struct OMX_CONFIG_IMAGEFILTERTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGEFILTERTYPE eImageFilter; -} OMX_CONFIG_IMAGEFILTERTYPE; - - -/** - * Customized U and V for color enhancement - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bColorEnhancement : Enable/disable color enhancement - * nCustomizedU : Practical values: 16-240, range: 0-255, value set for - * U component - * nCustomizedV : Practical values: 16-240, range: 0-255, value set for - * V component - */ -typedef struct OMX_CONFIG_COLORENHANCEMENTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bColorEnhancement; - OMX_U8 nCustomizedU; - OMX_U8 nCustomizedV; -} OMX_CONFIG_COLORENHANCEMENTTYPE; - - -/** - * Define color key and color key mask - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nARGBColor : 32bit Alpha, Red, Green, Blue Color - * nARGBMask : 32bit Mask for Alpha, Red, Green, Blue channels - */ -typedef struct OMX_CONFIG_COLORKEYTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nARGBColor; - OMX_U32 nARGBMask; -} OMX_CONFIG_COLORKEYTYPE; - - -/** - * List of color blend types for pre/post processing - * - * ENUMS: - * None : No color blending present - * AlphaConstant : Function is (alpha_constant * src) + - * (1 - alpha_constant) * dst) - * AlphaPerPixel : Function is (alpha * src) + (1 - alpha) * dst) - * Alternate : Function is alternating pixels from src and dst - * And : Function is (src & dst) - * Or : Function is (src | dst) - * Invert : Function is ~src - */ -typedef enum OMX_COLORBLENDTYPE { - OMX_ColorBlendNone, - OMX_ColorBlendAlphaConstant, - OMX_ColorBlendAlphaPerPixel, - OMX_ColorBlendAlternate, - OMX_ColorBlendAnd, - OMX_ColorBlendOr, - OMX_ColorBlendInvert, - OMX_ColorBlendKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ColorBlendVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_ColorBlendMax = 0x7FFFFFFF -} OMX_COLORBLENDTYPE; - - -/** - * Color blend configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nRGBAlphaConstant : Constant global alpha values when global alpha is used - * eColorBlend : Color blend type enumeration - */ -typedef struct OMX_CONFIG_COLORBLENDTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nRGBAlphaConstant; - OMX_COLORBLENDTYPE eColorBlend; -} OMX_CONFIG_COLORBLENDTYPE; - - -/** - * Hold frame dimension - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nWidth : Frame width in pixels - * nHeight : Frame height in pixels - */ -typedef struct OMX_FRAMESIZETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nWidth; - OMX_U32 nHeight; -} OMX_FRAMESIZETYPE; - - -/** - * Rotation configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nRotation : +/- integer rotation value - */ -typedef struct OMX_CONFIG_ROTATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nRotation; -} OMX_CONFIG_ROTATIONTYPE; - - -/** - * Possible mirroring directions for pre/post processing - * - * ENUMS: - * None : No mirroring - * Vertical : Vertical mirroring, flip on X axis - * Horizontal : Horizontal mirroring, flip on Y axis - * Both : Both vertical and horizontal mirroring - */ -typedef enum OMX_MIRRORTYPE { - OMX_MirrorNone = 0, - OMX_MirrorVertical, - OMX_MirrorHorizontal, - OMX_MirrorBoth, - OMX_MirrorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MirrorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MirrorMax = 0x7FFFFFFF -} OMX_MIRRORTYPE; - - -/** - * Mirroring configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eMirror : Mirror type enumeration - */ -typedef struct OMX_CONFIG_MIRRORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_MIRRORTYPE eMirror; -} OMX_CONFIG_MIRRORTYPE; - - -/** - * Position information only - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nX : X coordinate for the point - * nY : Y coordinate for the point - */ -typedef struct OMX_CONFIG_POINTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nX; - OMX_S32 nY; -} OMX_CONFIG_POINTTYPE; - - -/** - * Frame size plus position - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nLeft : X Coordinate of the top left corner of the rectangle - * nTop : Y Coordinate of the top left corner of the rectangle - * nWidth : Width of the rectangle - * nHeight : Height of the rectangle - */ -typedef struct OMX_CONFIG_RECTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nLeft; - OMX_S32 nTop; - OMX_U32 nWidth; - OMX_U32 nHeight; -} OMX_CONFIG_RECTTYPE; - - -/** - * Deblocking state; it is required to be set up before starting the codec - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bDeblocking : Enable/disable deblocking mode - */ -typedef struct OMX_PARAM_DEBLOCKINGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bDeblocking; -} OMX_PARAM_DEBLOCKINGTYPE; - - -/** - * Stabilization state - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bStab : Enable/disable frame stabilization state - */ -typedef struct OMX_CONFIG_FRAMESTABTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bStab; -} OMX_CONFIG_FRAMESTABTYPE; - - -/** - * White Balance control type - * - * STRUCT MEMBERS: - * SunLight : Referenced in JSR-234 - * Flash : Optimal for device's integrated flash - */ -typedef enum OMX_WHITEBALCONTROLTYPE { - OMX_WhiteBalControlOff = 0, - OMX_WhiteBalControlAuto, - OMX_WhiteBalControlSunLight, - OMX_WhiteBalControlCloudy, - OMX_WhiteBalControlShade, - OMX_WhiteBalControlTungsten, - OMX_WhiteBalControlFluorescent, - OMX_WhiteBalControlIncandescent, - OMX_WhiteBalControlFlash, - OMX_WhiteBalControlHorizon, - OMX_WhiteBalControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_WhiteBalControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_WhiteBalControlMax = 0x7FFFFFFF -} OMX_WHITEBALCONTROLTYPE; - - -/** - * White Balance control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eWhiteBalControl : White balance enumeration - */ -typedef struct OMX_CONFIG_WHITEBALCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_WHITEBALCONTROLTYPE eWhiteBalControl; -} OMX_CONFIG_WHITEBALCONTROLTYPE; - - -/** - * Exposure control type - */ -typedef enum OMX_EXPOSURECONTROLTYPE { - OMX_ExposureControlOff = 0, - OMX_ExposureControlAuto, - OMX_ExposureControlNight, - OMX_ExposureControlBackLight, - OMX_ExposureControlSpotLight, - OMX_ExposureControlSports, - OMX_ExposureControlSnow, - OMX_ExposureControlBeach, - OMX_ExposureControlLargeAperture, - OMX_ExposureControlSmallAperture, - OMX_ExposureControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_ExposureControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_ExposureControlVeryLong, - OMX_ExposureControlFixedFps, - OMX_ExposureControlNightWithPreview, - OMX_ExposureControlAntishake, - OMX_ExposureControlFireworks, - OMX_ExposureControlMax = 0x7FFFFFFF -} OMX_EXPOSURECONTROLTYPE; - - -/** - * White Balance control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eExposureControl : Exposure control enumeration - */ -typedef struct OMX_CONFIG_EXPOSURECONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_EXPOSURECONTROLTYPE eExposureControl; -} OMX_CONFIG_EXPOSURECONTROLTYPE; - - -/** - * Defines sensor supported mode. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nFrameRate : Single shot mode is indicated by a 0 - * bOneShot : Enable for single shot, disable for streaming - * sFrameSize : Framesize - */ -typedef struct OMX_PARAM_SENSORMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nFrameRate; - OMX_BOOL bOneShot; - OMX_FRAMESIZETYPE sFrameSize; -} OMX_PARAM_SENSORMODETYPE; - - -/** - * Defines contrast level - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nContrast : Values allowed for contrast -100 to 100, zero means no change - */ -typedef struct OMX_CONFIG_CONTRASTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nContrast; -} OMX_CONFIG_CONTRASTTYPE; - - -/** - * Defines brightness level - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nBrightness : 0-100% - */ -typedef struct OMX_CONFIG_BRIGHTNESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nBrightness; -} OMX_CONFIG_BRIGHTNESSTYPE; - - -/** - * Defines backlight level configuration for a video sink, e.g. LCD panel - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nBacklight : Values allowed for backlight 0-100% - * nTimeout : Number of milliseconds before backlight automatically turns - * off. A value of 0x0 disables backight timeout - */ -typedef struct OMX_CONFIG_BACKLIGHTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nBacklight; - OMX_U32 nTimeout; -} OMX_CONFIG_BACKLIGHTTYPE; - - -/** - * Defines setting for Gamma - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nGamma : Values allowed for gamma -100 to 100, zero means no change - */ -typedef struct OMX_CONFIG_GAMMATYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nGamma; -} OMX_CONFIG_GAMMATYPE; - - -/** - * Define for setting saturation - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nSaturation : Values allowed for saturation -100 to 100, zero means - * no change - */ -typedef struct OMX_CONFIG_SATURATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nSaturation; -} OMX_CONFIG_SATURATIONTYPE; - - -/** - * Define for setting Lightness - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nLightness : Values allowed for lightness -100 to 100, zero means no - * change - */ -typedef struct OMX_CONFIG_LIGHTNESSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_S32 nLightness; -} OMX_CONFIG_LIGHTNESSTYPE; - - -/** - * Plane blend configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Index of input port associated with the plane. - * nDepth : Depth of the plane in relation to the screen. Higher - * numbered depths are "behind" lower number depths. - * This number defaults to the Port Index number. - * nAlpha : Transparency blending component for the entire plane. - * See blending modes for more detail. - */ -typedef struct OMX_CONFIG_PLANEBLENDTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nDepth; - OMX_U32 nAlpha; -} OMX_CONFIG_PLANEBLENDTYPE; - - -/** - * Define interlace type - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bEnable : Enable control variable for this functionality - * (see below) - * nInterleavePortIndex : Index of input or output port associated with - * the interleaved plane. - * pPlanarPortIndexes[4] : Index of input or output planar ports. - */ -typedef struct OMX_PARAM_INTERLEAVETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnable; - OMX_U32 nInterleavePortIndex; -} OMX_PARAM_INTERLEAVETYPE; - - -/** - * Defines the picture effect used for an input picture - */ -typedef enum OMX_TRANSITIONEFFECTTYPE { - OMX_EffectNone, - OMX_EffectFadeFromBlack, - OMX_EffectFadeToBlack, - OMX_EffectUnspecifiedThroughConstantColor, - OMX_EffectDissolve, - OMX_EffectWipe, - OMX_EffectUnspecifiedMixOfTwoScenes, - OMX_EffectKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_EffectVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_EffectReverseUnspecifiedMixOfTwoScenes, - -#ifndef __VIDEOCORE4__ - OMX_EffectDiagonalWipe, - OMX_EffectDiagonalWipeRotate, - OMX_EffectEllipticalWipe, - OMX_EffectEllipticalWipeRotate, - OMX_EffectInverseEllipticalWipe, - OMX_EffectInverseEllipticalWipeRotate, - OMX_EffectGlassWipe, - OMX_EffectGlassWipeRotate, - OMX_EffectWavyWipe, - OMX_EffectWavyWipeRotate, - OMX_EffectMunchingSquares, - OMX_EffectStripeWipe, - OMX_EffectStripeWipeRotate, - - OMX_EffectRotozoomUnmatched, - OMX_EffectRotozoomMatched, - OMX_EffectRotozoomGentle, -#endif - - OMX_EffectMunchRandom, - OMX_EffectMunchVRandom, - OMX_EffectMunchHRandom, - OMX_EffectMunchWipe, - OMX_EffectMunchMunch, - OMX_EffectMunchStripe, - OMX_EffectFadeRandom, - OMX_EffectFadeVRandom, - OMX_EffectFadeHRandom, - OMX_EffectFadeWipe, - OMX_EffectFadeMunch, - OMX_EffectFadeStripe, - OMX_EffectColourBlockRandom, - OMX_EffectColourBlockVRandom, - OMX_EffectColourBlockHRandom, - OMX_EffectColourBlockWipe, - OMX_EffectColourBlockMunch, - OMX_EffectColourBlockStripe, - OMX_EffectColourBlock2Random, - OMX_EffectColourBlock2VRandom, - OMX_EffectColourBlock2HRandom, - OMX_EffectColourBlock2Wipe, - OMX_EffectColourBlock2Munch, - OMX_EffectColourBlock2Stripe, - OMX_EffectShadeRandom, - OMX_EffectShadeVRandom, - OMX_EffectShadeHRandom, - OMX_EffectShadeWipe, - OMX_EffectShadeMunch, - OMX_EffectShadeStripe, - OMX_EffectBitmaskRandom, - OMX_EffectBitmaskVRandom, - OMX_EffectBitmaskHRandom, - OMX_EffectBitmaskWipe, - OMX_EffectBitmaskMunch, - OMX_EffectBitmaskStripe, - OMX_EffectBitmask2Random, - OMX_EffectBitmask2VRandom, - OMX_EffectBitmask2HRandom, - OMX_EffectBitmask2Wipe, - OMX_EffectBitmask2Munch, - OMX_EffectBitmask2Stripe, - OMX_EffectBitmask2ColourRandom, - OMX_EffectBitmask2ColourVRandom, - OMX_EffectBitmask2ColourHRandom, - OMX_EffectBitmask2ColourWipe, - OMX_EffectBitmask2ColourMunch, - OMX_EffectBitmask2ColourStripe, - - OMX_EffectPushRight, - OMX_EffectPushLeft, - OMX_EffectPushDown, - OMX_EffectPushUp, - OMX_EffectCoverRight, - OMX_EffectCoverLeft, - OMX_EffectCoverDown, - OMX_EffectCoverUp, - OMX_EffectRevealRight, - OMX_EffectRevealLeft, - OMX_EffectRevealDown, - OMX_EffectRevealUp, - OMX_EffectWipeRight, - OMX_EffectWipeLeft, - OMX_EffectWipeDown, - OMX_EffectWipeUp, - OMX_EffectSpeckle, - OMX_EffectCircle, - OMX_EffectSpiral, - OMX_EffectDiamond, - OMX_EffectVert, - OMX_EffectPlus, - OMX_EffectClock, - OMX_EffectPlasma, - OMX_EffectDisplace, - OMX_EffectGenie, - OMX_EffectSide, - OMX_EffectMaze, - OMX_EffectRipple, - OMX_EffectStar, - OMX_EffectAlpha, - OMX_EffectIntense, - OMX_EffectIntenseU, - OMX_EffectIntenseV, - OMX_EffectInverseIntense, - OMX_EffectInverseIntenseU, - OMX_EffectInverseIntenseV, - - OMX_EffectPageTurn, - - OMX_EffectFlipPlaneDown, - OMX_EffectFlipPlaneDownMid, - OMX_EffectFlipPlaneDownHigh, - OMX_EffectFlipPlaneLeft, - OMX_EffectFlipPlaneLeftMid, - OMX_EffectFlipPlaneLeftHigh, - OMX_EffectFlipCubeDown, - OMX_EffectFlipCubeDownMid, - OMX_EffectFlipCubeDownHigh, - OMX_EffectFlipCubeLeft, - OMX_EffectFlipCubeLeftMid, - OMX_EffectFlipCubeLeftHigh, - - OMX_EffectMax = 0x7FFFFFFF -} OMX_TRANSITIONEFFECTTYPE; - - -/** - * Structure used to configure current transition effect - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eEffect : Effect to enable - */ -typedef struct OMX_CONFIG_TRANSITIONEFFECTTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_TRANSITIONEFFECTTYPE eEffect; -} OMX_CONFIG_TRANSITIONEFFECTTYPE; - - -/** - * Defines possible data unit types for encoded video data. The data unit - * types are used both for encoded video input for playback as well as - * encoded video output from recording. - */ -typedef enum OMX_DATAUNITTYPE { - OMX_DataUnitCodedPicture, - OMX_DataUnitVideoSegment, - OMX_DataUnitSeveralSegments, - OMX_DataUnitArbitraryStreamSection, - OMX_DataUnitKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DataUnitVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DataUnitMax = 0x7FFFFFFF -} OMX_DATAUNITTYPE; - - -/** - * Defines possible encapsulation types for coded video data unit. The - * encapsulation information is used both for encoded video input for - * playback as well as encoded video output from recording. - */ -typedef enum OMX_DATAUNITENCAPSULATIONTYPE { - OMX_DataEncapsulationElementaryStream, - OMX_DataEncapsulationGenericPayload, - OMX_DataEncapsulationRtpPayload, - OMX_DataEncapsulationKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DataEncapsulationVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DataEncapsulationMax = 0x7FFFFFFF -} OMX_DATAUNITENCAPSULATIONTYPE; - - -/** - * Structure used to configure the type of being decoded/encoded - */ -typedef struct OMX_PARAM_DATAUNITTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_DATAUNITTYPE eUnitType; - OMX_DATAUNITENCAPSULATIONTYPE eEncapsulationType; -} OMX_PARAM_DATAUNITTYPE; - - -/** - * Defines dither types - */ -typedef enum OMX_DITHERTYPE { - OMX_DitherNone, - OMX_DitherOrdered, - OMX_DitherErrorDiffusion, - OMX_DitherOther, - OMX_DitherKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_DitherVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_DitherMax = 0x7FFFFFFF -} OMX_DITHERTYPE; - - -/** - * Structure used to configure current type of dithering - */ -typedef struct OMX_CONFIG_DITHERTYPE { - OMX_U32 nSize; /**< Size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_DITHERTYPE eDither; /**< Type of dithering to use */ -} OMX_CONFIG_DITHERTYPE; - -typedef struct OMX_CONFIG_CAPTUREMODETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; /**< Port that this structure applies to */ - OMX_BOOL bContinuous; /**< If true then ignore frame rate and emit capture - * data as fast as possible (otherwise obey port's frame rate). */ - OMX_BOOL bFrameLimited; /**< If true then terminate capture after the port emits the - * specified number of frames (otherwise the port does not - * terminate the capture until instructed to do so by the client). - * Even if set, the client may manually terminate the capture prior - * to reaching the limit. */ - OMX_U32 nFrameLimit; /**< Limit on number of frames emitted during a capture (only - * valid if bFrameLimited is set). */ -} OMX_CONFIG_CAPTUREMODETYPE; - -typedef enum OMX_METERINGTYPE { - - OMX_MeteringModeAverage, /**< Center-weighted average metering. */ - OMX_MeteringModeSpot, /**< Spot (partial) metering. */ - OMX_MeteringModeMatrix, /**< Matrix or evaluative metering. */ - - OMX_MeteringKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_MeteringVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_MeteringModeBacklit, - OMX_EVModeMax = 0x7fffffff -} OMX_METERINGTYPE; - -typedef struct OMX_CONFIG_EXPOSUREVALUETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_METERINGTYPE eMetering; - OMX_S32 xEVCompensation; /**< Fixed point value stored as Q16 */ - OMX_U32 nApertureFNumber; /**< e.g. nApertureFNumber = 2 implies "f/2" - Q16 format */ - OMX_BOOL bAutoAperture; /**< Whether aperture number is defined automatically */ - OMX_U32 nShutterSpeedMsec; /**< Shutterspeed in milliseconds */ - OMX_BOOL bAutoShutterSpeed; /**< Whether shutter speed is defined automatically */ - OMX_U32 nSensitivity; /**< e.g. nSensitivity = 100 implies "ISO 100" */ - OMX_BOOL bAutoSensitivity; /**< Whether sensitivity is defined automatically */ -} OMX_CONFIG_EXPOSUREVALUETYPE; - -/** - * Focus region configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bCenter : Use center region as focus region of interest - * bLeft : Use left region as focus region of interest - * bRight : Use right region as focus region of interest - * bTop : Use top region as focus region of interest - * bBottom : Use bottom region as focus region of interest - * bTopLeft : Use top left region as focus region of interest - * bTopRight : Use top right region as focus region of interest - * bBottomLeft : Use bottom left region as focus region of interest - * bBottomRight : Use bottom right region as focus region of interest - */ -typedef struct OMX_CONFIG_FOCUSREGIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bCenter; - OMX_BOOL bLeft; - OMX_BOOL bRight; - OMX_BOOL bTop; - OMX_BOOL bBottom; - OMX_BOOL bTopLeft; - OMX_BOOL bTopRight; - OMX_BOOL bBottomLeft; - OMX_BOOL bBottomRight; -} OMX_CONFIG_FOCUSREGIONTYPE; - -/** - * Focus Status type - */ -typedef enum OMX_FOCUSSTATUSTYPE { - OMX_FocusStatusOff = 0, - OMX_FocusStatusRequest, - OMX_FocusStatusReached, - OMX_FocusStatusUnableToReach, - OMX_FocusStatusLost, - OMX_FocusStatusKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_FocusStatusVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_FocusStatusCafWatching, - OMX_FocusStatusCafSceneChanged, - OMX_FocusStatusMax = 0x7FFFFFFF -} OMX_FOCUSSTATUSTYPE; - -/** - * Focus status configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFocusStatus : Specifies the focus status - * bCenterStatus : Use center region as focus region of interest - * bLeftStatus : Use left region as focus region of interest - * bRightStatus : Use right region as focus region of interest - * bTopStatus : Use top region as focus region of interest - * bBottomStatus : Use bottom region as focus region of interest - * bTopLeftStatus : Use top left region as focus region of interest - * bTopRightStatus : Use top right region as focus region of interest - * bBottomLeftStatus : Use bottom left region as focus region of interest - * bBottomRightStatus : Use bottom right region as focus region of interest - */ -typedef struct OMX_PARAM_FOCUSSTATUSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_FOCUSSTATUSTYPE eFocusStatus; - OMX_BOOL bCenterStatus; - OMX_BOOL bLeftStatus; - OMX_BOOL bRightStatus; - OMX_BOOL bTopStatus; - OMX_BOOL bBottomStatus; - OMX_BOOL bTopLeftStatus; - OMX_BOOL bTopRightStatus; - OMX_BOOL bBottomLeftStatus; - OMX_BOOL bBottomRightStatus; -} OMX_PARAM_FOCUSSTATUSTYPE; - -/** @} */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Image.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Image.h @@ -1,347 +0,0 @@ -/** - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -/** - * @file OMX_Image.h - OpenMax IL version 1.1.2 - * The structures needed by Image components to exchange parameters and - * configuration data with the components. - */ -#ifndef OMX_Image_h -#define OMX_Image_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** - * Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_IVCommon.h" - -/** @defgroup imaging OpenMAX IL Imaging Domain - * @ingroup iv - * Structures for OpenMAX IL Imaging domain - * @{ - */ - -/** - * Enumeration used to define the possible image compression coding. - */ -typedef enum OMX_IMAGE_CODINGTYPE { - OMX_IMAGE_CodingUnused, /**< Value when format is N/A */ - OMX_IMAGE_CodingAutoDetect, /**< Auto detection of image format */ - OMX_IMAGE_CodingJPEG, /**< JPEG/JFIF image format */ - OMX_IMAGE_CodingJPEG2K, /**< JPEG 2000 image format */ - OMX_IMAGE_CodingEXIF, /**< EXIF image format */ - OMX_IMAGE_CodingTIFF, /**< TIFF image format */ - OMX_IMAGE_CodingGIF, /**< Graphics image format */ - OMX_IMAGE_CodingPNG, /**< PNG image format */ - OMX_IMAGE_CodingLZW, /**< LZW image format */ - OMX_IMAGE_CodingBMP, /**< Windows Bitmap format */ - OMX_IMAGE_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_IMAGE_CodingTGA, - OMX_IMAGE_CodingPPM, - - OMX_IMAGE_CodingMax = 0x7FFFFFFF -} OMX_IMAGE_CODINGTYPE; - - -/** - * Data structure used to define an image path. The number of image paths - * for input and output will vary by type of the image component. - * - * Input (aka Source) : Zero Inputs, one Output, - * Splitter : One Input, 2 or more Outputs, - * Processing Element : One Input, one output, - * Mixer : 2 or more inputs, one output, - * Output (aka Sink) : One Input, zero outputs. - * - * The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output - * image path. If additional vendor specific data is required, it should - * be transmitted to the component using the CustomCommand function. - * Compliant components will prepopulate this structure with optimal - * values during the OMX_GetParameter() command. - * - * STRUCT MEMBERS: - * cMIMEType : MIME type of data for the port - * pNativeRender : Platform specific reference for a display if a - * sync, otherwise this field is 0 - * nFrameWidth : Width of frame to be used on port if - * uncompressed format is used. Use 0 for - * unknown, don't care or variable - * nFrameHeight : Height of frame to be used on port if - * uncompressed format is used. Use 0 for - * unknown, don't care or variable - * nStride : Number of bytes per span of an image (i.e. - * indicates the number of bytes to get from - * span N to span N+1, where negative stride - * indicates the image is bottom up - * nSliceHeight : Height used when encoding in slices - * bFlagErrorConcealment : Turns on error concealment if it is supported by - * the OMX component - * eCompressionFormat : Compression format used in this instance of - * the component. When OMX_IMAGE_CodingUnused is - * specified, eColorFormat is valid - * eColorFormat : Decompressed format used by this component - * pNativeWindow : Platform specific reference for a window object if a - * display sink , otherwise this field is 0x0. - */ -typedef struct OMX_IMAGE_PORTDEFINITIONTYPE { - OMX_STRING cMIMEType; - OMX_NATIVE_DEVICETYPE pNativeRender; - OMX_U32 nFrameWidth; - OMX_U32 nFrameHeight; - OMX_S32 nStride; - OMX_U32 nSliceHeight; - OMX_BOOL bFlagErrorConcealment; - OMX_IMAGE_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_NATIVE_WINDOWTYPE pNativeWindow; -} OMX_IMAGE_PORTDEFINITIONTYPE; - - -/** - * Port format parameter. This structure is used to enumerate the various - * data input/output format supported by the port. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Indicates which port to set - * nIndex : Indicates the enumeration index for the format from - * 0x0 to N-1 - * eCompressionFormat : Compression format used in this instance of the - * component. When OMX_IMAGE_CodingUnused is specified, - * eColorFormat is valid - * eColorFormat : Decompressed format used by this component - */ -typedef struct OMX_IMAGE_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_IMAGE_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; -} OMX_IMAGE_PARAM_PORTFORMATTYPE; - - -/** - * Flash control type - * - * ENUMS - * Torch : Flash forced constantly on - */ -typedef enum OMX_IMAGE_FLASHCONTROLTYPE { - OMX_IMAGE_FlashControlOn = 0, - OMX_IMAGE_FlashControlOff, - OMX_IMAGE_FlashControlAuto, - OMX_IMAGE_FlashControlRedEyeReduction, - OMX_IMAGE_FlashControlFillin, - OMX_IMAGE_FlashControlTorch, - OMX_IMAGE_FlashControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_FlashControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_FlashControlMax = 0x7FFFFFFF -} OMX_IMAGE_FLASHCONTROLTYPE; - - -/** - * Flash control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFlashControl : Flash control type - */ -typedef struct OMX_IMAGE_PARAM_FLASHCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_FLASHCONTROLTYPE eFlashControl; -} OMX_IMAGE_PARAM_FLASHCONTROLTYPE; - - -/** - * Focus control type - */ -typedef enum OMX_IMAGE_FOCUSCONTROLTYPE { - OMX_IMAGE_FocusControlOn = 0, - OMX_IMAGE_FocusControlOff, - OMX_IMAGE_FocusControlAuto, - OMX_IMAGE_FocusControlAutoLock, - OMX_IMAGE_FocusControlKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_FocusControlVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_FocusControlHyperfocal, /* Focus at the hyperfocal point of the lens. */ - OMX_IMAGE_FocusControlAutoMacro, /* CF over a macro range (eg 0-50cm) */ - OMX_IMAGE_FocusControlAutoInfinity, /* CF over distant range (eg 50cm to infinity) */ - OMX_IMAGE_FocusControlAutoLockMacro, /* AF over a macro range (eg 0-50cm) */ - OMX_IMAGE_FocusControlAutoLockInfinity, /* AF over distant range (eg 50cm to infinity) */ - OMX_IMAGE_FocusControlNearFixed, /* Focus at a fixed near focus point - (50cm-1m) */ - OMX_IMAGE_FocusControlAutoNear, /* CF over a near range (eg 0-200cm) */ - OMX_IMAGE_FocusControlAutoLockNear, /* AF over a near range (eg 0-200cm) */ - OMX_IMAGE_FocusControlInfinityFixed, /* Focus at infinity */ - OMX_IMAGE_FocusControlMacroFixed, /* Focus at a macro distance */ - OMX_IMAGE_FocusControlAutoFast, /* CF over a full range with fast response */ - OMX_IMAGE_FocusControlAutoMacroFast, /* CF over a macro range (eg 0-50cm) with fast response */ - OMX_IMAGE_FocusControlAutoNearFast, /* CF over a near range (eg 0-200cm) */ - OMX_IMAGE_FocusControlAutoInfinityFast, /* CF over distant range (eg 50cm to infinity) with fast response */ - OMX_IMAGE_FocusControlCurrentFixed, /* Stop the lens at the current position */ - OMX_IMAGE_FocusControlMax = 0x7FFFFFFF -} OMX_IMAGE_FOCUSCONTROLTYPE; - - -/** - * Focus control configuration - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFocusControl : Focus control - * nFocusSteps : Focus can take on values from 0 mm to infinity. - * Interest is only in number of steps over this range. - * nFocusStepIndex : Current focus step index - */ -typedef struct OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_FOCUSCONTROLTYPE eFocusControl; - OMX_U32 nFocusSteps; - OMX_U32 nFocusStepIndex; -} OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE; - - -/** - * Q Factor for JPEG compression, which controls the tradeoff between image - * quality and size. Q Factor provides a more simple means of controlling - * JPEG compression quality, without directly programming Quantization - * tables for chroma and luma - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nQFactor : JPEG Q factor value in the range of 1-100. A factor of 1 - * produces the smallest, worst quality images, and a factor - * of 100 produces the largest, best quality images. A - * typical default is 75 for small good quality images - */ -typedef struct OMX_IMAGE_PARAM_QFACTORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nQFactor; -} OMX_IMAGE_PARAM_QFACTORTYPE; - -/** - * Quantization table type - */ - -typedef enum OMX_IMAGE_QUANTIZATIONTABLETYPE { - OMX_IMAGE_QuantizationTableLuma = 0, - OMX_IMAGE_QuantizationTableChroma, - OMX_IMAGE_QuantizationTableChromaCb, - OMX_IMAGE_QuantizationTableChromaCr, - OMX_IMAGE_QuantizationTableKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_QuantizationTableVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_QuantizationTableMax = 0x7FFFFFFF -} OMX_IMAGE_QUANTIZATIONTABLETYPE; - -/** - * JPEG quantization tables are used to determine DCT compression for - * YUV data, as an alternative to specifying Q factor, providing exact - * control of compression - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eQuantizationTable : Quantization table type - * nQuantizationMatrix[64] : JPEG quantization table of coefficients stored - * in increasing columns then by rows of data (i.e. - * row 1, ... row 8). Quantization values are in - * the range 0-255 and stored in linear order - * (i.e. the component will zig-zag the - * quantization table data if required internally) - */ -typedef struct OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_QUANTIZATIONTABLETYPE eQuantizationTable; - OMX_U8 nQuantizationMatrix[64]; -} OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE; - - -/** - * Huffman table type, the same Huffman table is applied for chroma and - * luma component - */ -typedef enum OMX_IMAGE_HUFFMANTABLETYPE { - OMX_IMAGE_HuffmanTableAC = 0, - OMX_IMAGE_HuffmanTableDC, - OMX_IMAGE_HuffmanTableACLuma, - OMX_IMAGE_HuffmanTableACChroma, - OMX_IMAGE_HuffmanTableDCLuma, - OMX_IMAGE_HuffmanTableDCChroma, - OMX_IMAGE_HuffmanTableKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_IMAGE_HuffmanTableVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_IMAGE_HuffmanTableMax = 0x7FFFFFFF -} OMX_IMAGE_HUFFMANTABLETYPE; - -/** - * JPEG Huffman table - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eHuffmanTable : Huffman table type - * nNumberOfHuffmanCodeOfLength[16] : 0-16, number of Huffman codes of each - * possible length - * nHuffmanTable[256] : 0-255, the size used for AC and DC - * HuffmanTable are 16 and 162 - */ -typedef struct OMX_IMAGE_PARAM_HUFFMANTTABLETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_IMAGE_HUFFMANTABLETYPE eHuffmanTable; - OMX_U8 nNumberOfHuffmanCodeOfLength[16]; - OMX_U8 nHuffmanTable[256]; -}OMX_IMAGE_PARAM_HUFFMANTTABLETYPE; - -/** @} */ -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Index.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Index.h @@ -1,532 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** @file OMX_Index.h - OpenMax IL version 1.1.2 - * The OMX_Index header file contains the definitions for both applications - * and components . - */ - - -#ifndef OMX_Index_h -#define OMX_Index_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ -#include "OMX_Types.h" - - -/** The OMX_INDEXTYPE enumeration is used to select a structure when either - * getting or setting parameters and/or configuration data. Each entry in - * this enumeration maps to an OMX specified structure. When the - * OMX_GetParameter, OMX_SetParameter, OMX_GetConfig or OMX_SetConfig methods - * are used, the second parameter will always be an entry from this enumeration - * and the third entry will be the structure shown in the comments for the entry. - * For example, if the application is initializing a cropping function, the - * OMX_SetConfig command would have OMX_IndexConfigCommonInputCrop as the second parameter - * and would send a pointer to an initialized OMX_RECTTYPE structure as the - * third parameter. - * - * The enumeration entries named with the OMX_Config prefix are sent using - * the OMX_SetConfig command and the enumeration entries named with the - * OMX_PARAM_ prefix are sent using the OMX_SetParameter command. - */ -typedef enum OMX_INDEXTYPE { - - OMX_IndexComponentStartUnused = 0x01000000, - OMX_IndexParamPriorityMgmt, /**< reference: OMX_PRIORITYMGMTTYPE */ - OMX_IndexParamAudioInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamImageInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamVideoInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamOtherInit, /**< reference: OMX_PORT_PARAM_TYPE */ - OMX_IndexParamNumAvailableStreams, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamActiveStream, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamSuspensionPolicy, /**< reference: OMX_PARAM_SUSPENSIONPOLICYTYPE */ - OMX_IndexParamComponentSuspended, /**< reference: OMX_PARAM_SUSPENSIONTYPE */ - OMX_IndexConfigCapturing, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCaptureMode, /**< reference: OMX_CONFIG_CAPTUREMODETYPE */ - OMX_IndexAutoPauseAfterCapture, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamContentURI, /**< reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexParamCustomContentPipe, /**< reference: OMX_PARAM_CONTENTPIPETYPE */ - OMX_IndexParamDisableResourceConcealment, /**< reference: OMX_RESOURCECONCEALMENTTYPE */ - OMX_IndexConfigMetadataItemCount, /**< reference: OMX_CONFIG_METADATAITEMCOUNTTYPE */ - OMX_IndexConfigContainerNodeCount, /**< reference: OMX_CONFIG_CONTAINERNODECOUNTTYPE */ - OMX_IndexConfigMetadataItem, /**< reference: OMX_CONFIG_METADATAITEMTYPE */ - OMX_IndexConfigCounterNodeID, /**< reference: OMX_CONFIG_CONTAINERNODEIDTYPE */ - OMX_IndexParamMetadataFilterType, /**< reference: OMX_PARAM_METADATAFILTERTYPE */ - OMX_IndexParamMetadataKeyFilter, /**< reference: OMX_PARAM_METADATAFILTERTYPE */ - OMX_IndexConfigPriorityMgmt, /**< reference: OMX_PRIORITYMGMTTYPE */ - OMX_IndexParamStandardComponentRole, /**< reference: OMX_PARAM_COMPONENTROLETYPE */ - - OMX_IndexPortStartUnused = 0x02000000, - OMX_IndexParamPortDefinition, /**< reference: OMX_PARAM_PORTDEFINITIONTYPE */ - OMX_IndexParamCompBufferSupplier, /**< reference: OMX_PARAM_BUFFERSUPPLIERTYPE */ - OMX_IndexReservedStartUnused = 0x03000000, - - /* Audio parameters and configurations */ - OMX_IndexAudioStartUnused = 0x04000000, - OMX_IndexParamAudioPortFormat, /**< reference: OMX_AUDIO_PARAM_PORTFORMATTYPE */ - OMX_IndexParamAudioPcm, /**< reference: OMX_AUDIO_PARAM_PCMMODETYPE */ - OMX_IndexParamAudioAac, /**< reference: OMX_AUDIO_PARAM_AACPROFILETYPE */ - OMX_IndexParamAudioRa, /**< reference: OMX_AUDIO_PARAM_RATYPE */ - OMX_IndexParamAudioMp3, /**< reference: OMX_AUDIO_PARAM_MP3TYPE */ - OMX_IndexParamAudioAdpcm, /**< reference: OMX_AUDIO_PARAM_ADPCMTYPE */ - OMX_IndexParamAudioG723, /**< reference: OMX_AUDIO_PARAM_G723TYPE */ - OMX_IndexParamAudioG729, /**< reference: OMX_AUDIO_PARAM_G729TYPE */ - OMX_IndexParamAudioAmr, /**< reference: OMX_AUDIO_PARAM_AMRTYPE */ - OMX_IndexParamAudioWma, /**< reference: OMX_AUDIO_PARAM_WMATYPE */ - OMX_IndexParamAudioSbc, /**< reference: OMX_AUDIO_PARAM_SBCTYPE */ - OMX_IndexParamAudioMidi, /**< reference: OMX_AUDIO_PARAM_MIDITYPE */ - OMX_IndexParamAudioGsm_FR, /**< reference: OMX_AUDIO_PARAM_GSMFRTYPE */ - OMX_IndexParamAudioMidiLoadUserSound, /**< reference: OMX_AUDIO_PARAM_MIDILOADUSERSOUNDTYPE */ - OMX_IndexParamAudioG726, /**< reference: OMX_AUDIO_PARAM_G726TYPE */ - OMX_IndexParamAudioGsm_EFR, /**< reference: OMX_AUDIO_PARAM_GSMEFRTYPE */ - OMX_IndexParamAudioGsm_HR, /**< reference: OMX_AUDIO_PARAM_GSMHRTYPE */ - OMX_IndexParamAudioPdc_FR, /**< reference: OMX_AUDIO_PARAM_PDCFRTYPE */ - OMX_IndexParamAudioPdc_EFR, /**< reference: OMX_AUDIO_PARAM_PDCEFRTYPE */ - OMX_IndexParamAudioPdc_HR, /**< reference: OMX_AUDIO_PARAM_PDCHRTYPE */ - OMX_IndexParamAudioTdma_FR, /**< reference: OMX_AUDIO_PARAM_TDMAFRTYPE */ - OMX_IndexParamAudioTdma_EFR, /**< reference: OMX_AUDIO_PARAM_TDMAEFRTYPE */ - OMX_IndexParamAudioQcelp8, /**< reference: OMX_AUDIO_PARAM_QCELP8TYPE */ - OMX_IndexParamAudioQcelp13, /**< reference: OMX_AUDIO_PARAM_QCELP13TYPE */ - OMX_IndexParamAudioEvrc, /**< reference: OMX_AUDIO_PARAM_EVRCTYPE */ - OMX_IndexParamAudioSmv, /**< reference: OMX_AUDIO_PARAM_SMVTYPE */ - OMX_IndexParamAudioVorbis, /**< reference: OMX_AUDIO_PARAM_VORBISTYPE */ - - OMX_IndexConfigAudioMidiImmediateEvent, /**< reference: OMX_AUDIO_CONFIG_MIDIIMMEDIATEEVENTTYPE */ - OMX_IndexConfigAudioMidiControl, /**< reference: OMX_AUDIO_CONFIG_MIDICONTROLTYPE */ - OMX_IndexConfigAudioMidiSoundBankProgram, /**< reference: OMX_AUDIO_CONFIG_MIDISOUNDBANKPROGRAMTYPE */ - OMX_IndexConfigAudioMidiStatus, /**< reference: OMX_AUDIO_CONFIG_MIDISTATUSTYPE */ - OMX_IndexConfigAudioMidiMetaEvent, /**< reference: OMX_AUDIO_CONFIG_MIDIMETAEVENTTYPE */ - OMX_IndexConfigAudioMidiMetaEventData, /**< reference: OMX_AUDIO_CONFIG_MIDIMETAEVENTDATATYPE */ - OMX_IndexConfigAudioVolume, /**< reference: OMX_AUDIO_CONFIG_VOLUMETYPE */ - OMX_IndexConfigAudioBalance, /**< reference: OMX_AUDIO_CONFIG_BALANCETYPE */ - OMX_IndexConfigAudioChannelMute, /**< reference: OMX_AUDIO_CONFIG_CHANNELMUTETYPE */ - OMX_IndexConfigAudioMute, /**< reference: OMX_AUDIO_CONFIG_MUTETYPE */ - OMX_IndexConfigAudioLoudness, /**< reference: OMX_AUDIO_CONFIG_LOUDNESSTYPE */ - OMX_IndexConfigAudioEchoCancelation, /**< reference: OMX_AUDIO_CONFIG_ECHOCANCELATIONTYPE */ - OMX_IndexConfigAudioNoiseReduction, /**< reference: OMX_AUDIO_CONFIG_NOISEREDUCTIONTYPE */ - OMX_IndexConfigAudioBass, /**< reference: OMX_AUDIO_CONFIG_BASSTYPE */ - OMX_IndexConfigAudioTreble, /**< reference: OMX_AUDIO_CONFIG_TREBLETYPE */ - OMX_IndexConfigAudioStereoWidening, /**< reference: OMX_AUDIO_CONFIG_STEREOWIDENINGTYPE */ - OMX_IndexConfigAudioChorus, /**< reference: OMX_AUDIO_CONFIG_CHORUSTYPE */ - OMX_IndexConfigAudioEqualizer, /**< reference: OMX_AUDIO_CONFIG_EQUALIZERTYPE */ - OMX_IndexConfigAudioReverberation, /**< reference: OMX_AUDIO_CONFIG_REVERBERATIONTYPE */ - OMX_IndexConfigAudioChannelVolume, /**< reference: OMX_AUDIO_CONFIG_CHANNELVOLUMETYPE */ - - /* Image specific parameters and configurations */ - OMX_IndexImageStartUnused = 0x05000000, - OMX_IndexParamImagePortFormat, /**< reference: OMX_IMAGE_PARAM_PORTFORMATTYPE */ - OMX_IndexParamFlashControl, /**< reference: OMX_IMAGE_PARAM_FLASHCONTROLTYPE */ - OMX_IndexConfigFocusControl, /**< reference: OMX_IMAGE_CONFIG_FOCUSCONTROLTYPE */ - OMX_IndexParamQFactor, /**< reference: OMX_IMAGE_PARAM_QFACTORTYPE */ - OMX_IndexParamQuantizationTable, /**< reference: OMX_IMAGE_PARAM_QUANTIZATIONTABLETYPE */ - OMX_IndexParamHuffmanTable, /**< reference: OMX_IMAGE_PARAM_HUFFMANTTABLETYPE */ - OMX_IndexConfigFlashControl, /**< reference: OMX_IMAGE_PARAM_FLASHCONTROLTYPE */ - - /* Video specific parameters and configurations */ - OMX_IndexVideoStartUnused = 0x06000000, - OMX_IndexParamVideoPortFormat, /**< reference: OMX_VIDEO_PARAM_PORTFORMATTYPE */ - OMX_IndexParamVideoQuantization, /**< reference: OMX_VIDEO_PARAM_QUANTIZATIONTYPE */ - OMX_IndexParamVideoFastUpdate, /**< reference: OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE */ - OMX_IndexParamVideoBitrate, /**< reference: OMX_VIDEO_PARAM_BITRATETYPE */ - OMX_IndexParamVideoMotionVector, /**< reference: OMX_VIDEO_PARAM_MOTIONVECTORTYPE */ - OMX_IndexParamVideoIntraRefresh, /**< reference: OMX_VIDEO_PARAM_INTRAREFRESHTYPE */ - OMX_IndexParamVideoErrorCorrection, /**< reference: OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE */ - OMX_IndexParamVideoVBSMC, /**< reference: OMX_VIDEO_PARAM_VBSMCTYPE */ - OMX_IndexParamVideoMpeg2, /**< reference: OMX_VIDEO_PARAM_MPEG2TYPE */ - OMX_IndexParamVideoMpeg4, /**< reference: OMX_VIDEO_PARAM_MPEG4TYPE */ - OMX_IndexParamVideoWmv, /**< reference: OMX_VIDEO_PARAM_WMVTYPE */ - OMX_IndexParamVideoRv, /**< reference: OMX_VIDEO_PARAM_RVTYPE */ - OMX_IndexParamVideoAvc, /**< reference: OMX_VIDEO_PARAM_AVCTYPE */ - OMX_IndexParamVideoH263, /**< reference: OMX_VIDEO_PARAM_H263TYPE */ - OMX_IndexParamVideoProfileLevelQuerySupported, /**< reference: OMX_VIDEO_PARAM_PROFILELEVELTYPE */ - OMX_IndexParamVideoProfileLevelCurrent, /**< reference: OMX_VIDEO_PARAM_PROFILELEVELTYPE */ - OMX_IndexConfigVideoBitrate, /**< reference: OMX_VIDEO_CONFIG_BITRATETYPE */ - OMX_IndexConfigVideoFramerate, /**< reference: OMX_CONFIG_FRAMERATETYPE */ - OMX_IndexConfigVideoIntraVOPRefresh, /**< reference: OMX_CONFIG_INTRAREFRESHVOPTYPE */ - OMX_IndexConfigVideoIntraMBRefresh, /**< reference: OMX_CONFIG_MACROBLOCKERRORMAPTYPE */ - OMX_IndexConfigVideoMBErrorReporting, /**< reference: OMX_CONFIG_MBERRORREPORTINGTYPE */ - OMX_IndexParamVideoMacroblocksPerFrame, /**< reference: OMX_PARAM_MACROBLOCKSTYPE */ - OMX_IndexConfigVideoMacroBlockErrorMap, /**< reference: OMX_CONFIG_MACROBLOCKERRORMAPTYPE */ - OMX_IndexParamVideoSliceFMO, /**< reference: OMX_VIDEO_PARAM_AVCSLICEFMO */ - OMX_IndexConfigVideoAVCIntraPeriod, /**< reference: OMX_VIDEO_CONFIG_AVCINTRAPERIOD */ - OMX_IndexConfigVideoNalSize, /**< reference: OMX_VIDEO_CONFIG_NALSIZE */ - - /* Image & Video common Configurations */ - OMX_IndexCommonStartUnused = 0x07000000, - OMX_IndexParamCommonDeblocking, /**< reference: OMX_PARAM_DEBLOCKINGTYPE */ - OMX_IndexParamCommonSensorMode, /**< reference: OMX_PARAM_SENSORMODETYPE */ - OMX_IndexParamCommonInterleave, /**< reference: OMX_PARAM_INTERLEAVETYPE */ - OMX_IndexConfigCommonColorFormatConversion, /**< reference: OMX_CONFIG_COLORCONVERSIONTYPE */ - OMX_IndexConfigCommonScale, /**< reference: OMX_CONFIG_SCALEFACTORTYPE */ - OMX_IndexConfigCommonImageFilter, /**< reference: OMX_CONFIG_IMAGEFILTERTYPE */ - OMX_IndexConfigCommonColorEnhancement, /**< reference: OMX_CONFIG_COLORENHANCEMENTTYPE */ - OMX_IndexConfigCommonColorKey, /**< reference: OMX_CONFIG_COLORKEYTYPE */ - OMX_IndexConfigCommonColorBlend, /**< reference: OMX_CONFIG_COLORBLENDTYPE */ - OMX_IndexConfigCommonFrameStabilisation,/**< reference: OMX_CONFIG_FRAMESTABTYPE */ - OMX_IndexConfigCommonRotate, /**< reference: OMX_CONFIG_ROTATIONTYPE */ - OMX_IndexConfigCommonMirror, /**< reference: OMX_CONFIG_MIRRORTYPE */ - OMX_IndexConfigCommonOutputPosition, /**< reference: OMX_CONFIG_POINTTYPE */ - OMX_IndexConfigCommonInputCrop, /**< reference: OMX_CONFIG_RECTTYPE */ - OMX_IndexConfigCommonOutputCrop, /**< reference: OMX_CONFIG_RECTTYPE */ - OMX_IndexConfigCommonDigitalZoom, /**< reference: OMX_CONFIG_SCALEFACTORTYPE */ - OMX_IndexConfigCommonOpticalZoom, /**< reference: OMX_CONFIG_SCALEFACTORTYPE*/ - OMX_IndexConfigCommonWhiteBalance, /**< reference: OMX_CONFIG_WHITEBALCONTROLTYPE */ - OMX_IndexConfigCommonExposure, /**< reference: OMX_CONFIG_EXPOSURECONTROLTYPE */ - OMX_IndexConfigCommonContrast, /**< reference: OMX_CONFIG_CONTRASTTYPE */ - OMX_IndexConfigCommonBrightness, /**< reference: OMX_CONFIG_BRIGHTNESSTYPE */ - OMX_IndexConfigCommonBacklight, /**< reference: OMX_CONFIG_BACKLIGHTTYPE */ - OMX_IndexConfigCommonGamma, /**< reference: OMX_CONFIG_GAMMATYPE */ - OMX_IndexConfigCommonSaturation, /**< reference: OMX_CONFIG_SATURATIONTYPE */ - OMX_IndexConfigCommonLightness, /**< reference: OMX_CONFIG_LIGHTNESSTYPE */ - OMX_IndexConfigCommonExclusionRect, /**< reference: OMX_CONFIG_RECTTYPE */ - OMX_IndexConfigCommonDithering, /**< reference: OMX_CONFIG_DITHERTYPE */ - OMX_IndexConfigCommonPlaneBlend, /**< reference: OMX_CONFIG_PLANEBLENDTYPE */ - OMX_IndexConfigCommonExposureValue, /**< reference: OMX_CONFIG_EXPOSUREVALUETYPE */ - OMX_IndexConfigCommonOutputSize, /**< reference: OMX_FRAMESIZETYPE */ - OMX_IndexParamCommonExtraQuantData, /**< reference: OMX_OTHER_EXTRADATATYPE */ - OMX_IndexConfigCommonFocusRegion, /**< reference: OMX_CONFIG_FOCUSREGIONTYPE */ - OMX_IndexConfigCommonFocusStatus, /**< reference: OMX_PARAM_FOCUSSTATUSTYPE */ - OMX_IndexConfigCommonTransitionEffect, /**< reference: OMX_CONFIG_TRANSITIONEFFECTTYPE */ - - /* Reserved Configuration range */ - OMX_IndexOtherStartUnused = 0x08000000, - OMX_IndexParamOtherPortFormat, /**< reference: OMX_OTHER_PARAM_PORTFORMATTYPE */ - OMX_IndexConfigOtherPower, /**< reference: OMX_OTHER_CONFIG_POWERTYPE */ - OMX_IndexConfigOtherStats, /**< reference: OMX_OTHER_CONFIG_STATSTYPE */ - - - /* Reserved Time range */ - OMX_IndexTimeStartUnused = 0x09000000, - OMX_IndexConfigTimeScale, /**< reference: OMX_TIME_CONFIG_SCALETYPE */ - OMX_IndexConfigTimeClockState, /**< reference: OMX_TIME_CONFIG_CLOCKSTATETYPE */ - OMX_IndexConfigTimeActiveRefClock, /**< reference: OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE */ - OMX_IndexConfigTimeCurrentMediaTime, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (read only) */ - OMX_IndexConfigTimeCurrentWallTime, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (read only) */ - OMX_IndexConfigTimeCurrentAudioReference, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (write only) */ - OMX_IndexConfigTimeCurrentVideoReference, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (write only) */ - OMX_IndexConfigTimeMediaTimeRequest, /**< reference: OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE (write only) */ - OMX_IndexConfigTimeClientStartTime, /**<reference: OMX_TIME_CONFIG_TIMESTAMPTYPE (write only) */ - OMX_IndexConfigTimePosition, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexConfigTimeSeekMode, /**< reference: OMX_TIME_CONFIG_SEEKMODETYPE */ - - - OMX_IndexKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - /* Vendor specific area */ - OMX_IndexVendorStartUnused = 0x7F000000, - /* Vendor specific structures should be in the range of 0x7F000000 - to 0x7FFFFFFE. This range is not broken out by vendor, so - private indexes are not guaranteed unique and therefore should - only be sent to the appropriate component. */ - - /* used for ilcs-top communication */ - OMX_IndexParamMarkComparison, /**< reference: OMX_PARAM_MARKCOMPARISONTYPE */ - OMX_IndexParamPortSummary, /**< reference: OMX_PARAM_PORTSUMMARYTYPE */ - OMX_IndexParamTunnelStatus, /**< reference : OMX_PARAM_TUNNELSTATUSTYPE */ - OMX_IndexParamBrcmRecursionUnsafe, /**< reference: OMX_PARAM_BRCMRECURSIONUNSAFETYPE */ - - /* used for top-ril communication */ - OMX_IndexParamBufferAddress, /**< reference : OMX_PARAM_BUFFERADDRESSTYPE */ - OMX_IndexParamTunnelSetup, /**< reference : OMX_PARAM_TUNNELSETUPTYPE */ - OMX_IndexParamBrcmPortEGL, /**< reference : OMX_PARAM_BRCMPORTEGLTYPE */ - OMX_IndexParamIdleResourceCount, /**< reference : OMX_PARAM_U32TYPE */ - - /* used for ril-ril communication */ - OMX_IndexParamImagePoolDisplayFunction, /**<reference : OMX_PARAM_IMAGEDISPLAYFUNCTIONTYPE */ - OMX_IndexParamBrcmDataUnit, /**<reference: OMX_PARAM_DATAUNITTYPE */ - OMX_IndexParamCodecConfig, /**<reference: OMX_PARAM_CODECCONFIGTYPE */ - OMX_IndexParamCameraPoolToEncoderFunction, /**<reference : OMX_PARAM_CAMERAPOOLTOENCODERFUNCTIONTYPE */ - OMX_IndexParamCameraStripeFunction, /**<reference : OMX_PARAM_CAMERASTRIPEFUNCTIONTYPE */ - OMX_IndexParamCameraCaptureEventFunction, /**<reference : OMX_PARAM_CAMERACAPTUREEVENTFUNCTIONTYPE */ - - /* used for client-ril communication */ - OMX_IndexParamTestInterface, /**< reference : OMX_PARAM_TESTINTERFACETYPE */ - - // 0x7f000010 - OMX_IndexConfigDisplayRegion, /**< reference : OMX_CONFIG_DISPLAYREGIONTYPE */ - OMX_IndexParamSource, /**< reference : OMX_PARAM_SOURCETYPE */ - OMX_IndexParamSourceSeed, /**< reference : OMX_PARAM_SOURCESEEDTYPE */ - OMX_IndexParamResize, /**< reference : OMX_PARAM_RESIZETYPE */ - OMX_IndexConfigVisualisation, /**< reference : OMX_CONFIG_VISUALISATIONTYPE */ - OMX_IndexConfigSingleStep, /**<reference : OMX_PARAM_U32TYPE */ - OMX_IndexConfigPlayMode, /**<reference: OMX_CONFIG_PLAYMODETYPE */ - OMX_IndexParamCameraCamplusId, /**<reference : OMX_PARAM_U32TYPE */ - OMX_IndexConfigCommonImageFilterParameters, /**<reference : OMX_CONFIG_IMAGEFILTERPARAMSTYPE */ - OMX_IndexConfigTransitionControl, /**<reference : OMX_CONFIG_TRANSITIONCONTROLTYPE */ - OMX_IndexConfigPresentationOffset, /**<reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexParamSourceFunctions, /**<reference: OMX_PARAM_STILLSFUNCTIONTYPE */ - OMX_IndexConfigAudioMonoTrackControl, /**<reference : OMX_CONFIG_AUDIOMONOTRACKCONTROLTYPE */ - OMX_IndexParamCameraImagePool, /**<reference : OMX_PARAM_CAMERAIMAGEPOOLTYPE */ - OMX_IndexConfigCameraISPOutputPoolHeight,/**<reference : OMX_PARAM_U32TYPE */ - OMX_IndexParamImagePoolSize, /**<reference: OMX_PARAM_IMAGEPOOLSIZETYPE */ - - // 0x7f000020 - OMX_IndexParamImagePoolExternal, /**<reference: OMX_PARAM_IMAGEPOOLEXTERNALTYPE */ - OMX_IndexParamRUTILFifoInfo, /**<reference: OMX_PARAM_RUTILFIFOINFOTYPE*/ - OMX_IndexParamILFifoConfig, /**<reference: OMX_PARAM_ILFIFOCONFIG */ - OMX_IndexConfigCameraSensorModes, /**<reference : OMX_CONFIG_CAMERASENSORMODETYPE */ - OMX_IndexConfigBrcmPortStats, /**<reference : OMX_CONFIG_BRCMPORTSTATSTYPE */ - OMX_IndexConfigBrcmPortBufferStats, /**<reference : OMX_CONFIG_BRCMPORTBUFFERSTATSTYPE */ - OMX_IndexConfigBrcmCameraStats, /**<reference : OMX_CONFIG_BRCMCAMERASTATSTYPE */ - OMX_IndexConfigBrcmIOPerfStats, /**<reference : OMX_CONFIG_BRCMIOPERFSTATSTYPE */ - OMX_IndexConfigCommonSharpness, /**<reference : OMX_CONFIG_SHARPNESSTYPE */ - OMX_IndexConfigCommonFlickerCancellation, /**reference : OMX_CONFIG_FLICKERCANCELTYPE */ - OMX_IndexParamCameraSwapImagePools, /**<reference : OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraSingleBufferCaptureInput, /**<reference : OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCommonRedEyeRemoval, /**<reference : OMX_CONFIG_REDEYEREMOVALTYPE */ - OMX_IndexConfigCommonFaceDetectionControl, /**<reference : OMX_CONFIG_FACEDETECTIONCONTROLTYPE */ - OMX_IndexConfigCommonFaceDetectionRegion, /**<reference : OMX_CONFIG_FACEDETECTIONREGIONTYPE */ - OMX_IndexConfigCommonInterlace, /**<reference: OMX_CONFIG_INTERLACETYPE */ - - // 0x7f000030 - OMX_IndexParamISPTunerName, /**<reference: OMX_PARAM_CAMERAISPTUNERTYPE */ - OMX_IndexParamCameraDeviceNumber, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraDevicesPresent, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraInputFrame, /**<reference: OMX_CONFIG_IMAGEPTRTYPE */ - OMX_IndexConfigStillColourDenoiseEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigVideoColourDenoiseEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigAFAssistLight, /**<reference: OMX_CONFIG_AFASSISTTYPE */ - OMX_IndexConfigSmartShakeReductionEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigInputCropPercentages, /**<reference: OMX_CONFIG_INPUTCROPTYPE */ - OMX_IndexConfigStillsAntiShakeEnable, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigWaitForFocusBeforeCapture,/**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigAudioRenderingLatency, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigDrawBoxAroundFaces, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCodecRequirements, /**<reference: OMX_PARAM_CODECREQUIREMENTSTYPE */ - OMX_IndexConfigBrcmEGLImageMemHandle, /**<reference: OMX_CONFIG_BRCMEGLIMAGEMEMHANDLETYPE */ - OMX_IndexConfigPrivacyIndicator, /**<reference: OMX_CONFIG_PRIVACYINDICATORTYPE */ - - // 0x7f000040 - OMX_IndexParamCameraFlashType, /**<reference: OMX_PARAM_CAMERAFLASHTYPE */ - OMX_IndexConfigCameraEnableStatsPass, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCameraFlashConfig, /**<reference: OMX_CONFIG_CAMERAFLASHCONFIGTYPE */ - OMX_IndexConfigCaptureRawImageURI, /**<reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexConfigCameraStripeFuncMinLines, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraAlgorithmVersionDeprecated, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraIsoReferenceValue, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraCaptureAbortsAutoFocus, /**<reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmClockMissCount, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFlashChargeLevel, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoEncodedSliceSize, /**<reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmAudioTrackGaplessPlayback, /**< reference: OMX_CONFIG_BRCMAUDIOTRACKGAPLESSPLAYBACKTYPE */ - OMX_IndexConfigBrcmAudioTrackChangeControl, /**< reference: OMX_CONFIG_BRCMAUDIOTRACKCHANGECONTROLTYPE */ - OMX_IndexParamBrcmPixelAspectRatio, /**< reference: OMX_CONFIG_POINTTYPE */ - OMX_IndexParamBrcmPixelValueRange, /**< reference: OMX_PARAM_BRCMPIXELVALUERANGETYPE */ - OMX_IndexParamCameraDisableAlgorithm, /**< reference: OMX_PARAM_CAMERADISABLEALGORITHMTYPE */ - - // 0x7f000050 - OMX_IndexConfigBrcmVideoIntraPeriodTime, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoIntraPeriod, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmAudioEffectControl, /**< reference: OMX_CONFIG_BRCMAUDIOEFFECTCONTROLTYPE */ - OMX_IndexConfigBrcmMinimumProcessingLatency, /**< reference: OMX_CONFIG_BRCMMINIMUMPROCESSINGLATENCY */ - OMX_IndexParamBrcmVideoAVCSEIEnable, /**< reference: OMX_PARAM_BRCMVIDEOAVCSEIENABLETYPE */ - OMX_IndexParamBrcmAllowMemChange, /**< reference: OMX_PARAM_BRCMALLOWMEMCHANGETYPE */ - OMX_IndexConfigBrcmVideoEncoderMBRowsPerSlice, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraAFAssistDeviceNumber_Deprecated, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraPrivacyIndicatorDeviceNumber_Deprecated, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraUseCase, /**< reference: OMX_CONFIG_CAMERAUSECASETYPE */ - OMX_IndexParamBrcmDisableProprietaryTunnels, /**< reference: OMX_PARAM_BRCMDISABLEPROPRIETARYTUNNELSTYPE */ - OMX_IndexParamBrcmOutputBufferSize, /**< reference: OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE */ - OMX_IndexParamBrcmRetainMemory, /**< reference: OMX_PARAM_BRCMRETAINMEMORYTYPE */ - OMX_IndexConfigCanFocus_Deprecated, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmImmutableInput, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamDynamicParameterFile, /**< reference: OMX_PARAM_CONTENTURITYPE */ - - // 0x7f000060 - OMX_IndexParamUseDynamicParameterFile, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCameraInfo, /**< reference: OMX_CONFIG_CAMERAINFOTYPE */ - OMX_IndexConfigCameraFeatures, /**< reference: OMX_CONFIG_CAMERAFEATURESTYPE */ - OMX_IndexConfigRequestCallback, /**< reference: OMX_CONFIG_REQUESTCALLBACKTYPE */ //Should be added to the spec as part of IL416c - OMX_IndexConfigBrcmOutputBufferFullCount, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCommonFocusRegionXY, /**< reference: OMX_CONFIG_FOCUSREGIONXYTYPE */ - OMX_IndexParamBrcmDisableEXIF, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigUserSettingsId, /**< reference: OMX_CONFIG_U8TYPE */ - OMX_IndexConfigCameraSettings, /**< reference: OMX_CONFIG_CAMERASETTINGSTYPE */ - OMX_IndexConfigDrawBoxLineParams, /**< reference: OMX_CONFIG_DRAWBOXLINEPARAMS */ - OMX_IndexParamCameraRmiControl_Deprecated, /**< reference: OMX_PARAM_CAMERARMITYPE */ - OMX_IndexConfigBurstCapture, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmEnableIJGTableScaling, /**< reference: OMX_PARAM_IJGSCALINGTYPE */ - OMX_IndexConfigPowerDown, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmSyncOutput, /**< reference: OMX_CONFIG_BRCMSYNCOUTPUTTYPE */ - OMX_IndexParamBrcmFlushCallback, /**< reference: OMX_PARAM_BRCMFLUSHCALLBACK */ - - // 0x7f000070 - OMX_IndexConfigBrcmVideoRequestIFrame, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmNALSSeparate, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigConfirmView, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigDrmView, /**< reference: OMX_CONFIG_DRMVIEWTYPE */ - OMX_IndexConfigBrcmVideoIntraRefresh, /**< reference: OMX_VIDEO_PARAM_INTRAREFRESHTYPE */ - OMX_IndexParamBrcmMaxFileSize, /**< reference: OMX_PARAM_BRCMU64TYPE */ - OMX_IndexParamBrcmCRCEnable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmCRC, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigCameraRmiInUse_Deprecated, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmAudioSource, /**<reference: OMX_CONFIG_BRCMAUDIOSOURCETYPE */ - OMX_IndexConfigBrcmAudioDestination, /**< reference: OMX_CONFIG_BRCMAUDIODESTINATIONTYPE */ - OMX_IndexParamAudioDdp, /**< reference: OMX_AUDIO_PARAM_DDPTYPE */ - OMX_IndexParamBrcmThumbnail, /**< reference: OMX_PARAM_BRCMTHUMBNAILTYPE */ - OMX_IndexParamBrcmDisableLegacyBlocks_Deprecated, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmCameraInputAspectRatio, /**< reference: OMX_PARAM_BRCMASPECTRATIOTYPE */ - OMX_IndexParamDynamicParameterFileFailFatal,/**< reference: OMX_CONFIG_BOOLEANTYPE */ - - // 0x7f000080 - OMX_IndexParamBrcmVideoDecodeErrorConcealment, /**< reference: OMX_PARAM_BRCMVIDEODECODEERRORCONCEALMENTTYPE */ - OMX_IndexParamBrcmInterpolateMissingTimestamps, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmSetCodecPerformanceMonitoring, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFlashInfo, /**< reference: OMX_CONFIG_FLASHINFOTYPE */ - OMX_IndexParamBrcmMaxFrameSkips, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigDynamicRangeExpansion, /**< reference: OMX_CONFIG_DYNAMICRANGEEXPANSIONTYPE */ - OMX_IndexParamBrcmFlushCallbackId, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmTransposeBufferCount, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFaceRecognitionControl, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigFaceRecognitionSaveFace, /**< reference: OMX_PARAM_BRCMU64TYPE */ - OMX_IndexConfigFaceRecognitionDatabaseUri, /**< reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexConfigClockAdjustment, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexParamBrcmThreadAffinity, /**< reference: OMX_PARAM_BRCMTHREADAFFINITYTYPE */ - OMX_IndexParamAsynchronousOutput, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigAsynchronousFailureURI, /**< reference: OMX_PARAM_CONTENTURITYPE */ - OMX_IndexConfigCommonFaceBeautification, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - - // 0x7f000090 - OMX_IndexConfigCommonSceneDetectionControl,/**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigCommonSceneDetected, /**< reference: OMX_CONFIG_SCENEDETECTTYPE */ - OMX_IndexParamDisableVllPool, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamVideoMvc, /**< reference: OMX_VIDEO_PARAM_MVCTYPE */ - OMX_IndexConfigBrcmDrawStaticBox, /**< reference: OMX_CONFIG_STATICBOXTYPE */ - OMX_IndexConfigBrcmClockReferenceSource, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamPassBufferMarks, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigPortCapturing, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexConfigBrcmDecoderPassThrough, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmDecoderPassThrough=OMX_IndexConfigBrcmDecoderPassThrough, /* deprecated */ - OMX_IndexParamBrcmMaxCorruptMBs, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmGlobalAudioMute, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraCaptureMode, /**< reference: OMX_PARAM_CAMERACAPTUREMODETYPE */ - OMX_IndexParamBrcmDrmEncryption, /**< reference: OMX_PARAM_BRCMDRMENCRYPTIONTYPE */ - OMX_IndexConfigBrcmCameraRnDPreprocess, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmCameraRnDPostprocess, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmAudioTrackChangeCount, /**< reference: OMX_PARAM_U32TYPE */ - - // 0x7f0000a0 - OMX_IndexParamCommonUseStcTimestamps, /**< reference: OMX_PARAM_TIMESTAMPMODETYPE */ - OMX_IndexConfigBufferStall, /**< reference: OMX_CONFIG_BUFFERSTALLTYPE */ - OMX_IndexConfigRefreshCodec, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCaptureStatus, /**< reference: OMX_PARAM_CAPTURESTATETYPE */ - OMX_IndexConfigTimeInvalidStartTime, /**< reference: OMX_TIME_CONFIG_TIMESTAMPTYPE */ - OMX_IndexConfigLatencyTarget, /**< reference: OMX_CONFIG_LATENCYTARGETTYPE */ - OMX_IndexConfigMinimiseFragmentation, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmUseProprietaryCallback, /**< reference: OMX_CONFIG_BRCMUSEPROPRIETARYTUNNELTYPE */ - OMX_IndexParamPortMaxFrameSize, /**< reference: OMX_FRAMESIZETYPE */ - OMX_IndexParamComponentName, /**< reference: OMX_PARAM_COMPONENTROLETYPE */ - OMX_IndexConfigEncLevelExtension, /**< reference: OMX_VIDEO_CONFIG_LEVEL_EXTEND */ - OMX_IndexConfigTemporalDenoiseEnable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmLazyImagePoolDestroy, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmEEDEEnable, /**< reference: OMX_VIDEO_EEDE_ENABLE */ - OMX_IndexParamBrcmEEDELossRate, /**< reference: OMX_VIDEO_EEDE_LOSSRATE */ - OMX_IndexParamAudioDts, /**< reference: OMX_AUDIO_PARAM_DTSTYPE */ - - // 0x7f0000b0 - OMX_IndexParamNumOutputChannels, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmHighDynamicRange, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmPoolMemAllocSize, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmBufferFlagFilter, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoEncodeMinQuant, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoEncodeMaxQuant, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamRateControlModel, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmExtraBuffers, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigFieldOfView, /**< reference: OMX_CONFIG_BRCMFOVTYPE */ - OMX_IndexParamBrcmAlignHoriz, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmAlignVert, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamColorSpace, /**< reference: OMX_PARAM_COLORSPACETYPE */ - OMX_IndexParamBrcmDroppablePFrames, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoInitialQuant, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoEncodeQpP, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoRCSliceDQuant, /**< reference: OMX_PARAM_U32TYPE */ - - // 0x7f0000c0 - OMX_IndexParamBrcmVideoFrameLimitBits, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmVideoPeakRate, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoH264DisableCABAC, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmVideoH264LowLatency, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmVideoH264AUDelimiters, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmVideoH264DeblockIDC, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigBrcmVideoH264IntraMBMode, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexConfigContrastEnhance, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraCustomSensorConfig, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamBrcmHeaderOnOpen, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmUseRegisterFile, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmRegisterFileFailFatal, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmConfigFileRegisters, /**< reference: OMX_PARAM_BRCMCONFIGFILETYPE */ - OMX_IndexParamBrcmConfigFileChunkRegisters,/**< reference: OMX_PARAM_BRCMCONFIGFILECHUNKTYPE */ - OMX_IndexParamBrcmAttachLog, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamCameraZeroShutterLag, /**< reference: OMX_CONFIG_ZEROSHUTTERLAGTYPE */ - - // 0x7f0000d0 - OMX_IndexParamBrcmFpsRange, /**< reference: OMX_PARAM_BRCMFRAMERATERANGETYPE */ - OMX_IndexParamCaptureExposureCompensation, /**< reference: OMX_PARAM_S32TYPE */ - OMX_IndexParamBrcmVideoPrecodeForQP, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoTimestampFifo, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamSWSharpenDisable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexConfigBrcmFlashRequired, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoDrmProtectBuffer, /**< reference: OMX_PARAM_BRCMVIDEODRMPROTECTBUFFERTYPE */ - OMX_IndexParamSWSaturationDisable, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmVideoDecodeConfigVD3, /**< reference: OMX_PARAM_BRCMVIDEODECODECONFIGVD3TYPE */ - OMX_IndexConfigBrcmPowerMonitor, /**< reference: OMX_CONFIG_BOOLEANTYPE */ - OMX_IndexParamBrcmZeroCopy, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexParamBrcmVideoEGLRenderDiscardMode, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexParamBrcmVideoAVC_VCLHRDEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoAVC_LowDelayHRDEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoCroppingDisable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoAVCInlineHeaderEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - - // 0x7f0000f0 - OMX_IndexConfigBrcmAudioDownmixCoefficients = 0x7f0000f0, /**< reference: OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS */ - OMX_IndexConfigBrcmAudioDownmixCoefficients8x8, /**< reference: OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS8x8 */ - OMX_IndexConfigBrcmAudioMaxSample, /**< reference: OMX_CONFIG_BRCMAUDIOMAXSAMPLE */ - OMX_IndexConfigCustomAwbGains, /**< reference: OMX_CONFIG_CUSTOMAWBGAINSTYPE */ - OMX_IndexParamRemoveImagePadding, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE*/ - OMX_IndexParamBrcmVideoAVCInlineVectorsEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexConfigBrcmRenderStats, /**< reference: OMX_CONFIG_BRCMRENDERSTATSTYPE */ - OMX_IndexConfigBrcmCameraAnnotate, /**< reference: OMX_CONFIG_BRCMANNOTATETYPE */ - OMX_IndexParamBrcmStereoscopicMode, /**< reference :OMX_CONFIG_BRCMSTEREOSCOPICMODETYPE */ - OMX_IndexParamBrcmLockStepEnable, /**< reference: OMX_CONFIG_PORTBOOLEANTYPE */ - OMX_IndexParamBrcmTimeScale, /**< reference: OMX_PARAM_U32TYPE */ - OMX_IndexParamCameraInterface, /**< reference: OMX_PARAM_CAMERAINTERFACETYPE */ - OMX_IndexParamCameraClockingMode, /**< reference: OMX_PARAM_CAMERACLOCKINGMODETYPE */ - OMX_IndexParamCameraRxConfig, /**< reference: OMX_PARAM_CAMERARXCONFIG_TYPE */ - OMX_IndexParamCameraRxTiming, /**< reference: OMX_PARAM_CAMERARXTIMING_TYPE */ - OMX_IndexMax = 0x7FFFFFFF -} OMX_INDEXTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Other.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Other.h @@ -1,347 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** @file OMX_Other.h - OpenMax IL version 1.1.2 - * The structures needed by Other components to exchange - * parameters and configuration data with the components. - */ - -#ifndef OMX_Other_h -#define OMX_Other_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/* Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_Core.h" - - -/** - * Enumeration of possible data types which match to multiple domains or no - * domain at all. For types which are vendor specific, a value above - * OMX_OTHER_VENDORTSTART should be used. - */ -typedef enum OMX_OTHER_FORMATTYPE { - OMX_OTHER_FormatTime = 0, /**< Transmission of various timestamps, elapsed time, - time deltas, etc */ - OMX_OTHER_FormatPower, /**< Perhaps used for enabling/disabling power - management, setting clocks? */ - OMX_OTHER_FormatStats, /**< Could be things such as frame rate, frames - dropped, etc */ - OMX_OTHER_FormatBinary, /**< Arbitrary binary data */ - OMX_OTHER_FormatVendorReserved = 1000, /**< Starting value for vendor specific - formats */ - - OMX_OTHER_FormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_OTHER_FormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_OTHER_FormatText, - OMX_OTHER_FormatTextSKM2, - OMX_OTHER_FormatText3GP5, - - OMX_OTHER_FormatMax = 0x7FFFFFFF -} OMX_OTHER_FORMATTYPE; - -/** - * Enumeration of seek modes. - */ -typedef enum OMX_TIME_SEEKMODETYPE { - OMX_TIME_SeekModeFast = 0, /**< Prefer seeking to an approximation - * of the requested seek position over - * the actual seek position if it - * results in a faster seek. */ - OMX_TIME_SeekModeAccurate, /**< Prefer seeking to the actual seek - * position over an approximation - * of the requested seek position even - * if it results in a slower seek. */ - OMX_TIME_SeekModeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_SeekModeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - - OMX_TIME_SeekModeDirectional, /**< Similar to Fast, but if seeking backwards will - * try and seek to a previous sync position from the - * current media time. */ - - OMX_TIME_SeekModeMax = 0x7FFFFFFF -} OMX_TIME_SEEKMODETYPE; - -/* Structure representing the seekmode of the component */ -typedef struct OMX_TIME_CONFIG_SEEKMODETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_TIME_SEEKMODETYPE eType; /**< The seek mode */ -} OMX_TIME_CONFIG_SEEKMODETYPE; - -/** Structure representing a time stamp used with the following configs - * on the Clock Component (CC): - * - * OMX_IndexConfigTimeCurrentWallTime: query of the CC’s current wall - * time - * OMX_IndexConfigTimeCurrentMediaTime: query of the CC’s current media - * time - * OMX_IndexConfigTimeCurrentAudioReference and - * OMX_IndexConfigTimeCurrentVideoReference: audio/video reference - * clock sending SC its reference time - * OMX_IndexConfigTimeClientStartTime: a Clock Component client sends - * this structure to the Clock Component via a SetConfig on its - * client port when it receives a buffer with - * OMX_BUFFERFLAG_STARTTIME set. It must use the timestamp - * specified by that buffer for nStartTimestamp. - * - * It’s also used with the following config on components in general: - * - * OMX_IndexConfigTimePosition: IL client querying component position - * (GetConfig) or commanding a component to seek to the given location - * (SetConfig) - */ -typedef struct OMX_TIME_CONFIG_TIMESTAMPTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version - * information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_TICKS nTimestamp; /**< timestamp .*/ -} OMX_TIME_CONFIG_TIMESTAMPTYPE; - -/** Enumeration of possible reference clocks to the media time. */ -typedef enum OMX_TIME_UPDATETYPE { - OMX_TIME_UpdateRequestFulfillment, /**< Update is the fulfillment of a media time request. */ - OMX_TIME_UpdateScaleChanged, /**< Update was generated because the scale chagned. */ - OMX_TIME_UpdateClockStateChanged, /**< Update was generated because the clock state changed. */ - OMX_TIME_UpdateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_UpdateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TIME_UpdateMax = 0x7FFFFFFF -} OMX_TIME_UPDATETYPE; - -/** Enumeration of possible reference clocks to the media time. */ -typedef enum OMX_TIME_REFCLOCKTYPE { - OMX_TIME_RefClockNone, /**< Use no references. */ - OMX_TIME_RefClockAudio, /**< Use references sent through OMX_IndexConfigTimeCurrentAudioReference */ - OMX_TIME_RefClockVideo, /**< Use references sent through OMX_IndexConfigTimeCurrentVideoReference */ - OMX_TIME_RefClockKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_RefClockVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TIME_RefClockMax = 0x7FFFFFFF -} OMX_TIME_REFCLOCKTYPE; - -/** Enumeration of clock states. */ -typedef enum OMX_TIME_CLOCKSTATE { - OMX_TIME_ClockStateRunning, /**< Clock running. */ - OMX_TIME_ClockStateWaitingForStartTime, /**< Clock waiting until the - * prescribed clients emit their - * start time. */ - OMX_TIME_ClockStateStopped, /**< Clock stopped. */ - OMX_TIME_ClockStateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_TIME_ClockStateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_TIME_ClockStateMax = 0x7FFFFFFF -} OMX_TIME_CLOCKSTATE; - -/** Structure representing a media time request to the clock component. - * - * A client component sends this structure to the Clock Component via a SetConfig - * on its client port to specify a media timestamp the Clock Component - * should emit. The Clock Component should fulfill the request by sending a - * OMX_TIME_MEDIATIMETYPE when its media clock matches the requested - * timestamp. - * - * The client may require a media time request be fulfilled slightly - * earlier than the media time specified. In this case the client specifies - * an offset which is equal to the difference between wall time corresponding - * to the requested media time and the wall time when it will be - * fulfilled. - * - * A client component may uses these requests and the OMX_TIME_MEDIATIMETYPE to - * time events according to timestamps. If a client must perform an operation O at - * a time T (e.g. deliver a video frame at its corresponding timestamp), it makes a - * media time request at T (perhaps specifying an offset to ensure the request fulfillment - * is a little early). When the clock component passes the resulting OMX_TIME_MEDIATIMETYPE - * structure back to the client component, the client may perform operation O (perhaps having - * to wait a slight amount more time itself as specified by the return values). - */ - -typedef struct OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< port that this structure applies to */ - OMX_PTR pClientPrivate; /**< Client private data to disabiguate this media time - * from others (e.g. the number of the frame to deliver). - * Duplicated in the media time structure that fulfills - * this request. A value of zero is reserved for time scale - * updates. */ - OMX_TICKS nMediaTimestamp; /**< Media timestamp requested.*/ - OMX_TICKS nOffset; /**< Amount of wall clock time by which this - * request should be fulfilled early */ -} OMX_TIME_CONFIG_MEDIATIMEREQUESTTYPE; - -/**< Structure sent from the clock component client either when fulfilling - * a media time request or when the time scale has changed. - * - * In the former case the Clock Component fills this structure and times its emission - * to a client component (via the client port) according to the corresponding media - * time request sent by the client. The Clock Component should time the emission to occur - * when the requested timestamp matches the Clock Component's media time but also the - * prescribed offset early. - * - * Upon scale changes the clock component clears the nClientPrivate data, sends the current - * media time and sets the nScale to the new scale via the client port. It emits a - * OMX_TIME_MEDIATIMETYPE to all clients independent of any requests. This allows clients to - * alter processing to accomodate scaling. For instance a video component might skip inter-frames - * in the case of extreme fastforward. Likewise an audio component might add or remove samples - * from an audio frame to scale audio data. - * - * It is expected that some clock components may not be able to fulfill requests - * at exactly the prescribed time. This is acceptable so long as the request is - * fulfilled at least as early as described and not later. This structure provides - * fields the client may use to wait for the remaining time. - * - * The client may use either the nOffset or nWallTimeAtMedia fields to determine the - * wall time until the nMediaTimestamp actually occurs. In the latter case the - * client can get a more accurate value for offset by getting the current wall - * from the cloc component and subtracting it from nWallTimeAtMedia. - */ - -typedef struct OMX_TIME_MEDIATIMETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nClientPrivate; /**< Client private data to disabiguate this media time - * from others. Copied from the media time request. - * A value of zero is reserved for time scale updates. */ - OMX_TIME_UPDATETYPE eUpdateType; /**< Reason for the update */ - OMX_TICKS nMediaTimestamp; /**< Media time requested. If no media time was - * requested then this is the current media time. */ - OMX_TICKS nOffset; /**< Amount of wall clock time by which this - * request was actually fulfilled early */ - - OMX_TICKS nWallTimeAtMediaTime; /**< Wall time corresponding to nMediaTimeStamp. - * A client may compare this value to current - * media time obtained from the Clock Component to determine - * the wall time until the media timestamp is really - * current. */ - OMX_S32 xScale; /**< Current media time scale in Q16 format. */ - OMX_TIME_CLOCKSTATE eState; /* Seeking Change. Added 7/12.*/ - /**< State of the media time. */ -} OMX_TIME_MEDIATIMETYPE; - -/** Structure representing the current media time scale factor. Applicable only to clock - * component, other components see scale changes via OMX_TIME_MEDIATIMETYPE buffers sent via - * the clock component client ports. Upon recieving this config the clock component changes - * the rate by which the media time increases or decreases effectively implementing trick modes. - */ -typedef struct OMX_TIME_CONFIG_SCALETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_S32 xScale; /**< This is a value in Q16 format which is used for - * scaling the media time */ -} OMX_TIME_CONFIG_SCALETYPE; - -/** Bits used to identify a clock port. Used in OMX_TIME_CONFIG_CLOCKSTATETYPE’s nWaitMask field */ -#define OMX_CLOCKPORT0 0x00000001 -#define OMX_CLOCKPORT1 0x00000002 -#define OMX_CLOCKPORT2 0x00000004 -#define OMX_CLOCKPORT3 0x00000008 -#define OMX_CLOCKPORT4 0x00000010 -#define OMX_CLOCKPORT5 0x00000020 -#define OMX_CLOCKPORT6 0x00000040 -#define OMX_CLOCKPORT7 0x00000080 - -/** Structure representing the current mode of the media clock. - * IL Client uses this config to change or query the mode of the - * media clock of the clock component. Applicable only to clock - * component. - * - * On a SetConfig if eState is OMX_TIME_ClockStateRunning media time - * starts immediately at the prescribed start time. If - * OMX_TIME_ClockStateWaitingForStartTime the Clock Component ignores - * the given nStartTime and waits for all clients specified in the - * nWaitMask to send starttimes (via - * OMX_IndexConfigTimeClientStartTime). The Clock Component then starts - * the media clock using the earliest start time supplied. */ -typedef struct OMX_TIME_CONFIG_CLOCKSTATETYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version - * information */ - OMX_TIME_CLOCKSTATE eState; /**< State of the media time. */ - OMX_TICKS nStartTime; /**< Start time of the media time. */ - OMX_TICKS nOffset; /**< Time to offset the media time by - * (e.g. preroll). Media time will be - * reported to be nOffset ticks earlier. - */ - OMX_U32 nWaitMask; /**< Mask of OMX_CLOCKPORT values. */ -} OMX_TIME_CONFIG_CLOCKSTATETYPE; - -/** Structure representing the reference clock currently being used to - * compute media time. IL client uses this config to change or query the - * clock component's active reference clock */ -typedef struct OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_TIME_REFCLOCKTYPE eClock; /**< Reference clock used to compute media time */ -} OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE; - -/** Descriptor for setting specifics of power type. - * Note: this structure is listed for backwards compatibility. */ -typedef struct OMX_OTHER_CONFIG_POWERTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_BOOL bEnablePM; /**< Flag to enable Power Management */ -} OMX_OTHER_CONFIG_POWERTYPE; - - -/** Descriptor for setting specifics of stats type. - * Note: this structure is listed for backwards compatibility. */ -typedef struct OMX_OTHER_CONFIG_STATSTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - /* what goes here */ -} OMX_OTHER_CONFIG_STATSTYPE; - - -/** - * The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output other - * path. - */ -typedef struct OMX_OTHER_PORTDEFINITIONTYPE { - OMX_OTHER_FORMATTYPE eFormat; /**< Type of data expected for this channel */ -} OMX_OTHER_PORTDEFINITIONTYPE; - -/** Port format parameter. This structure is used to enumerate - * the various data input/output format supported by the port. - */ -typedef struct OMX_OTHER_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; /**< size of the structure in bytes */ - OMX_VERSIONTYPE nVersion; /**< OMX specification version information */ - OMX_U32 nPortIndex; /**< Indicates which port to set */ - OMX_U32 nIndex; /**< Indicates the enumeration index for the format from 0x0 to N-1 */ - OMX_OTHER_FORMATTYPE eFormat; /**< Type of data expected for this channel */ -} OMX_OTHER_PARAM_PORTFORMATTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Types.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Types.h @@ -1,372 +0,0 @@ -/* - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** OMX_Types.h - OpenMax IL version 1.1.2 - * The OMX_Types header file contains the primitive type definitions used by - * the core, the application and the component. This file may need to be - * modified to be used on systems that do not have "char" set to 8 bits, - * "short" set to 16 bits and "long" set to 32 bits. - */ - -#ifndef OMX_Types_h -#define OMX_Types_h - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -/** The OMX_API and OMX_APIENTRY are platform specific definitions used - * to declare OMX function prototypes. They are modified to meet the - * requirements for a particular platform */ -#ifdef __SYMBIAN32__ -# ifdef __OMX_EXPORTS -# define OMX_API __declspec(dllexport) -# else -# ifdef _WIN32 -# define OMX_API __declspec(dllexport) -# else -# define OMX_API __declspec(dllimport) -# endif -# endif -#else -# if defined(_WIN32) && !defined(__MINGW32__) -# ifdef __OMX_EXPORTS -# define OMX_API __declspec(dllexport) -# else -# define OMX_API __declspec(dllimport) -# endif -# else -# ifdef __OMX_EXPORTS -# define OMX_API -# else -# define OMX_API extern -# endif -# endif -#endif - -#ifndef OMX_APIENTRY -#define OMX_APIENTRY -#endif - -/** OMX_IN is used to identify inputs to an OMX function. This designation - will also be used in the case of a pointer that points to a parameter - that is used as an output. */ -#ifndef OMX_IN -#define OMX_IN -#endif - -/** OMX_OUT is used to identify outputs from an OMX function. This - designation will also be used in the case of a pointer that points - to a parameter that is used as an input. */ -#ifndef OMX_OUT -#define OMX_OUT -#endif - - -/** OMX_INOUT is used to identify parameters that may be either inputs or - outputs from an OMX function at the same time. This designation will - also be used in the case of a pointer that points to a parameter that - is used both as an input and an output. */ -#ifndef OMX_INOUT -#define OMX_INOUT -#endif - -/** OMX_ALL is used to as a wildcard to select all entities of the same type - * when specifying the index, or referring to a object by an index. (i.e. - * use OMX_ALL to indicate all N channels). When used as a port index - * for a config or parameter this OMX_ALL denotes that the config or - * parameter applies to the entire component not just one port. */ -#define OMX_ALL 0xFFFFFFFF - -/** In the following we define groups that help building doxygen documentation */ - -/** @defgroup core OpenMAX IL core - * Functions and structure related to the OMX IL core - */ - - /** @defgroup comp OpenMAX IL component - * Functions and structure related to the OMX IL component - */ - -/** @defgroup rpm Resource and Policy Management - * Structures for resource and policy management of components - */ - -/** @defgroup buf Buffer Management - * Buffer handling functions and structures - */ - -/** @defgroup tun Tunneling - * @ingroup core comp - * Structures and functions to manage tunnels among component ports - */ - -/** @defgroup cp Content Pipes - * @ingroup core - */ - - /** @defgroup metadata Metadata handling - * - */ - -#if defined(__GNUC__) -#include <stdint.h> -#define STDINT_H_AVAILABLE -#endif - -/** OMX_U8 is an 8 bit unsigned quantity that is byte aligned */ -typedef unsigned char OMX_U8; - -/** OMX_S8 is an 8 bit signed quantity that is byte aligned */ -typedef signed char OMX_S8; - -/** OMX_U16 is a 16 bit unsigned quantity that is 16 bit word aligned */ -typedef unsigned short OMX_U16; - -/** OMX_S16 is a 16 bit signed quantity that is 16 bit word aligned */ -typedef signed short OMX_S16; - -/** OMX_U32 is a 32 bit unsigned quantity that is 32 bit word aligned */ -#ifdef STDINT_H_AVAILABLE -typedef uint32_t OMX_U32; -#else -typedef unsigned long OMX_U32; -#endif - -/** OMX_S32 is a 32 bit signed quantity that is 32 bit word aligned */ -#ifdef STDINT_H_AVAILABLE -typedef int32_t OMX_S32; -#else -typedef signed long OMX_S32; -#endif - - -/* Users with compilers that cannot accept the "long long" designation should - define the OMX_SKIP64BIT macro. It should be noted that this may cause - some components to fail to compile if the component was written to require - 64 bit integral types. However, these components would NOT compile anyway - since the compiler does not support the way the component was written. -*/ -#ifndef OMX_SKIP64BIT -#ifdef __SYMBIAN32__ -/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ -typedef unsigned long long OMX_U64; - -/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ -typedef signed long long OMX_S64; - -#elif defined(WIN32) - -/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ -typedef unsigned __int64 OMX_U64; - -/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ -typedef signed __int64 OMX_S64; - -#else /* WIN32 */ - -/** OMX_U64 is a 64 bit unsigned quantity that is 64 bit word aligned */ -typedef unsigned long long OMX_U64; - -/** OMX_S64 is a 64 bit signed quantity that is 64 bit word aligned */ -typedef signed long long OMX_S64; - -#endif /* WIN32 */ -#endif - - -/** The OMX_BOOL type is intended to be used to represent a true or a false - value when passing parameters to and from the OMX core and components. The - OMX_BOOL is a 32 bit quantity and is aligned on a 32 bit word boundary. - */ -typedef enum OMX_BOOL { - OMX_FALSE = 0, - OMX_TRUE = !OMX_FALSE, - OMX_BOOL_MAX = 0x7FFFFFFF -} OMX_BOOL; - -/** The OMX_PTR type is intended to be used to pass pointers between the OMX - applications and the OMX Core and components. This is a 32 bit pointer and - is aligned on a 32 bit boundary. - */ -typedef void* OMX_PTR; - -/** The OMX_STRING type is intended to be used to pass "C" type strings between - the application and the core and component. The OMX_STRING type is a 32 - bit pointer to a zero terminated string. The pointer is word aligned and - the string is byte aligned. - */ -typedef char* OMX_STRING; - -/** The OMX_BYTE type is intended to be used to pass arrays of bytes such as - buffers between the application and the component and core. The OMX_BYTE - type is a 32 bit pointer to a zero terminated string. The pointer is word - aligned and the string is byte aligned. - */ -typedef unsigned char* OMX_BYTE; - -/** OMX_UUIDTYPE is a very long unique identifier to uniquely identify - at runtime. This identifier should be generated by a component in a way - that guarantees that every instance of the identifier running on the system - is unique. */ -typedef unsigned char OMX_UUIDTYPE[128]; - -/** The OMX_DIRTYPE enumeration is used to indicate if a port is an input or - an output port. This enumeration is common across all component types. - */ -typedef enum OMX_DIRTYPE -{ - OMX_DirInput, /**< Port is an input port */ - OMX_DirOutput, /**< Port is an output port */ - OMX_DirMax = 0x7FFFFFFF -} OMX_DIRTYPE; - -/** The OMX_ENDIANTYPE enumeration is used to indicate the bit ordering - for numerical data (i.e. big endian, or little endian). - */ -typedef enum OMX_ENDIANTYPE -{ - OMX_EndianBig, /**< big endian */ - OMX_EndianLittle, /**< little endian */ - OMX_EndianMax = 0x7FFFFFFF -} OMX_ENDIANTYPE; - - -/** The OMX_NUMERICALDATATYPE enumeration is used to indicate if data - is signed or unsigned - */ -typedef enum OMX_NUMERICALDATATYPE -{ - OMX_NumericalDataSigned, /**< signed data */ - OMX_NumericalDataUnsigned, /**< unsigned data */ - OMX_NumercialDataMax = 0x7FFFFFFF -} OMX_NUMERICALDATATYPE; - - -/** Unsigned bounded value type */ -typedef struct OMX_BU32 { - OMX_U32 nValue; /**< actual value */ - OMX_U32 nMin; /**< minimum for value (i.e. nValue >= nMin) */ - OMX_U32 nMax; /**< maximum for value (i.e. nValue <= nMax) */ -} OMX_BU32; - - -/** Signed bounded value type */ -typedef struct OMX_BS32 { - OMX_S32 nValue; /**< actual value */ - OMX_S32 nMin; /**< minimum for value (i.e. nValue >= nMin) */ - OMX_S32 nMax; /**< maximum for value (i.e. nValue <= nMax) */ -} OMX_BS32; - - -/** Structure representing some time or duration in microseconds. This structure - * must be interpreted as a signed 64 bit value. The quantity is signed to accommodate - * negative deltas and preroll scenarios. The quantity is represented in microseconds - * to accomodate high resolution timestamps (e.g. DVD presentation timestamps based - * on a 90kHz clock) and to allow more accurate and synchronized delivery (e.g. - * individual audio samples delivered at 192 kHz). The quantity is 64 bit to - * accommodate a large dynamic range (signed 32 bit values would allow only for plus - * or minus 35 minutes). - * - * Implementations with limited precision may convert the signed 64 bit value to - * a signed 32 bit value internally but risk loss of precision. - */ -#ifndef OMX_SKIP64BIT -typedef OMX_S64 OMX_TICKS; -#else -typedef struct OMX_TICKS -{ - OMX_U32 nLowPart; /** low bits of the signed 64 bit tick value */ - OMX_U32 nHighPart; /** high bits of the signed 64 bit tick value */ -} OMX_TICKS; -#endif -#define OMX_TICKS_PER_SECOND 1000000 - -/** Define the public interface for the OMX Handle. The core will not use - this value internally, but the application should only use this value. - */ -typedef void* OMX_HANDLETYPE; - -typedef struct OMX_MARKTYPE -{ - OMX_HANDLETYPE hMarkTargetComponent; /**< The component that will - generate a mark event upon - processing the mark. */ - OMX_PTR pMarkData; /**< Application specific data associated with - the mark sent on a mark event to disambiguate - this mark from others. */ -} OMX_MARKTYPE; - - -/** OMX_NATIVE_DEVICETYPE is used to map a OMX video port to the - * platform & operating specific object used to reference the display - * or can be used by a audio port for native audio rendering */ -typedef void* OMX_NATIVE_DEVICETYPE; - -/** OMX_NATIVE_WINDOWTYPE is used to map a OMX video port to the - * platform & operating specific object used to reference the window */ -typedef void* OMX_NATIVE_WINDOWTYPE; - - -/** Define the OMX IL version that corresponds to this set of header files. - * We also define a combined version that can be used to write or compare - * values of the 32bit nVersion field, assuming a little endian architecture */ -#define OMX_VERSION_MAJOR 1 -#define OMX_VERSION_MINOR 1 -#define OMX_VERSION_REVISION 2 -#define OMX_VERSION_STEP 0 - -#define OMX_VERSION ((OMX_VERSION_STEP<<24) | (OMX_VERSION_REVISION<<16) | (OMX_VERSION_MINOR<<8) | OMX_VERSION_MAJOR) - - -/** The OMX_VERSIONTYPE union is used to specify the version for - a structure or component. For a component, the version is entirely - specified by the component vendor. Components doing the same function - from different vendors may or may not have the same version. For - structures, the version shall be set by the entity that allocates the - structure. For structures specified in the OMX 1.1 specification, the - value of the version shall be set to 1.1.0.0 in all cases. Access to the - OMX_VERSIONTYPE can be by a single 32 bit access (e.g. by nVersion) or - by accessing one of the structure elements to, for example, check only - the Major revision. - */ -typedef union OMX_VERSIONTYPE -{ - struct - { - OMX_U8 nVersionMajor; /**< Major version accessor element */ - OMX_U8 nVersionMinor; /**< Minor version accessor element */ - OMX_U8 nRevision; /**< Revision version accessor element */ - OMX_U8 nStep; /**< Step version accessor element */ - } s; - OMX_U32 nVersion; /**< 32 bit value to make accessing the - version easily done in a single word - size copy/compare operation */ -} OMX_VERSIONTYPE; - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ diff --git a/vc/include/interface/vmcs_host/khronos/IL/OMX_Video.h b/vc/include/interface/vmcs_host/khronos/IL/OMX_Video.h @@ -1,1082 +0,0 @@ -/** - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject - * to the following conditions: - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - */ - -/** - * @file OMX_Video.h - OpenMax IL version 1.1.2 - * The structures is needed by Video components to exchange parameters - * and configuration data with OMX components. - */ -#ifndef OMX_Video_h -#define OMX_Video_h - -/** @defgroup video OpenMAX IL Video Domain - * @ingroup iv - * Structures for OpenMAX IL Video domain - * @{ - */ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -/** - * Each OMX header must include all required header files to allow the - * header to compile without errors. The includes below are required - * for this header file to compile successfully - */ - -#include "OMX_IVCommon.h" - - -/** - * Enumeration used to define the possible video compression codings. - * NOTE: This essentially refers to file extensions. If the coding is - * being used to specify the ENCODE type, then additional work - * must be done to configure the exact flavor of the compression - * to be used. For decode cases where the user application can - * not differentiate between MPEG-4 and H.264 bit streams, it is - * up to the codec to handle this. - */ -typedef enum OMX_VIDEO_CODINGTYPE { - OMX_VIDEO_CodingUnused, /**< Value when coding is N/A */ - OMX_VIDEO_CodingAutoDetect, /**< Autodetection of coding type */ - OMX_VIDEO_CodingMPEG2, /**< AKA: H.262 */ - OMX_VIDEO_CodingH263, /**< H.263 */ - OMX_VIDEO_CodingMPEG4, /**< MPEG-4 */ - OMX_VIDEO_CodingWMV, /**< all versions of Windows Media Video */ - OMX_VIDEO_CodingRV, /**< all versions of Real Video */ - OMX_VIDEO_CodingAVC, /**< H.264/AVC */ - OMX_VIDEO_CodingMJPEG, /**< Motion JPEG */ - OMX_VIDEO_CodingKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_CodingVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - -#define OMX_AUDIO_CodingVP6_Supported 1 - OMX_VIDEO_CodingVP6, /**< On2 VP6 */ -#define OMX_AUDIO_CodingVP7_Supported 1 - OMX_VIDEO_CodingVP7, /**< On2 VP7 */ -#define OMX_AUDIO_CodingVP8_Supported 1 - OMX_VIDEO_CodingVP8, /**< On2 VP8 */ -#define OMX_AUDIO_CodingYUV_Supported 1 - OMX_VIDEO_CodingYUV, /* raw YUV video */ -#define OMX_AUDIO_CodingSorenson_Supported 1 - OMX_VIDEO_CodingSorenson, /**< Sorenson */ -#define OMX_AUDIO_CodingTheora_Supported 1 - OMX_VIDEO_CodingTheora, /**< Theora */ -#define OMX_AUDIO_CodingMVC_Supported 1 - OMX_VIDEO_CodingMVC, /**< H.264/MVC */ - - OMX_VIDEO_CodingMax = 0x7FFFFFFF -} OMX_VIDEO_CODINGTYPE; - - -/** - * Data structure used to define a video path. The number of Video paths for - * input and output will vary by type of the Video component. - * - * Input (aka Source) : zero Inputs, one Output, - * Splitter : one Input, 2 or more Outputs, - * Processing Element : one Input, one output, - * Mixer : 2 or more inputs, one output, - * Output (aka Sink) : one Input, zero outputs. - * - * The PortDefinition structure is used to define all of the parameters - * necessary for the compliant component to setup an input or an output video - * path. If additional vendor specific data is required, it should be - * transmitted to the component using the CustomCommand function. Compliant - * components will prepopulate this structure with optimal values during the - * GetDefaultInitParams command. - * - * STRUCT MEMBERS: - * cMIMEType : MIME type of data for the port - * pNativeRender : Platform specific reference for a display if a - * sync, otherwise this field is 0 - * nFrameWidth : Width of frame to be used on channel if - * uncompressed format is used. Use 0 for unknown, - * don't care or variable - * nFrameHeight : Height of frame to be used on channel if - * uncompressed format is used. Use 0 for unknown, - * don't care or variable - * nStride : Number of bytes per span of an image - * (i.e. indicates the number of bytes to get - * from span N to span N+1, where negative stride - * indicates the image is bottom up - * nSliceHeight : Height used when encoding in slices - * nBitrate : Bit rate of frame to be used on channel if - * compressed format is used. Use 0 for unknown, - * don't care or variable - * xFramerate : Frame rate to be used on channel if uncompressed - * format is used. Use 0 for unknown, don't care or - * variable. Units are Q16 frames per second. - * bFlagErrorConcealment : Turns on error concealment if it is supported by - * the OMX component - * eCompressionFormat : Compression format used in this instance of the - * component. When OMX_VIDEO_CodingUnused is - * specified, eColorFormat is used - * eColorFormat : Decompressed format used by this component - * pNativeWindow : Platform specific reference for a window object if a - * display sink , otherwise this field is 0x0. - */ -typedef struct OMX_VIDEO_PORTDEFINITIONTYPE { - OMX_STRING cMIMEType; - OMX_NATIVE_DEVICETYPE pNativeRender; - OMX_U32 nFrameWidth; - OMX_U32 nFrameHeight; - OMX_S32 nStride; - OMX_U32 nSliceHeight; - OMX_U32 nBitrate; - OMX_U32 xFramerate; - OMX_BOOL bFlagErrorConcealment; - OMX_VIDEO_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_NATIVE_WINDOWTYPE pNativeWindow; -} OMX_VIDEO_PORTDEFINITIONTYPE; - -/** - * Port format parameter. This structure is used to enumerate the various - * data input/output format supported by the port. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Indicates which port to set - * nIndex : Indicates the enumeration index for the format from - * 0x0 to N-1 - * eCompressionFormat : Compression format used in this instance of the - * component. When OMX_VIDEO_CodingUnused is specified, - * eColorFormat is used - * eColorFormat : Decompressed format used by this component - * xFrameRate : Indicates the video frame rate in Q16 format - */ -typedef struct OMX_VIDEO_PARAM_PORTFORMATTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIndex; - OMX_VIDEO_CODINGTYPE eCompressionFormat; - OMX_COLOR_FORMATTYPE eColorFormat; - OMX_U32 xFramerate; -} OMX_VIDEO_PARAM_PORTFORMATTYPE; - - -/** - * This is a structure for configuring video compression quantization - * parameter values. Codecs may support different QP values for different - * frame types. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version info - * nPortIndex : Port that this structure applies to - * nQpI : QP value to use for index frames - * nQpP : QP value to use for P frames - * nQpB : QP values to use for bidirectional frames - */ -typedef struct OMX_VIDEO_PARAM_QUANTIZATIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nQpI; - OMX_U32 nQpP; - OMX_U32 nQpB; -} OMX_VIDEO_PARAM_QUANTIZATIONTYPE; - - -/** - * Structure for configuration of video fast update parameters. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version info - * nPortIndex : Port that this structure applies to - * bEnableVFU : Enable/Disable video fast update - * nFirstGOB : Specifies the number of the first macroblock row - * nFirstMB : specifies the first MB relative to the specified first GOB - * nNumMBs : Specifies the number of MBs to be refreshed from nFirstGOB - * and nFirstMB - */ -typedef struct OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnableVFU; - OMX_U32 nFirstGOB; - OMX_U32 nFirstMB; - OMX_U32 nNumMBs; -} OMX_VIDEO_PARAM_VIDEOFASTUPDATETYPE; - - -/** - * Enumeration of possible bitrate control types - */ -typedef enum OMX_VIDEO_CONTROLRATETYPE { - OMX_Video_ControlRateDisable, - OMX_Video_ControlRateVariable, - OMX_Video_ControlRateConstant, - OMX_Video_ControlRateVariableSkipFrames, - OMX_Video_ControlRateConstantSkipFrames, - OMX_Video_ControlRateKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_Video_ControlRateVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_Video_ControlRateMax = 0x7FFFFFFF -} OMX_VIDEO_CONTROLRATETYPE; - - -/** - * Structure for configuring bitrate mode of a codec. - * - * STRUCT MEMBERS: - * nSize : Size of the struct in bytes - * nVersion : OMX spec version info - * nPortIndex : Port that this struct applies to - * eControlRate : Control rate type enum - * nTargetBitrate : Target bitrate to encode with - */ -typedef struct OMX_VIDEO_PARAM_BITRATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_CONTROLRATETYPE eControlRate; - OMX_U32 nTargetBitrate; -} OMX_VIDEO_PARAM_BITRATETYPE; - - -/** - * Enumeration of possible motion vector (MV) types - */ -typedef enum OMX_VIDEO_MOTIONVECTORTYPE { - OMX_Video_MotionVectorPixel, - OMX_Video_MotionVectorHalfPel, - OMX_Video_MotionVectorQuarterPel, - OMX_Video_MotionVectorEighthPel, - OMX_Video_MotionVectorKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_Video_MotionVectorVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_Video_MotionVectorMax = 0x7FFFFFFF -} OMX_VIDEO_MOTIONVECTORTYPE; - - -/** - * Structure for configuring the number of motion vectors used as well - * as their accuracy. - * - * STRUCT MEMBERS: - * nSize : Size of the struct in bytes - * nVersion : OMX spec version info - * nPortIndex : port that this structure applies to - * eAccuracy : Enumerated MV accuracy - * bUnrestrictedMVs : Allow unrestricted MVs - * bFourMV : Allow use of 4 MVs - * sXSearchRange : Search range in horizontal direction for MVs - * sYSearchRange : Search range in vertical direction for MVs - */ -typedef struct OMX_VIDEO_PARAM_MOTIONVECTORTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_MOTIONVECTORTYPE eAccuracy; - OMX_BOOL bUnrestrictedMVs; - OMX_BOOL bFourMV; - OMX_S32 sXSearchRange; - OMX_S32 sYSearchRange; -} OMX_VIDEO_PARAM_MOTIONVECTORTYPE; - - -/** - * Enumeration of possible methods to use for Intra Refresh - */ -typedef enum OMX_VIDEO_INTRAREFRESHTYPE { - OMX_VIDEO_IntraRefreshCyclic, /**< Cyclic intra refresh, bit 0 is set*/ - OMX_VIDEO_IntraRefreshAdaptive, /**< Adaptive intra refresh, bit 1 is set*/ - OMX_VIDEO_IntraRefreshBoth, /**< Cyclic + Adaptive intra refresh (no mrows since bit 2 is off)*/ - OMX_VIDEO_IntraRefreshKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_IntraRefreshVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_IntraRefreshCyclicMrows, /**< Cyclic intra refresh, multiple rows at a time bits 0 and 2 are set*/ - OMX_VIDEO_IntraRefreshPseudoRand, /**< Psuedo random intra refresh, uses bit 3*/ - OMX_VIDEO_IntraRefreshMax = 0x7FFFFFFF -} OMX_VIDEO_INTRAREFRESHTYPE; - - -/** - * Structure for configuring intra refresh mode - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eRefreshMode : Cyclic, Adaptive, or Both - * nAirMBs : Number of intra macroblocks to refresh in a frame when - * AIR is enabled - * nAirRef : Number of times a motion marked macroblock has to be - * intra coded - * nCirMBs : Number of consecutive macroblocks to be coded as "intra" - * when CIR is enabled - */ -typedef struct OMX_VIDEO_PARAM_INTRAREFRESHTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_INTRAREFRESHTYPE eRefreshMode; - OMX_U32 nAirMBs; - OMX_U32 nAirRef; - OMX_U32 nCirMBs; - OMX_U32 nPirMBs; -} OMX_VIDEO_PARAM_INTRAREFRESHTYPE; - - -/** - * Structure for enabling various error correction methods for video - * compression. - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * bEnableHEC : Enable/disable header extension codes (HEC) - * bEnableResync : Enable/disable resynchronization markers - * nResynchMarkerSpacing : Resynch markers interval (in bits) to be - * applied in the stream - * bEnableDataPartitioning : Enable/disable data partitioning - * bEnableRVLC : Enable/disable reversible variable length - * coding - */ -typedef struct OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnableHEC; - OMX_BOOL bEnableResync; - OMX_U32 nResynchMarkerSpacing; - OMX_BOOL bEnableDataPartitioning; - OMX_BOOL bEnableRVLC; -} OMX_VIDEO_PARAM_ERRORCORRECTIONTYPE; - - -/** - * Configuration of variable block-size motion compensation (VBSMC) - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * b16x16 : Enable inter block search 16x16 - * b16x8 : Enable inter block search 16x8 - * b8x16 : Enable inter block search 8x16 - * b8x8 : Enable inter block search 8x8 - * b8x4 : Enable inter block search 8x4 - * b4x8 : Enable inter block search 4x8 - * b4x4 : Enable inter block search 4x4 - */ -typedef struct OMX_VIDEO_PARAM_VBSMCTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL b16x16; - OMX_BOOL b16x8; - OMX_BOOL b8x16; - OMX_BOOL b8x8; - OMX_BOOL b8x4; - OMX_BOOL b4x8; - OMX_BOOL b4x4; -} OMX_VIDEO_PARAM_VBSMCTYPE; - - -/** - * H.263 profile types, each profile indicates support for various - * performance bounds and different annexes. - * - * ENUMS: - * Baseline : Baseline Profile: H.263 (V1), no optional modes - * H320 Coding : H.320 Coding Efficiency Backward Compatibility - * Profile: H.263+ (V2), includes annexes I, J, L.4 - * and T - * BackwardCompatible : Backward Compatibility Profile: H.263 (V1), - * includes annex F - * ISWV2 : Interactive Streaming Wireless Profile: H.263+ - * (V2), includes annexes I, J, K and T - * ISWV3 : Interactive Streaming Wireless Profile: H.263++ - * (V3), includes profile 3 and annexes V and W.6.3.8 - * HighCompression : Conversational High Compression Profile: H.263++ - * (V3), includes profiles 1 & 2 and annexes D and U - * Internet : Conversational Internet Profile: H.263++ (V3), - * includes profile 5 and annex K - * Interlace : Conversational Interlace Profile: H.263++ (V3), - * includes profile 5 and annex W.6.3.11 - * HighLatency : High Latency Profile: H.263++ (V3), includes - * profile 6 and annexes O.1 and P.5 - */ -typedef enum OMX_VIDEO_H263PROFILETYPE { - OMX_VIDEO_H263ProfileBaseline = 0x01, - OMX_VIDEO_H263ProfileH320Coding = 0x02, - OMX_VIDEO_H263ProfileBackwardCompatible = 0x04, - OMX_VIDEO_H263ProfileISWV2 = 0x08, - OMX_VIDEO_H263ProfileISWV3 = 0x10, - OMX_VIDEO_H263ProfileHighCompression = 0x20, - OMX_VIDEO_H263ProfileInternet = 0x40, - OMX_VIDEO_H263ProfileInterlace = 0x80, - OMX_VIDEO_H263ProfileHighLatency = 0x100, - OMX_VIDEO_H263ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_H263ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_H263ProfileMax = 0x7FFFFFFF -} OMX_VIDEO_H263PROFILETYPE; - - -/** - * H.263 level types, each level indicates support for various frame sizes, - * bit rates, decoder frame rates. - */ -typedef enum OMX_VIDEO_H263LEVELTYPE { - OMX_VIDEO_H263Level10 = 0x01, - OMX_VIDEO_H263Level20 = 0x02, - OMX_VIDEO_H263Level30 = 0x04, - OMX_VIDEO_H263Level40 = 0x08, - OMX_VIDEO_H263Level45 = 0x10, - OMX_VIDEO_H263Level50 = 0x20, - OMX_VIDEO_H263Level60 = 0x40, - OMX_VIDEO_H263Level70 = 0x80, - OMX_VIDEO_H263LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_H263LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_H263LevelMax = 0x7FFFFFFF -} OMX_VIDEO_H263LEVELTYPE; - - -/** - * Specifies the picture type. These values should be OR'd to signal all - * pictures types which are allowed. - * - * ENUMS: - * Generic Picture Types: I, P and B - * H.263 Specific Picture Types: SI and SP - * H.264 Specific Picture Types: EI and EP - * MPEG-4 Specific Picture Types: S - */ -typedef enum OMX_VIDEO_PICTURETYPE { - OMX_VIDEO_PictureTypeI = 0x01, - OMX_VIDEO_PictureTypeP = 0x02, - OMX_VIDEO_PictureTypeB = 0x04, - OMX_VIDEO_PictureTypeSI = 0x08, - OMX_VIDEO_PictureTypeSP = 0x10, - OMX_VIDEO_PictureTypeEI = 0x11, - OMX_VIDEO_PictureTypeEP = 0x12, - OMX_VIDEO_PictureTypeS = 0x14, - OMX_VIDEO_PictureTypeKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_PictureTypeVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_PictureTypeMax = 0x7FFFFFFF -} OMX_VIDEO_PICTURETYPE; - - -/** - * H.263 Params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nPFrames : Number of P frames between each I frame - * nBFrames : Number of B frames between each I frame - * eProfile : H.263 profile(s) to use - * eLevel : H.263 level(s) to use - * bPLUSPTYPEAllowed : Indicating that it is allowed to use PLUSPTYPE - * (specified in the 1998 version of H.263) to - * indicate custom picture sizes or clock - * frequencies - * nAllowedPictureTypes : Specifies the picture types allowed in the - * bitstream - * bForceRoundingTypeToZero : value of the RTYPE bit (bit 6 of MPPTYPE) is - * not constrained. It is recommended to change - * the value of the RTYPE bit for each reference - * picture in error-free communication - * nPictureHeaderRepetition : Specifies the frequency of picture header - * repetition - * nGOBHeaderInterval : Specifies the interval of non-empty GOB - * headers in units of GOBs - */ -typedef struct OMX_VIDEO_PARAM_H263TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_VIDEO_H263PROFILETYPE eProfile; - OMX_VIDEO_H263LEVELTYPE eLevel; - OMX_BOOL bPLUSPTYPEAllowed; - OMX_U32 nAllowedPictureTypes; - OMX_BOOL bForceRoundingTypeToZero; - OMX_U32 nPictureHeaderRepetition; - OMX_U32 nGOBHeaderInterval; -} OMX_VIDEO_PARAM_H263TYPE; - - -/** - * MPEG-2 profile types, each profile indicates support for various - * performance bounds and different annexes. - */ -typedef enum OMX_VIDEO_MPEG2PROFILETYPE { - OMX_VIDEO_MPEG2ProfileSimple = 0, /**< Simple Profile */ - OMX_VIDEO_MPEG2ProfileMain, /**< Main Profile */ - OMX_VIDEO_MPEG2Profile422, /**< 4:2:2 Profile */ - OMX_VIDEO_MPEG2ProfileSNR, /**< SNR Profile */ - OMX_VIDEO_MPEG2ProfileSpatial, /**< Spatial Profile */ - OMX_VIDEO_MPEG2ProfileHigh, /**< High Profile */ - OMX_VIDEO_MPEG2ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG2ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG2ProfileMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG2PROFILETYPE; - - -/** - * MPEG-2 level types, each level indicates support for various frame - * sizes, bit rates, decoder frame rates. No need - */ -typedef enum OMX_VIDEO_MPEG2LEVELTYPE { - OMX_VIDEO_MPEG2LevelLL = 0, /**< Low Level */ - OMX_VIDEO_MPEG2LevelML, /**< Main Level */ - OMX_VIDEO_MPEG2LevelH14, /**< High 1440 */ - OMX_VIDEO_MPEG2LevelHL, /**< High Level */ - OMX_VIDEO_MPEG2LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG2LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG2LevelMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG2LEVELTYPE; - - -/** - * MPEG-2 params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nPFrames : Number of P frames between each I frame - * nBFrames : Number of B frames between each I frame - * eProfile : MPEG-2 profile(s) to use - * eLevel : MPEG-2 levels(s) to use - */ -typedef struct OMX_VIDEO_PARAM_MPEG2TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_VIDEO_MPEG2PROFILETYPE eProfile; - OMX_VIDEO_MPEG2LEVELTYPE eLevel; -} OMX_VIDEO_PARAM_MPEG2TYPE; - - -/** - * MPEG-4 profile types, each profile indicates support for various - * performance bounds and different annexes. - * - * ENUMS: - * - Simple Profile, Levels 1-3 - * - Simple Scalable Profile, Levels 1-2 - * - Core Profile, Levels 1-2 - * - Main Profile, Levels 2-4 - * - N-bit Profile, Level 2 - * - Scalable Texture Profile, Level 1 - * - Simple Face Animation Profile, Levels 1-2 - * - Simple Face and Body Animation (FBA) Profile, Levels 1-2 - * - Basic Animated Texture Profile, Levels 1-2 - * - Hybrid Profile, Levels 1-2 - * - Advanced Real Time Simple Profiles, Levels 1-4 - * - Core Scalable Profile, Levels 1-3 - * - Advanced Coding Efficiency Profile, Levels 1-4 - * - Advanced Core Profile, Levels 1-2 - * - Advanced Scalable Texture, Levels 2-3 - */ -typedef enum OMX_VIDEO_MPEG4PROFILETYPE { - OMX_VIDEO_MPEG4ProfileSimple = 0x01, - OMX_VIDEO_MPEG4ProfileSimpleScalable = 0x02, - OMX_VIDEO_MPEG4ProfileCore = 0x04, - OMX_VIDEO_MPEG4ProfileMain = 0x08, - OMX_VIDEO_MPEG4ProfileNbit = 0x10, - OMX_VIDEO_MPEG4ProfileScalableTexture = 0x20, - OMX_VIDEO_MPEG4ProfileSimpleFace = 0x40, - OMX_VIDEO_MPEG4ProfileSimpleFBA = 0x80, - OMX_VIDEO_MPEG4ProfileBasicAnimated = 0x100, - OMX_VIDEO_MPEG4ProfileHybrid = 0x200, - OMX_VIDEO_MPEG4ProfileAdvancedRealTime = 0x400, - OMX_VIDEO_MPEG4ProfileCoreScalable = 0x800, - OMX_VIDEO_MPEG4ProfileAdvancedCoding = 0x1000, - OMX_VIDEO_MPEG4ProfileAdvancedCore = 0x2000, - OMX_VIDEO_MPEG4ProfileAdvancedScalable = 0x4000, - OMX_VIDEO_MPEG4ProfileAdvancedSimple = 0x8000, - OMX_VIDEO_MPEG4ProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG4ProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG4ProfileMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG4PROFILETYPE; - - -/** - * MPEG-4 level types, each level indicates support for various frame - * sizes, bit rates, decoder frame rates. No need - */ -typedef enum OMX_VIDEO_MPEG4LEVELTYPE { - OMX_VIDEO_MPEG4Level0 = 0x01, /**< Level 0 */ - OMX_VIDEO_MPEG4Level0b = 0x02, /**< Level 0b */ - OMX_VIDEO_MPEG4Level1 = 0x04, /**< Level 1 */ - OMX_VIDEO_MPEG4Level2 = 0x08, /**< Level 2 */ - OMX_VIDEO_MPEG4Level3 = 0x10, /**< Level 3 */ - OMX_VIDEO_MPEG4Level4 = 0x20, /**< Level 4 */ - OMX_VIDEO_MPEG4Level4a = 0x40, /**< Level 4a */ - OMX_VIDEO_MPEG4Level5 = 0x80, /**< Level 5 */ - OMX_VIDEO_MPEG4Level6 = 0x100, /**< Level 5 */ - OMX_VIDEO_MPEG4LevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_MPEG4LevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_MPEG4LevelMax = 0x7FFFFFFF -} OMX_VIDEO_MPEG4LEVELTYPE; - - -/** - * MPEG-4 configuration. This structure handles configuration options - * which are specific to MPEG4 algorithms - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nSliceHeaderSpacing : Number of macroblocks between slice header (H263+ - * Annex K). Put zero if not used - * bSVH : Enable Short Video Header mode - * bGov : Flag to enable GOV - * nPFrames : Number of P frames between each I frame (also called - * GOV period) - * nBFrames : Number of B frames between each I frame - * nIDCVLCThreshold : Value of intra DC VLC threshold - * bACPred : Flag to use ac prediction - * nMaxPacketSize : Maximum size of packet in bytes. - * nTimeIncRes : Used to pass VOP time increment resolution for MPEG4. - * Interpreted as described in MPEG4 standard. - * eProfile : MPEG-4 profile(s) to use. - * eLevel : MPEG-4 level(s) to use. - * nAllowedPictureTypes : Specifies the picture types allowed in the bitstream - * nHeaderExtension : Specifies the number of consecutive video packet - * headers within a VOP - * bReversibleVLC : Specifies whether reversible variable length coding - * is in use - */ -typedef struct OMX_VIDEO_PARAM_MPEG4TYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nSliceHeaderSpacing; - OMX_BOOL bSVH; - OMX_BOOL bGov; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_U32 nIDCVLCThreshold; - OMX_BOOL bACPred; - OMX_U32 nMaxPacketSize; - OMX_U32 nTimeIncRes; - OMX_VIDEO_MPEG4PROFILETYPE eProfile; - OMX_VIDEO_MPEG4LEVELTYPE eLevel; - OMX_U32 nAllowedPictureTypes; - OMX_U32 nHeaderExtension; - OMX_BOOL bReversibleVLC; -} OMX_VIDEO_PARAM_MPEG4TYPE; - - -/** - * WMV Versions - */ -typedef enum OMX_VIDEO_WMVFORMATTYPE { - OMX_VIDEO_WMVFormatUnused = 0x01, /**< Format unused or unknown */ - OMX_VIDEO_WMVFormat7 = 0x02, /**< Windows Media Video format 7 */ - OMX_VIDEO_WMVFormat8 = 0x04, /**< Windows Media Video format 8 */ - OMX_VIDEO_WMVFormat9 = 0x08, /**< Windows Media Video format 9 */ - OMX_VIDEO_WMFFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_WMFFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_WMVFormatMax = 0x7FFFFFFF -} OMX_VIDEO_WMVFORMATTYPE; - - -/** - * WMV Params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFormat : Version of WMV stream / data - */ -typedef struct OMX_VIDEO_PARAM_WMVTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_WMVFORMATTYPE eFormat; -} OMX_VIDEO_PARAM_WMVTYPE; - - -/** - * Real Video Version - */ -typedef enum OMX_VIDEO_RVFORMATTYPE { - OMX_VIDEO_RVFormatUnused = 0, /**< Format unused or unknown */ - OMX_VIDEO_RVFormat8, /**< Real Video format 8 */ - OMX_VIDEO_RVFormat9, /**< Real Video format 9 */ - OMX_VIDEO_RVFormatG2, /**< Real Video Format G2 */ - OMX_VIDEO_RVFormatKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_RVFormatVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_RVFormatMax = 0x7FFFFFFF -} OMX_VIDEO_RVFORMATTYPE; - - -/** - * Real Video Params - * - * STUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * eFormat : Version of RV stream / data - * nBitsPerPixel : Bits per pixel coded in the frame - * nPaddedWidth : Padded width in pixel of a video frame - * nPaddedHeight : Padded Height in pixels of a video frame - * nFrameRate : Rate of video in frames per second - * nBitstreamFlags : Flags which internal information about the bitstream - * nBitstreamVersion : Bitstream version - * nMaxEncodeFrameSize: Max encoded frame size - * bEnablePostFilter : Turn on/off post filter - * bEnableTemporalInterpolation : Turn on/off temporal interpolation - * bEnableLatencyMode : When enabled, the decoder does not display a decoded - * frame until it has detected that no enhancement layer - * frames or dependent B frames will be coming. This - * detection usually occurs when a subsequent non-B - * frame is encountered - */ -typedef struct OMX_VIDEO_PARAM_RVTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_VIDEO_RVFORMATTYPE eFormat; - OMX_U16 nBitsPerPixel; - OMX_U16 nPaddedWidth; - OMX_U16 nPaddedHeight; - OMX_U32 nFrameRate; - OMX_U32 nBitstreamFlags; - OMX_U32 nBitstreamVersion; - OMX_U32 nMaxEncodeFrameSize; - OMX_BOOL bEnablePostFilter; - OMX_BOOL bEnableTemporalInterpolation; - OMX_BOOL bEnableLatencyMode; -} OMX_VIDEO_PARAM_RVTYPE; - - -/** - * AVC profile types, each profile indicates support for various - * performance bounds and different annexes. - */ -typedef enum OMX_VIDEO_AVCPROFILETYPE { - OMX_VIDEO_AVCProfileBaseline = 0x01, /**< Baseline profile */ - OMX_VIDEO_AVCProfileMain = 0x02, /**< Main profile */ - OMX_VIDEO_AVCProfileExtended = 0x04, /**< Extended profile */ - OMX_VIDEO_AVCProfileHigh = 0x08, /**< High profile */ - OMX_VIDEO_AVCProfileHigh10 = 0x10, /**< High 10 profile */ - OMX_VIDEO_AVCProfileHigh422 = 0x20, /**< High 4:2:2 profile */ - OMX_VIDEO_AVCProfileHigh444 = 0x40, /**< High 4:4:4 profile */ - OMX_VIDEO_AVCProfileConstrainedBaseline = 0x80, /**< Constrained Baseline Profile */ - OMX_VIDEO_AVCProfileKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_AVCProfileVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_AVCProfileMax = 0x7FFFFFFF -} OMX_VIDEO_AVCPROFILETYPE; - - -/** - * AVC level types, each level indicates support for various frame sizes, - * bit rates, decoder frame rates. No need - */ -typedef enum OMX_VIDEO_AVCLEVELTYPE { - OMX_VIDEO_AVCLevel1 = 0x01, /**< Level 1 */ - OMX_VIDEO_AVCLevel1b = 0x02, /**< Level 1b */ - OMX_VIDEO_AVCLevel11 = 0x04, /**< Level 1.1 */ - OMX_VIDEO_AVCLevel12 = 0x08, /**< Level 1.2 */ - OMX_VIDEO_AVCLevel13 = 0x10, /**< Level 1.3 */ - OMX_VIDEO_AVCLevel2 = 0x20, /**< Level 2 */ - OMX_VIDEO_AVCLevel21 = 0x40, /**< Level 2.1 */ - OMX_VIDEO_AVCLevel22 = 0x80, /**< Level 2.2 */ - OMX_VIDEO_AVCLevel3 = 0x100, /**< Level 3 */ - OMX_VIDEO_AVCLevel31 = 0x200, /**< Level 3.1 */ - OMX_VIDEO_AVCLevel32 = 0x400, /**< Level 3.2 */ - OMX_VIDEO_AVCLevel4 = 0x800, /**< Level 4 */ - OMX_VIDEO_AVCLevel41 = 0x1000, /**< Level 4.1 */ - OMX_VIDEO_AVCLevel42 = 0x2000, /**< Level 4.2 */ - OMX_VIDEO_AVCLevel5 = 0x4000, /**< Level 5 */ - OMX_VIDEO_AVCLevel51 = 0x8000, /**< Level 5.1 */ - OMX_VIDEO_AVCLevelKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_AVCLevelVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_AVCLevelMax = 0x7FFFFFFF -} OMX_VIDEO_AVCLEVELTYPE; - - -/** - * AVC loop filter modes - * - * OMX_VIDEO_AVCLoopFilterEnable : Enable - * OMX_VIDEO_AVCLoopFilterDisable : Disable - * OMX_VIDEO_AVCLoopFilterDisableSliceBoundary : Disabled on slice boundaries - */ -typedef enum OMX_VIDEO_AVCLOOPFILTERTYPE { - OMX_VIDEO_AVCLoopFilterEnable = 0, - OMX_VIDEO_AVCLoopFilterDisable, - OMX_VIDEO_AVCLoopFilterDisableSliceBoundary, - OMX_VIDEO_AVCLoopFilterKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_AVCLoopFilterVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_AVCLoopFilterMax = 0x7FFFFFFF -} OMX_VIDEO_AVCLOOPFILTERTYPE; - - -/** - * AVC params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nSliceHeaderSpacing : Number of macroblocks between slice header, put - * zero if not used - * nPFrames : Number of P frames between each I frame - * nBFrames : Number of B frames between each I frame - * bUseHadamard : Enable/disable Hadamard transform - * nRefFrames : Max number of reference frames to use for inter - * motion search (1-16) - * nRefIdxTrailing : Pic param set ref frame index (index into ref - * frame buffer of trailing frames list), B frame - * support - * nRefIdxForward : Pic param set ref frame index (index into ref - * frame buffer of forward frames list), B frame - * support - * bEnableUEP : Enable/disable unequal error protection. This - * is only valid of data partitioning is enabled. - * bEnableFMO : Enable/disable flexible macroblock ordering - * bEnableASO : Enable/disable arbitrary slice ordering - * bEnableRS : Enable/disable sending of redundant slices - * eProfile : AVC profile(s) to use - * eLevel : AVC level(s) to use - * nAllowedPictureTypes : Specifies the picture types allowed in the - * bitstream - * bFrameMBsOnly : specifies that every coded picture of the - * coded video sequence is a coded frame - * containing only frame macroblocks - * bMBAFF : Enable/disable switching between frame and - * field macroblocks within a picture - * bEntropyCodingCABAC : Entropy decoding method to be applied for the - * syntax elements for which two descriptors appear - * in the syntax tables - * bWeightedPPrediction : Enable/disable weighted prediction shall not - * be applied to P and SP slices - * nWeightedBipredicitonMode : Default weighted prediction is applied to B - * slices - * bconstIpred : Enable/disable intra prediction - * bDirect8x8Inference : Specifies the method used in the derivation - * process for luma motion vectors for B_Skip, - * B_Direct_16x16 and B_Direct_8x8 as specified - * in subclause 8.4.1.2 of the AVC spec - * bDirectSpatialTemporal : Flag indicating spatial or temporal direct - * mode used in B slice coding (related to - * bDirect8x8Inference) . Spatial direct mode is - * more common and should be the default. - * nCabacInitIdx : Index used to init CABAC contexts - * eLoopFilterMode : Enable/disable loop filter - */ -typedef struct OMX_VIDEO_PARAM_AVCTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nSliceHeaderSpacing; - OMX_U32 nPFrames; - OMX_U32 nBFrames; - OMX_BOOL bUseHadamard; - OMX_U32 nRefFrames; - OMX_U32 nRefIdx10ActiveMinus1; - OMX_U32 nRefIdx11ActiveMinus1; - OMX_BOOL bEnableUEP; - OMX_BOOL bEnableFMO; - OMX_BOOL bEnableASO; - OMX_BOOL bEnableRS; - OMX_VIDEO_AVCPROFILETYPE eProfile; - OMX_VIDEO_AVCLEVELTYPE eLevel; - OMX_U32 nAllowedPictureTypes; - OMX_BOOL bFrameMBsOnly; - OMX_BOOL bMBAFF; - OMX_BOOL bEntropyCodingCABAC; - OMX_BOOL bWeightedPPrediction; - OMX_U32 nWeightedBipredicitonMode; - OMX_BOOL bconstIpred ; - OMX_BOOL bDirect8x8Inference; - OMX_BOOL bDirectSpatialTemporal; - OMX_U32 nCabacInitIdc; - OMX_VIDEO_AVCLOOPFILTERTYPE eLoopFilterMode; -} OMX_VIDEO_PARAM_AVCTYPE; - -typedef struct OMX_VIDEO_PARAM_PROFILELEVELTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 eProfile; /**< type is OMX_VIDEO_AVCPROFILETYPE, OMX_VIDEO_H263PROFILETYPE, - or OMX_VIDEO_MPEG4PROFILETYPE depending on context */ - OMX_U32 eLevel; /**< type is OMX_VIDEO_AVCLEVELTYPE, OMX_VIDEO_H263LEVELTYPE, - or OMX_VIDEO_MPEG4PROFILETYPE depending on context */ - OMX_U32 nProfileIndex; /**< Used to query for individual profile support information, - This parameter is valid only for - OMX_IndexParamVideoProfileLevelQuerySupported index, - For all other indices this parameter is to be ignored. */ -} OMX_VIDEO_PARAM_PROFILELEVELTYPE; - -/** - * Structure for dynamically configuring bitrate mode of a codec. - * - * STRUCT MEMBERS: - * nSize : Size of the struct in bytes - * nVersion : OMX spec version info - * nPortIndex : Port that this struct applies to - * nEncodeBitrate : Target average bitrate to be generated in bps - */ -typedef struct OMX_VIDEO_CONFIG_BITRATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nEncodeBitrate; -} OMX_VIDEO_CONFIG_BITRATETYPE; - -/** - * Defines Encoder Frame Rate setting - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * xEncodeFramerate : Encoding framerate represented in Q16 format - */ -typedef struct OMX_CONFIG_FRAMERATETYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 xEncodeFramerate; /* Q16 format */ -} OMX_CONFIG_FRAMERATETYPE; - -typedef struct OMX_CONFIG_INTRAREFRESHVOPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL IntraRefreshVOP; -} OMX_CONFIG_INTRAREFRESHVOPTYPE; - -typedef struct OMX_CONFIG_MACROBLOCKERRORMAPTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nErrMapSize; /* Size of the Error Map in bytes */ - OMX_U8 ErrMap[1]; /* Error map hint */ -} OMX_CONFIG_MACROBLOCKERRORMAPTYPE; - -typedef struct OMX_CONFIG_MBERRORREPORTINGTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_BOOL bEnabled; -} OMX_CONFIG_MBERRORREPORTINGTYPE; - -typedef struct OMX_PARAM_MACROBLOCKSTYPE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nMacroblocks; -} OMX_PARAM_MACROBLOCKSTYPE; - -/** - * AVC Slice Mode modes - * - * OMX_VIDEO_SLICEMODE_AVCDefault : Normal frame encoding, one slice per frame - * OMX_VIDEO_SLICEMODE_AVCMBSlice : NAL mode, number of MBs per frame - * OMX_VIDEO_SLICEMODE_AVCByteSlice : NAL mode, number of bytes per frame - */ -typedef enum OMX_VIDEO_AVCSLICEMODETYPE { - OMX_VIDEO_SLICEMODE_AVCDefault = 0, - OMX_VIDEO_SLICEMODE_AVCMBSlice, - OMX_VIDEO_SLICEMODE_AVCByteSlice, - OMX_VIDEO_SLICEMODE_AVCKhronosExtensions = 0x6F000000, /**< Reserved region for introducing Khronos Standard Extensions */ - OMX_VIDEO_SLICEMODE_AVCVendorStartUnused = 0x7F000000, /**< Reserved region for introducing Vendor Extensions */ - OMX_VIDEO_SLICEMODE_AVCLevelMax = 0x7FFFFFFF -} OMX_VIDEO_AVCSLICEMODETYPE; - -/** - * AVC FMO Slice Mode Params - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nNumSliceGroups : Specifies the number of slice groups - * nSliceGroupMapType : Specifies the type of slice groups - * eSliceMode : Specifies the type of slice - */ -typedef struct OMX_VIDEO_PARAM_AVCSLICEFMO { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U8 nNumSliceGroups; - OMX_U8 nSliceGroupMapType; - OMX_VIDEO_AVCSLICEMODETYPE eSliceMode; -} OMX_VIDEO_PARAM_AVCSLICEFMO; - -/** - * AVC IDR Period Configs - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nIDRPeriod : Specifies periodicity of IDR frames - * nPFrames : Specifies internal of coding Intra frames - */ -typedef struct OMX_VIDEO_CONFIG_AVCINTRAPERIOD { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nIDRPeriod; - OMX_U32 nPFrames; -} OMX_VIDEO_CONFIG_AVCINTRAPERIOD; - -/** - * AVC NAL Size Configs - * - * STRUCT MEMBERS: - * nSize : Size of the structure in bytes - * nVersion : OMX specification version information - * nPortIndex : Port that this structure applies to - * nNaluBytes : Specifies the NAL unit size - */ -typedef struct OMX_VIDEO_CONFIG_NALSIZE { - OMX_U32 nSize; - OMX_VERSIONTYPE nVersion; - OMX_U32 nPortIndex; - OMX_U32 nNaluBytes; -} OMX_VIDEO_CONFIG_NALSIZE; - - -/** @} */ - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif -/* File EOF */ - diff --git a/vc/include/interface/vmcs_host/linux/vcfiled/vcfiled_check.h b/vc/include/interface/vmcs_host/linux/vcfiled/vcfiled_check.h @@ -1,48 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCFILED_CHECK_H -#define VCFILED_CHECK_H - -#ifdef ANDROID -#define VCFILED_LOCKDIR "/tmp/vcfiled/vcfiled.pid" -#define VCFILED_LOCKFILE "/tmp/vcfiled" -#endif - -#ifndef VCFILED_LOCKFILE -#define VCFILED_LOCKDIR "/var/run/vcfiled" -#define VCFILED_LOCKFILE VCFILED_LOCKDIR "/vcfiled" -#endif - -typedef void (*VCFILED_LOGMSG_T)(int level, const char *fmt, ...); -int vcfiled_lock(const char *filename, VCFILED_LOGMSG_T logmsg); -extern int vcfiled_is_running(const char *lockfile); - - -#endif - - diff --git a/vc/include/interface/vmcs_host/linux/vchost_config.h b/vc/include/interface/vmcs_host/linux/vchost_config.h @@ -1,61 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCHOST_CONFIG_H -#define VCHOST_CONFIG_H - -#include "interface/vcos/vcos.h" - -#if 0 -/* Types that map onto VideoCore's types of the same name. */ -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef short int16_t; -typedef long int32_t; -typedef unsigned long uint32_t; -typedef long long int64_t; -typedef unsigned long long uint64_t; - -#ifndef vc_assert -#define vc_assert(cond) vcos_assert(cond) -#endif -#endif - -/* On this platform we need to be able to release the host-side software resources. */ -extern void vc_os_close(void); - -#ifndef VCHPRE_ -#define VCHPRE_ extern -#endif -#ifndef VCHPOST_ -#define VCHPOST_ -#endif -#ifndef VCCPRE_ -#define VCCPRE_ -#endif - -#endif diff --git a/vc/include/interface/vmcs_host/vc_cec.h b/vc/include/interface/vmcs_host/vc_cec.h @@ -1,513 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * CEC related constants - shared by both host and vc. - */ - -#ifndef _VC_CEC_H_ -#define _VC_CEC_H_ - -#ifndef STRINGIFY -#define STRINGIFY(x) #x -#define TOSTRING(x) STRINGIFY(x) -#endif - -//Broadcast address and TV logical address -#define CEC_BROADCAST_ADDR 0x0F -#define CEC_TV_ADDRESS 0x00 - -//Maximum transmit length excluding the header byte */ -#define CEC_MAX_XMIT_LENGTH 15 /* +1 for CEC Header Length */ -//Invalid physical address -#define CEC_CLEAR_ADDR 0xFFFF /* packed 16 bits of F.F.F.F */ - -/* ---------------------------------------------------------------------- - * general CEC defines - * -------------------------------------------------------------------- */ -//Maximum transmission length and invalid physical address are now in vc_cec.h -#define CEC_VERSION 0x04 /* HDMI 1.3a */ -//This OUI ID is registered at the current HQ address in Irvine -#define CEC_VENDOR_ID_BROADCOM (0x18C086L) // 24 bit OUI company id from IEEE. = Broadcom -//These three OUI IDs are registered with the old address of Irvine office in case you need them -//#define CEC_VENDOR_ID_BROADCOM (0x000AF7L) -//#define CEC_VENDOR_ID_BROADCOM (0x001018L) -//#define CEC_VENDOR_ID_BROADCOM (0x001BE9L) -#define CEC_VENDOR_ID_ONKYO (0x0009B0L) -#define CEC_VENDOR_ID_PANASONIC_EUROPE (0x000F12L) - -//If we want to "pretend" to be somebody else use a different company id -#define CEC_VENDOR_ID (0x000000L) //We should set the vendor id - -#define CEC_BLOCKING 1 -#define CEC_NONBLOCKING 0 - -/** - * These are the logical addresses for all possible attached devices - */ -typedef enum CEC_AllDevices { - CEC_AllDevices_eTV = 0, /**<TV only */ - CEC_AllDevices_eRec1, /**<Address for 1st Recording Device */ - CEC_AllDevices_eRec2, /**<Address for 2nd Recording Device */ - CEC_AllDevices_eSTB1, /**<Address for 1st SetTop Box Device */ - CEC_AllDevices_eDVD1, /**<Address for 1st DVD Device */ - CEC_AllDevices_eAudioSystem, /**<Address for Audio Device */ - CEC_AllDevices_eSTB2, /**<Address for 2nd SetTop Box Device */ - CEC_AllDevices_eSTB3, /**<Address for 3rd SetTop Box Device */ - CEC_AllDevices_eDVD2, /**<Address for 2nd DVD Device */ - CEC_AllDevices_eRec3, /**<Address for 3rd Recording Device */ - CEC_AllDevices_eSTB4, /**<10 Address for 4th Tuner Device */ - CEC_AllDevices_eDVD3, /**<11 Address for 3rd DVD Device */ - CEC_AllDevices_eRsvd3, /**<Reserved and cannot be used */ - CEC_AllDevices_eRsvd4, /**<Reserved and cannot be used */ - CEC_AllDevices_eFreeUse, /**<Free Address, use for any device */ - CEC_AllDevices_eUnRegistered = 15 /**<UnRegistered Devices */ -} CEC_AllDevices_T; - -/** - * define device types for <Report Physical Address> - */ -typedef enum CEC_DeviceTypes{ - CEC_DeviceType_TV = 0, /**<TV only */ - CEC_DeviceType_Rec = 1, /**<Recoding device */ - CEC_DeviceType_Reserved = 2, /**<Reserved */ - CEC_DeviceType_Tuner = 3, /**<STB */ - CEC_DeviceType_Playback = 4, /**<DVD player */ - CEC_DeviceType_Audio = 5, /**<AV receiver */ - CEC_DeviceType_Switch = 6, /**<CEC switch */ - CEC_DeviceType_VidProc = 7, /**<Video processor */ - - CEC_DeviceType_Invalid = 0xF, //RESERVED - DO NOT USE -} CEC_DEVICE_TYPE_T; - -/** - * Generic CEC opcode - */ -typedef enum { - CEC_Opcode_FeatureAbort = 0x00, - CEC_Opcode_ImageViewOn = 0x04, - CEC_Opcode_TunerStepIncrement = 0x05, - CEC_Opcode_TunerStepDecrement = 0x06, - CEC_Opcode_TunerDeviceStatus = 0x07, - CEC_Opcode_GiveTunerDeviceStatus = 0x08, - CEC_Opcode_RecordOn = 0x09, - CEC_Opcode_RecordStatus = 0x0A, - CEC_Opcode_RecordOff = 0x0B, - CEC_Opcode_TextViewOn = 0x0D, - CEC_Opcode_RecordTVScreen = 0x0F, - CEC_Opcode_GiveDeckStatus = 0x1A, - CEC_Opcode_DeckStatus = 0x1B, - CEC_Opcode_SetMenuLanguage = 0x32, - CEC_Opcode_ClearAnalogTimer = 0x33, - CEC_Opcode_SetAnalogTimer = 0x34, - CEC_Opcode_TimerStatus = 0x35, - CEC_Opcode_Standby = 0x36, - CEC_Opcode_Play = 0x41, - CEC_Opcode_DeckControl = 0x42, - CEC_Opcode_TimerClearedStatus = 0x43, - CEC_Opcode_UserControlPressed = 0x44, - CEC_Opcode_UserControlReleased = 0x45, - CEC_Opcode_GiveOSDName = 0x46, - CEC_Opcode_SetOSDName = 0x47, - CEC_Opcode_SetOSDString = 0x64, - CEC_Opcode_SetTimerProgramTitle = 0x67, - CEC_Opcode_SystemAudioModeRequest = 0x70, - CEC_Opcode_GiveAudioStatus = 0x71, - CEC_Opcode_SetSystemAudioMode = 0x72, - CEC_Opcode_ReportAudioStatus = 0x7A, - CEC_Opcode_GiveSystemAudioModeStatus = 0x7D, - CEC_Opcode_SystemAudioModeStatus = 0x7E, - CEC_Opcode_RoutingChange = 0x80, - CEC_Opcode_RoutingInformation = 0x81, - CEC_Opcode_ActiveSource = 0x82, - CEC_Opcode_GivePhysicalAddress = 0x83, - CEC_Opcode_ReportPhysicalAddress = 0x84, - CEC_Opcode_RequestActiveSource = 0x85, - CEC_Opcode_SetStreamPath = 0x86, - CEC_Opcode_DeviceVendorID = 0x87, - CEC_Opcode_VendorCommand = 0x89, - CEC_Opcode_VendorRemoteButtonDown = 0x8A, - CEC_Opcode_VendorRemoteButtonUp = 0x8B, - CEC_Opcode_GiveDeviceVendorID = 0x8C, - CEC_Opcode_MenuRequest = 0x8D, - CEC_Opcode_MenuStatus = 0x8E, - CEC_Opcode_GiveDevicePowerStatus = 0x8F, - CEC_Opcode_ReportPowerStatus = 0x90, - CEC_Opcode_GetMenuLanguage = 0x91, - CEC_Opcode_SelectAnalogService = 0x92, - CEC_Opcode_SelectDigitalService = 0x93, - CEC_Opcode_SetDigitalTimer = 0x97, - CEC_Opcode_ClearDigitalTimer = 0x99, - CEC_Opcode_SetAudioRate = 0x9A, - CEC_Opcode_InactiveSource = 0x9D, - CEC_Opcode_CECVersion = 0x9E, - CEC_Opcode_GetCECVersion = 0x9F, - CEC_Opcode_VendorCommandWithID = 0xA0, - CEC_Opcode_ClearExternalTimer = 0xA1, - CEC_Opcode_SetExternalTimer = 0xA2, - CEC_Opcode_ReportShortAudioDescriptor = 0xA3, - CEC_Opcode_RequestShortAudioDescriptor = 0xA4, - CEC_Opcode_InitARC = 0xC0, - CEC_Opcode_ReportARCInited = 0xC1, - CEC_Opcode_ReportARCTerminated = 0xC2, - CEC_Opcode_RequestARCInit = 0xC3, - CEC_Opcode_RequestARCTermination = 0xC4, - CEC_Opcode_TerminateARC = 0xC5, - CEC_Opcode_CDC = 0xF8, - CEC_Opcode_Abort = 0xFF -} CEC_OPCODE_T; - -/** - * Reason parameter for <Feature Abort> - */ -typedef enum { - CEC_Abort_Reason_Unrecognised_Opcode = 0, - CEC_Abort_Reason_Wrong_Mode = 1, - CEC_Abort_Reason_Cannot_Provide_Source = 2, - CEC_Abort_Reason_Invalid_Operand = 3, - CEC_Abort_Reason_Refused = 4, - CEC_Abort_Reason_Undetermined = 5 -} CEC_ABORT_REASON_T; - -/** - * Display control parameter for <Set OSD string> - */ -typedef enum { - CEC_DISPLAY_CONTROL_DEFAULT_TIME = 0, - CEC_DISPLAY_CONTROL_UNTIL_CLEARED = (1<<6), - CEC_DISPLAY_CONTROL_CLEAR_PREV_MSG = (1<<7) -} CEC_DISPLAY_CONTROL_T; - -/** - * Power status parameter for <Report Power Status> - */ -typedef enum { - CEC_POWER_STATUS_ON = 0, - CEC_POWER_STATUS_STANDBY = 1, - CEC_POWER_STATUS_ON_PENDING = 2, - CEC_POWER_STATUS_STANDBY_PENDING = 3 -} CEC_POWER_STATUS_T; - -/** - * Menu state parameter for <Menu Status> - */ -typedef enum { - CEC_MENU_STATE_ACTIVATED = 0, - CEC_MENU_STATE_DEACTIVATED = 1, - CEC_MENU_STATE_QUERY = 2 -} CEC_MENU_STATE_T; - -/** - * Deck status parameter for <Deck Status> - */ -typedef enum { - CEC_DECK_INFO_PLAY = 0x11, - CEC_DECK_INFO_RECORD = 0x12, - CEC_DECK_INFO_PLAY_REVERSE = 0x13, - CEC_DECK_INFO_STILL = 0x14, - CEC_DECK_INFO_SLOW = 0x15, - CEC_DECK_INFO_SLOW_REVERSE = 0x16, - CEC_DECK_INFO_SEARCH_FORWARD = 0x17, - CEC_DECK_INFO_SEARCH_REVERSE = 0x18, - CEC_DECK_INFO_NO_MEDIA = 0x19, - CEC_DECK_INFO_STOP = 0x1A, - CEC_DECK_INFO_WIND = 0x1B, - CEC_DECK_INFO_REWIND = 0x1C, - CEC_DECK_IDX_SEARCH_FORWARD = 0x1D, - CEC_DECK_IDX_SEARCH_REVERSE = 0x1E, - CEC_DECK_OTHER_STATUS = 0x1F -} CEC_DECK_INFO_T; - -/** - * Deck control mode for <Deck Control> - */ -typedef enum { - CEC_DECK_CTRL_FORWARD = 1, - CEC_DECK_CTRL_BACKWARD = 2, - CEC_DECK_CTRL_STOP = 3, - CEC_DECK_CTRL_EJECT = 4 -} CEC_DECK_CTRL_MODE_T; - -/** - * Play mode for <Play> - */ -typedef enum { - CEC_PLAY_FORWARD = 0x24, - CEC_PLAY_REVERSE = 0x20, - CEC_PLAY_STILL = 0x25, - CEC_PLAY_SCAN_FORWARD_MIN_SPEED = 0x05, - CEC_PLAY_SCAN_FORWARD_MED_SPEED = 0x06, - CEC_PLAY_SCAN_FORWARD_MAX_SPEED = 0x07, - CEC_PLAY_SCAN_REVERSE_MIN_SPEED = 0x09, - CEC_PLAY_SCAN_REVERSE_MED_SPEED = 0x0A, - CEC_PLAY_SCAN_REVERSE_MAX_SPEED = 0x0B, - CEC_PLAY_SLOW_FORWARD_MIN_SPEED = 0x15, - CEC_PLAY_SLOW_FORWARD_MED_SPEED = 0x16, - CEC_PLAY_SLOW_FORWARD_MAX_SPEED = 0x17, - CEC_PLAY_SLOW_REVERSE_MIN_SPEED = 0x19, - CEC_PLAY_SLOW_REVERSE_MED_SPEED = 0x1A, - CEC_PLAY_SLOW_REVERSE_MAX_SPEED = 0x1B -} CEC_PLAY_MODE_T; - -/** - * Status request for <Give Deck Status> - */ -typedef enum { - CEC_DECK_STATUS_ON = 1, - CEC_DECK_STATUS_OFF = 2, - CEC_DECK_STATUS_ONCE = 3 -} CEC_DECK_STATUS_REQUEST_T; - -/** - * Button code for <User Control Pressed> - */ -typedef enum { - CEC_User_Control_Select = 0x00, - CEC_User_Control_Up = 0x01, - CEC_User_Control_Down = 0x02, - CEC_User_Control_Left = 0x03, - CEC_User_Control_Right = 0x04, - CEC_User_Control_RightUp = 0x05, - CEC_User_Control_RightDown = 0x06, - CEC_User_Control_LeftUp = 0x07, - CEC_User_Control_LeftDown = 0x08, - CEC_User_Control_RootMenu = 0x09, - CEC_User_Control_SetupMenu = 0x0A, - CEC_User_Control_ContentsMenu = 0x0B, - CEC_User_Control_FavoriteMenu = 0x0C, - CEC_User_Control_Exit = 0x0D, - CEC_User_Control_Number0 = 0x20, - CEC_User_Control_Number1 = 0x21, - CEC_User_Control_Number2 = 0x22, - CEC_User_Control_Number3 = 0x23, - CEC_User_Control_Number4 = 0x24, - CEC_User_Control_Number5 = 0x25, - CEC_User_Control_Number6 = 0x26, - CEC_User_Control_Number7 = 0x27, - CEC_User_Control_Number8 = 0x28, - CEC_User_Control_Number9 = 0x29, - CEC_User_Control_Dot = 0x2A, - CEC_User_Control_Enter = 0x2B, - CEC_User_Control_Clear = 0x2C, - CEC_User_Control_ChannelUp = 0x30, - CEC_User_Control_ChannelDown = 0x31, - CEC_User_Control_PreviousChannel = 0x32, - CEC_User_Control_SoundSelect = 0x33, - CEC_User_Control_InputSelect = 0x34, - CEC_User_Control_DisplayInformation = 0x35, - CEC_User_Control_Help = 0x36, - CEC_User_Control_PageUp = 0x37, - CEC_User_Control_PageDown = 0x38, - CEC_User_Control_Power = 0x40, - CEC_User_Control_VolumeUp = 0x41, - CEC_User_Control_VolumeDown = 0x42, - CEC_User_Control_Mute = 0x43, - CEC_User_Control_Play = 0x44, - CEC_User_Control_Stop = 0x45, - CEC_User_Control_Pause = 0x46, - CEC_User_Control_Record = 0x47, - CEC_User_Control_Rewind = 0x48, - CEC_User_Control_FastForward = 0x49, - CEC_User_Control_Eject = 0x4A, - CEC_User_Control_Forward = 0x4B, - CEC_User_Control_Backward = 0x4C, - CEC_User_Control_Angle = 0x50, - CEC_User_Control_Subpicture = 0x51, - CEC_User_Control_VideoOnDemand = 0x52, - CEC_User_Control_EPG = 0x53, - CEC_User_Control_TimerProgramming = 0x54, - CEC_User_Control_InitialConfig = 0x55, - CEC_User_Control_PlayFunction = 0x60, - CEC_User_Control_PausePlayFunction = 0x61, - CEC_User_Control_RecordFunction = 0x62, - CEC_User_Control_PauseRecordFunction = 0x63, - CEC_User_Control_StopFunction = 0x64, - CEC_User_Control_MuteFunction = 0x65, - CEC_User_Control_RestoreVolumeFunction = 0x66, - CEC_User_Control_TuneFunction = 0x67, - CEC_User_Control_SelectDiskFunction = 0x68, - CEC_User_Control_SelectAVInputFunction = 0x69, - CEC_User_Control_SelectAudioInputFunction = 0x6A, - CEC_User_Control_F1Blue = 0x71, - CEC_User_Control_F2Red = 0x72, - CEC_User_Control_F3Green = 0x73, - CEC_User_Control_F4Yellow = 0x74, - CEC_User_Control_F5 = 0x75 -} CEC_USER_CONTROL_T; - -/** - *CEC topology struct - * - * Meaning of device_attr is as follows (one per active logical device) - * bit 3-0 logical address (see CEC_AllDevices_T above) - * bit 7-4 device type (see CEC_DEVICE_TYPE_T above) - * bit 11-8 index to upstream device - * bit 15-12 number of downstream device - * bit 31-16 index of first 4 downstream devices - * - * To keep life simple we only show the first 4 connected downstream devices - * - */ -typedef struct { - uint16_t active_mask; /**<bit n is set if logical device n is active */ - uint16_t num_devices; /**<no. of bits set above, save us from counting */ - uint32_t device_attr[16]; /**<Device attribute, see above for explanation */ -} VC_CEC_TOPOLOGY_T; - -/** - * CEC message format (provided for host application's convenience - * for encapsulating a CEC message - */ -typedef struct { - uint32_t length; //Length of CEC message without the header, so zero indicates a poll message - CEC_AllDevices_T initiator; - CEC_AllDevices_T follower; - uint8_t payload[CEC_MAX_XMIT_LENGTH+1]; //We actually only need 15 bytes, this payload does not include header -} VC_CEC_MESSAGE_T; - -/** - * CEC related notification - */ -typedef enum { - VC_CEC_NOTIFY_NONE = 0, //Reserved - NOT TO BE USED - VC_CEC_TX = (1 << 0), /**<A message has been transmitted */ - VC_CEC_RX = (1 << 1), /**<A message has arrived (only for registered commands) */ - VC_CEC_BUTTON_PRESSED = (1 << 2), /**<<User Control Pressed> */ - VC_CEC_BUTTON_RELEASE = (1 << 3), /**<<User Control Release> */ - VC_CEC_REMOTE_PRESSED = (1 << 4), /**<<Vendor Remote Button Down> */ - VC_CEC_REMOTE_RELEASE = (1 << 5), /**<<Vendor Remote Button Up> */ - VC_CEC_LOGICAL_ADDR = (1 << 6), /**<New logical address allocated or released */ - VC_CEC_TOPOLOGY = (1 << 7), /**<Topology is available */ - VC_CEC_LOGICAL_ADDR_LOST = (1 << 15) /**<Only for passive mode, if the logical address is lost for whatever reason, this will be triggered */ -} VC_CEC_NOTIFY_T; - - -/** - * Callback reason and arguments (for sending back to host) All parameters are uint32_t - * For the reason parameter - * Bit 15-0 of reason is the reason code, - * Bit 23-16 is length of valid bytes which follows in the 4 32-bit parameters (0 < length <= 16) - * Bit 31-24 is any return code (if required for this callback) - * - * Length of valid bytes for TX/RX/button press/release callbacks will be the length - * of the actual CEC message - * - * Length of valid bytes for logical address will always be 6 (first parameter + 16-bit physical address) - * - * Length of valid bytes for topology callback will always be 2 (16-bit mask) - * - * Many CEC callback messages are of variable length so not all bytes 0-15 are available - * - * Reason param1 param2 param3 param4 remark - * VC_CEC_TX bytes 0-3 bytes 4-7 bytes 8-11 bytes 12-15 A message has been transmitted - * Only a message sent from the host will - generate this callback - (non-zero return code means failure) - - * VC_CEC_RX bytes 0-3 bytes 4-7 bytes 8-11 bytes 12-15 By definition only successful message will be forwarded - * - * VC_CEC_BUTTON_PRESSED bytes 0-3 bytes 4-7 - - User Control pressed (byte 2 will be actual user control code) - * VC_CEC_BUTTON_RELEASE bytes 0-3 - - - User Control release (byte 2 will be actual user control code) - - * VC_CEC_REMOTE_PRESSED bytes 0-3 bytes 4-7 bytes 8-11 bytes 12-15 Vendor remote button down - * VC_CEC_REMOTE_RELEASE bytes 0-3 bytes 4-7 bytes 8-11 bytes 12-15 Vendor remote button up - - * VC_CEC_LOGICAL_ADDR Log addr Phy addr - - Logical address allocated or failure - * VC_CEC_TOPOLOGY topology bit - * mask New topology is avaiable - * - *VC_CEC_LOGICAL_ADDR_LOST Last log addr Phy addr "Last log addr" is no longer available - * - * Notes: - * VC_CEC_BUTTON_RELEASE and VC_CEC_REMOTE_RELEASE (<User Control Release> and <Vendor Remote Button Up> messages respectively) - * returns the code from the most recent <User Control pressed> <Vendor Remote button up> respectively. - * The host application will need to find out the vendor ID of the initiator - * separately in the case if <Vendor Remote Button Up>/<Vendor Remote Button Down> commands were received. - * <User Control Pressed> will not be longer than 6 bytes (including header) - * - * VC_CEC_LOGICAL_ADDR returns 0xF in param1 whenever no logical address is in used. If physical address is 0xFFFF, - * this means CEC is being disabled. Otherwise physical address is the one read from EDID (and no suitable logical address - * is avaiable to be allocated). Host application should only attempt to send message if both param1 is not 0xF AND param2 - * is not 0xFFFF. - * - * VC_CEC_TOPOLOGY returns a 16-bit mask in param1 where bit n is set if logical address n is present. Host application - * must explicitly retrieve the entire topology if it wants to know how devices are connected. The bit mask includes our - * own logical address. - * - * If CEC is running in passive mode, the host will get a VC_CEC_LOGICAL_ADDR_LOST callback if the logical address is - * lost (e.g. HDMI mode change). In this case the host should try a new logical address. The physical address returned may - * also change, so the host should check this. - */ - -/** - * General callback function for notifications from CEC middleware (and CEC service) - * - * @param client_p is the callback context passed in by user - * - * @param reason is the notification nature (plus message lengths, return code, etc.) - * - * @param param1 is the first parameter of notification (see above) - * - * @param param2 is the second parameter of notification (see above) - * - * @param param3 is the third parameter of notification (see above) - * - * @param param4 is the fourth parameter of notification (see above) - * - * @return void - */ -typedef void (*CEC_CALLBACK_T)(void *client_p, uint32_t reason, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4); - -/** - * Some macros to get some fields from the callback parameters in CEC callback - */ -//Marcos operating on reason -#define CEC_CB_REASON(x) ((x) & 0xFFFF) /** Get callback reason */ -#define CEC_CB_MSG_LENGTH(x) (((x) >> 16) & 0xFF) /** Get callback parameter length (this includes the header byte) */ -#define CEC_CB_RC(x) (((x) >> 24) & 0xFF) /** Get return value (only for TX callbacks for the moment) */ - -//Macros operating on param1 -#define CEC_CB_INITIATOR(x) (((x) >> 4) & 0xF) /** Get the initiator from first parameter */ -#define CEC_CB_FOLLOWER(x) ((x) & 0xF) /** Get the follower from first parameter */ -#define CEC_CB_OPCODE(x) (((x) >> 8) & 0xFF) /** Get the opcode from first parameter */ -#define CEC_CB_OPERAND1(x) (((x) >> 16) & 0xFF) /** Get the button code from <User Control Pressed> or the first operand of the opcode */ -#define CEC_CB_OPERAND2(x) (((x) >> 24) & 0xFF) /** Get the second operand of opcode */ - -//CEC service return code -typedef enum { - VC_CEC_SUCCESS = 0, /** OK */ - VC_CEC_ERROR_NO_ACK = 1, /** No acknowledgement */ - VC_CEC_ERROR_SHUTDOWN = 2, /** In the process of shutting down */ - VC_CEC_ERROR_BUSY = 3, /** block is busy */ - VC_CEC_ERROR_NO_LA = 4, /** No logical address */ - VC_CEC_ERROR_NO_PA = 5, /** No physical address */ - VC_CEC_ERROR_NO_TOPO = 6, /** No topology */ - VC_CEC_ERROR_INVALID_FOLLOWER = 7, /** Invalid follower */ - VC_CEC_ERROR_INVALID_ARGUMENT = 8 /** Invalid arguments */ -} VC_CEC_ERROR_T; - -#endif diff --git a/vc/include/interface/vmcs_host/vc_cecservice.h b/vc/include/interface/vmcs_host/vc_cecservice.h @@ -1,515 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * CEC service host API, - * See vc_cec.h and vc_cecservice_defs.h for related constants - */ - -#ifndef _VC_CECSERVICE_H_ -#define _VC_CECSERVICE_H_ - -#include "vcinclude/common.h" -#include "interface/vcos/vcos.h" -#include "interface/vchi/vchi.h" -#include "interface/vmcs_host/vc_cecservice_defs.h" -#include "interface/vmcs_host/vc_cec.h" - -/** - * \file - * This API defines the controls for CEC. HDMI must be powered on before - * CEC is available (subject to CEC support in TV). - * - * In general, a zero return value indicates success; a negative return - * value indicates error in VCHI layer; a positive return value indicates - * alternative return value from the server - */ - -/** - * Callback function for host side notification - * This is the SAME as the callback function type defined in vc_cec.h - * Host applications register a single callback for all CEC related notifications. - * See vc_cec.h for meanings of all parameters - * - * @param callback_data is the context passed in by user in <DFN>vc_cec_register_callback</DFN> - * - * @param reason bits 15-0 is VC_CEC_NOTIFY_T in vc_cec.h; - * bits 23-16 is the valid length of message in param1 to param4 (LSB of param1 is the byte0, MSB of param4 is byte15), little endian - * bits 31-24 is the return code (if any) - * - * @param param1 is the first parameter - * - * @param param2 is the second parameter - * - * @param param3 is the third parameter - * - * @param param4 is the fourth parameter - * - * @return void - */ -typedef void (*CECSERVICE_CALLBACK_T)(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2, uint32_t param3, uint32_t param4); - -//API at application start time -/** - * Call <DFN>vc_vchi_cec_init</DFN> to initialise the CEC service for use. - * - * @param initialise_instance is the VCHI instance - * @param connections are array of pointers to VCHI connections - * @param num_connections is the number of connections in array - * @return void - **********************************************************/ -VCHPRE_ void vc_vchi_cec_init(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections ); - -/** - * Call <DFN>vc_vchi_cec_stop</DFN> to stop host side CEC service. - * - * @param none - * @return void - **********************************************************/ -VCHPRE_ void vc_vchi_cec_stop( void ); - -/** - * Host applications use <DFN>vc_cec_register_callaback</DFN> to register - * callback to handle all CEC notifications. If more than one applications - * need to use CEC, there should be ONE central application which acts on - * behalf of all clients and handles all communications with CEC services. - * - * @param callback function - * @param context to be passed when function is called - * @return void - ***********************************************************/ -VCHPRE_ void vc_cec_register_callback(CECSERVICE_CALLBACK_T callback, void *callback_data); - -//Service API -/** - * Use <DFN>vc_cec_register_command</DFN> to register an opcode to - * to forwarded to the host application. By default <Feature Abort> - * is always forwarded. Once an opcode is registered, it is left to - * the host application to reply to a CEC message (where appropriate). - * It is recommended NOT to register the following commands as they - * are replied to automatically by CEC middleware: - * <Give Physical Address>, <Give Device Vendor ID>, <Give OSD Name>, - * <Get CEC Version>, <Give Device Power Status>, <Menu Request>, - * and <Get Menu Language> - * In addition, the following opcodes cannot be registered: - * <User Control Pressed>, <User Control Released>, - * <Vendor Remote Button Down>, <Vendor Remote Button Up>, - * and <Abort>. - * <Feature Abort> is always forwarded if it is the reply - * of a command the host sent. - * - * @param opcode to be registered. - * - * @return zero if the command is successful, non-zero otherwise - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_register_command(CEC_OPCODE_T opcode); - -/** - * <DFN>vc_cec_register_all</DFN> registers all opcodes except <Abort> - * to be forwarded as CEC_RX notification. - * Button presses <User Control Pressed>, etc. will still be forwarded - * separately as VC_CEC_BUTTON_PRESSED etc. notification. - * - * @param None - * - * @return zero if the command is successful, non-zero otherwise - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_register_all( void ); - -/** - * Use <DFN>vc_cec_deregister_command</DFN> to remove an opcode from - * the filter for forwarding. By default <Feature Abort> is always forwarded. - * The following opcode cannot be deregistered: - * <User Control Pressed>, <User Control Released>, - * <Vendor Remote Button Down>, <Vendor Remote Button Up>, - * and <Abort>. - * - * @param opcode to be deregistered - * - * @return zero if the command is successful, non-zero otherwise - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_deregister_command(CEC_OPCODE_T opcode); - -/** - * <DFN>vc_cec_deregister_all</DFN> removes all registered opcodes, - * except the ones (e.g. button presses) which are always forwarded. - * - * @param None - * - * @return zero if the command is successful, non-zero otherwise - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_deregister_all( void ); - -/** - * <DFN>vc_cec_send_message</DFN> allows a host application to - * send a CEC message to another device. There are several - * built-in functions for sending command messages. The host - * application MUST have a valid logical address (between 1 and - * 14 inclusive) before it can send a message. - * (For poll message set payload to NULL and length to zero). - * - * @param Follower's logical address - * - * @param Message payload WITHOUT the header byte (can be NULL) - * - * @param Payload length WITHOUT the header byte (can be zero) - * - * @param VC_TRUE if the message is a reply to an incoming message - * - * @return zero if the command is successful, non-zero otherwise - * If the command is successful, there will be a Tx callback - * in due course to indicate whether the message has been - * acknowledged by the recipient or not - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_message(const uint32_t follower, - const uint8_t *payload, - uint32_t length, - vcos_bool_t is_reply); -/** - * <DFN>vc_cec_get_logical_address</DFN> gets the logical address, - * If one is being allocated 0xF (unregistered) will be set. - * A address value of 0xF also means CEC system is not yet ready - * to send or receive any messages. - * - * @param pointer to logical address (set to allocated address) - * - * @return zero if the command is successful, non-zero otherwise - * logical_address is not modified if command failed - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_get_logical_address(CEC_AllDevices_T *logical_address); - -/** - * <DFN>vc_cec_alloc_logical_address</DFN> starts the allocation - * of a logical address. Logical address is automatically allocated - * after HDMI power on is complete and AV mute is deassert. - * The host only needs to call this if the - * initial allocation failed (logical address being 0xF and - * physical address is NOT 0xFFFF from <DFN>VC_CEC_LOGICAL_ADDR</DFN> - * notification), or if the host explicitly released its logical - * address. - * - * @param none - * - * @return zero if the command is successful, non-zero otherwise - * If successful, there will be a callback notification - * <DFN>VC_CEC_LOGICAL_ADDR</DFN>. - * The host should wait for this before calling this - * function again. - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_alloc_logical_address( void ); - -/** - * Normally <DFN>vc_cec_release_logical_address</DFN> will not - * be called by the host application. It is used to release - * our logical address. This effectively disables CEC. - * The host will need to allocate a new logical address before - * doing any CEC calls (send/receive message, get topology, etc.). - * - * @param none - * - * @return zero if the command is successful, non-zero otherwise - * The host should get a callback <DFN>VC_CEC_LOGICAL_ADDR</DFN> - * with 0xF being the logical address and 0xFFFF - * being the physical address. - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_release_logical_address( void ); - -/** - * Use <DFN>vc_cec_get_topology</DFN> to get the topology. - * - * @param pointer to <DFN>VC_CEC_TOPOLOGY_T</DFN> - * - * @return zero if the command is successful, non-zero otherwise - * If successful, the topology will be set, otherwise it is unchanged - * A topology with only 1 device (us) means CEC is not supported. - * If there is no topology available, this also returns a failure. - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_get_topology( VC_CEC_TOPOLOGY_T* topology); - -/** - * Use <DFN>vc_cec_set_vendor_id</DFN> to - * set the response to <Give Device Vendor ID> - * - * @param 24-bit IEEE vendor id - * - * @return zero if the command is successful, non-zero otherwise - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_set_vendor_id( const uint32_t id ); - -/** - * Use <DFN>vc_cec_set_osd_name</DFN> to - * set the response to <Give OSD Name> - * - * @param OSD name (14 byte char array) - * - * @return zero if the command is successful, non-zero otherwise - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_set_osd_name( const char* name ); - -/** - * <DFN>vc_cec_get_physical_address</DFN> gets our physical address - * - * @param pointer to physical address (returned as 16-bit packed value) - * - * @return zero if the command is successful, non-zero otherwise - * If failed, physical address argument will not be changed - * A physical address of 0xFFFF means CEC is not supported - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_get_physical_address(uint16_t *physical_address); - -/** - * <DFN>vc_cec_get_vendor_id(</DFN> gets the vendor id of a particular logical address - * - * @param logical_address is the logical address of the device [in] - * - * @param vendorid is the pointer to vendor ID (24-bit IEEE OUI value) [out] - * - * @return zero if the command is successful, non-zero otherwise - * If failed, vendor id argument will not be changed - * A vendor ID of 0xFFFFFF means the device does not exist - * A vendor ID of 0x0 means vendor ID is not known and - * the application can send <Give Device Vendor ID> to that device - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_get_vendor_id(const CEC_AllDevices_T logical_address, uint32_t *vendor_id); - -/** - * <DFN>vc_cec_device_type(</DFN> returns the default device type of a particular - * logical address, which can be used as the argument to vc_cec_send_ReportPhysicalAddress. - * - * @param logical address - * - * @return the default device type, if there is any error, the return device - * type will be CEC_DeviceType_Invalid - * - ************************************************************/ -VCHPRE_ CEC_DEVICE_TYPE_T VCHPOST_ vc_cec_device_type(const CEC_AllDevices_T logical_address); - -/** - * These couple of functions are provided for host application's convenience: - * If the xmit message is encapsulate in a VC_CEC_MESSAGE_T - * then it can be sent as a normal message (not as a reply) - * and the initiator field is ignored with vc_cec_send_message2 - * and return zero for success - * - * Applications can call vc_cec_param2message to turn the callback parameters - * into a VC_CEC_MESSAGE_T (not for LOGICAL_ADDR and TOPOLOGY callbacks). - * It also returns zero for success. - */ -VCHPRE_ int VCHPOST_ vc_cec_send_message2(const VC_CEC_MESSAGE_T *message); - -VCHPRE_ int VCHPOST_ vc_cec_param2message( const uint32_t reason, const uint32_t param1, - const uint32_t param2, const uint32_t param3, - const uint32_t param4, VC_CEC_MESSAGE_T *message); - -//Extra API if CEC is running in passive mode -//If CEC is not in passive mode the following 3 functions always -//return failure -/** - * <DFN> vc_cec_poll_address </DFN> sets and polls a particular address to find out - * its availability in the CEC network. Only available when CEC is running in passive - * mode. The host can only call this function during logical address allocation stage. - * - * @param logical address to try - * - * @return 0 if poll is successful (address is occupied) - * >0 if poll is unsuccessful (Error code is in VC_CEC_ERROR_T in vc_cec.h) - * <0 VCHI errors - */ -VCHPRE_ int VCHPOST_ vc_cec_poll_address(const CEC_AllDevices_T logical_address); - -/** - * <DFN> vc_cec_set_logical_address </DFN> sets the logical address, device type - * and vendor ID to be in use. Only available when CEC is running in passive - * mode. It is the responsibility of the host to make sure the logical address - * is actually free to be used. Physical address will be what is read from EDID. - * - * @param logical address - * - * @param device type - * - * @param vendor ID - * - * @return 0 if successful, non-zero otherwise - */ -VCHPRE_ int VCHPOST_ vc_cec_set_logical_address(const CEC_AllDevices_T logical_address, - const CEC_DEVICE_TYPE_T device_type, - const uint32_t vendor_id); - -/** - * <DFN> vc_cec_add_device </DFN> adds a new device to topology. - * Only available when CEC is running in passive mode. Device will be - * automatically removed from topology if a failed xmit is detected. - * If last_device is true, it will trigger a topology computation - * (and may trigger a topology callback). - * - * @param logical address - * - * @param physical address - * - * @param device type - * - * @param true if this is the last device, false otherwise - * - * @return 0 if successful, non-zero otherwise - */ -VCHPRE_ int VCHPOST_ vc_cec_add_device(const CEC_AllDevices_T logical_address, - const uint16_t physical_address, - const CEC_DEVICE_TYPE_T device_type, - vcos_bool_t last_device); - -/** - * <DFN> vc_cec_set_passive </DFN> enables and disables passive mode. - * Call this function first (with VC_TRUE as the argument) to enable - * passive mode before calling any of the above passive API functions - * - * @param TRUE to enable passive mode, FALSE to disable - * - * @return 0 if successful, non-zero otherwise - */ -VCHPRE_ int VCHPOST_ vc_cec_set_passive(vcos_bool_t enabled); - - -//API for some common CEC messages -/** - * Functions beginning with vc_cec_send_xxx make it easier for the - * host application to send CEC message xxx to other devices - */ -/** - * <DFN>vc_cec_send_FeatureAbort</DFN> sends <Feature Abort> - * for a received command. - * - * @param follower (cannot be 0xF) - * - * @param rejected opcode - * - * @param reject reason <DFN>CEC_ABORT_REASON_T</DFN> - * - * @return zero if the command is successful, non-zero otherwise - * Tx callback if successful - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_FeatureAbort(uint32_t follower, - CEC_OPCODE_T opcode, - CEC_ABORT_REASON_T reason); - -/** - * <DFN>vc_cec_send_ActiveSource</DFN> broadcasts - * <Active Source> to all devices - * - * @param physical address (16-bit packed) - * - * @param reply or not (normally not) - * - * @return zero if the command is successful, non-zero otherwise - * Tx callback if successful - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_ActiveSource(uint16_t physical_address, vcos_bool_t is_reply); - -/** - * <DFN>vc_cec_send_ImageViewOn</DFN> sends <Image View On> - * - * @param follower - * - * @param reply or not (normally not) - * - * @return zero if the command is successful, non-zero otherwise - * Tx callback if successful - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_ImageViewOn(uint32_t follower, vcos_bool_t is_reply); - -/** - * <DFN>vc_cec_send_SetOSDString</DFN> sends <Set OSD String> - * - * @param follower - * - * @param string (char[13]) - * - * @param display control <DFN>CEC_DISPLAY_CONTROL_T</DFN> - * - * @param reply or not (normally not) - * - * @return zero if the command is successful, non-zero otherwise - * Tx callback if successful - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_SetOSDString(uint32_t follower, - CEC_DISPLAY_CONTROL_T disp_ctrl, - const char* string, - vcos_bool_t is_reply); - -/** - * <DFN>vc_cec_send_Standby</DFN> sends <Standby>. - * This will put any/all devices to standby if they support - * this CEC message. - * - * @param follower (can be 0xF) - * - * @param reply or not (normally not) - * - * @return zero if the command is successful, non-zero otherwise - * Tx callback if successful - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_Standby(uint32_t follower, vcos_bool_t is_reply); - -/** - * <DFN>vc_cec_send_MenuStatus</DFN> sends <Menu Status> - * (response to <Menu Request>) - * - * @param follower - * - * @param menu state <DFN>CEC_MENU_STATE_T</DFN> but NOT CEC_MENU_STATE_QUERY - * - * @param reply or not (should always be yes) - * - * @return zero if the command is successful, non-zero otherwise - * Tx callback if successful - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_MenuStatus(uint32_t follower, - CEC_MENU_STATE_T menu_state, - vcos_bool_t is_reply); - -/** - * <DFN>vc_cec_send_ReportPhysicalAddress</DFN> broadcasts - * <Report Physical Address> to all devices. Note although - * the passed in device type can be override the default one - * associated the allocated logical address, it is not - * recommended to do so. One can use <DFN>vc_cec_device_type</DFN> - * to get the default device type associated with the logical - * address returned via VC_CEC_LOGICAL_ADDR callback. - * - * @param physical address (16-bit packed) - * - * @param device type to be broadcasted - * - * @param reply or not (normally not) - * - * @return zero if the command is successful, non-zero otherwise - * Tx callback if successful - ***********************************************************/ -VCHPRE_ int VCHPOST_ vc_cec_send_ReportPhysicalAddress(uint16_t physical_address, - CEC_DEVICE_TYPE_T device_type, - vcos_bool_t is_reply); - -#endif //_VC_CECSERVICE_H_ diff --git a/vc/include/interface/vmcs_host/vc_cecservice_defs.h b/vc/include/interface/vmcs_host/vc_cecservice_defs.h @@ -1,182 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * CEC service command enumeration and parameter types. - */ - -/** - * \file - * This file contains definition shared by host side and - * Videocore side CEC service: - * - * In general, a zero return value indicates success of the function - * A non-zero value indicates VCHI error - * A positive value indicates alternative return value (for some functions). - * - */ - - -#ifndef _VC_CECSERVICE_DEFS_H_ -#define _VC_CECSERVICE_DEFS_H_ -#include "vcinclude/common.h" -#include "interface/vcos/vcos.h" -#include "interface/vcos/vcos_logging.h" -#include "interface/vchi/message_drivers/message.h" - -//CEC VCOS logging stuff -#define CECHOST_LOG_CATEGORY (&cechost_log_category) -#define vc_cec_log_trace(...) _VCOS_LOG_X(CECHOST_LOG_CATEGORY, VCOS_LOG_TRACE, __VA_ARGS__) -#define vc_cec_log_warn(...) _VCOS_LOG_X(CECHOST_LOG_CATEGORY, VCOS_LOG_WARN, __VA_ARGS__) -#define vc_cec_log_error(...) _VCOS_LOG_X(CECHOST_LOG_CATEGORY, VCOS_LOG_ERROR, __VA_ARGS__) -#define vc_cec_log_info(...) _VCOS_LOG_X(CECHOST_LOG_CATEGORY, VCOS_LOG_INFO, __VA_ARGS__) -extern VCOS_LOG_CAT_T cechost_log_category; //The actual object lives in CEC host side service code - -#define VC_CECSERVICE_VER 1 -#define CECSERVICE_MSGFIFO_SIZE 1024 -#define CECSERVICE_CLIENT_NAME MAKE_FOURCC("CECS") -#define CECSERVICE_NOTIFY_NAME MAKE_FOURCC("CECN") - -//CEC service commands -typedef enum { - VC_CEC_REGISTER_CMD = 0, - VC_CEC_REGISTER_ALL, - VC_CEC_DEREGISTER_CMD, - VC_CEC_DEREGISTER_ALL, - VC_CEC_SEND_MSG, - VC_CEC_GET_LOGICAL_ADDR, - VC_CEC_ALLOC_LOGICAL_ADDR, - VC_CEC_RELEASE_LOGICAL_ADDR, - VC_CEC_GET_TOPOLOGY, - VC_CEC_SET_VENDOR_ID, - VC_CEC_SET_OSD_NAME, - VC_CEC_GET_PHYSICAL_ADDR, - VC_CEC_GET_VENDOR_ID, - - //The following 3 commands are used when CEC middleware is - //running in passive mode (i.e. it does not allocate - //logical address automatically) - VC_CEC_POLL_ADDR, - VC_CEC_SET_LOGICAL_ADDR, - VC_CEC_ADD_DEVICE, - VC_CEC_SET_PASSIVE, - //Add more commands here - VC_CEC_END_OF_LIST -} VC_CEC_CMD_CODE_T; - -//See vc_cec.h for details -//REGISTER_CMD -//Parameters: opcode to register (CEC_OPCODE_T sent as uint32) -//Reply: none - -//REGISTER_ALL -//Parameters: none -//Reply: none - -//DEREGISTER_CMD -//Parameters: opcode to deregister (CEC_OPCODE_T sent as uint32) -//Reply: none - -//DEREGISTER_ALL -//Parameters: none -//Reply: none - -//SEND_MSG -//Parameters: destination, length, 16 bytes buffer (message can only be at most 15 bytes however) -//Reply: none (callback) -typedef struct { - uint32_t follower; - uint32_t length; - uint8_t payload[16]; //max. 15 bytes padded to 16 - uint32_t is_reply; //non-zero if this is a reply, zero otherwise -} CEC_SEND_MSG_PARAM_T; - -//GET_LOGICAL_ADDR -//Parameters: none -//Reply: logical address (uint8 returned as uint32) - -//ALLOC_LOGICAL_ADDR -//Parameters: none -//Reply: none (callback) - -//GET_TOPOLOGY -//Parameters: none -//Reply: topology (see VC_TOPOLOGY_T) - -//SET_VENDOR_ID -//Parameters: vendor id (uint32) -//Reply: none - -//Set OSD name -//Parameters: 14 byte char -//Reply: none -#define OSD_NAME_LENGTH 14 - -//GET_PHYSICAL_ADDR -//Parameter: none -//Reply: packed physical address returned as uint16 - -//GET_VENDOR_ID -//Parameter: logical address (CEC_AllDevices_T sent as uint32_t) -//Reply: (uint32_t vendor id) - -//POLL_LOGICAL_ADDR (only for passive mode) -//Used by host to test a logical address to see if it is available for use -//Only available if CEC is compiled in passive mode and while the host -//is testing the availability of a logical address -//Parameter: logical address -//Reply: - -//SET_LOGICAL_ADDR [(only for passive mode) This will be changed when we support multiple logical addresses] -//Set the logical address used -//Only available if CEC is compiled in passive mode -//Parameter: logical address, device type, vendor ID -//Reply: (int32_t - zero means success, non-zero otherwise) -//This function will result in a VC_CEC_LOGICAL_ADDR callback -typedef struct { - uint32_t logical_address; - uint32_t device_type; - uint32_t vendor_id; -} CEC_SET_LOGICAL_ADDR_PARAM_T; - -//ADD_DEVICE (only for passive mode) -//Only available if CEC is compiled in passive mode -//Parameter: logical address, physical address, device type, last device? -//Reply: (int32_t - zero means success, non-zero otherwise) -typedef struct { - uint32_t logical_address; /**<logical address */ - uint32_t physical_address; /**<16-bit packed physical address in big endian */ - uint32_t device_type; /**<CEC_DEVICE_TYPE_T */ - uint32_t last_device; /**<True (non-zero) or false (zero) */ -} CEC_ADD_DEVICE_PARAM_T; - -//SET PASSIVE (only for passive mode) -//Enable/disable passive mode -//Parameter: non-zero to enable passive mode, zero to disable -//Reply: (int32_t - zero means success, non-zero otherwise, non zero will be VCHI errors) - -#endif //#ifndef _VC_CECSERVICE_DEFS_H_ diff --git a/vc/include/interface/vmcs_host/vc_cma.h b/vc/include/interface/vmcs_host/vc_cma.h @@ -1,70 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef _VC_CMA_H_ -#define _VC_CMA_H_ - -#include "interface/vcos/vcos.h" -#include "interface/vchiq_arm/vchiq.h" - -#ifdef __linux__ - -#include <linux/ioctl.h> - -#define VC_CMA_IOC_MAGIC 0xc5 - -#define VC_CMA_IOC_RESERVE _IO(VC_CMA_IOC_MAGIC, 0) - -#endif - -#define VC_CMA_FOURCC VCHIQ_MAKE_FOURCC('C','M','A',' ') -#define VC_CMA_VERSION 2 - -#define VC_CMA_CHUNK_ORDER 6 /* 256K */ -#define VC_CMA_CHUNK_SIZE (4096 << VC_CMA_CHUNK_ORDER) -#define VC_CMA_MAX_PARAMS_PER_MSG ((VCHIQ_MAX_MSG_SIZE - sizeof(unsigned short)) / sizeof(unsigned short)) - -enum -{ - VC_CMA_MSG_QUIT, - VC_CMA_MSG_OPEN, - VC_CMA_MSG_TICK, - VC_CMA_MSG_ALLOC, /* chunk count */ - VC_CMA_MSG_FREE, /* chunk, chunk, ... */ - VC_CMA_MSG_ALLOCATED, /* chunk, chunk, ... */ - VC_CMA_MSG_REQUEST_ALLOC, /* chunk count */ - VC_CMA_MSG_REQUEST_FREE, /* chunk count */ - VC_CMA_MSG_RESERVE, /* bytes lo, bytes hi */ - VC_CMA_MSG_MAX -}; - -typedef struct vc_cma_msg_struct -{ - unsigned short type; - unsigned short params[VC_CMA_MAX_PARAMS_PER_MSG]; -} VC_CMA_MSG_T; - -#endif diff --git a/vc/include/interface/vmcs_host/vc_dispmanx.h b/vc/include/interface/vmcs_host/vc_dispmanx.h @@ -1,142 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Display manager service API - -#ifndef _VC_DISPMANX_H_ -#define _VC_DISPMANX_H_ - -#include "interface/vcos/vcos.h" -#include "interface/vctypes/vc_image_types.h" -#include "vc_dispservice_x_defs.h" -#include "interface/vmcs_host/vc_dispmanx_types.h" -#include "interface/vchi/vchi.h" - -#ifdef __cplusplus -extern "C" { -#endif -// Same function as above, to aid migration of code. -VCHPRE_ int VCHPOST_ vc_dispman_init( void ); -// Stop the service from being used -VCHPRE_ void VCHPOST_ vc_dispmanx_stop( void ); -// Set the entries in the rect structure -VCHPRE_ int VCHPOST_ vc_dispmanx_rect_set( VC_RECT_T *rect, uint32_t x_offset, uint32_t y_offset, uint32_t width, uint32_t height ); -// Resources -// Create a new resource -VCHPRE_ DISPMANX_RESOURCE_HANDLE_T VCHPOST_ vc_dispmanx_resource_create( VC_IMAGE_TYPE_T type, uint32_t width, uint32_t height, uint32_t *native_image_handle ); -// Write the bitmap data to VideoCore memory -VCHPRE_ int VCHPOST_ vc_dispmanx_resource_write_data( DISPMANX_RESOURCE_HANDLE_T res, VC_IMAGE_TYPE_T src_type, int src_pitch, void * src_address, const VC_RECT_T * rect ); -VCHPRE_ int VCHPOST_ vc_dispmanx_resource_write_data_handle( DISPMANX_RESOURCE_HANDLE_T res, VC_IMAGE_TYPE_T src_type, int src_pitch, VCHI_MEM_HANDLE_T handle, uint32_t offset, const VC_RECT_T * rect ); -VCHPRE_ int VCHPOST_ vc_dispmanx_resource_read_data( - DISPMANX_RESOURCE_HANDLE_T handle, - const VC_RECT_T* p_rect, - void * dst_address, - uint32_t dst_pitch ); -// Delete a resource -VCHPRE_ int VCHPOST_ vc_dispmanx_resource_delete( DISPMANX_RESOURCE_HANDLE_T res ); - -// Displays -// Opens a display on the given device -VCHPRE_ DISPMANX_DISPLAY_HANDLE_T VCHPOST_ vc_dispmanx_display_open( uint32_t device ); -// Opens a display on the given device in the request mode -VCHPRE_ DISPMANX_DISPLAY_HANDLE_T VCHPOST_ vc_dispmanx_display_open_mode( uint32_t device, uint32_t mode ); -// Open an offscreen display -VCHPRE_ DISPMANX_DISPLAY_HANDLE_T VCHPOST_ vc_dispmanx_display_open_offscreen( DISPMANX_RESOURCE_HANDLE_T dest, DISPMANX_TRANSFORM_T orientation ); -// Change the mode of a display -VCHPRE_ int VCHPOST_ vc_dispmanx_display_reconfigure( DISPMANX_DISPLAY_HANDLE_T display, uint32_t mode ); -// Sets the desstination of the display to be the given resource -VCHPRE_ int VCHPOST_ vc_dispmanx_display_set_destination( DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_RESOURCE_HANDLE_T dest ); -// Set the background colour of the display -VCHPRE_ int VCHPOST_ vc_dispmanx_display_set_background( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_DISPLAY_HANDLE_T display, - uint8_t red, uint8_t green, uint8_t blue ); -// get the width, height, frame rate and aspect ratio of the display -VCHPRE_ int VCHPOST_ vc_dispmanx_display_get_info( DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_MODEINFO_T * pinfo ); -// Closes a display -VCHPRE_ int VCHPOST_ vc_dispmanx_display_close( DISPMANX_DISPLAY_HANDLE_T display ); - -// Updates -// Start a new update, DISPMANX_NO_HANDLE on error -VCHPRE_ DISPMANX_UPDATE_HANDLE_T VCHPOST_ vc_dispmanx_update_start( int32_t priority ); -// Add an elment to a display as part of an update -VCHPRE_ DISPMANX_ELEMENT_HANDLE_T VCHPOST_ vc_dispmanx_element_add ( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_DISPLAY_HANDLE_T display, - int32_t layer, const VC_RECT_T *dest_rect, DISPMANX_RESOURCE_HANDLE_T src, - const VC_RECT_T *src_rect, DISPMANX_PROTECTION_T protection, - VC_DISPMANX_ALPHA_T *alpha, - DISPMANX_CLAMP_T *clamp, DISPMANX_TRANSFORM_T transform ); -// Change the source image of a display element -VCHPRE_ int VCHPOST_ vc_dispmanx_element_change_source( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_ELEMENT_HANDLE_T element, - DISPMANX_RESOURCE_HANDLE_T src ); -// Change the layer number of a display element -VCHPRE_ int VCHPOST_ vc_dispmanx_element_change_layer ( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_ELEMENT_HANDLE_T element, - int32_t layer ); -// Signal that a region of the bitmap has been modified -VCHPRE_ int VCHPOST_ vc_dispmanx_element_modified( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_ELEMENT_HANDLE_T element, const VC_RECT_T * rect ); -// Remove a display element from its display -VCHPRE_ int VCHPOST_ vc_dispmanx_element_remove( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_ELEMENT_HANDLE_T element ); -// Ends an update -VCHPRE_ int VCHPOST_ vc_dispmanx_update_submit( DISPMANX_UPDATE_HANDLE_T update, DISPMANX_CALLBACK_FUNC_T cb_func, void *cb_arg ); -// End an update and wait for it to complete -VCHPRE_ int VCHPOST_ vc_dispmanx_update_submit_sync( DISPMANX_UPDATE_HANDLE_T update ); -// Query the image formats supported in the VMCS build -VCHPRE_ int VCHPOST_ vc_dispmanx_query_image_formats( uint32_t *supported_formats ); - -//New function added to VCHI to change attributes, set_opacity does not work there. -VCHPRE_ int VCHPOST_ vc_dispmanx_element_change_attributes( DISPMANX_UPDATE_HANDLE_T update, - DISPMANX_ELEMENT_HANDLE_T element, - uint32_t change_flags, - int32_t layer, - uint8_t opacity, - const VC_RECT_T *dest_rect, - const VC_RECT_T *src_rect, - DISPMANX_RESOURCE_HANDLE_T mask, - DISPMANX_TRANSFORM_T transform ); - -//xxx hack to get the image pointer from a resource handle, will be obsolete real soon -VCHPRE_ uint32_t VCHPOST_ vc_dispmanx_resource_get_image_handle( DISPMANX_RESOURCE_HANDLE_T res); - -//Call this instead of vc_dispman_init -VCHPRE_ void VCHPOST_ vc_vchi_dispmanx_init (VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections ); - -// Take a snapshot of a display in its current state. -// This call may block for a time; when it completes, the snapshot is ready. -// only transform=0 is supported -VCHPRE_ int VCHPOST_ vc_dispmanx_snapshot( DISPMANX_DISPLAY_HANDLE_T display, - DISPMANX_RESOURCE_HANDLE_T snapshot_resource, - DISPMANX_TRANSFORM_T transform ); - -// Set the resource palette (for VC_IMAGE_4BPP and VC_IMAGE_8BPP) -VCHPRE_ int VCHPOST_ vc_dispmanx_resource_set_palette( DISPMANX_RESOURCE_HANDLE_T handle, - void * src_address, int offset, int size); - -// Start triggering callbacks synced to vsync -VCHPRE_ int VCHPOST_ vc_dispmanx_vsync_callback( DISPMANX_DISPLAY_HANDLE_T display, DISPMANX_CALLBACK_FUNC_T cb_func, void *cb_arg ); - -#ifdef __cplusplus -} -#endif - -#endif // _VC_DISPMANX_H_ diff --git a/vc/include/interface/vmcs_host/vc_dispmanx_types.h b/vc/include/interface/vmcs_host/vc_dispmanx_types.h @@ -1,228 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Typedefs and enums for the VideoCore III Display Manager - -#ifndef _DISPMANX_TYPES_H -#define _DISPMANX_TYPES_H - -#include "interface/vctypes/vc_image_types.h" -#include "interface/vctypes/vc_display_types.h" - -#define VC_DISPMANX_VERSION 1 - -/* Opaque handles */ -typedef uint32_t DISPMANX_DISPLAY_HANDLE_T; -typedef uint32_t DISPMANX_UPDATE_HANDLE_T; -typedef uint32_t DISPMANX_ELEMENT_HANDLE_T; -typedef uint32_t DISPMANX_RESOURCE_HANDLE_T; - -typedef uint32_t DISPMANX_PROTECTION_T; - -#define DISPMANX_NO_HANDLE 0 - -#define DISPMANX_PROTECTION_MAX 0x0f -#define DISPMANX_PROTECTION_NONE 0 -#define DISPMANX_PROTECTION_HDCP 11 // Derived from the WM DRM levels, 101-300 - - - -/* Default display IDs. - Note: if you overwrite with you own dispmanx_platfrom_init function, you - should use IDs you provided during dispmanx_display_attach. -*/ -#define DISPMANX_ID_MAIN_LCD 0 -#define DISPMANX_ID_AUX_LCD 1 -#define DISPMANX_ID_HDMI 2 -#define DISPMANX_ID_SDTV 3 -#define DISPMANX_ID_FORCE_LCD 4 -#define DISPMANX_ID_FORCE_TV 5 -#define DISPMANX_ID_FORCE_OTHER 6 /* non-default display */ - -/* Return codes. Nonzero ones indicate failure. */ -typedef enum { - DISPMANX_SUCCESS = 0, - DISPMANX_INVALID = -1 - /* XXX others TBA */ -} DISPMANX_STATUS_T; - -typedef enum { - /* Bottom 2 bits sets the orientation */ - DISPMANX_NO_ROTATE = 0, - DISPMANX_ROTATE_90 = 1, - DISPMANX_ROTATE_180 = 2, - DISPMANX_ROTATE_270 = 3, - - DISPMANX_FLIP_HRIZ = 1 << 16, - DISPMANX_FLIP_VERT = 1 << 17, - - /* invert left/right images */ - DISPMANX_STEREOSCOPIC_INVERT = 1 << 19, - /* extra flags for controlling 3d duplication behaviour */ - DISPMANX_STEREOSCOPIC_NONE = 0 << 20, - DISPMANX_STEREOSCOPIC_MONO = 1 << 20, - DISPMANX_STEREOSCOPIC_SBS = 2 << 20, - DISPMANX_STEREOSCOPIC_TB = 3 << 20, - DISPMANX_STEREOSCOPIC_MASK = 15 << 20, - - /* extra flags for controlling snapshot behaviour */ - DISPMANX_SNAPSHOT_NO_YUV = 1 << 24, - DISPMANX_SNAPSHOT_NO_RGB = 1 << 25, - DISPMANX_SNAPSHOT_FILL = 1 << 26, - DISPMANX_SNAPSHOT_SWAP_RED_BLUE = 1 << 27, - DISPMANX_SNAPSHOT_PACK = 1 << 28 -} DISPMANX_TRANSFORM_T; - -typedef enum { - /* Bottom 2 bits sets the alpha mode */ - DISPMANX_FLAGS_ALPHA_FROM_SOURCE = 0, - DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS = 1, - DISPMANX_FLAGS_ALPHA_FIXED_NON_ZERO = 2, - DISPMANX_FLAGS_ALPHA_FIXED_EXCEED_0X07 = 3, - - DISPMANX_FLAGS_ALPHA_PREMULT = 1 << 16, - DISPMANX_FLAGS_ALPHA_MIX = 1 << 17 -} DISPMANX_FLAGS_ALPHA_T; - -typedef struct { - DISPMANX_FLAGS_ALPHA_T flags; - uint32_t opacity; - VC_IMAGE_T *mask; -} DISPMANX_ALPHA_T; - -typedef struct { - DISPMANX_FLAGS_ALPHA_T flags; - uint32_t opacity; - DISPMANX_RESOURCE_HANDLE_T mask; -} VC_DISPMANX_ALPHA_T; /* for use with vmcs_host */ - -typedef enum { - DISPMANX_FLAGS_CLAMP_NONE = 0, - DISPMANX_FLAGS_CLAMP_LUMA_TRANSPARENT = 1, -#if __VCCOREVER__ >= 0x04000000 - DISPMANX_FLAGS_CLAMP_TRANSPARENT = 2, - DISPMANX_FLAGS_CLAMP_REPLACE = 3 -#else - DISPMANX_FLAGS_CLAMP_CHROMA_TRANSPARENT = 2, - DISPMANX_FLAGS_CLAMP_TRANSPARENT = 3 -#endif -} DISPMANX_FLAGS_CLAMP_T; - -typedef enum { - DISPMANX_FLAGS_KEYMASK_OVERRIDE = 1, - DISPMANX_FLAGS_KEYMASK_SMOOTH = 1 << 1, - DISPMANX_FLAGS_KEYMASK_CR_INV = 1 << 2, - DISPMANX_FLAGS_KEYMASK_CB_INV = 1 << 3, - DISPMANX_FLAGS_KEYMASK_YY_INV = 1 << 4 -} DISPMANX_FLAGS_KEYMASK_T; - -typedef union { - struct { - uint8_t yy_upper; - uint8_t yy_lower; - uint8_t cr_upper; - uint8_t cr_lower; - uint8_t cb_upper; - uint8_t cb_lower; - } yuv; - struct { - uint8_t red_upper; - uint8_t red_lower; - uint8_t blue_upper; - uint8_t blue_lower; - uint8_t green_upper; - uint8_t green_lower; - } rgb; -} DISPMANX_CLAMP_KEYS_T; - -typedef struct { - DISPMANX_FLAGS_CLAMP_T mode; - DISPMANX_FLAGS_KEYMASK_T key_mask; - DISPMANX_CLAMP_KEYS_T key_value; - uint32_t replace_value; -} DISPMANX_CLAMP_T; - -typedef struct { - int32_t width; - int32_t height; - DISPMANX_TRANSFORM_T transform; - DISPLAY_INPUT_FORMAT_T input_format; - uint32_t display_num; -} DISPMANX_MODEINFO_T; - -/* Update callback. */ -typedef void (*DISPMANX_CALLBACK_FUNC_T)(DISPMANX_UPDATE_HANDLE_T u, void * arg); - -/* Progress callback */ -typedef void (*DISPMANX_PROGRESS_CALLBACK_FUNC_T)(DISPMANX_UPDATE_HANDLE_T u, - uint32_t line, - void * arg); - -/* Pluggable display interface */ - -typedef struct tag_DISPMANX_DISPLAY_FUNCS_T { - // Get essential HVS configuration to be passed to the HVS driver. Options - // is any combination of the following flags: HVS_ONESHOT, HVS_FIFOREG, - // HVS_FIFO32, HVS_AUTOHSTART, HVS_INTLACE; and if HVS_FIFOREG, one of; - // { HVS_FMT_RGB888, HVS_FMT_RGB565, HVS_FMT_RGB666, HVS_FMT_YUV }. - int32_t (*get_hvs_config)(void *instance, uint32_t *pchan, - uint32_t *poptions, DISPLAY_INFO_T *info, - uint32_t *bg_colour, uint32_t *test_mode); - - // Get optional HVS configuration for gamma tables, OLED matrix and dither controls. - // Set these function pointers to NULL if the relevant features are not required. - int32_t (*get_gamma_params)(void * instance, - int32_t gain[3], int32_t offset[3], int32_t gamma[3]); - int32_t (*get_oled_params)(void * instance, uint32_t * poffsets, - uint32_t coeffs[3]); - int32_t (*get_dither)(void * instance, uint32_t * dither_depth, uint32_t * dither_type); - - // Get mode information, which may be returned to the applications as a courtesy. - // Transform should be set to 0, and {width,height} should be final dimensions. - int32_t (*get_info)(void * instance, DISPMANX_MODEINFO_T * info); - - // Inform driver that the application refcount has become nonzero / zero - // These callbacks might perhaps be used for backlight and power management. - int32_t (*open)(void * instance); - int32_t (*close)(void * instance); - - // Display list updated callback. Primarily of use to a "one-shot" display. - // For convenience of the driver, we pass the register address of the HVS FIFO. - void (*dlist_updated)(void * instance, volatile uint32_t * fifo_reg); - - // End-of-field callback. This may occur in an interrupt context. - void (*eof_callback)(void * instance); - - // Return screen resolution format - DISPLAY_INPUT_FORMAT_T (*get_input_format)(void * instance); - - int32_t (*suspend_resume)(void *instance, int up); - - DISPLAY_3D_FORMAT_T (*get_3d_format)(void * instance); -} DISPMANX_DISPLAY_FUNCS_T; - -#endif /* ifndef _DISPMANX_TYPES_H */ diff --git a/vc/include/interface/vmcs_host/vc_dispservice_defs.h b/vc/include/interface/vmcs_host/vc_dispservice_defs.h @@ -1,250 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_DISPSERVICE_DEFS_H -#define VC_DISPSERVICE_DEFS_H - -#define HOST_PITCH_ALIGNMENT 4 - -//Round up to the nearest multiple of 16 -#define PAD16(x) (((x) + (VC_INTERFACE_BLOCK_SIZE-1)) & ~(VC_INTERFACE_BLOCK_SIZE-1)) - -//The max length for an effect name -#define DISPMAN_MAX_EFFECT_NAME (28) - -typedef enum { - // Values initially chosen to match VC_IMAGE_TYPE_T to aid debugging - // This is now a mandatory constraint - VC_FORMAT_RGB565 = 1, - VC_FORMAT_YUV420 = 3, - VC_FORMAT_RGB888 = 5, - VC_FORMAT_RGBA32 = 15, - VC_FORMAT_RGBA565 = 17, - VC_FORMAT_RGBA16 = 18, - VC_FORMAT_TF_RGBA32 = 20, - VC_FORMAT_TF_RGBA16 = 23, - VC_FORMAT_TF_RGB565 = 25, - VC_FORMAT_BGR888 = 31, - VC_FORMAT_BGR888_NP = 32, - - VC_FORMAT_ARGB8888 = 43, - VC_FORMAT_XRGB8888 = 44, - - /* To force 32-bit storage, enabling use in structures over-the-wire */ - VC_FORMAT_RANGE_MAX = 0x7FFFFFFF -} VC_IMAGE_FORMAT_T; - -// Transforms. -/* Image transformations. These must match the DISPMAN and Media Player versions */ -#define TRANSFORM_HFLIP (1<<0) -#define TRANSFORM_VFLIP (1<<1) -#define TRANSFORM_TRANSPOSE (1<<2) - -typedef enum { - VC_DISPMAN_ROT0 = 0, - VC_DISPMAN_MIRROR_ROT0 = TRANSFORM_HFLIP, - VC_DISPMAN_MIRROR_ROT180 = TRANSFORM_VFLIP, - VC_DISPMAN_ROT180 = TRANSFORM_HFLIP|TRANSFORM_VFLIP, - VC_DISPMAN_MIRROR_ROT90 = TRANSFORM_TRANSPOSE, - VC_DISPMAN_ROT270 = TRANSFORM_TRANSPOSE|TRANSFORM_HFLIP, - VC_DISPMAN_ROT90 = TRANSFORM_TRANSPOSE|TRANSFORM_VFLIP, - VC_DISPMAN_MIRROR_ROT270 = TRANSFORM_TRANSPOSE|TRANSFORM_HFLIP|TRANSFORM_VFLIP, -} VC_DISPMAN_TRANSFORM_T; - -typedef enum { - VC_RESOURCE_TYPE_HOST, - VC_RESOURCE_TYPE_VIDEOCORE, - VC_RESOURCE_TYPE_VIDEOCORE_UNCACHED, -} VC_RESOURCE_TYPE_T; - -typedef struct { - uint8_t type; // VC_IMAGE_FORMAT_T - uint32_t width; // width in pixels - uint32_t height; // height in pixels - uint32_t pitch; // pitch of image_data array in *bytes* - uint32_t size; // number of *bytes* available in the image_data arry - uint32_t pointer; // pointer for image_data - this allows the object to be cast to a VC_IMAGE_T on the VIDEOCORE side -} VC_IMAGE_PARAM_T; - -typedef enum { - VC_DISPMAN_DISPLAY_SET_DESTINATION = 0, - VC_DISPMAN_DISPLAY_UPDATE_START, - VC_DISPMAN_DISPLAY_UPDATE_END, - VC_DISPMAN_DISPLAY_OBJECT_ADD, - VC_DISPMAN_DISPLAY_OBJECT_REMOVE, - VC_DISPMAN_DISPLAY_OBJECT_MODIFY, - VC_DISPMAN_DISPLAY_LOCK, - VC_DISPMAN_DISPLAY_UNLOCK, - VC_DISPMAN_DISPLAY_RESOURCE_CREATE, - VC_DISPMAN_DISPLAY_RESOURCE_DELETE, - VC_DISPMAN_DISPLAY_GET_COMPOSITE, - VC_DISPMAN_DISPLAY_APPLY_EFFECT_INSTANCE, - VC_DISPMAN_DISPLAY_RECONFIGURE, - VC_DISPMAN_DISPLAY_CREATE_EFFECTS_INSTANCE, - VC_DISPMAN_DISPLAY_DELETE_EFFECTS_INSTANCE, - VC_DISPMAN_DISPLAY_SET_EFFECT, - VC_DISPMAN_DISPLAY_RESOURCE_SET_ALPHA, - VC_DISPMAN_DISPLAY_SNAPSHOT, - VC_DISPMAN_DISPLAY_QUERY_IMAGE_FORMATS, - VC_DISPMAN_DISPLAY_GET_DISPLAY_DETAILS, - // new features - add to end of list - VC_DISPMAN_DISPLAY_RESOURCE_CREATE_FROM_IMAGE, - VC_CMD_END_OF_LIST -} VC_CMD_CODE_T; - -/* The table of functions executed for each command. */ - -typedef void (*INTERFACE_EXECUTE_FN_T)(int, int); - -extern INTERFACE_EXECUTE_FN_T interface_execute_fn[]; - -//Parameter sets for dispservice commands -typedef struct { - uint32_t state; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMAN_LOCK_PARAM_T; - -typedef struct { - uint32_t display; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMAN_GET_DISPLAY_DETAILS_PARAM_T; - -typedef struct { - uint32_t display; - uint32_t resource; - uint32_t dummy[2]; //Pad to multiple of 16 bytes -} DISPMAN_SET_DEST_PARAM_T; - -typedef struct { - uint32_t display; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMAN_GET_COMPOSITE_PARAM_T; - -typedef struct -{ - uint32_t display; - uint32_t effects_instance; - - uint32_t dummy[2]; //Pad to multiple of 16 bytes -} DISPMAN_APPLY_EFFECTS_INSTANCE_PARAM_T; - -typedef struct -{ - uint32_t read_response; - uint32_t effects_instance; -} DISPMAN_CREATE_EFFECTS_INSTANCE_RESPONSE_T; - -typedef struct -{ - uint32_t effects_instance; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMAN_DELETE_EFFECTS_INSTANCE_PARAM_T; - -typedef struct -{ - uint32_t effects_instance; - char effect_name[ DISPMAN_MAX_EFFECT_NAME ]; - //no need to pad as long as DISPMAN_MAX_EFFECT_NAME +sizeof(uint32) = 32 -} DISPMAN_SET_EFFECT_PARAM_T; - -typedef struct { - uint32_t display; - uint16_t width; - uint16_t height; - uint32_t dummy[2]; //Pad to multiple of 16 bytes -} DISPMAN_RECONFIGURE_PARAM_T; - -typedef struct { - uint32_t display; - uint32_t transparent_colour; - uint32_t dummy[2]; //Pad to multiple of 16 bytes -} DISPMAN_SET_TRANSPARENT_COLOUR_PARAM_T; - -typedef struct { - //uint32_t object; - uint32_t display; - int32_t layer; - uint32_t transform; - uint32_t resource; - uint16_t dest_x; - uint16_t dest_y; - uint16_t dest_width; - uint16_t dest_height; - uint16_t src_x; - uint16_t src_y; - uint16_t src_width; - uint16_t src_height; -} DISPMAN_OBJECT_ADD_PARAM_T; - -typedef struct { - uint32_t object; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMAN_OBJECT_REMOVE_PARAM_T; - -typedef struct { - uint32_t object; - uint16_t src_x; - uint16_t src_y; - uint16_t width; - uint16_t height; - uint32_t dummy[1]; // Pad to multiple of 16 bytes -} DISPMAN_OBJECT_MODIFY_PARAM_T; - -typedef struct -{ - uint32_t *resource; - VC_IMAGE_PARAM_T image; - uint8_t type; // VC_RESOURCE_TYPE_T - //Removed padding. VC_IMAGE_T may change in size, so handle the size in the code that sends and receives the commands - //uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMAN_RESOURCE_CREATE_PARAM_T; - -typedef struct -{ - uint32_t native_image_ptr; - uint32_t type; // VC_RESOURCE_TYPE_T - uint32_t dummy[2]; // Pad to multiple of 16 bytes -} DISPMAN_RESOURCE_CREATE_FROM_IMAGE_PARAM_T; - -typedef struct { - uint32_t resource; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMAN_RESOURCE_DELETE_PARAM_T; - -typedef struct { - uint32_t resource; - uint32_t alpha; - uint32_t dummy[2]; //Pad to multiple of 16 bytes -} DISPMAN_RESOURCE_SET_ALPHA_PARAM_T; - -typedef struct { - uint32_t display; - uint32_t resource; - uint32_t dummy[2]; //Pad to multiple of 16 bytes -} DISPMAN_DISPLAY_SNAPSHOT_PARAM_T; - -#endif //VC_DISPSERVICE_DEFS_H diff --git a/vc/include/interface/vmcs_host/vc_dispservice_x_defs.h b/vc/include/interface/vmcs_host/vc_dispservice_x_defs.h @@ -1,276 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Display service command enumeration. - -#ifndef VC_DISPSERVICEX_DEFS_H -#define VC_DISPSERVICEX_DEFS_H - -#include "interface/vctypes/vc_image_types.h" - -#define HOST_PITCH_ALIGNMENT 4 - -//Round up to the nearest multiple of 16 -#define PAD16(x) (((x) + (VC_INTERFACE_BLOCK_SIZE-1)) & ~(VC_INTERFACE_BLOCK_SIZE-1)) - -//The max length for an effect name -#define DISPMANX_MAX_EFFECT_NAME (28) - -// Should really use the VC_IMAGE_TYPE_T, but this one has been extended -// to force it up to 32-bits... -typedef enum { - // Values initially chosen to match VC_IMAGE_TYPE_T to aid debugging - // This is now a mandatory constraint - VC_FORMAT_RGB565 = VC_IMAGE_RGB565, - VC_FORMAT_YUV420 = VC_IMAGE_YUV420, - VC_FORMAT_RGB888 = VC_IMAGE_RGB888, - VC_FORMAT_RGBA32 = VC_IMAGE_RGBA32, - VC_FORMAT_RGBA565 = VC_IMAGE_RGBA565, - VC_FORMAT_RGBA16 = VC_IMAGE_RGBA16, - VC_FORMAT_TF_RGBA32 = VC_IMAGE_TF_RGBA32, - VC_FORMAT_TF_RGBA16 = VC_IMAGE_TF_RGBA16, - VC_FORMAT_TF_RGB565 = VC_IMAGE_TF_RGB565, - VC_FORMAT_BGR888 = VC_IMAGE_BGR888, - VC_FORMAT_BGR888_NP = VC_IMAGE_BGR888_NP, - - VC_FORMAT_ARGB8888 = VC_IMAGE_ARGB8888, - VC_FORMAT_XRGB8888 = VC_IMAGE_XRGB8888, - - /* To force 32-bit storage, enabling use in structures over-the-wire */ - VC_FORMAT_RANGE_MAX = 0x7FFFFFFF -} VC_IMAGE_FORMAT_T; - -// Transforms. -/* Image transformations. These must match the DISPMAN and Media Player versions */ -#define TRANSFORM_HFLIP (1<<0) -#define TRANSFORM_VFLIP (1<<1) -#define TRANSFORM_TRANSPOSE (1<<2) - -#define VC_DISPMAN_ROT0 VC_IMAGE_ROT0 -#define VC_DISPMAN_ROT90 VC_IMAGE_ROT90 -#define VC_DISPMAN_ROT180 VC_IMAGE_ROT180 -#define VC_DISPMAN_ROT270 VC_IMAGE_ROT270 -#define VC_DISPMAN_MIRROR_ROT0 VC_IMAGE_MIRROR_ROT0 -#define VC_DISPMAN_MIRROR_ROT90 VC_IMAGE_MIRROR_ROT90 -#define VC_DISPMAN_MIRROR_ROT180 VC_IMAGE_MIRROR_ROT180 -#define VC_DISPMAN_MIRROR_ROT270 VC_IMAGE_MIRROR_ROT270 -#define VC_DISPMAN_TRANSFORM_T VC_IMAGE_TRANSFORM_T - -typedef enum { - VC_RESOURCE_TYPE_HOST, - VC_RESOURCE_TYPE_VIDEOCORE, - VC_RESOURCE_TYPE_VIDEOCORE_UNCACHED, -} VC_RESOURCE_TYPE_T; - -typedef struct { - uint8_t type; // VC_IMAGE_FORMAT_T - uint32_t width; // width in pixels - uint32_t height; // height in pixels - uint32_t pitch; // pitch of image_data array in *bytes* - uint32_t size; // number of *bytes* available in the image_data arry - uint32_t pointer; // pointer for image_data - this allows the object to be cast to a VC_IMAGE_T on the VIDEOCORE side -} VC_IMAGE_PARAM_T; - -typedef enum { - VC_DISPMANX_GET_DEVICES = 0, - VC_DISPMANX_GET_DEVICE_NAME, - VC_DISPMANX_GET_MODES, - VC_DISPMANX_GET_MODE_INFO, - VC_DISPMANX_DISPLAY_QUERY_IMAGE_FORMATS, - // Resources - VC_DISPMANX_RESOURCE_CREATE, - VC_DISPMANX_RESOURCE_WRITE_DATA, - VC_DISPMANX_RESOURCE_DELETE, - // Displays - VC_DISPMANX_DISPLAY_OPEN, - VC_DISPMANX_DISPLAY_OPEN_MODE, - VC_DISPMANX_DISPLAY_OPEN_OFFSCREEN, - VC_DISPMANX_DISPLAY_RECONFIGURE, - VC_DISPMANX_DISPLAY_SET_DESTINATION, - VC_DISPMANX_DISPLAY_SET_BACKGROUND, - VC_DISPMANX_DISPLAY_GET_INFO, - VC_DISPMANX_DISPLAY_CLOSE, - // Updates - VC_DISPMANX_UPDATE_START, - VC_DISPMANX_ELEMENT_ADD, - VC_DISPMANX_ELEMENT_CHANGE_SOURCE, - VC_DISPMANX_ELEMENT_MODIFIED, - VC_DISPMANX_ELEMENT_REMOVE, - VC_DISPMANX_UPDATE_SUBMIT, - VC_DISPMANX_UPDATE_SUBMIT_SYNC, - // Miscellaneous - VC_DISPMANX_SNAPSHOT, - // new features - add to end of list - VC_CMD_END_OF_LIST -} VC_CMD_CODE_T; - -/* The table of functions executed for each command. */ - -typedef void (*INTERFACE_EXECUTE_FN_T)(int, int); - -extern INTERFACE_EXECUTE_FN_T interface_execute_fn[]; - -#define DISPMANX_MAX_HOST_DEVICES 8 -#define DISPMANX_MAX_DEVICE_NAME_LEN 16 - -//Parameter sets for dispservice commands - -typedef struct { - int32_t response; - uint32_t ndevices; - uint32_t dummy[2]; - uint8_t names[DISPMANX_MAX_HOST_DEVICES][DISPMANX_MAX_DEVICE_NAME_LEN]; -} DISPMANX_GET_DEVICES_RESP_T; -typedef struct { - uint32_t device; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMANX_GET_MODES_PARAM_T; -typedef struct { - uint32_t display; - uint32_t mode; - uint32_t dummy[2]; //Pad to multiple of 16 bytes -} DISPMANX_GET_MODE_INFO_PARAM_T; -typedef struct { - uint32_t type; - uint32_t width; - uint32_t height; - uint32_t dummy[1]; // Pad to multiple of 16 bytes -} DISPMANX_RESOURCE_CREATE_PARAM_T; -typedef struct { - // This will be needed when we change to vchi. - int junk; // empty structure not allowed -} DISPMANX_RESOURCE_WRITE_DATA_PARAM_T; -typedef struct { - uint32_t handle; - uint32_t dummy[3]; //Pad to multiple of 16 bytes -} DISPMANX_RESOURCE_DELETE_PARAM_T; -typedef struct { - uint32_t device; - uint32_t dummy[3]; -} DISPMANX_DISPLAY_OPEN_PARAM_T; -typedef struct { - uint32_t device; - uint32_t mode; - uint32_t dummy[2]; -} DISPMANX_DISPLAY_OPEN_MODE_PARAM_T; -typedef struct { - uint32_t dest; - uint32_t orientation; - uint32_t dummy[2]; -} DISPMANX_DISPLAY_OPEN_OFFSCREEN_PARAM_T; -typedef struct { - uint32_t display; - uint32_t dest; - uint32_t dummy[2]; -} DISPMANX_DISPLAY_SET_DESTINATION_PARAM_T; -typedef struct { - uint32_t display; - uint32_t update; - uint32_t colour; - uint32_t dummy; -} DISPMANX_DISPLAY_SET_BACKGROUND_PARAM_T; -typedef struct { - uint32_t display; - uint32_t dummy[3]; -} DISPMANX_DISPLAY_GET_INFO_PARAM_T; -typedef struct { - uint32_t read_response; - int32_t width; - int32_t height; - int32_t aspect_pixwidth; - int32_t aspect_pixheight; - int32_t fieldrate_num; - int32_t fieldrate_denom; - int32_t fields_per_frame; - uint32_t transform; - uint32_t dummy[3]; -} DISPMANX_DISPLAY_GET_INFO_RESP_T; -typedef struct { - int32_t priority; - uint32_t dummy[3]; -} DISPMANX_UPDATE_START_PARAM_T; -typedef struct { - uint32_t update; - uint32_t display; - int32_t layer; - uint32_t transform; - uint32_t src_resource; - uint16_t dest_x; - uint16_t dest_y; - uint16_t dest_width; - uint16_t dest_height; - uint16_t src_x; - uint16_t src_y; - uint16_t src_width; - uint16_t src_height; - uint32_t flags; - uint32_t opacity; - uint32_t mask_resource; - // already 16 byte aligned -} DISPMANX_ELEMENT_ADD_PARAM_T; -typedef struct { - uint32_t update; - uint32_t element; - uint32_t src_resource; - uint32_t dummy; // pad to 16 bytes -} DISPMANX_ELEMENT_CHANGE_SOURCE_PARAM_T; -typedef struct { - uint32_t update; - uint32_t element; - uint16_t x; - uint16_t y; - uint16_t width; - uint16_t height; -} DISPMANX_ELEMENT_MODIFIED_PARAM_T; -typedef struct { - uint32_t update; - uint32_t element; - uint32_t dummy[2]; -} DISPMANX_ELEMENT_REMOVE_PARAM_T; -typedef struct { - uint32_t update; - uint32_t dummy[3]; -} DISPMANX_UPDATE_SUBMIT_PARAM_T; -typedef struct { - uint32_t update; - uint32_t dummy[3]; -} DISPMANX_UPDATE_SUBMIT_SYNC_PARAM_T; -typedef struct { - uint32_t display; - uint32_t snapshot_resource; - uint32_t transform; - uint32_t dummy[1]; -} DISPMANX_DISPLAY_SNAPSHOT_PARAM_T; - -// for dispmanx - -#define TRANSFORM_HFLIP (1<<0) -#define TRANSFORM_VFLIP (1<<1) -#define TRANSFORM_TRANSPOSE (1<<2) - - -#endif //VC_DISPSERVICEX_DEFS_H diff --git a/vc/include/interface/vmcs_host/vc_fileservice_defs.h b/vc/include/interface/vmcs_host/vc_fileservice_defs.h @@ -1,119 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// File service command enumeration. - -#ifndef VC_FILESERVICE_DEFS_H -#define VC_FILESERVICE_DEFS_H - -#define VC_FILESERV_VER 1 -/* Definitions (not used by API) */ -#define FS_MAX_DATA 8192 //4096 - -/* Protocol (not used by API) version 1.2 */ - -enum { - /* Over-the-wire file open flags */ - VC_O_RDONLY = 0x01, - VC_O_WRONLY = 0x02, - VC_O_RDWR = 0x04, - VC_O_APPEND = 0x08, - VC_O_CREAT = 0x10, - VC_O_TRUNC = 0x20, - VC_O_EXCL = 0x40, - - /* Request Commands (VC->Host->VC) */ - - /* These commands don't require a pathname */ - VC_FILESYS_RESET = 64, - VC_FILESYS_CLOSE = 65, - VC_FILESYS_CLOSEDIR = 66, - VC_FILESYS_LSEEK = 67, - VC_FILESYS_READ = 68, - VC_FILESYS_READDIR = 69, - VC_FILESYS_SETEND = 70, - VC_FILESYS_WRITE = 71, - - /* These commands require a pathname */ - VC_FILESYS_FORMAT = 72, - VC_FILESYS_FREESPACE = 73, - VC_FILESYS_GET_ATTR = 74, - VC_FILESYS_MKDIR = 75, - VC_FILESYS_OPEN = 76, - VC_FILESYS_OPENDIR = 77, - VC_FILESYS_REMOVE = 78, - VC_FILESYS_RENAME = 79, - VC_FILESYS_SET_ATTR = 80, - VC_FILESYS_SCANDISK = 81, - VC_FILESYS_TOTALSPACE = 82, - VC_FILESYS_DISKWRITABLE=83, - VC_FILESYS_OPEN_DISK_RAW = 84, - VC_FILESYS_CLOSE_DISK_RAW = 85, - VC_FILESYS_NUMSECTORS = 86, - VC_FILESYS_READ_SECTORS = 87, - VC_FILESYS_WRITE_SECTORS = 88, - - VC_FILESYS_MOUNT = 89, - VC_FILESYS_UMOUNT = 90, - VC_FILESYS_FSTYPE = 91, - - VC_FILESYS_READ_DIRECT = 92, - - VC_FILESYS_LSEEK64 = 93, - VC_FILESYS_FREESPACE64 = 94, - VC_FILESYS_TOTALSPACE64= 95, - VC_FILESYS_OPEN_DISK = 96, - VC_FILESYS_CLOSE_DISK = 97, - - /* extra simple functions for mass storage testing */ - VC_FILESYS_READ_SECTOR = 98, //1sect - VC_FILESYS_STREAM_SECTOR_BEGIN = 99, - VC_FILESYS_STREAM_SECTOR_END = 100, - VC_FILESYS_WRITE_SECTOR = 101, - VC_FILESYS_FSTAT = 102, - VC_FILESYS_DIRSIZE = 103, - VC_FILESYS_LIST_DIRS = 104, - VC_FILESYS_LIST_FILES = 105, - VC_FILESYS_NUM_DIRS = 106, - VC_FILESYS_NUM_FILES = 107, - VC_FILESYS_MAX_FILESIZE = 108, - VC_FILESYS_CHKDSK = 109, -}; - -/* Parameters for lseek */ - -#define VC_FILESYS_SEEK_SET 0 /* Set file pointer to "offset" */ -#define VC_FILESYS_SEEK_CUR 1 /* Set file pointer to current plus "offset" */ -#define VC_FILESYS_SEEK_END 2 /* Set file pointer to EOF plus "offset" */ - -/* Return values of vc_filesys_type */ -#define VC_FILESYS_FS_UNKNOWN 0 -#define VC_FILESYS_FS_FAT12 1 -#define VC_FILESYS_FS_FAT16 2 -#define VC_FILESYS_FS_FAT32 3 - -#endif diff --git a/vc/include/interface/vmcs_host/vc_gencmd_defs.h b/vc/include/interface/vmcs_host/vc_gencmd_defs.h @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_GENCMD_DEFS_H -#define VC_GENCMD_DEFS_H - -//Format of reply message is error code followed by a string -#define GENCMDSERVICE_MSGFIFO_SIZE 1024 - -#define VC_GENCMD_VER 1 - -#endif diff --git a/vc/include/interface/vmcs_host/vc_hdmi.h b/vc/include/interface/vmcs_host/vc_hdmi.h @@ -1,545 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * HDMI common host header for TV service, defines resolution code which host applications should - * use for power up command for HDMI - */ - -#ifndef _VC_HDMI_H_ -#define _VC_HDMI_H_ - -#include "vc_hdmi_property.h" /**< All HDMI related properties have been moved to here */ - -typedef int VC_HDMI_BOOL_T; - -/** - * HDMI resolution groups. There are two main groups: - * CEA - the conventional HDMI ones like 720p - * DMT - computer monitor resolutions like XGA - */ -typedef enum { - HDMI_RES_GROUP_INVALID = 0, /**< Initialised value */ - HDMI_RES_GROUP_CEA = 1, /**< CEA - HDMI device */ - HDMI_RES_GROUP_DMT = 2, /**< DMT - computer monitors */ - HDMI_RES_GROUP_CEA_3D = 3, /* deprecated */ - -} HDMI_RES_GROUP_T; - -#define HDMI_RES_GROUP_NAME(g) \ - (((g) == HDMI_RES_GROUP_INVALID) ? "Invalid" : \ - (((g) == HDMI_RES_GROUP_CEA) ? "CEA" : \ - (((g) == HDMI_RES_GROUP_DMT) ? "DMT" : \ - "Unknown"))) - -/** - * CEA 861 defined video code and aspect ratios for various HDMI modes - * Not all values are valid for AVI infoframe - */ -typedef enum { - HDMI_ASPECT_UNKNOWN = 0, /**< Unknown aspect ratio, or not one of the values below */ - HDMI_ASPECT_4_3 = 1, /**< 4:3 */ - HDMI_ASPECT_14_9 = 2, /**< 14:9 */ - HDMI_ASPECT_16_9 = 3, /**< 16:9 */ - HDMI_ASPECT_5_4 = 4, /**< 5:4 */ - HDMI_ASPECT_16_10 = 5, /**< 16:10*/ - HDMI_ASPECT_15_9 = 6, /**< 15:9 */ - HDMI_ASPECT_64_27 = 7, /**< 64:27 */ - HDMI_ASPECT_21_9 = HDMI_ASPECT_64_27 /**< 21:9 is jargon, 64:27 is the actual aspect ratio */ - /* More aspect ratio values may be added here if defined by CEA in future */ -} HDMI_ASPECT_T; - -/** - * Display options set the bounding box (only used in CEA mode) - */ -typedef struct { - uint16_t aspect; /**<HDMI_ASPECT_T */ - /** Active area information - meanings as in CEA-861. */ - uint16_t vertical_bar_present; /**<VC_HDMI_BOOL_T */ - uint16_t left_bar_width; - uint16_t right_bar_width; - uint16_t horizontal_bar_present; /**<VC_HDMI_BOOL_T */ - uint16_t top_bar_height; - uint16_t bottom_bar_height; - /** S0/S1 flags as defined in CEA-861. */ - uint8_t overscan_flags; -} HDMI_DISPLAY_OPTIONS_T; - -/** - * HDMI internal state (with some of the properties related to current display signal) - * Also see SDTV_DISPLAY_STATE_T in vc_sdtv.h, members up to scan_mode will be in the - * same position as the equivalent state in SDTV_DISPLAY_STATE_T; - */ -typedef struct { - uint32_t state; - uint32_t width; - uint32_t height; - uint16_t frame_rate; - uint16_t scan_mode; - uint32_t group; /**<HDMI_RES_GROUP_T */ - uint32_t mode; /* This is the mode number of the format */ - uint16_t pixel_rep; /* Pixel repetition factor, only relevant for CEA formats */ - uint16_t aspect_ratio; /* This is the format's native aspect ratio */ - HDMI_DISPLAY_OPTIONS_T display_options; /* This has the aspect ratio sent in AVI infoframe */ - uint16_t pixel_encoding; - uint16_t format_3d; /* 3D format, only relevant for CEA formats */ -} HDMI_DISPLAY_STATE_T; - -/** - * Copy protection for HDMI, only HDCP is available - * This enum is to make it consistent with the enums - * SDTV_CP_MODE_T in vc_sdtv.h - */ -typedef enum { - HDMI_CP_NONE = 0, /**< No copyprotection */ - HDMI_CP_HDCP = 1 /**< HDCP 1.x */ -} HDMI_CP_MODE_T; - -/** - * HDMI operation modes - */ -typedef enum { - HDMI_MODE_OFF, /**< Off! */ - HDMI_MODE_DVI, /**< DVI */ - HDMI_MODE_HDMI, /**< HDMI */ - HDMI_MODE_3D /**< HDMI 1.4a 3D */ -} HDMI_MODE_T; - -/** - * Possible values for the Source Product Description type code (in SPD infoframe). - * Taken from the CEA-861 spec. - */ -typedef enum { - HDMI_SPD_TYPE_UNKNOWN, - HDMI_SPD_TYPE_STB, /**<Digital STB */ - HDMI_SPD_TYPE_DVD, /**<DVD player */ - HDMI_SPD_TYPE_DVHS, /**<D-VHS */ - HDMI_SPD_TYPE_HDD_RECORDER, /**<HDD video recoder */ - HDMI_SPD_TYPE_DVC, /**<DVC */ - HDMI_SPD_TYPE_DSC, /**<DSC */ - HDMI_SPD_TYPE_VCD, /**<Video CD */ - HDMI_SPD_TYPE_GAME, /**<Game */ - HDMI_SPD_TYPE_PC, /**<PC general */ - HDMI_SPD_TYPE_BD, /**<Blu-Ray Disc */ - HDMI_SPD_TYPE_SACD, /**<Super Audio CD */ - HDMI_SPD_TYPE_HDDVD, /**<HD DVD */ - HDMI_SPD_TYPE_PMP /**<Personal media player */ -} HDMI_SPD_TYPE_CODE_T; - -/** - * Structure for SPD infoframe - */ -typedef struct { - char *manufacturer; /**< Manufacture name (up to 8 characters) */ - char *description; /**< Product name (up to 16 characters) */ - HDMI_SPD_TYPE_CODE_T type; /**< Product type */ -} HDMI_SPD_DATA_T; - -/** - * These are CEA mode numbers (sent in AVI infoframe) for different resolutions as define in CEA-861 - * 1080i at 100/120Hz (40,46) are supported by HDMI H/W but note we cannot - * display the debug overlay under these modes. - * Some modes have two codes, the first one has aspect ratio 4:3 and - * the second one (with "H" suffix") 16:9. - * The modes with "4x", etc. are the same the corresponding "non-multiplied" modes - * but clocked at a higher pixel clock. - */ -typedef enum { - HDMI_CEA_VGA = 1, - HDMI_CEA_480p60 = 2, - HDMI_CEA_480p60H = 3, - HDMI_CEA_720p60 = 4, - HDMI_CEA_1080i60 = 5, - HDMI_CEA_480i60 = 6, - HDMI_CEA_480i60H = 7, - HDMI_CEA_240p60 = 8, - HDMI_CEA_240p60H = 9, - HDMI_CEA_480i60_4x = 10, - HDMI_CEA_480i60_4xH = 11, - HDMI_CEA_240p60_4x = 12, - HDMI_CEA_240p60_4xH = 13, - HDMI_CEA_480p60_2x = 14, - HDMI_CEA_480p60_2xH = 15, - HDMI_CEA_1080p60 = 16, - HDMI_CEA_576p50 = 17, - HDMI_CEA_576p50H = 18, - HDMI_CEA_720p50 = 19, - HDMI_CEA_1080i50 = 20, - HDMI_CEA_576i50 = 21, - HDMI_CEA_576i50H = 22, - HDMI_CEA_288p50 = 23, - HDMI_CEA_288p50H = 24, - HDMI_CEA_576i50_4x = 25, - HDMI_CEA_576i50_4xH = 26, - HDMI_CEA_288p50_4x = 27, - HDMI_CEA_288p50_4xH = 28, - HDMI_CEA_576p50_2x = 29, - HDMI_CEA_576p50_2xH = 30, - HDMI_CEA_1080p50 = 31, - HDMI_CEA_1080p24 = 32, - HDMI_CEA_1080p25 = 33, - HDMI_CEA_1080p30 = 34, - HDMI_CEA_480p60_4x = 35, - HDMI_CEA_480p60_4xH = 36, - HDMI_CEA_576p50_4x = 37, - HDMI_CEA_576p50_4xH = 38, - HDMI_CEA_1080i50_rb = 39, - HDMI_CEA_1080i100 = 40, - HDMI_CEA_720p100 = 41, - HDMI_CEA_576p100 = 42, - HDMI_CEA_576p100H = 43, - HDMI_CEA_576i100 = 44, - HDMI_CEA_576i100H = 45, - HDMI_CEA_1080i120 = 46, - HDMI_CEA_720p120 = 47, - HDMI_CEA_480p120 = 48, - HDMI_CEA_480p120H = 49, - HDMI_CEA_480i120 = 50, - HDMI_CEA_480i120H = 51, - HDMI_CEA_576p200 = 52, - HDMI_CEA_576p200H = 53, - HDMI_CEA_576i200 = 54, - HDMI_CEA_576i200H = 55, - HDMI_CEA_480p240 = 56, - HDMI_CEA_480p240H = 57, - HDMI_CEA_480i240 = 58, - HDMI_CEA_480i240H = 59, - HDMI_CEA_720p24 = 60, - HDMI_CEA_720p25 = 61, - HDMI_CEA_720p30 = 62, - HDMI_CEA_1080p120 = 63, - HDMI_CEA_1080p100 = 64, - - /* Up-to-date as of CEA 861-E */ - - HDMI_CEA_OFF = 0xff /**<Special code to shutdown HDMI */ - -} HDMI_CEA_RES_CODE_T; - -/** - * These are the DMT modes from VESA. They are used for powering up - * HDMI in DMT resolutions and are not sent in AVI infoframes. - * Enum is ordered as ascending order of DMT id. - * All reduced blanking formats are 60Hz unless stated otherwise. - */ -typedef enum { - HDMI_DMT_640x350_85 = 0x1, /**<640x350 */ - HDMI_DMT_640x400_85 = 0x2, /**<640x400 */ - HDMI_DMT_IBM_VGA_85 = 0x3, /**<720x400 */ - HDMI_DMT_VGA_60 = 0x4, /**<640x480 (60Hz is same as VGA above) */ - HDMI_DMT_VGA_72 = 0x5, - HDMI_DMT_VGA_75 = 0x6, - HDMI_DMT_VGA_85 = 0x7, - HDMI_DMT_SVGA_56 = 0x8, /**<800x600 */ - HDMI_DMT_SVGA_60 = 0x9, - HDMI_DMT_SVGA_72 = 0xA, - HDMI_DMT_SVGA_75 = 0xB, - HDMI_DMT_SVGA_85 = 0xC, - HDMI_DMT_SVGA_120 = 0xD, - HDMI_DMT_848x480_60 = 0xE, /**<848x480 */ - HDMI_DMT_XGA_43 = 0xF, /**<1024x768 - interlaced, DO NOT USE */ - HDMI_DMT_XGA_60 = 0x10, /**<1024x768 */ - HDMI_DMT_XGA_70 = 0x11, - HDMI_DMT_XGA_75 = 0x12, - HDMI_DMT_XGA_85 = 0x13, - HDMI_DMT_XGA_120 = 0x14, - HDMI_DMT_XGAP_75 = 0x15, /**<1152x864 */ - HDMI_DMT_WXGA_RB = 0x16, /**<1280x768 reduced blanking */ - HDMI_DMT_WXGA_60 = 0x17, - HDMI_DMT_WXGA_75 = 0x18, - HDMI_DMT_WXGA_85 = 0x19, - HDMI_DMT_WXGA_120 = 0x1A, /**<120Hz with reduced blanking */ - HDMI_DMT_1280x800_RB = 0x1B, /**<1280x800 reduced blanking */ - HDMI_DMT_1280x800_60 = 0x1C, - HDMI_DMT_1280x800_75 = 0x1D, - HDMI_DMT_1280x800_85 = 0x1E, - HDMI_DMT_1280x800_120 = 0x1F, /** reduced blanking */ - HDMI_DMT_1280x960_60 = 0x20, /**<1280x960 */ - HDMI_DMT_1280x960_85 = 0x21, - HDMI_DMT_1280x960_120 = 0x22, /** reduced blanking */ - HDMI_DMT_SXGA_60 = 0x23, /**<1280x1024 */ - HDMI_DMT_SXGA_75 = 0x24, - HDMI_DMT_SXGA_85 = 0x25, - HDMI_DMT_SXGA_120 = 0x26, /** reduced blanking */ - HDMI_DMT_1360x768_60 = 0x27, /**<1360x768 */ - HDMI_DMT_1360x768_120 = 0x28, /**<120 Hz with reduced blanking */ - HDMI_DMT_SXGAP_RB = 0x29, /**<1400x1050 reduced blanking */ - HDMI_DMT_SXGAP_60 = 0x2A, - HDMI_DMT_SXGAP_75 = 0x2B, - HDMI_DMT_SXGAP_85 = 0x2C, - HDMI_DMT_SXGAP_120 = 0x2D, /** reduced blanking */ - HDMI_DMT_1440x900_RB = 0x2E, /**<1440x900 reduced blanking */ - HDMI_DMT_1440x900_60 = 0x2F, - HDMI_DMT_1440x900_75 = 0x30, - HDMI_DMT_1440x900_85 = 0x31, - HDMI_DMT_1440x900_120 = 0x32, /** reduced blanking */ - HDMI_DMT_UXGA_60 = 0x33, /**<1600x1200 60Hz */ - HDMI_DMT_UXGA_65 = 0x34, - HDMI_DMT_UXGA_70 = 0x35, - HDMI_DMT_UXGA_75 = 0x36, - HDMI_DMT_UXGA_85 = 0x37, - HDMI_DMT_UXGA_120 = 0x38, /** reduced blanking */ - HDMI_DMT_SWXGAP_RB = 0x39, /**<1680x1050 reduced blanking */ - HDMI_DMT_SWXGAP_60 = 0x3A, /**<1680x1050 60Hz */ - HDMI_DMT_SWXGAP_75 = 0x3B, - HDMI_DMT_SWXGAP_85 = 0x3C, - HDMI_DMT_SWXGAP_120 = 0x3D, /** reduced blanking */ - HDMI_DMT_1792x1344_60 = 0x3E, /**<1792x1344 60Hz */ - HDMI_DMT_1792x1344_75 = 0x3F, /**<1792x1344 75Hz */ - HDMI_DMT_1792x1344_120 = 0x40, /** reduced blanking */ - HDMI_DMT_1856x1392_60 = 0x41, /**<1856x1392 60Hz */ - HDMI_DMT_1856x1392_75 = 0x42, /**<1856x1392 75Hz */ - HDMI_DMT_1856x1392_120 = 0x43, /** reduced blanking */ - HDMI_DMT_WUXGA_RB = 0x44, /**<1920x1200 reduced blanking */ - HDMI_DMT_WUXGA_60 = 0x45, /**<1920x1200 60Hz */ - HDMI_DMT_WUXGA_75 = 0x46, /**<1920x1200 75Hz */ - HDMI_DMT_WUXGA_85 = 0x47, /**<1920x1200 85Hz */ - HDMI_DMT_WUXGA_120 = 0x48, /** reduced blanking */ - HDMI_DMT_1920x1440_60 = 0x49, /**<1920x1440 60Hz */ - HDMI_DMT_1920x1440_75 = 0x4A, /**<1920x1440 75Hz */ - HDMI_DMT_1920x1440_120 = 0x4B, /** reduced blanking */ - HDMI_DMT_2560x1600_RB = 0x4C, /**<2560x1600 reduced blanking */ - HDMI_DMT_2560x1600_60 = 0x4D, /**<2560x1600 60 Hz */ - HDMI_DMT_2560x1600_75 = 0x4E, /**<2560x1600 75 Hz */ - HDMI_DMT_2560x1600_85 = 0x4E, /**<2560x1600 85 Hz */ - HDMI_DMT_2560x1600_120 = 0x50, /** reduced blanking */ - HDMI_DMT_1366x768_60 = 0x51, /**<1366x768 60Hz */ - HDMI_DMT_1080p_60 = 0x52, /**<Same as 1080p60 above */ - HDMI_DMT_1600x900_RB = 0x53, /**<1600x900 reduced blanking */ - HDMI_DMT_2048x1152_RB = 0x54, /**<2048x1152 reduced blanking */ - HDMI_DMT_720p_60 = 0x55, /**<Same as 720p60 above */ - HDMI_DMT_1366x768_RB = 0x56, /**<1366x768 reduced blanking */ - /* Up-to-date as of VESA DMT v1 r12 */ - - HDMI_DMT_OFF = 0xff -} HDMI_DMT_RES_CODE_T; - -/** - * HDMI scanmode - */ -typedef enum { - HDMI_NONINTERLACED, - HDMI_INTERLACED -} HDMI_INTERLACED_T; - -/** - * Preference for powering up HDMI using best mode - * Note we will only use CEA modes for matching - */ -typedef enum { - HDMI_MODE_MATCH_NONE = 0x0, /**<No mode*/ - HDMI_MODE_MATCH_FRAMERATE = 0x1, /**<Match based on frame rate */ - HDMI_MODE_MATCH_RESOLUTION = 0x2, /**<Match based on resolution */ - HDMI_MODE_MATCH_SCANMODE = 0x4 /**<Match based on scan mode */ -} EDID_MODE_MATCH_FLAG_T; - -/** - * Audio support flags - */ -typedef enum { - EDID_AUDIO_NO_SUPPORT = (1 << 0), /**<No support for that format */ - EDID_AUDIO_CHAN_UNSUPPORTED = (1 << 1), /**<max. no. of channels exceeded */ - EDID_AUDIO_FS_UNSUPPORTED = (1 << 2), /**<no support for that sampling frequency */ - EDID_AUDIO_BR_UNSUPPORTED = (1 << 3), /**<max. bitrate exceeded */ - EDID_AUDIO_SAMP_UNSUPPORTED = (1 << 4), /**sample size unsupported (pcm only) */ -} EDID_AUDIO_SUPPORT_FLAG_T; - -/** - * Enums for audio support in audio descriptor block (CEA only) - * audio formats as specified in CEA Short Audio Descriptors - */ -typedef enum { - EDID_AudioFormat_eReserved, /**<Refer to header when set in audio info frame */ - EDID_AudioFormat_ePCM, /**<Plain old PCM, mandatory for any audio support */ - EDID_AudioFormat_eAC3, /**<AC3 */ - EDID_AudioFormat_eMPEG1, /**<Mpeg layer 1 and 2 */ - EDID_AudioFormat_eMP3, /**<Mpeg layer 3 */ - EDID_AudioFormat_eMPEG2, /**<Mpeg 2 audio */ - EDID_AudioFormat_eAAC, /**<AAC */ - EDID_AudioFormat_eDTS, /**<DTS */ - EDID_AudioFormat_eATRAC, /**<Sony proprietary */ - EDID_AudioFormat_eDSD, /**<Super Audio CD 1-bit audio */ - EDID_AudioFormat_eEAC3, /**<Dolby Digital + */ - EDID_AudioFormat_eDTS_HD, /**<DTS-HD */ - EDID_AudioFormat_eMLP, /**<Meridian Lossless Packing - for DVD audio */ - EDID_AudioFormat_eDST, /**<Direct stream transfer - compressed super audio CD */ - EDID_AudioFormat_eWMAPRO, /**<WMA Pro */ - EDID_AudioFormat_eExtended, /**<Refer to byte 3 of audio db for coding extension type */ - - EDID_AudioFormat_eMaxCount -} EDID_AudioFormat; - -/** - * If audio format is set to EDID_AudioFormat_eExtended, - * this gives the extended audio type (see CEA-861E section 6.6.1) - */ -typedef enum { - EDID_AudioCodingExtension_NONE = 0x0, /** no extension, for audio format != Extended */ - EDID_AudioCodingExtension_HEAAC = 0x1, /**<HE-AAC */ - EDID_AudioCodingExtension_HEAAC2 = 0x2, /**<HE-AAC v2 */ - EDID_AudioCodingExtension_MPEGSUR = 0x3, /**<MPEG Surround */ - - EDID_AudioCodingExtension_max -} EDID_AudioCodingExtension; - -/** - * Audio sample rates as specified in CEA Short Audio Descriptors - */ -typedef enum { - EDID_AudioSampleRate_eReferToHeader = 0x0, /**<Only used in audio infoframe */ - EDID_AudioSampleRate_e32KHz = (1 << 0), /**<32 kHz (mandatory) */ - EDID_AudioSampleRate_e44KHz = (1 << 1), /**<44.1 kHz (mandatory) */ - EDID_AudioSampleRate_e48KHz = (1 << 2), /**<48kHz (mandatory) */ - EDID_AudioSampleRate_e88KHz = (1 << 3), /**<88.2 kHz */ - EDID_AudioSampleRate_e96KHz = (1 << 4), /**<96kHz */ - EDID_AudioSampleRate_e176KHz = (1 << 5), /**<176.4 kHz */ - EDID_AudioSampleRate_e192KHz = (1 << 6) /**<192 kHz */ -} EDID_AudioSampleRate; - -/** - * Audio sample sizes (L-PCM) as specified in CEA Short Audio Descriptors - */ -typedef enum { - EDID_AudioSampleSize_refertoheader = 0x0, /**<Only used in audio infoframe */ - EDID_AudioSampleSize_16bit = 0x1, /**<16-bit samples (mandatory) */ - EDID_AudioSampleSize_20bit = 0x2, /**<20-bit samples */ - EDID_AudioSampleSize_24bit = 0x4 /**<24-bit samples */ -} EDID_AudioSampleSize; - -/** - * LFE feedback level as described in audio db - */ -typedef enum { - EDID_AudioLFEFB_UNKNOWN = 0x0, /**<Refer to other information */ - EDID_AudioLFEFB_0dB = 0x1, /**<0dB - same level as other channels */ - EDID_AudioLFEFB_10dB = 0x2 /**<+10dB relative to other channels */ -} EDID_AudioLFEFB; - -/** - * All possible 3D structures - * to be used in decoded 3D modes (e.g. HDMI_3D_SUPPORTED_MODE) - */ -typedef enum { - HDMI_3D_STRUCT_NONE = 0, - HDMI_3D_STRUCT_FRAME_PACKING = (1<<0), - HDMI_3D_STRUCT_FIELD_ALTERNATIVE = (1<<1), - HDMI_3D_STRUCT_LINE_ALTERNATIVE = (1<<2), - HDMI_3D_STRUCT_SIDE_BY_SIDE_FULL = (1<<3), - HDMI_3D_STRUCT_L_DEPTH = (1<<4), - HDMI_3D_STRUCT_L_DEPTH_GRAPHICS_GRAPHICS_DEPTH = (1<<5), - HDMI_3D_STRUCT_TOP_AND_BOTTOM = (1<<6), - HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_HORIZONTAL = (1<<7), - HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_ODD_LEFT_ODD_RIGHT = (1<<8), - HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_ODD_LEFT_EVEN_RIGHT = (1<<9), - HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_EVEN_LEFT_ODD_RIGHT = (1<<10), - HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_EVEN_LEFT_EVEN_RIGHT = (1<<11), - HDMI_3D_STRUCT_FRAME_SEQUENTIAL = (1<<12), -} HDMI_3D_STRUCT_T; - -/** - * HDMI notifications (defined as a bit mask to be conveniently returned as a state), - * make sure this does not clash with the values in vc_sdtv.h - * SDTV notifications start at bit 16. - * These values are returned by the TV service in a callback. - */ -typedef enum { - VC_HDMI_UNPLUGGED = (1 << 0), /**<HDMI cable is detached */ - VC_HDMI_ATTACHED = (1 << 1), /**<HDMI cable is attached but not powered on */ - VC_HDMI_DVI = (1 << 2), /**<HDMI is on but in DVI mode (no audio) */ - VC_HDMI_HDMI = (1 << 3), /**<HDMI is on and HDMI mode is active */ - VC_HDMI_HDCP_UNAUTH = (1 << 4), /**<HDCP authentication is broken (e.g. Ri mismatched) or not active */ - VC_HDMI_HDCP_AUTH = (1 << 5), /**<HDCP is active */ - VC_HDMI_HDCP_KEY_DOWNLOAD = (1 << 6), /**<HDCP key download successful/fail */ - VC_HDMI_HDCP_SRM_DOWNLOAD = (1 << 7), /**<HDCP revocation list download successful/fail */ - VC_HDMI_CHANGING_MODE = (1 << 8), /**<HDMI is starting to change mode, clock has not yet been set */ - -} VC_HDMI_NOTIFY_T; -#define VC_HDMI_STANDBY (VC_HDMI_ATTACHED) /* For backward code compatibility */ - -/** - * Callback reason and arguments from HDMI middleware - * Each callback comes with two optional uint32_t parameters. - * Reason param1 param2 remark - * VC_HDMI_UNPLUGGED - - cable is unplugged - * VC_HDMI_STANDBY CEA/DMT mode code cable is plugged in and peripheral powered off (preferred mode sent back if available) - * VC_HDMI_DVI CEA/DMT mode code DVI mode is active at said resolution - * VC_HDMI_HDMI CEA(3D)/DMT mode code HDMI mode is active at said resolution (in 3D mode if CEA3D) - * VC_HDMI_HDCP_UNAUTH HDCP_ERROR_T retry? HDCP is inactive, the error can be none if we actively disable HDCP, if retry is non-zero, HDCP will attempt to reauthenticate - * VC_HDMI_HDCP_AUTH - - HDCP is active - * VC_HDMI_HDCP_KEY_DOWNLOAD success? - HDCP key download success (zero) or not (non zero) - * VC_HDMI_HDCP_SRM_DOWNLOAD no. of keys - HDCP revocation list download set no. of keys (zero means failure) - * VC_HDMI_CHANGING_MODE 0 0 No information is supplied in this callback - */ - -/* Some constants which are required on host side */ -#define HDCP_KEY_BLOCK_SIZE 328 /* KSV, padding, device keys and hash. */ -#define HDCP_KSV_LENGTH 5 -#define HDCP_MAX_DEVICE 127 /* Max. number of HDCP downstream device supported */ -#define HDCP_MAX_DEPTH 7 /* Max. number of levels HDCP 1.x can have */ -#define EDID_BLOCKSIZE 128 -#define HDMI_NUM_PACKET_BYTES 28 /* Size of HDMI infoframes minus the header */ -#define HDMI_MAX_EXPLICIT_3D_MODES 31 /* The number of explicit 3D modes is stored in 5 bits */ -#define EDID_MONITOR_DESC_SIZE 18 /* Size of detailed timing descriptor in EDID */ -#define EDID_DESC_HEADER_LEN 5 /* Size of detailed timing descriptor header in EDID */ -#define EDID_DESC_ASCII_STRING_LEN (EDID_MONITOR_DESC_SIZE - EDID_DESC_HEADER_LEN) -#define EDID_DEVICE_VENDOR_ID_LENGTH 3 /* Expanded Device Vendor ID length in EDID */ - -/* All CEC related constants now reside in vc_cec.h */ - -/** - * General callback function for both HDMI and HDCP middleware - * reason is the notification nature - * param1 and param2 have different meanings depending on the notification (see above) - * - * @param client_p is the callback context - * - * @param reason is the callback reason - * - * @param param1 is the first callback argument (meaning as above) - * - * @param param2 is the second callback argument (meaning as above) - * - * @return void - */ -typedef void (*HDMI_CALLBACK_T)(void *client_p, VC_HDMI_NOTIFY_T reason, uint32_t param1, uint32_t param2); - -/* TV service error return code */ -typedef enum { - VC_HDMI_SUCCESS = 0, /** OK */ - VC_HDMI_ERROR_FORMAT_UNSUPPORTED = 1, /** format not supported */ - VC_HDMI_ERROR_INVALID_FORMAT = 2, /** invalid format */ - VC_HDMI_ERROR_INVALID_PROPERTY = 3, /** invalid property */ - VC_HDMI_ERROR_OUT_OF_RANGE = 4, /** invalid values passed to set property */ - VC_HDMI_ERROR_INVALID_INFOFRAME = 5, /** invalid infoframe */ -} VC_HDMI_ERROR_T; - -/* Defines for backward code compatibilty (these were originally in hdmi.h) */ -typedef VC_HDMI_ERROR_T HDMI_RESULT_T; -#define HDMI_RESULT_SUCCESS (VC_HDMI_SUCCESS) -#define HDMI_RESULT_FAILED (VC_HDMI_ERROR_FORMAT_UNSUPPORTED) - -#endif diff --git a/vc/include/interface/vmcs_host/vc_hdmi_property.h b/vc/include/interface/vmcs_host/vc_hdmi_property.h @@ -1,137 +0,0 @@ -/* -Copyright (c) 2012 Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * This file contains all the properties one can set in HDMI - * Each property has up to two parameters corresponding to list of enums one can set via - * the set/get property function from TV service (HOST) or HDMI middleware API (Videocore) - * Each property also has a default value for these parameters. Please refer to - * individual properties for details. - */ - -#ifndef _VC_HDMI_PROPERTY_H_ -#define _VC_HDMI_PROPERTY_H_ -#include "vcinclude/common.h" - -/** - * Property type - */ -typedef enum { - HDMI_PROPERTY_PIXEL_ENCODING = 0, /**< Set pixel encoding, value of property is HDMI_PIXEL_ENCODING_T, default is RGB full range (unless it is not supported) */ - HDMI_PROPERTY_PIXEL_CLOCK_TYPE = 1, /**< See HDMI_PIXEL_CLOCK_TYPE_T, default is HDMI_PIXEL_CLOCK_TYPE_PAL */ - HDMI_PROPERTY_CONTENT_TYPE = 2, /**< Set content type flag EDID_ContentType_T */ - HDMI_PROPERTY_FUZZY_MATCH = 3, /**< disable (0 - default) or enable (1) fuzzy format match */ - HDMI_PROPERTY_3D_STRUCTURE = 4, /**< Set the 3D structure of the next HDMI power on (only for CEA mode) */ - - //More properties to be added here - HDMI_PROPERTY_MAX /**< place holder */ -} HDMI_PROPERTY_T; - -/** - * Setting/getting a property - */ -typedef struct { - HDMI_PROPERTY_T property; - uint32_t param1; - uint32_t param2; - //More fields may be added here if required in future -} HDMI_PROPERTY_PARAM_T; - -/** - * PIXEL_ENCODING: param1: encoding type, param2: n/a - * Setting encoding type is subjected to support in EDID - */ -typedef enum { - HDMI_PIXEL_ENCODING_DEFAULT = 0, /**<Default, note that CEA modes (except VGA) default to RGB limited but DMT modes default to RGB full */ - HDMI_PIXEL_ENCODING_RGB_LIMITED, - HDMI_PIXEL_ENCODING_RGB_FULL, - HDMI_PIXEL_ENCODING_YCbCr444_LIMITED, - HDMI_PIXEL_ENCODING_YCbCr444_FULL, - /** YCbCr 422 are not used at the moment */ - HDMI_PIXEL_ENCODING_YCbCr422_LIMITED, - HDMI_PIXEL_ENCODING_YCbCr422_FULL, - HDMI_PIXEL_ENCODING_MAX /**<place holder */ -} HDMI_PIXEL_ENCODING_T; - -/** - * PIXEL_CLOCK_TYPE: param1: pixel clock type, param2: n/a - * Pixel clock nudge factor (set pixel clock type) - */ -typedef enum { - HDMI_PIXEL_CLOCK_TYPE_PAL = 0, /**< Use norminal pixel clock (default) */ - HDMI_PIXEL_CLOCK_TYPE_NTSC = 1, /**< Multiply norminal pixel clock by 1000/1001 to get the alternative frame rate e.g. 59.94Hz rather than 60, not applicable to all formats */ - HDMI_PIXEL_CLOCK_TYPE_MAX /**< place holder */ -} HDMI_PIXEL_CLOCK_TYPE_T; - -/** - * Content type: param1: EDID content type, param2: n/a - */ -/** - * Content type: the enum is the actual value in AVI infoframe + 1 - * because NODATA and Graphics both have value zero - */ -typedef enum { - EDID_ContentType_NODATA = 0x0, /**<Content type none */ - EDID_ContentType_Graphics = 0x1, /**<Graphics, ITC must be set to 1 */ - EDID_ContentType_Photo = 0x2, /**<Photo */ - EDID_ContentType_Cinema = 0x3, /**<Cinema */ - EDID_ContentType_Game = 0x4, /**<Game */ - EDID_ContentType_MAX /**<place holder */ -} EDID_ContentType_T; - -/** - * Fuzzy match: param1 zero (disabled) or non-zero (enabled), param2: n/a - * If enabled, match format in EDID based on resolutions and formats only - * Default is zero (disabled, so match on blanking periods and pixel clock) - * Set to non-zero to enable fuzzy match - */ -typedef enum { - EDID_FUZZY_MATCH_DISABLED = 0x0, - EDID_FUZZY_MATCH_ENABLED = 0x1, - EDID_FUZZY_MATCH_MAX -} EDID_FuzzyMatch_T; - -/** - * 3D structure: param1 - 3D structure (e.g. top/bottom side by side) (default value is none, i.e. 2D) - * param2 - n/a at the moment, may be used in the future - * - * 3D structure is auto reset to "2D" every time HDMI is power on. Only affect CEA formats. - */ -/* - * Matched to the 3d struct bit fields stored internally to represent 3D support in EDID - */ -typedef enum { - HDMI_3D_FORMAT_NONE = 0, /**<plain and simple 2D! */ - HDMI_3D_FORMAT_SBS_HALF = (1<<7), /**<side by side half horizontal */ - HDMI_3D_FORMAT_TB_HALF = (1<<6), /**<top and bottom half vertical */ - HDMI_3D_FORMAT_FRAME_PACKING = (1<<8), /**<frame packed */ - HDMI_3D_FORMAT_FRAME_SEQUENTIAL = (1<<9), /**<Output left on even frames and right on odd frames (typically 120Hz)*/ - /* More 3D structs, e.g. full frame packing, may be added here */ - HDMI_3D_FORMAT_INVALID = 0xFFFF -} HDMI_3D_FORMAT_T; - -#endif //_VC_HDMI_PROPERTY_H_ diff --git a/vc/include/interface/vmcs_host/vc_hostreq_defs.h b/vc/include/interface/vmcs_host/vc_hostreq_defs.h @@ -1,166 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_HOSTREQ_DEFS_H -#define VC_HOSTREQ_DEFS_H - -#include "vcinclude/common.h" - -#define VC_HOSTREQ_VER 1 - -/* Types and constants common across the both ends of the interface */ -#define VC_HRMAX_CMD_DATA 512 -#define VC_HRMAX_VIBRATOR_SEQ (VC_HRMAX_CMD_DATA/4) - -typedef unsigned int keys_t; -typedef unsigned int led_t; - -/* Error codes used in responses and in the API */ -enum -{ - VC_HRERR_OK = 0, /* Success */ - VC_HRERR_NOTREADY = 1, - VC_HRERR_UNSUPPORTED = 10, /* Unsupported or inappropriate request */ - VC_HRERR_MEMADDR = 20, /* Trying to read protected host memory */ -}; - -/* Key bit enumerations */ -typedef enum -{ - // ENTRIES MUST ONLY BE ADDED TO THE END OF THIS ENUM LIST - - VC_KEY_0 = (1<<0), - VC_KEY_1 = (1<<1), - VC_KEY_2 = (1<<2), - VC_KEY_3 = (1<<3), - VC_KEY_4 = (1<<4), - VC_KEY_5 = (1<<5), - VC_KEY_6 = (1<<6), - VC_KEY_7 = (1<<7), - VC_KEY_8 = (1<<8), - VC_KEY_9 = (1<<9), - VC_KEY_UP = (1<<10), - VC_KEY_DOWN = (1<<11), - VC_KEY_LEFT = (1<<12), - VC_KEY_RIGHT = (1<<13), - VC_KEY_ENTER = (1<<14), - VC_KEY_SEND = (1<<15), - VC_KEY_END = (1<<16), - VC_KEY_MENU = (1<<17), - VC_KEY_VOLUP = (1<<18), - VC_KEY_VOLDOWN = (1<<19), - VC_KEY_STAR = (1<<20), - VC_KEY_HASH = (1<<21), - VC_KEY_CANCEL = (1<<22), - VC_KEY_CAMERA = (1<<23), - VC_KEY_RECORD = (1<<24), - VC_KEY_INFO = (1<<25), - VC_KEY_DVB = (1<<26), - VC_KEY_ANY = (1<<27)-1 // change this if any more keys are added -} VC_HOSTKEYS_T; - -/* Add notify events here */ -typedef enum -{ - // ENTRIES MUST ONLY BE ADDED TO THE END OF THIS ENUM LIST - - VC_HRNOTIFY_START = 0, - VC_HRNOTIFY_GAME_ACCEPT, - VC_HRNOTIFY_GAME_REJECT, - VC_HRNOTIFY_GAME_SAVE, - VC_HRNOTIFY_GAME_LOAD, - VC_HRNOTIFY_GAME_EXIT, - VC_HRNOTIFY_MELODY_END, - VC_HRNOTIFY_DISK_INSERTED, - VC_HRNOTIFY_DISK_REMOVED, - VC_HRNOTIFY_RINGTONE_END, - VC_HRNOTIFY_KEYTONE_END, - VC_HRNOTIFY_GAME_ABORT, - VC_HRNOTIFY_PCM_END, - VC_HRNOTIFY_FS_INUSE, - VC_HRNOTIFY_FS_NOT_INUSE, - VC_HRNOTIFY_APP_STATUS, /* app's status has changed (excluding things like elapsed times) - mainly errors or status changed */ - VC_HRNOTIFY_CAMERA_EVENT, - VC_HRNOTIFY_END - -} VC_HRNOTIFY_T; - -//typedef of the callback from a HRNOTIFY function -typedef void (* VC_HRNOTIFY_CALLBACK_T)( const VC_HRNOTIFY_T notify_event, const uint32_t param ); - -//typedef of the callback from a RENDERTEXT/CONGIFTEXT/LINKDATA/DMB* function -typedef void (* VC_HRDATA_CALLBACK_T)( int cmd, void *userdata, uint8_t *data, int len ); - -/* Enum host request commands here rather than in vcinterface */ -/* - NB There is overlap of command enumerations with other services - - but this does not matter -*/ -enum -{ - // ENTRIES MUST ONLY BE ADDED TO THE END OF THIS ENUM LIST - - /* Host request service commands, vc->host */ - VC_HOSTREQ_RESET = 64, - VC_HOSTREQ_CAPTUREKEYS, - VC_HOSTREQ_VIBRATORPLAY, - VC_HOSTREQ_VIBRATORSTOP, - VC_HOSTREQ_KEYLIGHT, - VC_HOSTREQ_SETLEDS, - VC_HOSTREQ_TIME, - VC_HOSTREQ_NOTIFY, - VC_HOSTREQ_READMEM, - VC_HOSTREQ_CONFIGTEXT, - VC_HOSTREQ_RENDERTEXT, - VC_HOSTREQ_LINKDATA, - VC_HOSTREQ_MALLOC, - VC_HOSTREQ_FREE, - VC_HOSTREQ_MEMMOVE, - VC_HOSTREQ_WRITEMEM, - VC_HOSTREQ_KEYIN, - VC_HOSTREQ_DISPLAYDEV, - VC_HOSTREQ_ACCESSURL, - VC_HOSTREQ_DMB_FIC, - VC_HOSTREQ_DMB_PAD, - VC_HOSTREQ_DMB_DATA, - VC_HOSTREQ_READMEM_3D, - VC_HOSTREQ_SEND_PCM, - VC_HOSTREQ_AUDIODEVREQUEST, - VC_HOSTREQ_AUDIODEVCONFIG, - VC_HOSTREQ_AUDIODEVRELEASE, - VC_HOSTREQ_PHOTOROW, - VC_HOSTREQ_COPYCONTROL, - VC_HOSTREQ_READPIXELS, /* Batch read of photo data from host */ - VC_HOSTREQ_REPORT_AV_STATS, - VC_HOSTREQ_GPIO, - - /* Host request service key messages */ - VC_HOSTREQ_KEYEVENT = 96, - VC_HOSTREQ_KEYACK -}; - -#endif diff --git a/vc/include/interface/vmcs_host/vc_ilcs_defs.h b/vc/include/interface/vmcs_host/vc_ilcs_defs.h @@ -1,288 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenMAX IL Component Service definitions - -#ifndef VC_ILCS_DEFS_H -#define VC_ILCS_DEFS_H - -#define VC_ILCS_VERSION 1 - -#ifdef USE_VCHIQ_ARM -#include "interface/vchiq_arm/vchiq.h" -#else -#include "interface/vchiq/vchiq.h" -#endif - -typedef enum { - IL_RESPONSE, - IL_CREATE_COMPONENT, - - IL_GET_COMPONENT_VERSION, - IL_SEND_COMMAND, - IL_GET_PARAMETER, - IL_SET_PARAMETER, - IL_GET_CONFIG, - IL_SET_CONFIG, - IL_GET_EXTENSION_INDEX, - IL_GET_STATE, - IL_COMPONENT_TUNNEL_REQUEST, - IL_USE_BUFFER, - IL_USE_EGL_IMAGE, - IL_ALLOCATE_BUFFER, - IL_FREE_BUFFER, - IL_EMPTY_THIS_BUFFER, - IL_FILL_THIS_BUFFER, - IL_SET_CALLBACKS, - IL_COMPONENT_ROLE_ENUM, - - IL_COMPONENT_DEINIT, - - IL_EVENT_HANDLER, - IL_EMPTY_BUFFER_DONE, - IL_FILL_BUFFER_DONE, - - IL_COMPONENT_NAME_ENUM, - IL_GET_DEBUG_INFORMATION, - - IL_SERVICE_QUIT, - IL_FUNCTION_MAX_NUM, - IL_FUNCTION_MAX = 0x7fffffff -} IL_FUNCTION_T; - - -// size of the largest structure passed by get/set -// parameter/config -// this should be calculated at compile time from IL headers -// must be a multiple of VC_INTERFACE_BLOCK_SIZE -#define VC_ILCS_MAX_PARAM_SIZE 288 - -// size of the largest structure below -#define VC_ILCS_MAX_CMD_LENGTH (sizeof(IL_GET_EXECUTE_T)) - -#define VC_ILCS_MAX_INLINE (VCHIQ_SLOT_SIZE-8-16) - -// all structures should be padded to be multiples of -// VC_INTERFACE_BLOCK_SIZE in length (currently 16) -typedef struct { - void *reference; -} IL_EXECUTE_HEADER_T; - -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; -} IL_RESPONSE_HEADER_T; - -// create instance -typedef struct { - OMX_PTR mark; - char name[256]; -} IL_CREATE_COMPONENT_EXECUTE_T; - -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - void *reference; - OMX_U32 numPorts; - OMX_U32 portDir; - OMX_U32 portIndex[32]; -} IL_CREATE_COMPONENT_RESPONSE_T; - -// set callbacks -typedef struct { - void *reference; - void *pAppData; -} IL_SET_CALLBACKS_EXECUTE_T; - -// get state -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - OMX_STATETYPE state; -} IL_GET_STATE_RESPONSE_T; - -// get parameter & get config -#define IL_GET_EXECUTE_HEADER_SIZE 8 -typedef struct { - void *reference; - OMX_INDEXTYPE index; - unsigned char param[VC_ILCS_MAX_PARAM_SIZE]; -} IL_GET_EXECUTE_T; - -#define IL_GET_RESPONSE_HEADER_SIZE 8 -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - unsigned char param[VC_ILCS_MAX_PARAM_SIZE]; -} IL_GET_RESPONSE_T; - -// set parameter & set config -#define IL_SET_EXECUTE_HEADER_SIZE 8 -typedef struct { - void *reference; - OMX_INDEXTYPE index; - unsigned char param[VC_ILCS_MAX_PARAM_SIZE]; -} IL_SET_EXECUTE_T; - -// send command -typedef struct { - void *reference; - OMX_COMMANDTYPE cmd; - OMX_U32 param; - OMX_MARKTYPE mark; -} IL_SEND_COMMAND_EXECUTE_T; - -// event handler callback -typedef struct { - void *reference; - OMX_EVENTTYPE event; - OMX_U32 data1; - OMX_U32 data2; - OMX_PTR eventdata; -} IL_EVENT_HANDLER_EXECUTE_T; - -// use/allocate buffer -typedef struct { - void *reference; - OMX_PTR bufferReference; - OMX_U32 port; - OMX_U32 size; - void *eglImage; -} IL_ADD_BUFFER_EXECUTE_T; - -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - OMX_PTR reference; - OMX_BUFFERHEADERTYPE bufferHeader; -} IL_ADD_BUFFER_RESPONSE_T; - -// free buffer -typedef struct { - void *reference; - OMX_U32 port; - OMX_PTR bufferReference; - IL_FUNCTION_T func; - OMX_PTR inputPrivate; - OMX_PTR outputPrivate; -} IL_FREE_BUFFER_EXECUTE_T; - -// empty/fill this buffer -typedef enum { - IL_BUFFER_NONE, - IL_BUFFER_BULK, - IL_BUFFER_INLINE, - IL_BUFFER_MAX = 0x7fffffff -} IL_BUFFER_METHOD_T; - -#define IL_BUFFER_BULK_UNALIGNED_MAX (32) // This value needs to be the same on voth VC and HOST. - // Here, we just manually set it to the max of VCHI_BULK_ALIGN on VC and HOST. -#if ( VCHI_BULK_ALIGN > IL_BUFFER_BULK_UNALIGNED_MAX ) - #error "VCHI_BULK_ALIGN > IL_BUFFER_BULK_UNALIGNED_MAX. Just set max higher on both VC and HOST so there's space to put the unaligned bytes." -#endif -typedef struct { - OMX_U8 header[IL_BUFFER_BULK_UNALIGNED_MAX-1]; - OMX_U8 headerlen; - OMX_U8 trailer[IL_BUFFER_BULK_UNALIGNED_MAX-1]; - OMX_U8 trailerlen; -} IL_BUFFER_BULK_T; - -typedef struct { - OMX_U8 buffer[1]; -} IL_BUFFER_INLINE_T; - -typedef struct { - void *reference; - OMX_BUFFERHEADERTYPE bufferHeader; - IL_BUFFER_METHOD_T method; - OMX_U32 bufferLen; -} IL_PASS_BUFFER_EXECUTE_T; - -// get component version -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - char name[128]; - OMX_VERSIONTYPE component_version; - OMX_VERSIONTYPE spec_version; - OMX_UUIDTYPE uuid; -} IL_GET_VERSION_RESPONSE_T; - -// get extension index -typedef struct { - void *reference; - char name[128]; -} IL_GET_EXTENSION_EXECUTE_T; - -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - OMX_INDEXTYPE index; -} IL_GET_EXTENSION_RESPONSE_T; - -// component role enum -typedef struct { - void *reference; - OMX_U32 index; -} IL_COMPONENT_ROLE_ENUM_EXECUTE_T; - -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - OMX_U8 role[128]; -} IL_COMPONENT_ROLE_ENUM_RESPONSE_T; - -typedef struct { - void *reference; - OMX_U32 port; - OMX_PTR tunnel_ref; // reference to use in requests - address of host/vc component - OMX_BOOL tunnel_host; // whether tunnel_ref is a host component - OMX_U32 tunnel_port; - OMX_TUNNELSETUPTYPE setup; -} IL_TUNNEL_REQUEST_EXECUTE_T; - -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - OMX_TUNNELSETUPTYPE setup; -} IL_TUNNEL_REQUEST_RESPONSE_T; - -typedef struct { - int index; -} IL_COMPONENT_NAME_ENUM_EXECUTE_T; - -typedef struct { - IL_FUNCTION_T func; - OMX_ERRORTYPE err; - OMX_U8 name[128]; -} IL_COMPONENT_NAME_ENUM_RESPONSE_T; - -typedef struct { - OMX_S32 len; -} IL_GET_DEBUG_INFORMATION_EXECUTE_T; - -#endif // VC_ILCS_DEFS_H diff --git a/vc/include/interface/vmcs_host/vc_imageconv_defs.h b/vc/include/interface/vmcs_host/vc_imageconv_defs.h @@ -1,51 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#ifndef IMAGECONV_DEFS_H -#define IMAGECONV_DEFS_H - -/** Statistics for image conversion to foreign image types - */ -typedef struct -{ - uint32_t magic; - uint32_t size; /**< Size of this structure, in bytes */ - uint32_t conversions; /**< Total conversions so far */ - uint32_t duplicate_conversions; /**< Duplicate conversions (same image twice) */ - uint32_t size_requests; /**< Num calls to get_converted_size */ - uint32_t consumed_count; /**< How many converted images were consumed */ - uint32_t failures; /**< Failed conversions */ - uint32_t time_spent; /**< Time spent converting, us */ - uint32_t max_vrf_delay; /**< The max time waiting for the VRF */ - uint32_t vrf_wait_time; /**< Total time waiting for the VRF */ - uint32_t last_mem_handle; /**< Last mem handle converted */ - uint32_t first_image_ts; /**< Timestamp of first image */ - uint32_t last_image_ts; /**< Timestamp of first image */ - uint32_t max_delay; /**< Jitter */ -} IMAGECONV_STATS_T; - -#define IMAGECONV_STATS_MAGIC 0x494D454C -#endif diff --git a/vc/include/interface/vmcs_host/vc_sdtv.h b/vc/include/interface/vmcs_host/vc_sdtv.h @@ -1,145 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * SDTV common host header for TV service - */ - -#ifndef _VC_SDTV_H_ -#define _VC_SDTV_H_ - -/** Different SDTV modes */ -/** colour */ -typedef enum SDTV_COLOUR_ -{ - SDTV_COLOUR_UNKNOWN = 0x0, - SDTV_COLOUR_RGB = 0x4, - SDTV_COLOUR_YPRPB = 0x8, - SDTV_COLOUR_FORCE_32BIT = 0x80000000 -} SDTV_COLOUR_T; -/** operation mode */ -typedef enum SDTV_MODE_T_ -{ - SDTV_MODE_NTSC = 0, /**<Normal NTSC */ - SDTV_MODE_NTSC_J = 1, /**<Japanese version of NTSC - no pedestal.*/ - SDTV_MODE_PAL = 2, /**<Normal PAL */ - SDTV_MODE_PAL_M = 3, /**<Brazilian version of PAL - 525/60 rather than 625/50, different subcarrier */ - SDTV_MODE_FORMAT_MASK = 0x3, - - SDTV_MODE_OUTPUT_MASK = 0xc, - - SDTV_MODE_YPRPB_480i = (SDTV_MODE_NTSC | SDTV_COLOUR_YPRPB), - SDTV_MODE_RGB_480i = (SDTV_MODE_NTSC | SDTV_COLOUR_RGB), - SDTV_MODE_YPRPB_576i = (SDTV_MODE_PAL | SDTV_COLOUR_YPRPB), - SDTV_MODE_RGB_576i = (SDTV_MODE_PAL | SDTV_COLOUR_RGB), - - SDTV_MODE_OFF = 0xf0, - SDTV_MODE_FORCE_32BIT = 0x80000000 -} SDTV_MODE_T; - -/** Different aspect ratios */ -typedef enum SDTV_ASPECT_T_ -{ - // TODO: extend this to allow picture placement/size to be communicated. - SDTV_ASPECT_UNKNOWN = 0, /**<Unknown */ - SDTV_ASPECT_4_3 = 1, /**<4:3 */ - SDTV_ASPECT_14_9 = 2, /**<14:9 */ - SDTV_ASPECT_16_9 = 3, /**<16:9 */ - SDTV_ASPECTFORCE_32BIT = 0x80000000 -} SDTV_ASPECT_T; - -/** SDTV power on option */ -typedef struct SDTV_OPTIONS_T_ -{ - SDTV_ASPECT_T aspect; -} SDTV_OPTIONS_T; - -/** - * Different copy protection modes - * At the moment we have only implemented Macrovision - */ -typedef enum -{ - SDTV_CP_NONE = 0, /**<No copy protection */ - SDTV_CP_MACROVISION_TYPE1 = 1, /**<Macrovision Type 1 */ - SDTV_CP_MACROVISION_TYPE2 = 2, /**<Macrovision Type 2 */ - SDTV_CP_MACROVISION_TYPE3 = 3, /**<Macrovision Type 3 */ - SDTV_CP_MACROVISION_TEST1 = 4, /**<Macrovision Test 1 */ - SDTV_CP_MACROVISION_TEST2 = 5, /**<Macrovision Test 2 */ - SDTV_CP_CGMS_COPYFREE = 6, /**<CGMS copy freely */ - SDTV_CP_CGMS_COPYNOMORE = 7, /**<CGMS copy no more */ - SDTV_CP_CGMS_COPYONCE = 8, /**<CGMS copy once */ - SDTV_CP_CGMS_COPYNEVER = 9, /**<CGMS copy never */ - SDTV_CP_WSS_COPYFREE = 10, /**<WSS no restriction */ - SDTV_CP_WSS_COPYRIGHT_COPYFREE = 11, /**<WSS copyright asserted */ - SDTV_CP_WSS_NOCOPY = 12, /**<WSS copying restricted */ - SDTV_CP_WSS_COPYRIGHT_NOCOPY = 13, /**<WSS copying restriced, copyright asserted */ - SDTV_CP_FORCE_32BIT = 0x80000000 -} SDTV_CP_MODE_T; - -/** - * SDTV internal state - */ -typedef struct { - uint32_t state; - uint32_t width; - uint32_t height; - uint16_t frame_rate; - uint16_t scan_mode; - SDTV_MODE_T mode; - SDTV_OPTIONS_T display_options; - SDTV_COLOUR_T colour; - SDTV_CP_MODE_T cp_mode; -} SDTV_DISPLAY_STATE_T; - -/** - * SDTV notifications - */ -typedef enum -{ - VC_SDTV_UNPLUGGED = 1 << 16, /**<SDTV cable unplugged, subject to platform support */ - VC_SDTV_ATTACHED = 1 << 17, /**<SDTV cable is plugged in */ - VC_SDTV_NTSC = 1 << 18, /**<SDTV is in NTSC mode */ - VC_SDTV_PAL = 1 << 19, /**<SDTV is in PAL mode */ - VC_SDTV_CP_INACTIVE = 1 << 20, /**<Copy protection disabled */ - VC_SDTV_CP_ACTIVE = 1 << 21 /**<Copy protection enabled */ -} VC_SDTV_NOTIFY_T; -#define VC_SDTV_STANDBY (VC_SDTV_ATTACHED) /* For backward code compatibility, to be consistent with HDMI */ - -/** - * Callback reason and arguments from vec middleware - * Each callback comes with two optional uint32_t parameters. - * Reason param1 param2 remark - * VC_SDTV_UNPLUGGED - - cable is unplugged - * VC_SDTV_STANDBY - - cable is plugged in - * VC_SDTV_NTSC SDTV_MODE_T SDTV_ASPECT_T NTSC mode active with said aspect ratio - * VC_SDTV_PAL SDTV_MODE_T SDTV_ASPECT_T PAL mode active with said aspect ratio - * VC_SDTV_CP_INACTIVE - - copy protection is inactive - * VC_SDTV_CP_ACTIVE SDTV_CP_MODE_T - copy protection is active - */ - -#endif diff --git a/vc/include/interface/vmcs_host/vc_service_common.h b/vc/include/interface/vmcs_host/vc_service_common.h @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2012 Broadcom Europe Ltd -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * Common definitions for services - */ - -#ifndef _VC_SERVICE_COMMON_DEFS_H_ -#define _VC_SERVICE_COMMON_DEFS_H_ -#include "vcinclude/common.h" -//Map VCHI return value to internal error code -//VCHI return +1 for retry so we will map it to -2 to allow -//servers to use positive values to indicate alternative return values -typedef enum { - VC_SERVICE_VCHI_SUCCESS = 0, - VC_SERVICE_VCHI_VCHIQ_ERROR = -1, - VC_SERVUCE_VCHI_RETRY = -2, - VC_SERVICE_VCHI_UNKNOWN_ERROR -} VC_SERVICE_VCHI_STATUS_T; - -extern VC_SERVICE_VCHI_STATUS_T vchi2service_status(int32_t x); -extern const char* vchi2service_status_string(VC_SERVICE_VCHI_STATUS_T status); - -#endif //#ifndef _VC_SERVICE_COMMON_DEFS_H_ diff --git a/vc/include/interface/vmcs_host/vc_tvservice.h b/vc/include/interface/vmcs_host/vc_tvservice.h @@ -1,524 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * TV service host API, - * See vc_hdmi.h for HDMI related constants - * See vc_sdtv.h for SDTV related constants - */ - -#ifndef _VC_TVSERVICE_H_ -#define _VC_TVSERVICE_H_ - -#include "vcinclude/common.h" -#include "interface/vcos/vcos.h" -#include "interface/vchi/vchi.h" -#include "interface/vmcs_host/vc_tvservice_defs.h" -#include "interface/vmcs_host/vc_hdmi.h" -#include "interface/vmcs_host/vc_sdtv.h" - -/** - * \file - * - * This API defines the controls for both HDMI and analogue TVs. It allows - * the user to dynamically switch between HDMI and SDTV without having - * to worry about switch one off before turning the other on. It also - * allows the user to query the supported HDMI resolutions and audio - * formats and turn on/off copy protection. - * - * There are three ways to turn on HDMI: preferred mode; best matched mode - * and explicit mode. See the three power on functions for details. - */ - -/** - * TVSERVICE_CALLBACK_T is the callback function for host side notification. - * Host applications register a single callback for all TV related notifications. - * See <DFN>VC_HDMI_NOTIFY_T</DFN> and <DFN>VC_SDTV_NOTIFY_T</DFN> in vc_hdmi.h and vc_sdtv.h - * respectively for list of reasons and respective param1 and param2 - * - * @param callback_data is the context passed in during the call to vc_tv_register_callback - * - * @param reason is the notification reason - * - * @param param1 is the first optional parameter - * - * @param param2 is the second optional parameter - * - * @return void - */ -typedef void (*TVSERVICE_CALLBACK_T)(void *callback_data, uint32_t reason, uint32_t param1, uint32_t param2); - -/* API at application start time */ -/** - * <DFN>vc_vchi_tv_init</DFN> is called at the beginning of the application - * to initialise the client to TV service - * - * @param initialise_instance is the VCHI instance - * - * @param array of pointers of connections - * - * @param number of connections (currently this is always <DFN>1</DFN> - * - * @return Zero is successful A negative return value indicates failure (which may mean it has not been started on VideoCore). - */ -VCHPRE_ int vc_vchi_tv_init(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections ); - -/** - * <DFN>vc_vchi_tv_stop</DNF> is called to stop the host side of TV service. - * - * @param none - * - * @return void - */ -VCHPRE_ void vc_vchi_tv_stop( void ); - -/** - * Host applications should call <DFN>vc_tv_register_callback</DNF> at - * the beginning to register a callback function to handle all notifications. - * See <DFN>TVSERVICE_CALLBACK_T </DFN> - * - * @param callback function - * - * @param callback_data is the context to be passed when function is called - * - * @return void - */ -VCHPRE_ void vc_tv_register_callback(TVSERVICE_CALLBACK_T callback, void *callback_data); - -/** - * <DFN>vc_tv_unregister_callback</DNF> removes a function registered with - * <DFN>vc_tv_register_callback</DNF> from the list of callbacks. - * - * @param callback function - * - * @return void - */ -VCHPRE_ void vc_tv_unregister_callback(TVSERVICE_CALLBACK_T callback); - -/** - * <DFN>vc_tv_unregister_callback</DNF> removes a function registered with - * <DFN>vc_tv_register_callback</DNF> from the list of callbacks. - * In contrast to vc_tv_unregister_callback this one matches not only the - * function pointer but also the data pointer before removal. - * - * @param callback function - * - * @return void - */ -VCHPRE_ void vc_tv_unregister_callback_full(TVSERVICE_CALLBACK_T callback, void *callback_data); - -/** - * In the following API any functions applying to HDMI only will have hdmi_ - * in the name, ditto for SDTV only will have sdtv_ in the name, - * Otherwise the function applies to both SDTV and HDMI (e.g. power off) - */ - -/** - * <DFN>vc_tv_get_state</DFN> is used to obtain the current TV state. - * Host applications should call this function right after registering - * a callback in case any notifications are missed. - * - * Now deprecated - use vc_tv_get_display_state instead - * - * @param pointer to TV_GET_STATE_RESP_T - * - * @return zero if the command is sent successfully, non zero otherwise - * If the command fails to be sent, passed in state is unchanged - * - */ -VCHPRE_ int VCHPOST_ vc_tv_get_state(TV_GET_STATE_RESP_T *tvstate); - -/** - * <DFN>vc_tv_get_display_state</DFN> is used to obtain the current TV display - * state. This function supersedes vc_tv_get_state (which is only kept for - * backward compatibility. - * Host applications should call this function right after registering - * a callback in case any notifications are missed. - * - * @param pointer to TV_DISPLAY_STATE_T - * - * @return zero if the command is sent successfully, non zero otherwise - * If the command fails to be sent, passed in state is unchanged - * - */ -VCHPRE_ int VCHPOST_ vc_tv_get_display_state(TV_DISPLAY_STATE_T *tvstate); - -/** - * Use <DFN>vc_tv_hdmi_power_on_preferred</DFN> if you don't care what resolutions - * a TV supports and just want to turn on its native resolution. Analogue TV will - * be powered down if on (same for the following two HDMI power on functions.) - * If power on is successful, a host application must wait for the power on complete - * callback before attempting to open the display. - * - * @param none - * - * @return single value interpreted as HDMI_RESULT_T (zero means success) - * if successful, there will be a callback when the power on is complete - * - **/ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_power_on_preferred( void ); - -/** - * Same as above, but tell the TV to enter 3D mode. The TV will go to 2D mode - * if the preferred mode doesn't support 3D. - **/ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_power_on_preferred_3d( void ); - -/** - * Use <DFN>vc_tv_hdmi_power_on_best</DFN> to power on HDMI at best matched resolution - * based on passed in parameters. Use HDMI_MODE_MATCH_FRAMERATE if you want to - * match the frame rate; use HDMI_MODE_MATCH_RESOLUTION if you want to match on - * screen size; add HDMI_MODE_MATCH_SCANMODE if you want to force - * interlaced/progressive mode. If no matching mode is found, the native resolution - * will be used instead. - * - * @param width is the desired minimum screen width - * - * @param height is the desired minimum screen height - * - * @param rate is the desired frame rate - * - * @param scan_mode (HDMI_NONINTERLACED / HDMI_INTERLACED) is the desired scan mode - * - * @param match flags is the matching flag <DFN>EDID_MODE_MATCH_FLAG_T</DFN> - * - * @return same as <DFN>vc_tv_hdmi_power_on_preferred</DFN> - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_power_on_best(uint32_t width, uint32_t height, uint32_t frame_rate, - HDMI_INTERLACED_T scan_mode, EDID_MODE_MATCH_FLAG_T match_flags); - -/** - * Same as above, but tell the TV to enter 3D mode. The TV will go to 2D mode - * if no suitable 3D mode can be found. - **/ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_power_on_best_3d(uint32_t width, uint32_t height, uint32_t frame_rate, - HDMI_INTERLACED_T scan_mode, EDID_MODE_MATCH_FLAG_T match_flags); - -/** - * Use <DFN>vc_tv_hdmi_power_on_explicit</DFN> if you want full control over what mode - * the TV is driven. This function is used, for example, when the host has the EDID - * and HDMI middleware does not know. If HDMI middleware has knowledge of EDID, the - * passed in mode is still subject to TV's supported modes - * - * @param mode (HDMI_MODE_HDMI/HDMI_MODE_DVI/HDMI_MODE_3D) - * - * @param group (HDMI_RES_GROUP_CEA/HDMI_RES_GROUP_DMT) - * - * @param code either <DFN>HDMI_CEA_RES_CODE_T</DFN> or <DFN>HDMI_DMT_RES_CODE_T</DFN> - * - * @return same as <DFN>vc_tv_hdmi_power_on_preferred</DFN> - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_power_on_explicit_new(HDMI_MODE_T mode, HDMI_RES_GROUP_T group, uint32_t code); - -/** - * <DFN>vc_tv_sdtv_power_on</DFN> is used to turn on analogue TV. HDMI will - * automatically be powered off if on. - * - * @param SDTV mode <DFN>SDTV_MODE_T</DFN> - * - * @param options <DFN>SDTV_OPTIONS_T</DFN> - * - * @return single value (zero means success) if successful, there will be a callback when the power on is complete - * - */ -VCHPRE_ int VCHPOST_ vc_tv_sdtv_power_on(SDTV_MODE_T mode, SDTV_OPTIONS_T *options); - -/** - * <DFN>vc_tv_power_off</DFN> is used to turn off either analogue or HDMI output. - * If HDMI is powered down, there will be a callback with reason UNPLUGGED (if no - * cable is attached) or STANDBY (if a cable is attached) - * - * @param none - * - * @return whether command is succcessfully sent - * - */ -VCHPRE_ int VCHPOST_ vc_tv_power_off( void ); - -/** - * <DFN>vc_tv_hdmi_get_supported_modes</DFN> is used to get a list of supported - * modes for a particular standard (CEA/DMT/CEA3D). Prefer resolution (group and mode) - * is also returned, if needed. If there are more modes supported than the size of the array - * supply, only the array will be filled. - * - * @param group(HDMI_RES_GROUP_CEA/HDMI_RES_GROUP_DMT) - * - * @param array of <DFN>TV_SUPPORT_MODE_T</DFN> struct - * - * @param length of array above (in elements, not bytes) - * - * @pointer to preferred group (can be NULL) - * - * @pointer to prefer mode code (can be NULL) - * - * @return the number of modes actually written in the array, - * zero means no modes (no EDID or cable unplugged) - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_get_supported_modes_new(HDMI_RES_GROUP_T group, - TV_SUPPORTED_MODE_NEW_T *supported_modes, - uint32_t max_supported_modes, - HDMI_RES_GROUP_T *preferred_group, - uint32_t *preferred_mode); -/** - * <DFN>vc_tv_hdmi_mode_supported</DFN> is used to query whether a particular mode - * is supported or not. - * - * @param resolution standard (HDMI_RES_GROUP_CEA/HDMI_RES_GROUP_DMT) - * - * @param mode code - * - * @return > 0 means supported, 0 means unsupported, < 0 means error - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_mode_supported(HDMI_RES_GROUP_T group, - uint32_t mode); - -/** - * <DFN>vc_tv_hdmi_audio_supported</DFN> is used to query whether a - * particular audio format is supported. By default a device has to support - * 16-bit stereo PCM at 32/44.1/48 kHz if audio is supported at all. - * Support of other audio formats allow SPDIF to be used. - * A return value of zero means the audio format is completely supported. - * Any non-zero values are interpreted as bit mask (EDID_AUDIO_SUPPORT_FLAG_T). - * For example, if EDID_AUDIO_NO_SUPPORT is set, the audio format is not supported. - * If EDID_AUDIO_CHAN_UNSUPPORTED is set, the max no. of channels has exceeded. - * - * @param audio format supplied as (<DFN>EDID_AudioFormat</DFN> + <DFN>EDID_AudioCodingExtension</DFN>) - * - * @param no. of channels (1-8) - * - * @param sample rate <DFN>EDID_AudioSampleRate</DFN> but NOT "refer to header" - * - * @param bit rate (or sample size if pcm) use <DFN>EDID_AudioSampleSize</DFN> as sample size argument - * - * @return: single value return interpreted as flags in <DFN>EDID_AUDIO_SUPPORT_FLAG_T</DFN> - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_audio_supported(uint32_t audio_format, uint32_t num_channels, - EDID_AudioSampleRate fs, uint32_t bitrate); - -/** - * Use <DFN>vc_tv_enable_copyprotect</DFN> to turn on copy protection. - * For HDMI, only HDMI_CP_HDCP is recognised. - * For SDTV, use one of the values in SDTV_CP_MODE_T - * - * @param copy protect mode - * - * @param time out in milliseconds (only applicable to HDMI) - * - * @return 0 means success, additional result via callback - * - */ -VCHPRE_ int VCHPOST_ vc_tv_enable_copyprotect(uint32_t cp_mode, uint32_t timeout); - -/** - * Use <DFN>vc_tv_disable_copyprotect</DFN> to turn off copy protection - * - * @param none - * - * @rturn 0 means success, additional result via callback - * - */ -VCHPRE_ int VCHPOST_ vc_tv_disable_copyprotect( void ); - -/** - * Use <DFN>vc_tv_show_info</DFN> to show or hide info screen. - * Only usable in HDMI at the moment. - * - * @param show (1) or hide (0) info screen - * - * @return zero if command is successfully sent - * - */ -VCHPRE_ int VCHPOST_ vc_tv_show_info(uint32_t show); - -/** - * <DFN>vc_tv_hdmi_get_av_latency</DFN> is used to get the AV latency - * (in ms) for HDMI (lipsync), only valid if HDMI is currently powered on, - * otherwise you get zero. The latency is defined as the relative delay - * of the video stream to the audio stream - * - * @param none - * - * @return latency (zero if error or latency is not defined), - * < 0 if failed to send command) - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_get_av_latency( void ); - -/** - * Use <DFN>vc_tv_hdmi_set_hdcp_key</DFN> to download HDCP key to HDCP middleware - * - * @param AES encrypted key block (328 bytes) - * - * @return single value return indicating queued status - * Callback indicates the validity of key - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_set_hdcp_key(const uint8_t *key); - -/** - * Use <DFN>vc_tv_hdmi_set_hdcp_revoked_list</DFN> to download SRM - * revoked list - * - * @param list - * - * @param size of list (no. of keys) - * - * @return single value return indicating queued status - * Callback indicates the number of keys set (zero if failed, unless you are clearing the list) - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_set_hdcp_revoked_list(const uint8_t *list, uint32_t num_keys); - -/** - * <DFN>vc_tv_hdmi_set_spd</DFN> is used to set the SPD infoframe. - * - * @param manufacturer (max. 8 characters) - * - * @param description (max. 16 characters) - * - * @param product type <DFN>HDMI_SPD_TYPE_CODE_T</DFN> - * - * @return whether command was sent successfully (zero means success) - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_set_spd(const char *manufacturer, const char *description, HDMI_SPD_TYPE_CODE_T type); - -/** - * <DFN>vc_tv_hdmi_set_display_options</DFN> is used to set the - * active area for HDMI (bar width/height should be set to zero if absent) - * This information is conveyed in AVI infoframe. - * - * @param aspect ratio <DFN>HDMI_ASPECT_T</DFN> - * - * @param left bar width - * - * @param right bar width - * - * @param top bar height - * - * @param bottom bar height - * - * @return whether command was sent successfully (zero means success) - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_set_display_options(HDMI_ASPECT_T aspect, uint32_t left_bar_width, uint32_t right_bar_width, uint32_t top_bar_height, uint32_t bottom_bar_height, uint32_t overscan_flags); - -/** - * Use <DFN>vc_tv_test_mode_start</DFN> to generate test signal. - * At the moment only DVI test signal is supported. - * HDMI must be powered off before this function is called. - * - * @param 24-bit background colour (if applicable) - * - * @param test mode <DFN>TV_TEST_MODE_T</DFN> - * - * @return whether command was sent successfully (zero means success) - * - */ -VCHPRE_ int VCHPOST_ vc_tv_test_mode_start(uint32_t colour, TV_TEST_MODE_T test_mode); - -/** - * Use <DFN>vc_tv_test_mode_stop</DFN> to stop the test signal and power down - * HDMI. - * - * @param none - * - * @return whether command was sent successfully (zero means success) - * - */ -VCHPRE_ int VCHPOST_ vc_tv_test_mode_stop( void ); - -/** - * <DFN>vc_tv_hdmi_ddc_read</DFN> allows an host application to read EDID - * with DDC protocol. - * - * @param offset - * - * @param length to read (this is typically 128 bytes to coincide with EDID block size) - * - * @param pointer to buffer, must be 16 byte aligned - * - * @returns length of data read (so zero means error) and the buffer will be filled - * only if there is no error - * - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_ddc_read(uint32_t offset, uint32_t length, uint8_t *buffer); - -/** - * Sets the TV state to attached. - * Required when hotplug interrupt is not handled by VideoCore. - * - * @param attached non-zero if the TV is attached or zero for unplugged. - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_set_attached(uint32_t attached); - -/** - * Sets one of the HDMI properties. HDMI properties persist - * between HDMI power on/off - * - * @param property [in] - * - * @return zero if successful, non-zero otherwise - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_set_property(const HDMI_PROPERTY_PARAM_T *property); - -/** - * Gets the current value of an HDMI property. - * - * @param property [in/out] - * - * @return zero if success (param1/param2 will be set), non-zero otherwise (param1/param2 will not be set) - */ -VCHPRE_ int VCHPOST_ vc_tv_hdmi_get_property(HDMI_PROPERTY_PARAM_T *property); - -/** - * Converts the notification reason to a string. - * - * @param reason is the notification reason - * @return The notification reason as a string. - */ -VCHPRE_ const char* vc_tv_notification_name(VC_HDMI_NOTIFY_T reason); - -/** - * Get the unique device ID from the EDID - * @param pointer to device ID struct - * @return zero if successful, non-zero if failed. - */ -VCHPRE_ int VCHPOST_ vc_tv_get_device_id(TV_DEVICE_ID_T *id); - -// temporary: maintain backwards compatibility -VCHPRE_ int VCHPOST_ vc_tv_hdmi_get_supported_modes(HDMI_RES_GROUP_T group, - TV_SUPPORTED_MODE_T *supported_modes, - uint32_t max_supported_modes, - HDMI_RES_GROUP_T *preferred_group, - uint32_t *preferred_mode); -// temporary: maintain backwards compatibility -VCHPRE_ int VCHPOST_ vc_tv_hdmi_power_on_explicit(HDMI_MODE_T mode, HDMI_RES_GROUP_T group, uint32_t code); - -#endif diff --git a/vc/include/interface/vmcs_host/vc_tvservice_defs.h b/vc/include/interface/vmcs_host/vc_tvservice_defs.h @@ -1,352 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * TV service command enumeration and parameter types. - */ - -#ifndef _VC_TVSERVICE_DEFS_H_ -#define _VC_TVSERVICE_DEFS_H_ -#include "vcinclude/common.h" -#include "interface/vchi/message_drivers/message.h" -#include "vc_hdmi.h" -#include "vc_sdtv.h" - -#define VC_TVSERVICE_VER 1 - -#define TVSERVICE_MSGFIFO_SIZE 1024 -#define TVSERVICE_CLIENT_NAME MAKE_FOURCC("TVSV") -#define TVSERVICE_NOTIFY_NAME MAKE_FOURCC("TVNT") - -#define TVSERVICE_MAX_CALLBACKS 5 - -//TV service commands -typedef enum { - VC_TV_GET_STATE = 0, - VC_TV_HDMI_ON_PREFERRED, - VC_TV_HDMI_ON_BEST, - VC_TV_HDMI_ON_EXPLICIT, - VC_TV_SDTV_ON, - VC_TV_OFF, - VC_TV_QUERY_SUPPORTED_MODES, - VC_TV_QUERY_MODE_SUPPORT, - VC_TV_QUERY_AUDIO_SUPPORT, - VC_TV_ENABLE_COPY_PROTECT, - VC_TV_DISABLE_COPY_PROTECT, - VC_TV_SHOW_INFO, - VC_TV_GET_AV_LATENCY, - VC_TV_HDCP_SET_KEY, - VC_TV_HDCP_SET_SRM, - VC_TV_SET_SPD, - VC_TV_SET_DISPLAY_OPTIONS, - VC_TV_TEST_MODE_START, - VC_TV_TEST_MODE_STOP, - VC_TV_DDC_READ, - VC_TV_SET_ATTACHED, - VC_TV_SET_PROP, - VC_TV_GET_PROP, - VC_TV_GET_DISPLAY_STATE, - VC_TV_QUERY_SUPPORTED_MODES_ACTUAL, - VC_TV_GET_DEVICE_ID, - //Add more commands here - VC_TV_END_OF_LIST -} VC_TV_CMD_CODE_T; - -//Parameters for each command (padded to multiple of 16 bytes) -//See vc_hdmi.h and vc_sdtv.h for details - -//GET_STATE -//Parameters: none -//Reply: state (flags of VC_HDMI_NOTIFY_T and VC_SDTV_NOTIFY_T) -// current width -// current height -// current refresh rate -// current scan mode - -typedef struct { - uint32_t state; /**<TV state is a union of bitmask of VC_HDMI_NOTIFY_T and VC_SDTV_NOTIFY_T */ - uint32_t width; /**<Current display width if TV is on */ - uint32_t height; /**<Current display height if TV is on */ - uint16_t frame_rate;/**<Current refresh rate is TV is on */ - uint16_t scan_mode; /**<Current scanmode 0 for progressive, 1 for interlaced */ -} TV_GET_STATE_RESP_T; - -//Generic single returned interpreted based on the command -typedef struct { - int32_t ret; //Single return value -} TV_GENERAL_RESP_T; - -//HDMI_ON_PREFERRED -//Parameters: 3d mode (on/off) -//Reply: single return value interpreted as HDMI_RESULT_T or SDTV equivalent (all single reply value will be of this form) -typedef struct { - uint32_t in_3d; -} TV_HDMI_ON_PREFERRED_PARAM_T; - -//HDMI_ON_BEST -//Parameters: width, height, frame rate, scan mode, matching flag (EDID_MODE_MATCH_FLAG_T), 3d mode (on/off) -//Reply: single return value interpreted as HDMI_RESULT_T or SDTV equivalent -typedef struct { - uint32_t width; - uint32_t height; - uint32_t frame_rate; - uint32_t scan_mode; - uint32_t match_flags; - uint32_t in_3d; -} TV_HDMI_ON_BEST_PARAM_T; - -//HDMI_ON_EXPLICIT -//Parameters: hdmi_mode, standard, mode -//Reply: same as above -typedef struct { - uint32_t hdmi_mode; //DVI or HDMI - uint32_t group; - uint32_t mode; -} TV_HDMI_ON_EXPLICIT_PARAM_T; - -//SDTV_ON -//Parameters: SDTV mode, aspect ratio -//Reply: Same as above -typedef struct { - uint32_t mode; - uint32_t aspect; -} TV_SDTV_ON_PARAM_T; - -//TV_OFF -//Parameters: none -//Reply: none - -//TV_QUERY_SUPPORTED_MODES -//Parameters: standard (CEA/DMT) sent as uint32_t -//Reply: how many modes there are in this group, -// preferred resolution - -//TV_QUERY_SUPPORTED_MODES_ACTUAL (This downloads the array of supported modes) -//Parameters: standard (CEA/DMT) sent as uint32_t, -// table size supplied -//Reply: how many modes which will be returned, -// prefer resolution, -// the actual array of modes (via bulk transfer) - -typedef struct { - uint32_t scan_mode : 1; /**<1 is interlaced, 0 for progressive */ - uint32_t native : 1; /**<1 means native mode, 0 otherwise */ - uint32_t group : 3; /**<group */ - uint32_t code : 7; /**<mode code */ - uint32_t pixel_rep : 3; /**<pixel repetition (zero means no repetition)*/ - uint32_t aspect_ratio : 5; /**<aspect ratio of the format */ - uint16_t frame_rate; /**<frame rate */ - uint16_t width; /**<frame width */ - uint16_t height; /**<frame height */ - uint32_t pixel_freq; /**<pixel clock in Hz */ - uint32_t struct_3d_mask;/**<3D structure supported for this mode, only valid if group == CEA. This is a bitmask of HDMI_3D_STRUCT_T */ -} TV_SUPPORTED_MODE_NEW_T; - -typedef struct { - uint16_t scan_mode : 1; /**<1 is interlaced, 0 for progressive */ - uint16_t native : 1; /**<1 means native mode, 0 otherwise */ - uint16_t code : 7; /**<mode code */ - uint16_t frame_rate; /**<frame rate */ - uint16_t width; /**<frame width */ - uint16_t height; /**<frame height */ -} TV_SUPPORTED_MODE_T; - -typedef struct { - uint32_t num_supported_modes; - uint32_t preferred_group; - uint32_t preferred_mode; -} TV_QUERY_SUPPORTED_MODES_RESP_T; - -//num_supported_modes is the no. of modes available in that group for TV_QUERY_SUPPORTED_MODES -//and no. of modes which will be bulk sent across in TV_QUERY_SUPPORTED_MODES_ACTUAL - -//For TV_QUERY_SUPPORTED_MODES_ACTUAL, there will be a separate bulk receive -//containing the supported modes array - -//TV_QUERY_MODE_SUPPORT -//Parameters: stardard, mode -//Reply: yes/no -//but the return value meaning is reversed (zero is unsupported, non-zero is supported) -typedef struct { - uint32_t group; - uint32_t mode; -} TV_QUERY_MODE_SUPPORT_PARAM_T; - -//TV_QUERY_AUDIO_SUPPORT -//Parameters: audio format, no. of channels, sampling frequency, bitrate/sample size -//Reply: single value interpreted as flags EDID_AUDIO_SUPPORT_FLAG_T -typedef struct { - uint32_t audio_format; //EDID_AudioFormat (if format is eExtended, add EDID_AudioCodingExtension to the audio format) - uint32_t num_channels; // 1-8 - uint32_t fs; // EDID_AudioSampleRate - uint32_t bitrate; // EDID_AudioSampleSize if format == PCM, bitrate otherwise -} TV_QUERY_AUDIO_SUPPORT_PARAM_T; - -//TV_ENABLE_COPY_PROTECT -//Parameters: copy protect mode (for HDMI it will always be HDCP), timeout -//Reply: single return value - cp result arrive via callback -typedef struct { - uint32_t cp_mode; - uint32_t timeout; -} TV_ENABLE_COPY_PROTECT_PARAM_T; - -//TV_DISABLE_COPY_PROTECT -//Parameters: none -//Reply: single value return - results arrive via callback - -//TV_SHOW_INFO -//Parameters: visible -//Reply: none -typedef struct { - uint32_t visible; //0 to hide the screen -} TV_SHOW_INFO_PARAM_T; - -//TV_GET_AV_LATENCY -//Parameters: none -//Reply: single value interpreted as latency in ms - - -//TV_HDCP_SET_KEY -//Parameters: key block buffer (fixed size HDCP_KEY_BLOCK_SIZE) -//Reply: none, key validity result arrives via callback -typedef struct { - uint8_t key[HDCP_KEY_BLOCK_SIZE]; -} TV_HDCP_SET_KEY_PARAM_T; - -//TV_HDCP_SET_SRM -//Parameters: num of keys, pointer to revocation list (transferred as buffer) -//Reply: none, callback indicates no. of keys set -typedef struct { - uint32_t num_keys; -} TV_HDCP_SET_SRM_PARAM_T; - -//TV_SET_SPD -//Parameters: name [8], description [16], type -//Reply: none -#define TV_SPD_NAME_LEN 8 -#define TV_SPD_DESC_LEN 16 -typedef struct { - char manufacturer[TV_SPD_NAME_LEN]; - char description[TV_SPD_DESC_LEN]; - uint32_t type; -} TV_SET_SPD_PARAM_T; - -//TV_SET_DISPLAY_OPTIONS -//Parameters: aspect ratio (HDMI_ASPECT_T), vert bar present (bool), -// left bar width, right bar width, horiz bar present (bool) -// top bar height, bottom bar height -//Reply: none -typedef struct { - uint32_t aspect; - uint32_t vertical_bar_present; - uint32_t left_bar_width; - uint32_t right_bar_width; - uint32_t horizontal_bar_present; - uint32_t top_bar_height; - uint32_t bottom_bar_height; - uint32_t overscan_flags; -} TV_SET_DISPLAY_OPTIONS_PARAM_T; - -//TV_TEST_MODE_START -//Parameters: rgb colour, test mode -//Reply: none - -//Actual enums used for test mode -typedef enum { - TV_TEST_MODE_DISABLED = 0, //Test mode disabled - TV_TEST_MODE_SOLID_BACKGND = 1, //Solid background colur - TV_TEST_MODE_SOLID_VERTICAL = 2, //Vertical bars - TV_TEST_MODE_SHADED_VERTICAL = 3, //Shaded vertical bars - TV_TEST_MODE_SHADED_WHITE_V = 4, //White vertical bars - TV_TEST_MODE_SHADED_WHITE_H = 5, //White horizontal bars - TV_TEST_MODE_SHADED_RGB = 6, //Shaded RGB + white bars - TV_TEST_MODE_WALKING = 7, //Walking one across 24-bit RGB - TV_TEST_MODE_DELAYED = 8, //Delayed shaded RGB bars - TV_TEST_MODE_HVD = 9, //Horizontal G, Vert. B, Diag. R bars - TV_TEST_MODE_ODD_CH =10, //Odd field crosshairs - TV_TEST_MODE_EVEN_CH =11, //Even field crosshairs - TV_TEST_MODE_32x32 =12, //32x32 white grid - TV_TEST_MODE_WYCGMRBK_SOLID =13, //Solid blah blah - TV_TEST_MODE_WYCGMRBK_SHADED =14, //Shaded blah blah - TV_TEST_MODE_32x32_DIAGONAL =15 //32x32 white diagonal grid -} TV_TEST_MODE_T; - -typedef struct { - uint32_t colour; //RGB colour - uint32_t test_mode; //one of the TV_TEST_MODE_T enums above -} TV_TEST_MODE_START_PARAM_T; - -//TV_TEST_MODE_STOP -//Parameters: none -//Reply: none - -//TV_DDC_READ -//Parameters: offset, length -//Reply: length of data actually read (so zero means error), -//and fills in the passed in buffer if no error -typedef struct { - uint32_t offset; - uint32_t length; -} TV_DDC_READ_PARAM_T; - -//TV_SET_ATTACHED -//Parameters: uint32_t attached or not (0 = hotplug low, 1 = hotplug high) - -//TV_SET_PROP -//Parameters: HDMI_PROPERTY_PARAM_T -//Reply: 0 = set successful, non-zero if error (int32_t) -#define HDMI_PROPERTY_SIZE_IN_WORDS (sizeof(HDMI_PROPERTY_T)/sizeof(uint32_t)) - -//TV_GET_PROP -//Parameters: parameter type (sent as uint32_t) -//Reply param1/param2 of the passed in property and return code -typedef struct { - int32_t ret; /**<Return code */ - HDMI_PROPERTY_PARAM_T property; /**<HDMI_PROPERTY_PARAM_T */ -} TV_GET_PROP_PARAM_T; - -//TV_GET_DISPLAY_STATE -//Parameters: none -//Return TV display state -typedef struct { - uint32_t state; /** This will be the state of HDMI | SDTV */ - union { - SDTV_DISPLAY_STATE_T sdtv; /** If SDTV is active, this is the state of SDTV */ - HDMI_DISPLAY_STATE_T hdmi; /** If HDMI is active, this is the state of HDMI */ - } display; -} TV_DISPLAY_STATE_T; - -//TV_GET_DEVICE_ID -//Parameter: none -//Return device ID information from EDID -typedef struct { - char vendor[EDID_DEVICE_VENDOR_ID_LENGTH+1]; - char monitor_name[EDID_DESC_ASCII_STRING_LEN+1]; - uint32_t serial_num; -} TV_DEVICE_ID_T; - -#endif diff --git a/vc/include/interface/vmcs_host/vc_vchi_audioserv_defs.h b/vc/include/interface/vmcs_host/vc_vchi_audioserv_defs.h @@ -1,156 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef _VC_AUDIO_DEFS_H_ -#define _VC_AUDIO_DEFS_H_ - -#define VC_AUDIOSERV_MIN_VER 1 -#define VC_AUDIOSERV_VER 2 - -// FourCC code used for VCHI connection -#define VC_AUDIO_SERVER_NAME MAKE_FOURCC("AUDS") - -// Maximum message length -#define VC_AUDIO_MAX_MSG_LEN (sizeof( VC_AUDIO_MSG_T )) - -// List of screens that are currently supported -// All message types supported for HOST->VC direction -typedef enum -{ - VC_AUDIO_MSG_TYPE_RESULT, // Generic result - VC_AUDIO_MSG_TYPE_COMPLETE, // playback of samples complete - VC_AUDIO_MSG_TYPE_CONFIG, // Configure - VC_AUDIO_MSG_TYPE_CONTROL, // control - VC_AUDIO_MSG_TYPE_OPEN, // open - VC_AUDIO_MSG_TYPE_CLOSE, // close/shutdown - VC_AUDIO_MSG_TYPE_START, // start output (i.e. resume) - VC_AUDIO_MSG_TYPE_STOP, // stop output (i.e. pause) - VC_AUDIO_MSG_TYPE_WRITE, // write samples - VC_AUDIO_MSG_TYPE_MAX - -} VC_AUDIO_MSG_TYPE; - -static const char *vc_audio_msg_type_names[] = { - "VC_AUDIO_MSG_TYPE_RESULT", - "VC_AUDIO_MSG_TYPE_COMPLETE", - "VC_AUDIO_MSG_TYPE_CONFIG", - "VC_AUDIO_MSG_TYPE_CONTROL", - "VC_AUDIO_MSG_TYPE_OPEN", - "VC_AUDIO_MSG_TYPE_CLOSE", - "VC_AUDIO_MSG_TYPE_START", - "VC_AUDIO_MSG_TYPE_STOP", - "VC_AUDIO_MSG_TYPE_WRITE", - "VC_AUDIO_MSG_TYPE_MAX" -}; - -// configure the audio -typedef struct -{ - uint32_t channels; - uint32_t samplerate; - uint32_t bps; - -} VC_AUDIO_CONFIG_T; - -typedef struct -{ - uint32_t volume; - uint32_t dest; - -} VC_AUDIO_CONTROL_T; - -// audio -typedef struct -{ - uint32_t dummy; - -} VC_AUDIO_OPEN_T; - -// audio -typedef struct -{ - uint32_t dummy; - -} VC_AUDIO_CLOSE_T; -// audio -typedef struct -{ - uint32_t dummy; - -} VC_AUDIO_START_T; -// audio -typedef struct -{ - uint32_t draining; - -} VC_AUDIO_STOP_T; - -// configure the write audio samples -typedef struct -{ - uint32_t count; // in bytes - void *callback; - void *cookie; - uint16_t silence; - uint16_t max_packet; -} VC_AUDIO_WRITE_T; - -// Generic result for a request (VC->HOST) -typedef struct -{ - int32_t success; // Success value - -} VC_AUDIO_RESULT_T; - -// Generic result for a request (VC->HOST) -typedef struct -{ - int32_t count; // Success value - void *callback; - void *cookie; -} VC_AUDIO_COMPLETE_T; - -// Message header for all messages in HOST->VC direction -typedef struct -{ - int32_t type; // Message type (VC_AUDIO_MSG_TYPE) - union - { - VC_AUDIO_CONFIG_T config; - VC_AUDIO_CONTROL_T control; - VC_AUDIO_OPEN_T open; - VC_AUDIO_CLOSE_T close; - VC_AUDIO_START_T start; - VC_AUDIO_STOP_T stop; - VC_AUDIO_WRITE_T write; - VC_AUDIO_RESULT_T result; - VC_AUDIO_COMPLETE_T complete; - } u; -} VC_AUDIO_MSG_T; - - -#endif // _VC_AUDIO_DEFS_H_ diff --git a/vc/include/interface/vmcs_host/vc_vchi_bufman.h b/vc/include/interface/vmcs_host/vc_vchi_bufman.h @@ -1,116 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_VCHI_BUFMAN_H -#define VC_VCHI_BUFMAN_H - -#include "interface/vctypes/vc_image_types.h" -#include "interface/vchi/vchi.h" -#ifdef __SYMBIAN32__ -#include "interface/vmcs_host/vc_vchi_bufman_defs.h" -typedef uint32_t DISPMANX_RESOURCE_HANDLE_T; -namespace BufManX { -#else -#include "interface/vmcs_host/vc_dispmanx.h" -#include "interface/vmcs_host/vc_vchi_bufman_defs.h" -#endif - -typedef void (*vc_bufman_callback_t) (void *next_cookie, void *next_cookie2, int32_t success); - -VCHPRE_ void VCHPOST_ vc_vchi_bufman_init(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections); - -typedef struct -{ - buf_frame_type_t type; - int width, height, pitch; - int bpp; // bits per pixel - int size; - void *pixels; -} BUFMANX_IMAGE_T; - -#define BUFMAN_TRANSFORM_HFLIP (1<<0) -#define BUFMAN_TRANSFORM_VFLIP (1<<1) -#define BUFMAN_TRANSFORM_TRANSPOSE (1<<2) - -typedef enum { - BUFMAN_TRANSFORM_ROT0 = 0, - BUFMAN_TRANSFORM_MIRROR_ROT0 = BUFMAN_TRANSFORM_HFLIP, - BUFMAN_TRANSFORM_MIRROR_ROT180 = BUFMAN_TRANSFORM_VFLIP, - BUFMAN_TRANSFORM_ROT180 = BUFMAN_TRANSFORM_HFLIP|BUFMAN_TRANSFORM_VFLIP, - BUFMAN_TRANSFORM_MIRROR_ROT90 = BUFMAN_TRANSFORM_TRANSPOSE, - BUFMAN_TRANSFORM_ROT270 = BUFMAN_TRANSFORM_TRANSPOSE|BUFMAN_TRANSFORM_HFLIP, - BUFMAN_TRANSFORM_ROT90 = BUFMAN_TRANSFORM_TRANSPOSE|BUFMAN_TRANSFORM_VFLIP, - BUFMAN_TRANSFORM_MIRROR_ROT270 = BUFMAN_TRANSFORM_TRANSPOSE|BUFMAN_TRANSFORM_HFLIP|BUFMAN_TRANSFORM_VFLIP, -} BUFMAN_TRANSFORM_T; - - -// we use an opaque type here as the internals shouldn't be used externally, but allocation of the size of the block is required by the caller. -#define BUFMANX_HANDLE_T_SIZE 1024 -typedef struct { - char opaque[BUFMANX_HANDLE_T_SIZE]; -} BUFMANX_HANDLE_T; - -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_convert_init(void); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_set_transform_buffer(void *pixels, int size); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_allocate_image(BUFMANX_IMAGE_T *image); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_release_image(BUFMANX_IMAGE_T *image); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_get_default_pitch( BUFMANX_IMAGE_T *src ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_get_default_size(BUFMANX_IMAGE_T *src); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_push ( BUFMANX_HANDLE_T *h, const BUFMANX_IMAGE_T *src, DISPMANX_RESOURCE_HANDLE_T dst, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform, vc_bufman_callback_t callback, void *cookie, void *cookie2 ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_pull ( BUFMANX_HANDLE_T *h, BUFMANX_IMAGE_T *dst, const DISPMANX_RESOURCE_HANDLE_T src, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform, vc_bufman_callback_t callback, void *cookie, void *cookie2 ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_pull_blocking ( BUFMANX_HANDLE_T *h, BUFMANX_IMAGE_T *dst, const DISPMANX_RESOURCE_HANDLE_T src, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_push_blocking ( BUFMANX_HANDLE_T *h, const BUFMANX_IMAGE_T *src, DISPMANX_RESOURCE_HANDLE_T dst, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_pull_striped ( BUFMANX_HANDLE_T *xh, BUFMANX_IMAGE_T *dst, const DISPMANX_RESOURCE_HANDLE_T src, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform, vc_bufman_callback_t callback, void *cookie, void *cookie2 ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_pull_striped_blocking ( BUFMANX_HANDLE_T *xh, BUFMANX_IMAGE_T *dst, const DISPMANX_RESOURCE_HANDLE_T src, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_push_striped ( BUFMANX_HANDLE_T *xh, const BUFMANX_IMAGE_T *src, DISPMANX_RESOURCE_HANDLE_T dst, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform, vc_bufman_callback_t callback, void *cookie, void *cookie2 ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_push_striped_blocking ( BUFMANX_HANDLE_T *xh, const BUFMANX_IMAGE_T *src, DISPMANX_RESOURCE_HANDLE_T dst, const VC_RECT_T *src_rect, const VC_RECT_T *dest_rect, BUFMAN_TRANSFORM_T transform ); - -VCHPRE_ void VCHPOST_ vc_bufmanx_push_multi ( BUFMANX_HANDLE_T *h, const BUFMANX_IMAGE_T *src, DISPMANX_RESOURCE_HANDLE_T dst, BUFMAN_TRANSFORM_T transform, vc_bufman_callback_t callback, void *cookie, void *cookie2 ); -VCHPRE_ void VCHPOST_ vc_bufmanx_pull_multi ( BUFMANX_HANDLE_T *h, BUFMANX_IMAGE_T *dst, const DISPMANX_RESOURCE_HANDLE_T src, BUFMAN_TRANSFORM_T transform, vc_bufman_callback_t callback, void *cookie, void *cookie2 ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_push_multi_blocking ( BUFMANX_HANDLE_T *h, const BUFMANX_IMAGE_T *src, DISPMANX_RESOURCE_HANDLE_T dst, BUFMAN_TRANSFORM_T transform ); -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_pull_multi_blocking ( BUFMANX_HANDLE_T *h, BUFMANX_IMAGE_T *dst, const DISPMANX_RESOURCE_HANDLE_T src, BUFMAN_TRANSFORM_T transform ); - -// Allocate the specified number and type of buffers on the server side, for use with streams -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_allocate_buffers - (uint32_t stream, uint32_t num_of_buffers, - buf_frame_type_t type, uint32_t width, uint32_t height); - -// Free buffers on the server which are associated with the specified stream -#define VC_BUFMANX_FREE_BUFFERS_ALL 0 -VCHPRE_ int32_t VCHPOST_ vc_bufmanx_free_buffers(uint32_t stream, uint32_t num_of_buffers); - -// Like vc_bufmanx_push_multi(), but specifies a stream, rather than a dispmanx resource handle, -// to push the data to. -VCHPRE_ void VCHPOST_ vc_bufmanx_push_multi_stream ( BUFMANX_HANDLE_T *xh, const BUFMANX_IMAGE_T *src, uint32_t stream, BUFMAN_TRANSFORM_T transform, vc_bufman_callback_t callback, void *cookie, void *cookie2 ); - -VCHPRE_ VC_IMAGE_TYPE_T VCHPOST_ vc_bufmanx_get_vc_image_type(buf_frame_type_t bm_type); - -#ifdef __SYMBIAN32__ -} // namespace BufManX -#endif - -#endif /* VC_VCHI_BUFMAN_H */ diff --git a/vc/include/interface/vmcs_host/vc_vchi_bufman_defs.h b/vc/include/interface/vmcs_host/vc_vchi_bufman_defs.h @@ -1,136 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_VCHI_BUFMAN_DEFS_H -#define VC_VCHI_BUFMAN_DEFS_H - -#ifdef __SYMBIAN32__ -typedef uint32_t DISPMANX_RESOURCE_HANDLE_T; -namespace BufManX { -#else -#include "interface/vmcs_host/vc_dispmanx.h" -#endif - -typedef enum { - // Insert extra frame types here - FRAME_HOST_IMAGE_BASE = 0x20000, // Base for host format images - FRAME_HOST_IMAGE_EFormatYuv420P, - FRAME_HOST_IMAGE_EFormatYuv422P, - FRAME_HOST_IMAGE_EFormatYuv422LE, - FRAME_HOST_IMAGE_EFormatRgb565, - FRAME_HOST_IMAGE_EFormatRgb888, - FRAME_HOST_IMAGE_EFormatRgbU32, - FRAME_HOST_IMAGE_EFormatRgbA32, - FRAME_HOST_IMAGE_EFormatRgbA32LE, - FRAME_HOST_IMAGE_EFormatRgbU32LE, - - FRAME_FORCE_FIELD_WIDTH = 0xFFFFFFFF -} buf_frame_type_t; - -typedef enum { - //host to videocore - VC_BUFMAN_CONVERT_UNUSED = 0, - VC_BUFMAN_PULL_FRAME, - VC_BUFMAN_PUSH_FRAME, - VC_BUFMAN_MESSAGE_RESPONSE, - VC_BUFMAN_SYNC, - VC_BUFMAN_ALLOC_BUF, - VC_BUFMAN_FREE_BUF, - VC_BUFMAN_PULL_MULTI, - VC_BUFMAN_PUSH_MULTI, - VC_BUFMAN_PUSH_MULTI_STREAM, - //vc to host - VC_BUFMAN_FRAME_SENT_CALLBACK, - VC_BUFMAN_FORCE_WIDTH = 0x7fffffff, -} buf_command_t; - -/* A header used for all messages sent and received by bufman. - */ -typedef struct { - buf_command_t command; -} BUF_MSG_HDR_T; - -/* General remotely call this bufman operation commands */ -typedef struct { - uint32_t resource_handle; - buf_frame_type_t type; - int32_t size, width, height, pitch; - VC_RECT_T src_rect; // in 16.16 units - VC_RECT_T dest_rect; // in 32.0 units -} BUF_MSG_REMOTE_FUNCTION_FRAME_T; - -typedef struct { - int32_t status; - int32_t total_stripes; - // normal stipe height and size - int32_t stripe_height, stripe_size; - // last stripe size (if height not a mulitple of stripe height, last stripe nay be smaller) - int32_t last_stripe_height, last_stripe_size; -} BUF_MSG_RESPONSE_T; - -typedef struct -{ - uint32_t stream; - uint32_t num_of_buffers; - buf_frame_type_t type; - uint32_t width; - uint32_t height; -} BUF_MSG_ALLOC_BUF_FRAME_T; - -typedef struct -{ - uint32_t stream; - uint32_t num_of_buffers; -} BUF_MSG_FREE_BUF_FRAME_T; - -typedef struct { - BUF_MSG_HDR_T hdr; - union { - BUF_MSG_REMOTE_FUNCTION_FRAME_T frame; - BUF_MSG_RESPONSE_T message_response; - BUF_MSG_ALLOC_BUF_FRAME_T alloc_buf_frame; - BUF_MSG_FREE_BUF_FRAME_T free_buf_frame; - } u; -} BUF_MSG_T; - -enum { - //host to videocore - VC_BUFMAN_ERROR_NONE = 0, - VC_BUFMAN_ERROR_BAD_GENERALLY = -1, - VC_BUFMAN_ERROR_BAD_RESOURCE = -2, - VC_BUFMAN_ERROR_BAD_TRANSFORM = -3, - VC_BUFMAN_ERROR_BAD_RESIZE = -4, - VC_BUFMAN_ERROR_BAD_HOST_FORMAT = -5, - VC_BUFMAN_ERROR_BAD_VC_FORMAT = -6, - VC_BUFMAN_ERROR_BAD_SIZE = -7, -}; - -#ifdef __SYMBIAN32__ -} // namespace BufManX -#endif - -#endif /* VC_VCHI_BUFMAN_DEFS_H */ diff --git a/vc/include/interface/vmcs_host/vc_vchi_dispmanx.h b/vc/include/interface/vmcs_host/vc_vchi_dispmanx.h @@ -1,69 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_VCHI_DISPMANX_H -#define VC_VCHI_DISPMANX_H - -#include "interface/peer/vc_vchi_dispmanx_common.h" - -#define VC_NUM_HOST_RESOURCES 64 -#define DISPMANX_MSGFIFO_SIZE 1024 -#define DISPMANX_CLIENT_NAME MAKE_FOURCC("DISP") -#define DISPMANX_NOTIFY_NAME MAKE_FOURCC("UPDH") - -//Or with command to indicate we don't need a response -#define DISPMANX_NO_REPLY_MASK (1<<31) - -typedef struct { - char description[32]; - uint32_t width; - uint32_t height; - uint32_t aspect_pixwidth; - uint32_t aspect_pixheight; - uint32_t fieldrate_num; - uint32_t fieldrate_denom; - uint32_t fields_per_frame; - uint32_t transform; -} GET_MODES_DATA_T; - -typedef struct { - int32_t response; - uint32_t width; - uint32_t height; - uint32_t transform; - uint32_t input_format; -} GET_INFO_DATA_T; - -//Attributes changes flag mask -#define ELEMENT_CHANGE_LAYER (1<<0) -#define ELEMENT_CHANGE_OPACITY (1<<1) -#define ELEMENT_CHANGE_DEST_RECT (1<<2) -#define ELEMENT_CHANGE_SRC_RECT (1<<3) -#define ELEMENT_CHANGE_MASK_RESOURCE (1<<4) -#define ELEMENT_CHANGE_TRANSFORM (1<<5) - -#endif diff --git a/vc/include/interface/vmcs_host/vc_vchi_fileservice_defs.h b/vc/include/interface/vmcs_host/vc_vchi_fileservice_defs.h @@ -1,75 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_VCHI_FILESERVICE_DEFS_H -#define VC_VCHI_FILESERVICE_DEFS_H - -#include "interface/vchi/vchi.h" - -/* Definitions (not used by API) */ - -/* structure used by both side to communicate */ -#define FILESERV_MAX_BULK_SECTOR 128 //must be power of two - -#define FILESERV_SECTOR_LENGTH 512 - -#define FILESERV_MAX_BULK (FILESERV_MAX_BULK_SECTOR*FILESERV_SECTOR_LENGTH) - -#define FILESERV_4CC MAKE_FOURCC("FSRV") - -typedef enum FILESERV_EVENT_T -{ - FILESERV_BULK_RX = 0, - FILESERV_BULK_TX, - FILESERV_BULK_RX_0, - FILESERV_BULK_RX_1 -}FILESERV_EVENT_T; -//this following structure has to equal VCHI_MAX_MSG_SIZE -#define FILESERV_MAX_DATA (VCHI_MAX_MSG_SIZE - 40) //(VCHI_MAX_MSG_SIZE - 24) - -typedef struct{ - uint32_t xid; //4 // transaction's ID, used to match cmds with response - uint32_t cmd_code; //4 - uint32_t params[4]; //16 - char data[FILESERV_MAX_DATA]; -}FILESERV_MSG_T; - -typedef enum -{ - FILESERV_RESP_OK, - FILESERV_RESP_ERROR, - FILESERV_BULK_READ, - FILESERV_BULK_WRITE, - -} FILESERV_RESP_CODE_T; - - -/* Protocol (not used by API) version 1.2 */ - - - -#endif diff --git a/vc/include/interface/vmcs_host/vc_vchi_filesys.h b/vc/include/interface/vmcs_host/vc_vchi_filesys.h @@ -1,184 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_VCHI_VCFILESYS_H_ -#define VC_VCHI_VCFILESYS_H_ - -#include "vchost_config.h" -#include "vcfilesys_defs.h" -#include "vc_fileservice_defs.h" -#include "interface/vchi/vchi.h" - -#ifndef _DIRENT_H // This should really be in a dirent.h header to avoid conflicts -typedef struct DIR_tag DIR; -#endif // ifndef _DIRENT_H - -typedef struct { - int64_t st_size; /* total size, in bytes (off_t)*/ - uint32_t st_modtime; /* time of last modification (time_t)*/ -} FSTAT_T; - - -VCHPRE_ int VCHPOST_ vc_vchi_filesys_init (VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections ); - -// Stop it to prevent the functions from trying to use it. -VCHPRE_ void VCHPOST_ vc_filesys_stop(void); - -// Return the service number (-1 if not running). -VCHPRE_ int VCHPOST_ vc_filesys_inum(void); - -// Low level file system functions equivalent to close(), lseek(), open(), read() and write() -VCHPRE_ int VCHPOST_ vc_filesys_close(int fildes); - -VCHPRE_ long VCHPOST_ vc_filesys_lseek(int fildes, long offset, int whence); - -VCHPRE_ int64_t VCHPOST_ vc_filesys_lseek64(int fildes, int64_t offset, int whence); - -VCHPRE_ int VCHPOST_ vc_filesys_open(const char *path, int vc_oflag); - -VCHPRE_ int VCHPOST_ vc_filesys_read(int fildes, void *buf, unsigned int nbyte); - -VCHPRE_ int VCHPOST_ vc_filesys_write(int fildes, const void *buf, unsigned int nbyte); - -VCHPRE_ int VCHPOST_ vc_filesys_mount(const char *device, const char *mountpoint, const char *options); -VCHPRE_ int VCHPOST_ vc_filesys_umount(const char *mountpoint); - - -// Ends a directory listing iteration -VCHPRE_ int VCHPOST_ vc_filesys_closedir(void *dhandle); - -// Formats the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_filesys_format(const char *path); - -// Returns the amount of free space on the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_filesys_freespace(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_filesys_freespace64(const char *path); - -// Gets the attributes of the named file -VCHPRE_ int VCHPOST_ vc_filesys_get_attr(const char *path, fattributes_t *attr); - -// Get the file stat info struct for the specified file. -VCHPRE_ int VCHPOST_ vc_filesys_fstat(int filedes, FSTAT_T *buf); - -// Creates a new directory -VCHPRE_ int VCHPOST_ vc_filesys_mkdir(const char *path); - -// Starts a directory listing iteration -VCHPRE_ void * VCHPOST_ vc_filesys_opendir(const char *dirname); - -// Directory listing iterator -VCHPRE_ struct dirent * VCHPOST_ vc_filesys_readdir_r(void *dhandle, struct dirent *result); - -// Get the sum of the filesizes, and the number of files under the specified directory path. -VCHPRE_ int64_t VCHPOST_ vc_filesys_dirsize(const char *path, uint32_t *num_files, uint32_t *num_dirs); - -// Deletes a file or (empty) directory -VCHPRE_ int VCHPOST_ vc_filesys_remove(const char *path); - -// Renames a file, provided the new name is on the same file system as the old -VCHPRE_ int VCHPOST_ vc_filesys_rename(const char *oldfile, const char *newfile); - -// Resets the co-processor side file system -VCHPRE_ int VCHPOST_ vc_filesys_reset(void); - -// Sets the attributes of the named file -VCHPRE_ int VCHPOST_ vc_filesys_set_attr(const char *path, fattributes_t attr); - -// Truncates a file at its current position -VCHPRE_ int VCHPOST_ vc_filesys_setend(int fildes); - -// Returns the size of a file in bytes. -VCHPRE_ int VCHPOST_ vc_filesys_size(const char *path); - -// Checks whether there are any messages in the incoming message fifo and responds to any such messages -VCHPRE_ int VCHPOST_ vc_filesys_poll_message_fifo(void); - -// Return the event used to wait for reads. -VCHPRE_ void * VCHPOST_ vc_filesys_read_event(void); - -// Sends a command for VC01 to reset the file system -VCHPRE_ void VCHPOST_ vc_filesys_sendreset(void); - -// Return the error code of the last file system error -VCHPRE_ int VCHPOST_ vc_filesys_errno(void); - -// Invalidates any cluster chains in the FAT that are not referenced in any directory structures -VCHPRE_ void VCHPOST_ vc_filesys_scandisk(const char *path); - -// Checks whether or not a FAT filesystem is corrupt or not. If fix_errors is TRUE behaves exactly as vc_filesys_scandisk. -VCHPRE_ int VCHPOST_ vc_filesys_chkdsk(const char *path, int fix_errors); - -// Return whether a disk is writeable or not. -VCHPRE_ int VCHPOST_ vc_filesys_diskwritable(const char *path); - -// Return file system type of a disk. -VCHPRE_ int VCHPOST_ vc_filesys_fstype(const char *path); - -// Returns the toatl amount of space on the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_filesys_totalspace(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_filesys_totalspace64(const char *path); - -// Open disk for block level access -VCHPRE_ int VCHPOST_ vc_filesys_open_disk_raw(const char *path); - -// Close disk from block level access mode -VCHPRE_ int VCHPOST_ vc_filesys_close_disk_raw(const char *path); - -// Open disk for normal access -VCHPRE_ int VCHPOST_ vc_filesys_open_disk(const char *path); - -// Close disk for normal access -VCHPRE_ int VCHPOST_ vc_filesys_close_disk(const char *path); - -// Return number of sectors. -VCHPRE_ int VCHPOST_ vc_filesys_numsectors(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_filesys_numsectors64(const char *path); - -// Read/Write sectors -VCHPRE_ int VCHPOST_ vc_filesys_read_sectors(const char *path, uint32_t sector_num, char *sectors, uint32_t num_sectors, uint32_t *sectors_read); -VCHPRE_ int VCHPOST_ vc_filesys_write_sectors(const char *path, uint32_t sector_num, char *sectors, uint32_t num_sectors, uint32_t *sectors_written); - -// Begin reading sectors from VideoCore. -VCHPRE_ int VCHPOST_ vc_filesys_read_sectors_begin(const char *path, uint32_t sector, uint32_t count); - -// Read the next sector. -VCHPRE_ int VCHPOST_ vc_filesys_read_sector(char *buf); - -// End streaming sectors. -VCHPRE_ int VCHPOST_ vc_filesys_read_sectors_end(uint32_t *sectors_read); - -// Begin writing sectors from VideoCore. -VCHPRE_ int VCHPOST_ vc_filesys_write_sectors_begin(const char *path, uint32_t sector, uint32_t count); - -// Write the next sector. -VCHPRE_ int VCHPOST_ vc_filesys_write_sector(const char *buf); - -// End streaming sectors. -VCHPRE_ int VCHPOST_ vc_filesys_write_sectors_end(uint32_t *sectors_written); - -#endif //VCFILESYS_H_ - diff --git a/vc/include/interface/vmcs_host/vc_vchi_gencmd.h b/vc/include/interface/vmcs_host/vc_vchi_gencmd.h @@ -1,88 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VC_VCHI_GENCMD_H -#define VC_VCHI_GENCMD_H -#include "vchost_config.h" -#include "interface/vchi/vchi.h" -#include "interface/vcos/vcos.h" //for VCHPRE_ abd VCHPOST_ macro's for func declaration - -/* Initialise general command service. Returns it's interface number. This initialises - the host side of the interface, it does not send anything to VideoCore. */ - -VCHPRE_ int VCHPOST_ vc_gencmd_init(void); - -VCHPRE_ void VCHPOST_ vc_vchi_gencmd_init(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections ); - - -/* Stop the service from being used. */ - -VCHPRE_ void VCHPOST_ vc_gencmd_stop(void); - -/* Functions to support videocore suspend/resume for cases where vc_gencmd_send expects a response to - * ensure videocore is not shut down (done internally in vc_gencmd / vc_gencmd_until) */ - -VCHPRE_ int VCHPOST_ use_gencmd_service(void); -VCHPRE_ int VCHPOST_ release_gencmd_service(void); - -/****************************************************************************** -Send commands to VideoCore. -These all return 0 for success. They return VC_MSGFIFO_FIFO_FULL if there is -insufficient space for the whole message in the fifo, and none of the message is -sent. -******************************************************************************/ - -/* send command to general command serivce */ -VCHPRE_ int VCHPOST_ vc_gencmd_send( const char *format, ... ); - -/* get resonse from general command serivce */ -VCHPRE_ int VCHPOST_ vc_gencmd_read_response(char *response, int maxlen); - -/* convenience function to send command and receive the response */ -VCHPRE_ int VCHPOST_ vc_gencmd(char *response, int maxlen, const char *format, ...); - -/****************************************************************************** -Utilities to help interpret the responses. -******************************************************************************/ - -/* Read the value of a property=value type pair from a string (typically VideoCore's - response to a general command). Return non-zero if found. */ -VCHPRE_ int VCHPOST_ vc_gencmd_string_property(char *text, const char *property, char **value, int *length); - -/* Read the numeric value of a property=number field from a response string. Return - non-zero if found. */ -VCHPRE_ int VCHPOST_ vc_gencmd_number_property(char *text, const char *property, int *number); - -/* Send a command until the desired response is received, the error message is detected, or the timeout */ -VCHPRE_ int VCHPOST_ vc_gencmd_until( char *cmd, - const char *property, - char *value, - const char *error_string, - int timeout); - - -#endif diff --git a/vc/include/interface/vmcs_host/vcfilesys.h b/vc/include/interface/vmcs_host/vcfilesys.h @@ -1,166 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "vchost_config.h" -#include "vcfilesys_defs.h" -#include "vc_fileservice_defs.h" - -#ifndef VCFILESYS_H_ -#define VCFILESYS_H_ - -#ifndef FILESYS_DIR_DEFINED -#define FILESYS_DIR_DEFINED -typedef struct DIR_tag DIR; -#endif - -// Initialises the file system for use -VCHPRE_ int VCHPOST_ vc_filesys_init (void); - -// Stop it to prevent the functions from trying to use it. -VCHPRE_ void VCHPOST_ vc_filesys_stop(void); - -// Return the service number (-1 if not running). -VCHPRE_ int VCHPOST_ vc_filesys_inum(void); - -// Low level file system functions equivalent to close(), lseek(), open(), read() and write() -VCHPRE_ int VCHPOST_ vc_filesys_close(int fildes); - -VCHPRE_ long VCHPOST_ vc_filesys_lseek(int fildes, long offset, int whence); - -VCHPRE_ int64_t VCHPOST_ vc_filesys_lseek64(int fildes, int64_t offset, int whence); - -VCHPRE_ int VCHPOST_ vc_filesys_open(const char *path, int vc_oflag); - -VCHPRE_ int VCHPOST_ vc_filesys_read(int fildes, void *buf, unsigned int nbyte); - -VCHPRE_ int VCHPOST_ vc_filesys_write(int fildes, const void *buf, unsigned int nbyte); - -VCHPRE_ int VCHPOST_ vc_filesys_mount(const char *device, const char *mountpoint, const char *options); -VCHPRE_ int VCHPOST_ vc_filesys_umount(const char *mountpoint); - - -// Ends a directory listing iteration -VCHPRE_ int VCHPOST_ vc_filesys_closedir(void *dhandle); - -// Formats the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_filesys_format(const char *path); - -// Returns the amount of free space on the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_filesys_freespace(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_filesys_freespace64(const char *path); - -// Gets the attributes of the named file -VCHPRE_ int VCHPOST_ vc_filesys_get_attr(const char *path, fattributes_t *attr); - -// Creates a new directory -VCHPRE_ int VCHPOST_ vc_filesys_mkdir(const char *path); - -// Starts a directory listing iteration -VCHPRE_ void * VCHPOST_ vc_filesys_opendir(const char *dirname); - -// Directory listing iterator -VCHPRE_ struct dirent * VCHPOST_ vc_filesys_readdir_r(void *dhandle, struct dirent *result); - -// Deletes a file or (empty) directory -VCHPRE_ int VCHPOST_ vc_filesys_remove(const char *path); - -// Renames a file, provided the new name is on the same file system as the old -VCHPRE_ int VCHPOST_ vc_filesys_rename(const char *oldfile, const char *newfile); - -// Resets the co-processor side file system -VCHPRE_ int VCHPOST_ vc_filesys_reset(void); - -// Sets the attributes of the named file -VCHPRE_ int VCHPOST_ vc_filesys_set_attr(const char *path, fattributes_t attr); - -// Truncates a file at its current position -VCHPRE_ int VCHPOST_ vc_filesys_setend(int fildes); - -// Checks whether there are any messages in the incoming message fifo and responds to any such messages -VCHPRE_ int VCHPOST_ vc_filesys_poll_message_fifo(void); - -// Return the event used to wait for reads. -VCHPRE_ void * VCHPOST_ vc_filesys_read_event(void); - -// Sends a command for VC01 to reset the file system -VCHPRE_ void VCHPOST_ vc_filesys_sendreset(void); - -// Return the error code of the last file system error -VCHPRE_ int VCHPOST_ vc_filesys_errno(void); - -// Invalidates any cluster chains in the FAT that are not referenced in any directory structures -VCHPRE_ void VCHPOST_ vc_filesys_scandisk(const char *path); - -// Checks whether or not a FAT filesystem is corrupt or not. If fix_errors is TRUE behaves exactly as vc_filesys_scandisk. -VCHPRE_ int VCHPOST_ vc_filesys_chkdsk(const char *path, int fix_errors); - -// Return whether a disk is writeable or not. -VCHPRE_ int VCHPOST_ vc_filesys_diskwritable(const char *path); - -// Return file system type of a disk. -VCHPRE_ int VCHPOST_ vc_filesys_fstype(const char *path); - -// Returns the toatl amount of space on the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_filesys_totalspace(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_filesys_totalspace64(const char *path); - -// Open disk for block level access -VCHPRE_ int VCHPOST_ vc_filesys_open_disk_raw(const char *path); - -// Close disk from block level access mode -VCHPRE_ int VCHPOST_ vc_filesys_close_disk_raw(const char *path); - -// Open disk for normal access -VCHPRE_ int VCHPOST_ vc_filesys_open_disk(const char *path); - -// Close disk for normal access -VCHPRE_ int VCHPOST_ vc_filesys_close_disk(const char *path); - -// Return number of sectors. -VCHPRE_ int VCHPOST_ vc_filesys_numsectors(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_filesys_numsectors64(const char *path); - -// Begin reading sectors from VideoCore. -VCHPRE_ int VCHPOST_ vc_filesys_read_sectors_begin(const char *path, uint32_t sector, uint32_t count); - -// Read the next sector. -VCHPRE_ int VCHPOST_ vc_filesys_read_sector(char *buf); - -// End streaming sectors. -VCHPRE_ int VCHPOST_ vc_filesys_read_sectors_end(uint32_t *sectors_read); - -// Begin writing sectors from VideoCore. -VCHPRE_ int VCHPOST_ vc_filesys_write_sectors_begin(const char *path, uint32_t sector, uint32_t count); - -// Write the next sector. -VCHPRE_ int VCHPOST_ vc_filesys_write_sector(const char *buf); - -// End streaming sectors. -VCHPRE_ int VCHPOST_ vc_filesys_write_sectors_end(uint32_t *sectors_written); - -#endif //VCFILESYS_H_ - diff --git a/vc/include/interface/vmcs_host/vcfilesys_defs.h b/vc/include/interface/vmcs_host/vcfilesys_defs.h @@ -1,88 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// File service required types - -#ifndef VCFILESYS_DEFS_H -#define VCFILESYS_DEFS_H - -#include <time.h> // for time_t - -/* Define type fattributes_t and struct dirent for use in file system functions */ - -typedef int fattributes_t; -//enum {ATTR_RDONLY=1, ATTR_DIRENT=2}; -#define ATTR_RDONLY 0x01 /* Read only file attributes */ -#define ATTR_HIDDEN 0x02 /* Hidden file attributes */ -#define ATTR_SYSTEM 0x04 /* System file attributes */ -#define ATTR_VOLUME 0x08 /* Volume Label file attributes */ -#define ATTR_DIRENT 0x10 /* Dirrectory file attributes */ -#define ATTR_ARCHIVE 0x20 /* Archives file attributes */ -#define ATTR_NORMAL 0x00 /* Normal file attributes */ - -#define D_NAME_MAX_SIZE 256 - -#ifndef _DIRENT_H // This should really be in a dirent.h header to avoid conflicts -struct dirent -{ - char d_name[D_NAME_MAX_SIZE]; - unsigned int d_size; - fattributes_t d_attrib; - time_t d_creatime; - time_t d_modtime; -}; -#endif // ifndef _DIRENT_H - -#define FS_MAX_PATH 256 // The maximum length of a pathname -/* Although not used in the API, this value is required on the host and -VC01 sides of the file system, even if there is no host side. Putting it in -vc_fileservice_defs.h is not appropriate as it would only be included if there -was a host side. */ - -/* File system error codes */ -#define FS_BAD_USER -7000 // The task isn't registered as a file system user - -#define FS_BAD_FILE -7001 // The path or filename or file descriptor is invalid -#define FS_BAD_PARM -7002 // Invalid parameter given -#define FS_ACCESS -7003 // File access conflict -#define FS_MAX_FILES -7004 // Maximum number of files already open -#define FS_NOEMPTY -7005 // Directory isn't empty -#define FS_MAX_SIZE -7006 // File is over the maximum file size - -#define FS_NO_DISK -7007 // No disk is present, or the disk has not been opened -#define FS_DISK_ERR -7008 // There is a problem with the disk - -#define FS_IO_ERROR -7009 // Driver level error - -#define FS_FMT_ERR -7010 // Format error - -#define FS_NO_BUFFER -7011 // Internal Nucleus File buffer not available -#define FS_NUF_INT -7012 // Internal Nucleus File error - -#define FS_UNSPEC_ERR -7013 // Unspecified error - -#endif diff --git a/vc/include/interface/vmcs_host/vcgencmd.h b/vc/include/interface/vmcs_host/vcgencmd.h @@ -1,95 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// General command service API - -#ifndef GENCMD_H -#define GENCMD_H - -#include "vchost_config.h" -#include "interface/vchi/vchi.h" - -VCHPRE_ void VCHPOST_ vc_vchi_gencmd_init(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections ); - - -/* Initialise general command service. Returns it's interface number. This initialises - the host side of the interface, it does not send anything to VideoCore. */ - -VCHPRE_ int VCHPOST_ vc_gencmd_init(void); - -/* Stop the service from being used. */ - -VCHPRE_ void VCHPOST_ vc_gencmd_stop(void); - -/* Return the service number (-1 if not running). */ -VCHPRE_ int VCHPOST_ vc_gencmd_inum(void); - -/****************************************************************************** -Send commands to VideoCore. -These all return 0 for success. They return VC_MSGFIFO_FIFO_FULL if there is -insufficient space for the whole message in the fifo, and none of the message is -sent. -******************************************************************************/ - -/* send command to general command serivce */ -VCHPRE_ int VCHPOST_ vc_gencmd_send( const char *format, ... ); - -/* get resonse from general command serivce */ -VCHPRE_ int VCHPOST_ vc_gencmd_read_response(char *response, int maxlen); - -/* convenience function to send command and receive the response */ -VCHPRE_ int VCHPOST_ vc_gencmd(char *response, int maxlen, const char *format, ...); - -/* read part of a response from the general command service */ -VCHPRE_ int VCHPOST_ vc_gencmd_read_response_partial(char *response, int nbytes); - -/* if reading with vc_gencmd_read_response_partial end response reads with this */ -VCHPRE_ int VCHPOST_ vc_gencmd_close_response_partial(void); - -/* get state of reading of response */ -VCHPRE_ int VCHPOST_ vc_gencmd_read_partial_state(void); - -/****************************************************************************** -Utilities to help interpret the responses. -******************************************************************************/ - -/* Read the value of a property=value type pair from a string (typically VideoCore's - response to a general command). Return non-zero if found. */ -VCHPRE_ int VCHPOST_ vc_gencmd_string_property(char *text, const char *property, char **value, int *length); - -/* Read the numeric value of a property=number field from a response string. Return - non-zero if found. */ -VCHPRE_ int VCHPOST_ vc_gencmd_number_property(char *text, const char *property, int *number); - -/* Send a command until the desired response is received, the error message is detected, or the timeout */ -VCHPRE_ int VCHPOST_ vc_gencmd_until( char *cmd, - const char *property, - char *value, - const char *error_string, - int timeout); - -#endif diff --git a/vc/include/interface/vmcs_host/vchost.h b/vc/include/interface/vmcs_host/vchost.h @@ -1,273 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCHOST_H -#define VCHOST_H - -#include "vchost_config.h" -#include "vcfilesys_defs.h" -#include "interface/vcos/vcos.h" //for VCHPRE_ abd VCHPOST_ macro's for func declaration -#include "interface/vmcs_host/vc_fileservice_defs.h" // for VC_O_XXX file definitions -#include "interface/vchi/vchi.h" - -#define UNUSED_PARAMETER(x) ((void)(x))/* macro to suppress not use warning */ - -/*---------------------------------------------------------------------------*/ -/* Byte-swapping, dependant on host's orientation */ -/*---------------------------------------------------------------------------*/ - -#ifndef VC_HOST_IS_BIG_ENDIAN -#define VC_HTOV32(val) (val) -#define VC_HTOV16(val) (val) -#define VC_VTOH32(val) (val) -#define VC_VTOH16(val) (val) -#else -static unsigned long VC_HTOV32(unsigned long val) { - return ((val<<24) | ((val&0xff00)<<8) | ((val>>8)&0xff00) | ((val>>24)&0xff)); } -static unsigned short VC_HTOV16(unsigned short val) { - return ((val<<8)|(val>>8)); } -static unsigned long VC_VTOH32(unsigned long val) { - return ((val<<24) | ((val&0xff00)<<8) | ((val>>8)&0xff00) | ((val>>24)&0xff)); } -static unsigned short VC_VTOH16(unsigned short val) { - return ((val<<8)|(val>>8)); } -#endif - -/*---------------------------------------------------------------------------*/ -/* Host port related functions */ -/*---------------------------------------------------------------------------*/ - -/* Boot a bin file from flash into RAM. Returns the id of the application running */ - -VCHPRE_ int VCHPOST_ vc_host_boot(char *cmd_line, void *binimg, int nbytes, int bootloader); - -/* Perform any platform specific initialisations. */ - -VCHPRE_ int VCHPOST_ vc_host_init(void); - -/* Read a multiple of 16 bytes from VideoCore. host_addr has no particular alignment, - but it is important that it transfers the data in 16-bit chunks if this is possible. */ - -VCHPRE_ int VCHPOST_ vc_host_read_consecutive(void *host_addr, uint32_t vc_addr, int nbytes, int channel); - -#ifdef VC_HOST_IS_BIG_ENDIAN -// Reads from VideoCore with an implicit swap of each pair of bytes. -VCHPRE_ int VCHPOST_ vc_host_read_byteswapped(void *host_addr, uint32_t vc_addr, int nbytes, int channel); -#endif - -/* Write a multiple of 16 bytes to VideoCore. host_addr has no particular alignment, - but it is important that it transfers the data in 16-bit chunks if this is possible. */ - -VCHPRE_ int VCHPOST_ vc_host_write_consecutive(uint32_t vc_addr, void *host_addr, int nbytes, int channel); - -#ifdef VC_HOST_IS_BIG_ENDIAN -// Write to VideoCore with an implicit swap of each pair of bytes. -VCHPRE_ int VCHPOST_ vc_host_write_byteswapped(uint32_t vc_addr, void *host_addr, int nbytes, int channel); -#endif - -/* Send an interrupt to VideoCore. */ - -VCHPRE_ int VCHPOST_ vc_host_send_interrupt(int channel); - -/* Wait for an interrupt from VideoCore. This can return immediately if applications - are happy to busy-wait. */ - -VCHPRE_ int VCHPOST_ vc_host_wait_interrupt(void); - -/* Tell the host to act on or ignore interrupts. */ - -VCHPRE_ void VCHPOST_ vc_host_interrupts(int on); - -/* Function called when there is some kind of internal error. Breakpoints can be set on - this for debugging. */ - -VCHPRE_ void VCHPOST_ vc_error(void); - - -/*---------------------------------------------------------------------------*/ -/* Event (interrupt) related functions */ -/*---------------------------------------------------------------------------*/ - -// Minimum number of event objects an implementation should support. -// Sufficient for 2 per 8 interfaces/services + 4 others -#define VC_EVENT_MAX_NUM 20 - -/* Create (and clear) an event. Returns a pointer to the event object. */ -VCHPRE_ void * VCHPOST_ vc_event_create(void); - -/* Wait for an event to be set, blocking until it is set. - Only one thread may be waiting at any one time. - The event is automatically cleared on leaving this function. */ -VCHPRE_ void VCHPOST_ vc_event_wait(void *sig); - -/* Reads the state of an event (for polling systems) */ -VCHPRE_ int VCHPOST_ vc_event_status(void *sig); - -/* Forcibly clears any pending event */ -VCHPRE_ void VCHPOST_ vc_event_clear(void *sig); - -/* Sets an event - can be called from any thread */ -VCHPRE_ void VCHPOST_ vc_event_set(void *sig); - -/* Register the calling task to be notified of an event. */ -VCHPRE_ void VCHPOST_ vc_event_register(void *ievent); - -/* Set events to block, stopping polling mode. */ -VCHPRE_ void VCHPOST_ vc_event_blocking(void); - -/*---------------------------------------------------------------------------*/ -/* Semaphore related functions */ -/*---------------------------------------------------------------------------*/ - -// Minimum number of locks an implementation should support. - -#define VC_LOCK_MAX_NUM 32 - -// Create a lock. Returns a pointer to the lock object. A lock is initially available -// just once. - -VCHPRE_ void * VCHPOST_ vc_lock_create(void); - -// Obtain a lock. Block until we have it. Locks are not re-entrant for the same thread. - -VCHPRE_ void VCHPOST_ vc_lock_obtain(void *lock); - -// Release a lock. Anyone can call this, even if they didn't obtain the lock first. - -VCHPRE_ void VCHPOST_ vc_lock_release(void *lock); - -/*---------------------------------------------------------------------------*/ -/* File system related functions */ -/*---------------------------------------------------------------------------*/ - -// Initialises the host dependent file system functions for use -VCHPRE_ void VCHPOST_ vc_hostfs_init(void); -VCHPRE_ void VCHPOST_ vc_hostfs_exit(void); - -// Low level file system functions equivalent to close(), lseek(), open(), read() and write() -VCHPRE_ int VCHPOST_ vc_hostfs_close(int fildes); - -VCHPRE_ long VCHPOST_ vc_hostfs_lseek(int fildes, long offset, int whence); - -VCHPRE_ int64_t VCHPOST_ vc_hostfs_lseek64(int fildes, int64_t offset, int whence); - -VCHPRE_ int VCHPOST_ vc_hostfs_open(const char *path, int vc_oflag); - -VCHPRE_ int VCHPOST_ vc_hostfs_read(int fildes, void *buf, unsigned int nbyte); - -VCHPRE_ int VCHPOST_ vc_hostfs_write(int fildes, const void *buf, unsigned int nbyte); - -// Ends a directory listing iteration -VCHPRE_ int VCHPOST_ vc_hostfs_closedir(void *dhandle); - -// Formats the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_hostfs_format(const char *path); - -// Returns the amount of free space on the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_hostfs_freespace(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_hostfs_freespace64(const char *path); - -// Gets the attributes of the named file -VCHPRE_ int VCHPOST_ vc_hostfs_get_attr(const char *path, fattributes_t *attr); - -// Creates a new directory -VCHPRE_ int VCHPOST_ vc_hostfs_mkdir(const char *path); - -// Starts a directory listing iteration -VCHPRE_ void * VCHPOST_ vc_hostfs_opendir(const char *dirname); - -// Directory listing iterator -VCHPRE_ struct dirent * VCHPOST_ vc_hostfs_readdir_r(void *dhandle, struct dirent *result); - -// Deletes a file or (empty) directory -VCHPRE_ int VCHPOST_ vc_hostfs_remove(const char *path); - -// Renames a file, provided the new name is on the same file system as the old -VCHPRE_ int VCHPOST_ vc_hostfs_rename(const char *oldfile, const char *newfile); - -// Sets the attributes of the named file -VCHPRE_ int VCHPOST_ vc_hostfs_set_attr(const char *path, fattributes_t attr); - -// Truncates a file at its current position -VCHPRE_ int VCHPOST_ vc_hostfs_setend(int fildes); - -// Returns the total amount of space on the drive that contains the given path -VCHPRE_ int VCHPOST_ vc_hostfs_totalspace(const char *path); -VCHPRE_ int64_t VCHPOST_ vc_hostfs_totalspace64(const char *path); - -// Return millisecond resolution system time, only used for differences -VCHPRE_ int VCHPOST_ vc_millitime(void); - -// Invalidates any cluster chains in the FAT that are not referenced in any directory structures -VCHPRE_ void VCHPOST_ vc_hostfs_scandisk(const char *path); - -// Checks whether or not a FAT filesystem is corrupt or not. If fix_errors is TRUE behaves exactly as vc_filesys_scandisk. -VCHPRE_ int VCHPOST_ vc_hostfs_chkdsk(const char *path, int fix_errors); - -/*---------------------------------------------------------------------------*/ -/* These functions only need to be implemented for the test system. */ -/*---------------------------------------------------------------------------*/ - -// Open a log file. -VCHPRE_ void VCHPOST_ vc_log_open(const char *fname); - -// Flush any pending data to the log file. -VCHPRE_ void VCHPOST_ vc_log_flush(void); - -// Close the log file. -VCHPRE_ void VCHPOST_ vc_log_close(void); - -// Log an error. -VCHPRE_ void VCHPOST_ vc_log_error(const char *format, ...); - -// Log a warning. -VCHPRE_ void VCHPOST_ vc_log_warning(const char *format, ...); - -// Write a message to the log. -VCHPRE_ void VCHPOST_ vc_log_msg(const char *format, ...); - -// Flush the log. -VCHPRE_ void VCHPOST_ vc_log_flush(void); - -// Return the total number of warnings and errors logged. -VCHPRE_ void VCHPOST_ vc_log_counts(int *warnings, int *errors); - -// Wait for the specified number of microseconds. Used in test system only. -VCHPRE_ void VCHPOST_ vc_sleep(int ms); - -// Get a time value in milliseconds. Used for measuring time differences -VCHPRE_ uint32_t VCHPOST_ vc_time(void); - -// Check timing functions are available. Use in calibrating tests. -VCHPRE_ int VCHPOST_ calibrate_sleep (const char *data_dir); - -/*---------------------------------------------------------------------------*/ -/* Functions to allow dynamic service creation */ -/*---------------------------------------------------------------------------*/ - -VCHPRE_ void VCHPOST_ vc_host_get_vchi_state(VCHI_INSTANCE_T *initialise_instance, VCHI_CONNECTION_T **connection); - -#endif diff --git a/vc/include/interface/vmcs_host/vchostreq.h b/vc/include/interface/vmcs_host/vchostreq.h @@ -1,108 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCHOSTREQ_H -#define VCHOSTREQ_H - -#include "vc_hostreq_defs.h" -#include "vchost_config.h" -#include <time.h> - -#include "interface/vchi/vchi.h" - -VCHPRE_ void VCHPOST_ vc_vchi_hostreq_init(VCHI_INSTANCE_T initialise_instance, VCHI_CONNECTION_T **connections, uint32_t num_connections ); -//These are originally in vchostmem.c, we only provide them here for backward compatibility -//Host apps should be using bufman service to read/write host memory -VCHPRE_ int VCHPOST_ vchostreq_readmem( void* host_addr, void *vc_addr, int len ); -VCHPRE_ int VCHPOST_ vchostreq_writemem( void* host_addr, void *vc_addr, int len, int channel ); - - -VCHPRE_ int VCHPOST_ vc_hostreq_init (void); - -VCHPRE_ void VCHPOST_ vc_hostreq_stop (void); - -/* Supplies current key settings (preferably when there is a change) */ -VCHPRE_ void VCHPOST_ vc_hostreq_keychange(keys_t keys); - -/* Sets a user notify function to be called for the given notify event */ -VCHPRE_ int32_t VCHPOST_ vc_hostreq_set_notify( const VC_HRNOTIFY_T notify_event, VC_HRNOTIFY_CALLBACK_T notifyfunc ); - -/* Sets a user callback to be called for the given hostreq event */ -VCHPRE_ int32_t VCHPOST_ vc_hostreq_set_data_callback( const int cmd, VC_HRDATA_CALLBACK_T callback, void *userdata ); - -/*---------------------------------------------------------------------------*/ -/*** The following require a host/application specific implementation ***/ - -/* Change key capture settings (might be ignored) */ -VCHPRE_ void VCHPOST_ vc_hostreq_capturekeys(keys_t keymask); - - -/* Play a zero terminated sequence on the vibrator */ -VCHPRE_ void VCHPOST_ vc_hostreq_vibratorplay(const int *sequence); - - -/* Stop the vibrator sequence immediately */ -VCHPRE_ void VCHPOST_ vc_hostreq_vibratorstop(void); - - -/* Switch backlight on or off. */ -VCHPRE_ void VCHPOST_ vc_hostreq_keylight(int state); - - -/* Set LEDs to specific brightness and colour levels. */ -VCHPRE_ void VCHPOST_ vc_hostreq_setleds(led_t ledvalues); - - -/* Returns seconds since midnight (00:00.00) Jan 1 1970, local time. */ -VCHPRE_ time_t VCHPOST_ vc_hostreq_time(void); - - -/* Send an event with the given eventcode to the host. */ -VCHPRE_ void VCHPOST_ vc_hostreq_notify(int eventcode, int param); - -/* Receive config data for subsequent hostreq_rendertext events. */ -VCHPRE_ void VCHPOST_ vc_hostreq_configtext(char *config_data, int len); - -/* Render a text string as a bitmap and then return it to VideoCore. */ -VCHPRE_ void VCHPOST_ vc_hostreq_rendertext(char *text, int len); - -/* Receive link information from a media file. */ -VCHPRE_ void VCHPOST_ vc_hostreq_linkdata(char *link_data, int len); - -/* Receive DMB FIC data */ -VCHPRE_ void VCHPOST_ vc_hostreq_dmb_fic(char *data, int len); - -/* Receive DMB PAD data */ -VCHPRE_ void VCHPOST_ vc_hostreq_dmb_pad(char *data, int len); - -/* Receive DMB DATA data */ -VCHPRE_ void VCHPOST_ vc_hostreq_dmb_data(char *data, int len); - -/* Request keypress info (from RTSP server). */ -VCHPRE_ void VCHPOST_ vc_hostreq_keyin(void); - -#endif diff --git a/vc/include/interface/vmcs_host/vcilcs.h b/vc/include/interface/vmcs_host/vcilcs.h @@ -1,103 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenMAX IL Component Service definitions - -#ifndef ILCS_H -#define ILCS_H - -#include "interface/vmcs_host/khronos/IL/OMX_Component.h" -#include "interface/vmcs_host/vc_ilcs_defs.h" - -struct ILCS_SERVICE_T; -typedef struct ILCS_SERVICE_T ILCS_SERVICE_T; - -struct ILCS_COMMON_T; -typedef struct ILCS_COMMON_T ILCS_COMMON_T; - -typedef void (*IL_FN_T)(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); - -typedef struct { - IL_FN_T *fns; - ILCS_COMMON_T *(*ilcs_common_init)(ILCS_SERVICE_T *); - void (*ilcs_common_deinit)(ILCS_COMMON_T *st); - void (*ilcs_thread_init)(ILCS_COMMON_T *st); - unsigned char *(*ilcs_mem_lock)(OMX_BUFFERHEADERTYPE *buffer); - void (*ilcs_mem_unlock)(OMX_BUFFERHEADERTYPE *buffer); -} ILCS_CONFIG_T; - -// initialise the VideoCore IL Component service -// returns pointer to state on success, NULL on failure -#ifdef USE_VCHIQ_ARM -VCHPRE_ ILCS_SERVICE_T VCHPOST_ *ilcs_init(VCHIQ_INSTANCE_T state, void **connection, ILCS_CONFIG_T *config, int use_memmgr); -#else -VCHPRE_ ILCS_SERVICE_T VCHPOST_ *ilcs_init(VCHIQ_STATE_T *state, void **connection, ILCS_CONFIG_T *config, int use_memmgr); -#endif - -// deinitialises the IL Component service -VCHPRE_ void VCHPOST_ ilcs_deinit(ILCS_SERVICE_T *ilcs); - -// returns 1 if the current thread is the ilcs thread, 0 otherwise -VCHPRE_ int VCHPOST_ ilcs_thread_current(void *param); - -// returns pointer to shared state -VCHPRE_ ILCS_COMMON_T *ilcs_get_common(ILCS_SERVICE_T *ilcs); - -VCHPRE_ int VCHPOST_ ilcs_execute_function(ILCS_SERVICE_T *ilcs, IL_FUNCTION_T func, void *data, int len, void *resp, int *rlen); -VCHPRE_ OMX_ERRORTYPE VCHPOST_ ilcs_pass_buffer(ILCS_SERVICE_T *ilcs, IL_FUNCTION_T func, void *reference, OMX_BUFFERHEADERTYPE *pBuffer); -VCHPRE_ OMX_BUFFERHEADERTYPE * VCHPOST_ ilcs_receive_buffer(ILCS_SERVICE_T *ilcs, void *call, int clen, OMX_COMPONENTTYPE **pComp); - -// bulks are 16 bytes aligned, implicit in use of vchiq -#define ILCS_ALIGN 16 - -#define ILCS_ROUND_UP(x) ((((unsigned long)(x))+ILCS_ALIGN-1) & ~(ILCS_ALIGN-1)) -#define ILCS_ROUND_DOWN(x) (((unsigned long)(x)) & ~(ILCS_ALIGN-1)) -#define ILCS_ALIGNED(x) (((unsigned long)(x) & (ILCS_ALIGN-1)) == 0) - - -#ifdef _VIDEOCORE -#include "vcfw/logging/logging.h" - -#ifdef ILCS_LOGGING - -#define LOG_MSG ILCS_LOGGING -extern void ilcs_log_event_handler(OMX_HANDLETYPE hComponent, OMX_PTR pAppData, OMX_EVENTTYPE eEvent, - OMX_U32 nData1,OMX_U32 nData2,OMX_PTR pEventData); - -#else - -#define LOG_MSG LOGGING_GENERAL -#define ilcs_log_event_handler(...) -extern void dummy_logging_message(int level, const char *format, ...); -#undef logging_message -#define logging_message if (1) {} else dummy_logging_message - -#endif // ILCS_LOGGING -#endif // _VIDEOCORE - -#endif // ILCS_H - diff --git a/vc/include/interface/vmcs_host/vcilcs_common.h b/vc/include/interface/vmcs_host/vcilcs_common.h @@ -1,83 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenMAX IL Component Service common - Host side header - -typedef struct { - OMX_U32 port; - IL_FUNCTION_T func; - OMX_BOOL bEGL; - OMX_U32 numBuffers; - OMX_DIRTYPE dir; -} VC_PRIVATE_PORT_T; - -struct _VC_PRIVATE_COMPONENT_T { - OMX_COMPONENTTYPE *comp; - void *reference; - OMX_U32 numPorts; - OMX_CALLBACKTYPE callbacks; - OMX_PTR callback_state; - VC_PRIVATE_PORT_T *port; - struct _VC_PRIVATE_COMPONENT_T *next; -}; -typedef struct _VC_PRIVATE_COMPONENT_T VC_PRIVATE_COMPONENT_T; - -struct ILCS_COMMON_T { - VCOS_SEMAPHORE_T component_lock; - VC_PRIVATE_COMPONENT_T *component_list; - ILCS_SERVICE_T *ilcs; -}; - -VCHPRE_ void VCHPOST_ vcilcs_config(ILCS_CONFIG_T *config); - -// functions that implement incoming functions calls -// from VideoCore components to host based components -VCHPRE_ void VCHPOST_ vcil_in_get_state(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_get_parameter(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_set_parameter(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_get_config(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_set_config(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_use_buffer(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_free_buffer(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_empty_this_buffer(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_fill_this_buffer(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_get_component_version(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_get_extension_index(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_in_component_role_enum(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); - -// functions that implement callbacks from VideoCore -// components to the host core. -// The prefix is vcil_out since they implement part -// of the API that the host uses out to VideoCore -VCHPRE_ void VCHPOST_ vcil_out_event_handler(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_out_empty_buffer_done(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); -VCHPRE_ void VCHPOST_ vcil_out_fill_buffer_done(ILCS_COMMON_T *st, void *call, int clen, void *resp, int *rlen); - -// functions used by the host IL core -VCHPRE_ OMX_ERRORTYPE VCHPOST_ vcil_out_get_debug_information(ILCS_COMMON_T *st, OMX_STRING debugInfo, OMX_S32 *pLen); -VCHPRE_ OMX_ERRORTYPE VCHPOST_ vcil_out_create_component(ILCS_COMMON_T *st, OMX_HANDLETYPE hComponent, OMX_STRING component_name); -VCHPRE_ OMX_ERRORTYPE VCHPOST_ vcil_out_component_name_enum(ILCS_COMMON_T *st, OMX_STRING cComponentName, OMX_U32 nNameLength, OMX_U32 nIndex); diff --git a/vc/include/vcinclude/common.h b/vc/include/vcinclude/common.h @@ -1,140 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef __VC_INCLUDE_COMMON_H__ -#define __VC_INCLUDE_COMMON_H__ - -#include "interface/vcos/vcos_stdint.h" -#include "interface/vctypes/vc_image_types.h" - -#if defined(__HIGHC__) && defined(_VIDEOCORE) && !defined(_I386) -// __HIGHC__ is only available with MW -// The scvc plugins are compiled (bizarrely) on an x86 with _VIDEOCORE set! -#include <vc/intrinsics.h> -#endif - -#ifdef __COVERITY__ -#ifndef _Rarely -#define _Rarely(x) (x) -#endif -#ifndef _Usually -#define _Usually(x) (x) -#endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __SYMBIAN32__ -# ifndef INLINE -# define INLINE __inline -# endif - -/* Align a pointer/integer by rounding up/down */ -#define ALIGN_DOWN(p, n) ((uint32_t)(p) - ( (uint32_t)(p) % (uint32_t)(n) )) -#define ALIGN_UP(p, n) ALIGN_DOWN((uint32_t)(p) + (uint32_t)(n) - 1, (n)) - -#elif defined (VCMODS_LCC) -#include <limits.h> - - -#elif !defined(__KERNEL__) -#include <limits.h> - -#endif - - -/*}}}*/ - -/* Fixed-point types */ -typedef unsigned short uint8p8_t; -typedef signed short sint8p8_t; -typedef unsigned short uint4p12_t; -typedef signed short sint4p12_t; -typedef signed short sint0p16_t; -typedef signed char sint8p0_t; -typedef unsigned char uint0p8_t; -typedef signed long int24p8_t; - -/*{{{ Common typedefs */ - -typedef enum bool_e -{ - VC_FALSE = 0, - VC_TRUE = 1, -} VC_BOOL_T; - -#ifndef bool_t -#define bool_t VC_BOOL_T -#endif - -/*}}}*/ - -/*{{{ Common macros */ - - -/* Align a pointer/integer by rounding up/down */ -#define ALIGN_DOWN(p, n) ((uintptr_t)(p) - ( (uintptr_t)(p) % (uintptr_t)(n) )) -#define ALIGN_UP(p, n) ALIGN_DOWN((uintptr_t)(p) + (uintptr_t)(n) - 1, (n)) - -#define CLIP(lower, n, upper) _min((upper), _max((lower), (n))) - -/*}}}*/ - -/*{{{ Debugging and profiling macros */ - -#if 0 -/* There's already an assert_once in <logging/logging.h> */ -#ifdef DEBUG -#define assert_once(x) \ - { \ - static uint8_t ignore = 0; \ - if(!ignore) \ - { \ - assert(x); \ - ignore++; \ - } \ - } -#else -#define assert_once(x) (void)0 -#endif -#endif /* 0 */ - -#if defined(__HIGHC__) && !defined(NDEBUG) -/* HighC lacks a __FUNCTION__ preproc symbol... :( */ -#define profile_rename(name) _ASM(".global " name "\n" name ":\n") -#else -#define profile_rename(name) (void)0 -#endif - -/*}}}*/ -#ifdef __cplusplus - } -#endif -#endif /* __VCINCLUDE_COMMON_H__ */ - diff --git a/vc/include/vcinclude/vc_image_types.h b/vc/include/vcinclude/vc_image_types.h @@ -1,33 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef __VC_INCLUDE_IMAGE_TYPES_H__ -#define __VC_INCLUDE_IMAGE_TYPES_H__ - -#include "interface/vctypes/vc_image_types.h" - -#endif /* __VC_INCLUDE_IMAGE_TYPES_H__ */ diff --git a/vc/include/vcinclude/vcore.h b/vc/include/vcinclude/vcore.h @@ -1,64 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VCORE_H -#define VCORE_H - -#ifdef __VIDEOCORE__ -#include "vc/intrinsics.h" -#undef asm -#define asm(x) _ASM(x) - -#undef min -#define min(x,y) _min(x,y) - -#undef max -#define max(x,y) _max(x,y) - -#ifndef abs -#define abs(x) _abs(x) -#endif -#else -#define _vasm asm -#define _bkpt() do {asm(" bkpt");}while(0) -#define _di() do{asm(" di");}while(0) -#define _ei() do{asm(" ei");}while(0) -#define _nop() do{asm(" nop");}while(0) -#define _sleep() do{asm(" sleep");}while(0) - -#undef min -#define min(x,y) ((x)<(y) ? (x):(y)) - -#undef max -#define max(x,y) ((x)>(y) ? (x):(y)) - -#ifndef abs -#define abs(x) ((x)>=0 ? (x):-(x)) -#endif -#endif - -#endif diff --git a/vc/lib/libEGL.so b/vc/lib/libEGL.so Binary files differ. diff --git a/vc/lib/libEGL_static.a b/vc/lib/libEGL_static.a Binary files differ. diff --git a/vc/lib/libGLESv1_CM.so b/vc/lib/libGLESv1_CM.so @@ -1 +0,0 @@ -libGLESv2.so- \ No newline at end of file diff --git a/vc/lib/libGLESv2.so b/vc/lib/libGLESv2.so Binary files differ. diff --git a/vc/lib/libGLESv2_static.a b/vc/lib/libGLESv2_static.a Binary files differ. diff --git a/vc/lib/libOpenVG.so b/vc/lib/libOpenVG.so Binary files differ. diff --git a/vc/lib/libWFC.so b/vc/lib/libWFC.so Binary files differ. diff --git a/vc/lib/libbcm_host.so b/vc/lib/libbcm_host.so Binary files differ. diff --git a/vc/lib/libcontainers.so b/vc/lib/libcontainers.so Binary files differ. diff --git a/vc/lib/libdebug_sym.so b/vc/lib/libdebug_sym.so Binary files differ. diff --git a/vc/lib/libdebug_sym_static.a b/vc/lib/libdebug_sym_static.a Binary files differ. diff --git a/vc/lib/libkhrn_client.a b/vc/lib/libkhrn_client.a Binary files differ. diff --git a/vc/lib/libkhrn_static.a b/vc/lib/libkhrn_static.a Binary files differ. diff --git a/vc/lib/libmmal.so b/vc/lib/libmmal.so Binary files differ. diff --git a/vc/lib/libmmal_components.so b/vc/lib/libmmal_components.so Binary files differ. diff --git a/vc/lib/libmmal_core.so b/vc/lib/libmmal_core.so Binary files differ. diff --git a/vc/lib/libmmal_util.so b/vc/lib/libmmal_util.so Binary files differ. diff --git a/vc/lib/libmmal_vc_client.so b/vc/lib/libmmal_vc_client.so Binary files differ. diff --git a/vc/lib/libopenmaxil.so b/vc/lib/libopenmaxil.so Binary files differ. diff --git a/vc/lib/libvcfiled_check.a b/vc/lib/libvcfiled_check.a Binary files differ. diff --git a/vc/lib/libvchiq_arm.so b/vc/lib/libvchiq_arm.so Binary files differ. diff --git a/vc/lib/libvchostif.a b/vc/lib/libvchostif.a Binary files differ. diff --git a/vc/lib/libvcilcs.a b/vc/lib/libvcilcs.a Binary files differ. diff --git a/vc/lib/libvcos.so b/vc/lib/libvcos.so Binary files differ. diff --git a/vc/lib/libvcsm.so b/vc/lib/libvcsm.so Binary files differ. diff --git a/vc/lib/libvmcs_rpc_client.a b/vc/lib/libvmcs_rpc_client.a Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_asf.so b/vc/lib/plugins/plugins/reader_asf.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_avi.so b/vc/lib/plugins/plugins/reader_avi.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_binary.so b/vc/lib/plugins/plugins/reader_binary.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_flv.so b/vc/lib/plugins/plugins/reader_flv.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_metadata_id3.so b/vc/lib/plugins/plugins/reader_metadata_id3.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_mkv.so b/vc/lib/plugins/plugins/reader_mkv.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_mp4.so b/vc/lib/plugins/plugins/reader_mp4.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_mpga.so b/vc/lib/plugins/plugins/reader_mpga.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_ps.so b/vc/lib/plugins/plugins/reader_ps.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_qsynth.so b/vc/lib/plugins/plugins/reader_qsynth.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_raw_video.so b/vc/lib/plugins/plugins/reader_raw_video.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_rcv.so b/vc/lib/plugins/plugins/reader_rcv.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_rtp.so b/vc/lib/plugins/plugins/reader_rtp.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_rtsp.so b/vc/lib/plugins/plugins/reader_rtsp.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_rv9.so b/vc/lib/plugins/plugins/reader_rv9.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_simple.so b/vc/lib/plugins/plugins/reader_simple.so Binary files differ. diff --git a/vc/lib/plugins/plugins/reader_wav.so b/vc/lib/plugins/plugins/reader_wav.so Binary files differ. diff --git a/vc/lib/plugins/plugins/writer_avi.so b/vc/lib/plugins/plugins/writer_avi.so Binary files differ. diff --git a/vc/lib/plugins/plugins/writer_binary.so b/vc/lib/plugins/plugins/writer_binary.so Binary files differ. diff --git a/vc/lib/plugins/plugins/writer_dummy.so b/vc/lib/plugins/plugins/writer_dummy.so Binary files differ. diff --git a/vc/lib/plugins/plugins/writer_mp4.so b/vc/lib/plugins/plugins/writer_mp4.so Binary files differ. diff --git a/vc/lib/plugins/plugins/writer_raw_video.so b/vc/lib/plugins/plugins/writer_raw_video.so Binary files differ. diff --git a/vc/lib/plugins/plugins/writer_simple.so b/vc/lib/plugins/plugins/writer_simple.so Binary files differ. diff --git a/vc/lib/plugins/reader_asf.so b/vc/lib/plugins/reader_asf.so Binary files differ. diff --git a/vc/lib/plugins/reader_avi.so b/vc/lib/plugins/reader_avi.so Binary files differ. diff --git a/vc/lib/plugins/reader_binary.so b/vc/lib/plugins/reader_binary.so Binary files differ. diff --git a/vc/lib/plugins/reader_flv.so b/vc/lib/plugins/reader_flv.so Binary files differ. diff --git a/vc/lib/plugins/reader_metadata_id3.so b/vc/lib/plugins/reader_metadata_id3.so Binary files differ. diff --git a/vc/lib/plugins/reader_mkv.so b/vc/lib/plugins/reader_mkv.so Binary files differ. diff --git a/vc/lib/plugins/reader_mp4.so b/vc/lib/plugins/reader_mp4.so Binary files differ. diff --git a/vc/lib/plugins/reader_mpga.so b/vc/lib/plugins/reader_mpga.so Binary files differ. diff --git a/vc/lib/plugins/reader_ps.so b/vc/lib/plugins/reader_ps.so Binary files differ. diff --git a/vc/lib/plugins/reader_qsynth.so b/vc/lib/plugins/reader_qsynth.so Binary files differ. diff --git a/vc/lib/plugins/reader_raw_video.so b/vc/lib/plugins/reader_raw_video.so Binary files differ. diff --git a/vc/lib/plugins/reader_rcv.so b/vc/lib/plugins/reader_rcv.so Binary files differ. diff --git a/vc/lib/plugins/reader_rtp.so b/vc/lib/plugins/reader_rtp.so Binary files differ. diff --git a/vc/lib/plugins/reader_rtsp.so b/vc/lib/plugins/reader_rtsp.so Binary files differ. diff --git a/vc/lib/plugins/reader_rv9.so b/vc/lib/plugins/reader_rv9.so Binary files differ. diff --git a/vc/lib/plugins/reader_simple.so b/vc/lib/plugins/reader_simple.so Binary files differ. diff --git a/vc/lib/plugins/reader_wav.so b/vc/lib/plugins/reader_wav.so Binary files differ. diff --git a/vc/lib/plugins/writer_avi.so b/vc/lib/plugins/writer_avi.so Binary files differ. diff --git a/vc/lib/plugins/writer_binary.so b/vc/lib/plugins/writer_binary.so Binary files differ. diff --git a/vc/lib/plugins/writer_dummy.so b/vc/lib/plugins/writer_dummy.so Binary files differ. diff --git a/vc/lib/plugins/writer_mp4.so b/vc/lib/plugins/writer_mp4.so Binary files differ. diff --git a/vc/lib/plugins/writer_raw_video.so b/vc/lib/plugins/writer_raw_video.so Binary files differ. diff --git a/vc/lib/plugins/writer_simple.so b/vc/lib/plugins/writer_simple.so Binary files differ. diff --git a/vc/sbin/vcfiled b/vc/sbin/vcfiled Binary files differ. diff --git a/vc/src/hello_pi/Makefile.include b/vc/src/hello_pi/Makefile.include @@ -1,28 +0,0 @@ - -CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -Wall -g -DHAVE_LIBOPENMAX=2 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DHAVE_LIBBCM_HOST -DUSE_EXTERNAL_LIBBCM_HOST -DUSE_VCHIQ_ARM -Wno-psabi - -LDFLAGS+=-L$(SDKSTAGE)/home/pi/tarina/vc/lib/ -lGLESv2 -lEGL -lopenmaxil -lbcm_host -lvcos -lvchiq_arm -lpthread -lrt -lm -L/home/pi/tarina/vc/src/hello_pi/libs/ilclient -L/home/pi/tarina/vc/src/hello_pi/libs/vgfont - -INCLUDES+=-I$(SDKSTAGE)/home/pi/tarina/vc/include/ -I$(SDKSTAGE)/home/pi/tarina/vc/include/interface/vcos/pthreads -I$(SDKSTAGE)/home/pi/tarina/vc/include/interface/vmcs_host/linux -I./ -I/home/pi/tarina/vc/src/hello_pi/libs/ilclient -I/home/pi/tarina/vc/src/hello_pi/libs/vgfont - -all: $(BIN) $(LIB) - -%.o: %.c - @rm -f $@ - $(CC) $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations - -%.o: %.cpp - @rm -f $@ - $(CXX) $(CFLAGS) $(INCLUDES) -g -c $< -o $@ -Wno-deprecated-declarations - -%.bin: $(OBJS) - $(CC) -o $@ -Wl,--whole-archive $(OBJS) $(LDFLAGS) -Wl,--no-whole-archive -rdynamic - -%.a: $(OBJS) - $(AR) r $@ $^ - -clean: - for i in $(OBJS); do (if test -e "$$i"; then ( rm $$i ); fi ); done - @rm -f $(BIN) $(LIB) - - diff --git a/vc/src/hello_pi/README b/vc/src/hello_pi/README @@ -1,21 +0,0 @@ -Building on Pi -++++++++++++++ - -To build the test apps on the pi, first build the libs: -make -C libs/ilclient -make -C libs/vgfont - -then by entering each test app directory and run make. E.g. - cd hello_world - make - ./hello_world.bin - -Running ./rebuild.sh will rebuild the all libs and and apps. - - -Building on a different PC -++++++++++++++++++++++++++ - -If you want to build the samples on a different machine (cross-compile) then set: -SDKSTAGE=<path/to/firmware-directory> and CC=<path/to/cross-compiler> -before running make. diff --git a/vc/src/hello_pi/hello_audio/Makefile b/vc/src/hello_pi/hello_audio/Makefile @@ -1,6 +0,0 @@ -OBJS=audio.o sinewave.o -BIN=hello_audio.bin -LDFLAGS+=-lilclient - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_audio/audio.c b/vc/src/hello_pi/hello_audio/audio.c @@ -1,426 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Audio output demo using OpenMAX IL though the ilcient helper library - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <assert.h> -#include <unistd.h> -#include <semaphore.h> - -#include "bcm_host.h" -#include "ilclient.h" - -#define N_WAVE 1024 /* dimension of Sinewave[] */ -#define PI (1<<16>>1) -#define SIN(x) Sinewave[((x)>>6) & (N_WAVE-1)] -#define COS(x) SIN((x)+(PI>>1)) -#define OUT_CHANNELS(num_channels) ((num_channels) > 4 ? 8: (num_channels) > 2 ? 4: (num_channels)) -extern short Sinewave[]; - -#ifndef countof - #define countof(arr) (sizeof(arr) / sizeof(arr[0])) -#endif - -#define BUFFER_SIZE_SAMPLES 1024 - -typedef int int32_t; - -typedef struct { - sem_t sema; - ILCLIENT_T *client; - COMPONENT_T *audio_render; - COMPONENT_T *list[2]; - OMX_BUFFERHEADERTYPE *user_buffer_list; // buffers owned by the client - uint32_t num_buffers; - uint32_t bytes_per_sample; -} AUDIOPLAY_STATE_T; - -static void input_buffer_callback(void *data, COMPONENT_T *comp) -{ - // do nothing - could add a callback to the user - // to indicate more buffers may be available. -} - -int32_t audioplay_create(AUDIOPLAY_STATE_T **handle, - uint32_t sample_rate, - uint32_t num_channels, - uint32_t bit_depth, - uint32_t num_buffers, - uint32_t buffer_size) -{ - uint32_t bytes_per_sample = (bit_depth * OUT_CHANNELS(num_channels)) >> 3; - int32_t ret = -1; - - *handle = NULL; - - // basic sanity check on arguments - if(sample_rate >= 8000 && sample_rate <= 192000 && - (num_channels >= 1 && num_channels <= 8) && - (bit_depth == 16 || bit_depth == 32) && - num_buffers > 0 && - buffer_size >= bytes_per_sample) - { - // buffer lengths must be 16 byte aligned for VCHI - int size = (buffer_size + 15) & ~15; - AUDIOPLAY_STATE_T *st; - - // buffer offsets must also be 16 byte aligned for VCHI - st = calloc(1, sizeof(AUDIOPLAY_STATE_T)); - - if(st) - { - OMX_ERRORTYPE error; - OMX_PARAM_PORTDEFINITIONTYPE param; - OMX_AUDIO_PARAM_PCMMODETYPE pcm; - int32_t s; - - ret = 0; - *handle = st; - - // create and start up everything - s = sem_init(&st->sema, 0, 1); - assert(s == 0); - - st->bytes_per_sample = bytes_per_sample; - st->num_buffers = num_buffers; - - st->client = ilclient_init(); - assert(st->client != NULL); - - ilclient_set_empty_buffer_done_callback(st->client, input_buffer_callback, st); - - error = OMX_Init(); - assert(error == OMX_ErrorNone); - - ilclient_create_component(st->client, &st->audio_render, "audio_render", ILCLIENT_ENABLE_INPUT_BUFFERS | ILCLIENT_DISABLE_ALL_PORTS); - assert(st->audio_render != NULL); - - st->list[0] = st->audio_render; - - // set up the number/size of buffers - memset(&param, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); - param.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - param.nVersion.nVersion = OMX_VERSION; - param.nPortIndex = 100; - - error = OMX_GetParameter(ILC_GET_HANDLE(st->audio_render), OMX_IndexParamPortDefinition, &param); - assert(error == OMX_ErrorNone); - - param.nBufferSize = size; - param.nBufferCountActual = num_buffers; - - error = OMX_SetParameter(ILC_GET_HANDLE(st->audio_render), OMX_IndexParamPortDefinition, &param); - assert(error == OMX_ErrorNone); - - // set the pcm parameters - memset(&pcm, 0, sizeof(OMX_AUDIO_PARAM_PCMMODETYPE)); - pcm.nSize = sizeof(OMX_AUDIO_PARAM_PCMMODETYPE); - pcm.nVersion.nVersion = OMX_VERSION; - pcm.nPortIndex = 100; - pcm.nChannels = OUT_CHANNELS(num_channels); - pcm.eNumData = OMX_NumericalDataSigned; - pcm.eEndian = OMX_EndianLittle; - pcm.nSamplingRate = sample_rate; - pcm.bInterleaved = OMX_TRUE; - pcm.nBitPerSample = bit_depth; - pcm.ePCMMode = OMX_AUDIO_PCMModeLinear; - - switch(num_channels) { - case 1: - pcm.eChannelMapping[0] = OMX_AUDIO_ChannelCF; - break; - case 3: - pcm.eChannelMapping[2] = OMX_AUDIO_ChannelCF; - pcm.eChannelMapping[1] = OMX_AUDIO_ChannelRF; - pcm.eChannelMapping[0] = OMX_AUDIO_ChannelLF; - break; - case 8: - pcm.eChannelMapping[7] = OMX_AUDIO_ChannelRS; - case 7: - pcm.eChannelMapping[6] = OMX_AUDIO_ChannelLS; - case 6: - pcm.eChannelMapping[5] = OMX_AUDIO_ChannelRR; - case 5: - pcm.eChannelMapping[4] = OMX_AUDIO_ChannelLR; - case 4: - pcm.eChannelMapping[3] = OMX_AUDIO_ChannelLFE; - pcm.eChannelMapping[2] = OMX_AUDIO_ChannelCF; - case 2: - pcm.eChannelMapping[1] = OMX_AUDIO_ChannelRF; - pcm.eChannelMapping[0] = OMX_AUDIO_ChannelLF; - break; - } - - error = OMX_SetParameter(ILC_GET_HANDLE(st->audio_render), OMX_IndexParamAudioPcm, &pcm); - assert(error == OMX_ErrorNone); - - ilclient_change_component_state(st->audio_render, OMX_StateIdle); - if(ilclient_enable_port_buffers(st->audio_render, 100, NULL, NULL, NULL) < 0) - { - // error - ilclient_change_component_state(st->audio_render, OMX_StateLoaded); - ilclient_cleanup_components(st->list); - - error = OMX_Deinit(); - assert(error == OMX_ErrorNone); - - ilclient_destroy(st->client); - - sem_destroy(&st->sema); - free(st); - *handle = NULL; - return -1; - } - - ilclient_change_component_state(st->audio_render, OMX_StateExecuting); - } - } - - return ret; -} - -int32_t audioplay_delete(AUDIOPLAY_STATE_T *st) -{ - OMX_ERRORTYPE error; - - ilclient_change_component_state(st->audio_render, OMX_StateIdle); - - error = OMX_SendCommand(ILC_GET_HANDLE(st->audio_render), OMX_CommandStateSet, OMX_StateLoaded, NULL); - assert(error == OMX_ErrorNone); - - ilclient_disable_port_buffers(st->audio_render, 100, st->user_buffer_list, NULL, NULL); - ilclient_change_component_state(st->audio_render, OMX_StateLoaded); - ilclient_cleanup_components(st->list); - - error = OMX_Deinit(); - assert(error == OMX_ErrorNone); - - ilclient_destroy(st->client); - - sem_destroy(&st->sema); - free(st); - - return 0; -} - -uint8_t *audioplay_get_buffer(AUDIOPLAY_STATE_T *st) -{ - OMX_BUFFERHEADERTYPE *hdr = NULL; - - hdr = ilclient_get_input_buffer(st->audio_render, 100, 0); - - if(hdr) - { - // put on the user list - sem_wait(&st->sema); - - hdr->pAppPrivate = st->user_buffer_list; - st->user_buffer_list = hdr; - - sem_post(&st->sema); - } - - return hdr ? hdr->pBuffer : NULL; -} - -int32_t audioplay_play_buffer(AUDIOPLAY_STATE_T *st, - uint8_t *buffer, - uint32_t length) -{ - OMX_BUFFERHEADERTYPE *hdr = NULL, *prev = NULL; - int32_t ret = -1; - - if(length % st->bytes_per_sample) - return ret; - - sem_wait(&st->sema); - - // search through user list for the right buffer header - hdr = st->user_buffer_list; - while(hdr != NULL && hdr->pBuffer != buffer && hdr->nAllocLen < length) - { - prev = hdr; - hdr = hdr->pAppPrivate; - } - - if(hdr) // we found it, remove from list - { - ret = 0; - if(prev) - prev->pAppPrivate = hdr->pAppPrivate; - else - st->user_buffer_list = hdr->pAppPrivate; - } - - sem_post(&st->sema); - - if(hdr) - { - OMX_ERRORTYPE error; - - hdr->pAppPrivate = NULL; - hdr->nOffset = 0; - hdr->nFilledLen = length; - - error = OMX_EmptyThisBuffer(ILC_GET_HANDLE(st->audio_render), hdr); - assert(error == OMX_ErrorNone); - } - - return ret; -} - -int32_t audioplay_set_dest(AUDIOPLAY_STATE_T *st, const char *name) -{ - int32_t success = -1; - OMX_CONFIG_BRCMAUDIODESTINATIONTYPE ar_dest; - - if (name && strlen(name) < sizeof(ar_dest.sName)) - { - OMX_ERRORTYPE error; - memset(&ar_dest, 0, sizeof(ar_dest)); - ar_dest.nSize = sizeof(OMX_CONFIG_BRCMAUDIODESTINATIONTYPE); - ar_dest.nVersion.nVersion = OMX_VERSION; - strcpy((char *)ar_dest.sName, name); - - error = OMX_SetConfig(ILC_GET_HANDLE(st->audio_render), OMX_IndexConfigBrcmAudioDestination, &ar_dest); - assert(error == OMX_ErrorNone); - success = 0; - } - - return success; -} - - -uint32_t audioplay_get_latency(AUDIOPLAY_STATE_T *st) -{ - OMX_PARAM_U32TYPE param; - OMX_ERRORTYPE error; - - memset(&param, 0, sizeof(OMX_PARAM_U32TYPE)); - param.nSize = sizeof(OMX_PARAM_U32TYPE); - param.nVersion.nVersion = OMX_VERSION; - param.nPortIndex = 100; - - error = OMX_GetConfig(ILC_GET_HANDLE(st->audio_render), OMX_IndexConfigAudioRenderingLatency, &param); - assert(error == OMX_ErrorNone); - - return param.nU32; -} - -#define CTTW_SLEEP_TIME 10 -#define MIN_LATENCY_TIME 20 - -static const char *audio_dest[] = {"local", "hdmi"}; -void play_api_test(int samplerate, int bitdepth, int nchannels, int dest) -{ - AUDIOPLAY_STATE_T *st; - int32_t ret; - unsigned int i, j, n; - int phase = 0; - int inc = 256<<16; - int dinc = 0; - int buffer_size = (BUFFER_SIZE_SAMPLES * bitdepth * OUT_CHANNELS(nchannels))>>3; - - assert(dest == 0 || dest == 1); - - ret = audioplay_create(&st, samplerate, nchannels, bitdepth, 10, buffer_size); - assert(ret == 0); - - ret = audioplay_set_dest(st, audio_dest[dest]); - assert(ret == 0); - - // iterate for 5 seconds worth of packets - for (n=0; n<((samplerate * 1000)/ BUFFER_SIZE_SAMPLES); n++) - { - uint8_t *buf; - int16_t *p; - uint32_t latency; - - while((buf = audioplay_get_buffer(st)) == NULL) - usleep(10*1000); - - p = (int16_t *) buf; - - // fill the buffer - for (i=0; i<BUFFER_SIZE_SAMPLES; i++) - { - int16_t val = SIN(phase); - phase += inc>>16; - inc += dinc; - if (inc>>16 < 512) - dinc++; - else - dinc--; - - for(j=0; j<OUT_CHANNELS(nchannels); j++) - { - if (bitdepth == 32) - *p++ = 0; - *p++ = val; - } - } - - // try and wait for a minimum latency time (in ms) before - // sending the next packet - while((latency = audioplay_get_latency(st)) > (samplerate * (MIN_LATENCY_TIME + CTTW_SLEEP_TIME) / 1000)) - usleep(CTTW_SLEEP_TIME*1000); - - ret = audioplay_play_buffer(st, buf, buffer_size); - assert(ret == 0); - } - - audioplay_delete(st); -} - -int main (int argc, char **argv) -{ - // 0=headphones, 1=hdmi - int audio_dest = 0; - // audio sample rate in Hz - int samplerate = 48000; - // numnber of audio channels - int channels = 2; - // number of bits per sample - int bitdepth = 16; - bcm_host_init(); - - if (argc > 1) - audio_dest = atoi(argv[1]); - if (argc > 2) - channels = atoi(argv[2]); - if (argc > 3) - samplerate = atoi(argv[3]); - - printf("Outputting audio to %s\n", audio_dest==0 ? "analogue":"hdmi"); - - play_api_test(samplerate, bitdepth, channels, audio_dest); - return 0; -} - diff --git a/vc/src/hello_pi/hello_audio/audioplay.h b/vc/src/hello_pi/hello_audio/audioplay.h @@ -1,159 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// API for host applications to deliver raw PCM samples to rendered on VideoCore - -#ifndef AUDIOPLAY_H -#define AUDIOPLAY_H - -/** - * \file - * - * \brief This API allows the host to provide PCM samples to be - * rendered via <DFN>audio_render</DFN>. - * - * This file describes a simple API for host applications to play sound - * using VideoCore. It includes the functionality to: - * - * \li open/close - * \li set pcm parameters - * \li set buffer size parameters - * \li retrieve empty buffer available to use - * \li send full buffer to be played - * \li retrieve current buffering level - * - * This API has no thread context of it's own, so the caller must be - * aware that the IL API will be used in context. This has - * implications on executing calls inside callback contexts, and on - * the minimum size of stack that the caller requires. See the - * <DFN>ilclient_stack_size()</DFN> function for assistance. - * - * This API will use a single <DFN>audio_render</DFN> IL component, and - * supply buffers to the input port using the OpenMAX IL base profile mode. - ********************************************************************************/ - -struct AUDIOPLAY_STATE_T; - -/** - * The <DFN>AUDIOPLAY_STATE_T</DFN> is an opaque type that represents the - * audioplus engine handle. - *******************************************************************************/ -typedef struct AUDIOPLAY_STATE_T AUDIOPLAY_STATE_T; - -/** - * The <DFN>audioplay_create()</DFN> function creates the audioplay object. - * - * @param handle On success, this is filled in with a handle to use in other - * API functions. - * - * @param sample_rate The sample rate, in samples per second, for the PCM data. - * This shall be between 8000 and 96000. - * - * @param num_channels The number of channels for the PCM data. Must be 1, 2, 4, or 8. - * Channels must be sent interleaved. - * - * @param bit_depth The bitdepth per channel per sample. Must be 16 or 32. - * - * @param num_buffers The number of buffers that will be created to write PCM - * samples into. - * - * @param buffer_size The size in bytes of each buffer that will be used to write - * PCM samples into. Note that small buffers of less than a few - * Kb in size may be faster than larger buffers, although this is - * platform dependant. - * - * @return 0 on success, -1 on failure. - *********************************************************************************/ -VCHPRE_ int32_t VCHPOST_ audioplay_create(AUDIOPLAY_STATE_T **handle, - uint32_t sample_rate, - uint32_t num_channels, - uint32_t bit_depth, - uint32_t num_buffers, - uint32_t buffer_size); - -/** - * The <DFN>audioplay_delete()</DFN> function deletes the audioplay object. - * - * @param handle Must be a handle previously created by - * <DFN>audioplay_create()</DFN>. After calling this - * function that handle is no longer valid. Any - * buffers provided by <DFN>audioplay_get_buffer()</DFN> - * are also no longer valid and must not be referenced. - * - * @return 0 on success, -1 on failure. - ********************************************************************************/ -VCHPRE_ int32_t VCHPOST_ audioplay_delete(AUDIOPLAY_STATE_T *handle); - -/** - * The <DFN>audioplay_get_buffer()</DFN> function requests an empty - * buffer. Any buffer returned will have the valid size indicated in - * the call to <DFN>audioplay_create()</DFN>. - * - * @param handle Must be a handle previously created by - * <DFN>audioplay_create()</DFN>. - * - * @return A pointer to an available buffer. If no buffers are - * available, then <DFN>NULL</DFN> will be returned. - *********************************************************************************/ -VCHPRE_ uint8_t * VCHPOST_ audioplay_get_buffer(AUDIOPLAY_STATE_T *handle); - - -/** - * The <DFN>audioplay_play_buffer()</DFN> sends a buffer containing - * raw samples to be rendered. - * - * @param handle Must be a handle previously created by - * <DFN>audioplay_create()</DFN>. - * - * @param buffer Must be a pointer previously returned by - * <DFN>audioplay_get_buffer()</DFN>. After calling this function - * the buffer pointer must not be referenced until returned - * again by another call to <DFN>audioplay_get_buffer()</DFN>. - * - * @param length Length in bytes of valid data. Must be a whole number of - * samples, ie a multiple of (num_channels*bit_depth/8). - * - * @return 0 on success, -1 on failure - ********************************************************************************/ -VCHPRE_ int32_t VCHPOST_ audioplay_play_buffer(AUDIOPLAY_STATE_T *handle, - uint8_t *buffer, - uint32_t length); - -/** - * The <DFN>audioplay_get_latency()</DFN> requests the current audio - * playout buffer size in samples, which is the latency until the next - * sample supplied is to be rendered. - * - * @param handle Must be a handle previously created by - * <DFN>audioplay_create()</DFN>. - * - * @return Number of samples currently buffered. - *********************************************************************************/ -VCHPRE_ uint32_t VCHPOST_ audioplay_get_latency(AUDIOPLAY_STATE_T *handle); - - -#endif /* AUDIOPLAY_H */ diff --git a/vc/src/hello_pi/hello_audio/hello_audio.bin b/vc/src/hello_pi/hello_audio/hello_audio.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_audio/sinewave.c b/vc/src/hello_pi/hello_audio/sinewave.c @@ -1,160 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Lookup table for audio output demo - -short Sinewave[] = { - 0, 201, 402, 603, 804, 1005, 1206, 1406, - 1607, 1808, 2009, 2209, 2410, 2610, 2811, 3011, - 3211, 3411, 3611, 3811, 4011, 4210, 4409, 4608, - 4807, 5006, 5205, 5403, 5601, 5799, 5997, 6195, - 6392, 6589, 6786, 6982, 7179, 7375, 7571, 7766, - 7961, 8156, 8351, 8545, 8739, 8932, 9126, 9319, - 9511, 9703, 9895, 10087, 10278, 10469, 10659, 10849, - 11038, 11227, 11416, 11604, 11792, 11980, 12166, 12353, - 12539, 12724, 12909, 13094, 13278, 13462, 13645, 13827, - 14009, 14191, 14372, 14552, 14732, 14911, 15090, 15268, - 15446, 15623, 15799, 15975, 16150, 16325, 16499, 16672, - 16845, 17017, 17189, 17360, 17530, 17699, 17868, 18036, - 18204, 18371, 18537, 18702, 18867, 19031, 19194, 19357, - 19519, 19680, 19840, 20000, 20159, 20317, 20474, 20631, - 20787, 20942, 21096, 21249, 21402, 21554, 21705, 21855, - 22004, 22153, 22301, 22448, 22594, 22739, 22883, 23027, - 23169, 23311, 23452, 23592, 23731, 23869, 24006, 24143, - 24278, 24413, 24546, 24679, 24811, 24942, 25072, 25201, - 25329, 25456, 25582, 25707, 25831, 25954, 26077, 26198, - 26318, 26437, 26556, 26673, 26789, 26905, 27019, 27132, - 27244, 27355, 27466, 27575, 27683, 27790, 27896, 28001, - 28105, 28208, 28309, 28410, 28510, 28608, 28706, 28802, - 28897, 28992, 29085, 29177, 29268, 29358, 29446, 29534, - 29621, 29706, 29790, 29873, 29955, 30036, 30116, 30195, - 30272, 30349, 30424, 30498, 30571, 30643, 30713, 30783, - 30851, 30918, 30984, 31049, - 31113, 31175, 31236, 31297, - 31356, 31413, 31470, 31525, 31580, 31633, 31684, 31735, - 31785, 31833, 31880, 31926, 31970, 32014, 32056, 32097, - 32137, 32176, 32213, 32249, 32284, 32318, 32350, 32382, - 32412, 32441, 32468, 32495, 32520, 32544, 32567, 32588, - 32609, 32628, 32646, 32662, 32678, 32692, 32705, 32717, - 32727, 32736, 32744, 32751, 32757, 32761, 32764, 32766, - 32767, 32766, 32764, 32761, 32757, 32751, 32744, 32736, - 32727, 32717, 32705, 32692, 32678, 32662, 32646, 32628, - 32609, 32588, 32567, 32544, 32520, 32495, 32468, 32441, - 32412, 32382, 32350, 32318, 32284, 32249, 32213, 32176, - 32137, 32097, 32056, 32014, 31970, 31926, 31880, 31833, - 31785, 31735, 31684, 31633, 31580, 31525, 31470, 31413, - 31356, 31297, 31236, 31175, 31113, 31049, 30984, 30918, - 30851, 30783, 30713, 30643, 30571, 30498, 30424, 30349, - 30272, 30195, 30116, 30036, 29955, 29873, 29790, 29706, - 29621, 29534, 29446, 29358, 29268, 29177, 29085, 28992, - 28897, 28802, 28706, 28608, 28510, 28410, 28309, 28208, - 28105, 28001, 27896, 27790, 27683, 27575, 27466, 27355, - 27244, 27132, 27019, 26905, 26789, 26673, 26556, 26437, - 26318, 26198, 26077, 25954, 25831, 25707, 25582, 25456, - 25329, 25201, 25072, 24942, 24811, 24679, 24546, 24413, - 24278, 24143, 24006, 23869, 23731, 23592, 23452, 23311, - 23169, 23027, 22883, 22739, 22594, 22448, 22301, 22153, - 22004, 21855, 21705, 21554, 21402, 21249, 21096, 20942, - 20787, 20631, 20474, 20317, 20159, 20000, 19840, 19680, - 19519, 19357, 19194, 19031, 18867, 18702, 18537, 18371, - 18204, 18036, 17868, 17699, 17530, 17360, 17189, 17017, - 16845, 16672, 16499, 16325, 16150, 15975, 15799, 15623, - 15446, 15268, 15090, 14911, 14732, 14552, 14372, 14191, - 14009, 13827, 13645, 13462, 13278, 13094, 12909, 12724, - 12539, 12353, 12166, 11980, 11792, 11604, 11416, 11227, - 11038, 10849, 10659, 10469, 10278, 10087, 9895, 9703, - 9511, 9319, 9126, 8932, 8739, 8545, 8351, 8156, - 7961, 7766, 7571, 7375, 7179, 6982, 6786, 6589, - 6392, 6195, 5997, 5799, 5601, 5403, 5205, 5006, - 4807, 4608, 4409, 4210, 4011, 3811, 3611, 3411, - 3211, 3011, 2811, 2610, 2410, 2209, 2009, 1808, - 1607, 1406, 1206, 1005, 804, 603, 402, 201, - 0, -201, -402, -603, -804, -1005, -1206, -1406, - -1607, -1808, -2009, -2209, -2410, -2610, -2811, -3011, - -3211, -3411, -3611, -3811, -4011, -4210, -4409, -4608, - -4807, -5006, -5205, -5403, -5601, -5799, -5997, -6195, - -6392, -6589, -6786, -6982, -7179, -7375, -7571, -7766, - -7961, -8156, -8351, -8545, -8739, -8932, -9126, -9319, - -9511, -9703, -9895, -10087, -10278, -10469, -10659, -10849, - -11038, -11227, -11416, -11604, -11792, -11980, -12166, -12353, - -12539, -12724, -12909, -13094, -13278, -13462, -13645, -13827, - -14009, -14191, -14372, -14552, -14732, -14911, -15090, -15268, - -15446, -15623, -15799, -15975, -16150, -16325, -16499, -16672, - -16845, -17017, -17189, -17360, -17530, -17699, -17868, -18036, - -18204, -18371, -18537, -18702, -18867, -19031, -19194, -19357, - -19519, -19680, -19840, -20000, -20159, -20317, -20474, -20631, - -20787, -20942, -21096, -21249, -21402, -21554, -21705, -21855, - -22004, -22153, -22301, -22448, -22594, -22739, -22883, -23027, - -23169, -23311, -23452, -23592, -23731, -23869, -24006, -24143, - -24278, -24413, -24546, -24679, -24811, -24942, -25072, -25201, - -25329, -25456, -25582, -25707, -25831, -25954, -26077, -26198, - -26318, -26437, -26556, -26673, -26789, -26905, -27019, -27132, - -27244, -27355, -27466, -27575, -27683, -27790, -27896, -28001, - -28105, -28208, -28309, -28410, -28510, -28608, -28706, -28802, - -28897, -28992, -29085, -29177, -29268, -29358, -29446, -29534, - -29621, -29706, -29790, -29873, -29955, -30036, -30116, -30195, - -30272, -30349, -30424, -30498, -30571, -30643, -30713, -30783, - -30851, -30918, -30984, -31049, -31113, -31175, -31236, -31297, - -31356, -31413, -31470, -31525, -31580, -31633, -31684, -31735, - -31785, -31833, -31880, -31926, -31970, -32014, -32056, -32097, - -32137, -32176, -32213, -32249, -32284, -32318, -32350, -32382, - -32412, -32441, -32468, -32495, -32520, -32544, -32567, -32588, - -32609, -32628, -32646, -32662, -32678, -32692, -32705, -32717, - -32727, -32736, -32744, -32751, -32757, -32761, -32764, -32766, - -32767, -32766, -32764, -32761, -32757, -32751, -32744, -32736, - -32727, -32717, -32705, -32692, -32678, -32662, -32646, -32628, - -32609, -32588, -32567, -32544, -32520, -32495, -32468, -32441, - -32412, -32382, -32350, -32318, -32284, -32249, -32213, -32176, - -32137, -32097, -32056, -32014, -31970, -31926, -31880, -31833, - -31785, -31735, -31684, -31633, -31580, -31525, -31470, -31413, - -31356, -31297, -31236, -31175, -31113, -31049, -30984, -30918, - -30851, -30783, -30713, -30643, -30571, -30498, -30424, -30349, - -30272, -30195, -30116, -30036, -29955, -29873, -29790, -29706, - -29621, -29534, -29446, -29358, -29268, -29177, -29085, -28992, - -28897, -28802, -28706, -28608, -28510, -28410, -28309, -28208, - -28105, -28001, -27896, -27790, -27683, -27575, -27466, -27355, - -27244, -27132, -27019, -26905, -26789, -26673, -26556, -26437, - -26318, -26198, -26077, -25954, -25831, -25707, -25582, -25456, - -25329, -25201, -25072, -24942, -24811, -24679, -24546, -24413, - -24278, -24143, -24006, -23869, -23731, -23592, -23452, -23311, - -23169, -23027, -22883, -22739, -22594, -22448, -22301, -22153, - -22004, -21855, -21705, -21554, -21402, -21249, -21096, -20942, - -20787, -20631, -20474, -20317, -20159, -20000, -19840, -19680, - -19519, -19357, -19194, -19031, -18867, -18702, -18537, -18371, - -18204, -18036, -17868, -17699, -17530, -17360, -17189, -17017, - -16845, -16672, -16499, -16325, -16150, -15975, -15799, -15623, - -15446, -15268, -15090, -14911, -14732, -14552, -14372, -14191, - -14009, -13827, -13645, -13462, -13278, -13094, -12909, -12724, - -12539, -12353, -12166, -11980, -11792, -11604, -11416, -11227, - -11038, -10849, -10659, -10469, -10278, -10087, -9895, -9703, - -9511, -9319, -9126, -8932, -8739, -8545, -8351, -8156, - -7961, -7766, -7571, -7375, -7179, -6982, -6786, -6589, - -6392, -6195, -5997, -5799, -5601, -5403, -5205, -5006, - -4807, -4608, -4409, -4210, -4011, -3811, -3611, -3411, - -3211, -3011, -2811, -2610, -2410, -2209, -2009, -1808, - -1607, -1406, -1206, -1005, -804, -603, -402, -201, -}; diff --git a/vc/src/hello_pi/hello_dispmanx/Makefile b/vc/src/hello_pi/hello_dispmanx/Makefile @@ -1,5 +0,0 @@ -OBJS=dispmanx.o -BIN=hello_dispmanx.bin - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_dispmanx/dispmanx.c b/vc/src/hello_pi/hello_dispmanx/dispmanx.c @@ -1,163 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// A simple demo using dispmanx to display an overlay - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <assert.h> -#include <unistd.h> -#include <sys/time.h> - -#include "bcm_host.h" - -#define WIDTH 200 -#define HEIGHT 200 - -#ifndef ALIGN_UP -#define ALIGN_UP(x,y) ((x + (y)-1) & ~((y)-1)) -#endif - -typedef struct -{ - DISPMANX_DISPLAY_HANDLE_T display; - DISPMANX_MODEINFO_T info; - void *image; - DISPMANX_UPDATE_HANDLE_T update; - DISPMANX_RESOURCE_HANDLE_T resource; - DISPMANX_ELEMENT_HANDLE_T element; - uint32_t vc_image_ptr; - -} RECT_VARS_T; - -static RECT_VARS_T gRectVars; - -static void FillRect( VC_IMAGE_TYPE_T type, void *image, int pitch, int aligned_height, int x, int y, int w, int h, int val ) -{ - int row; - int col; - - uint16_t *line = (uint16_t *)image + y * (pitch>>1) + x; - - for ( row = 0; row < h; row++ ) - { - for ( col = 0; col < w; col++ ) - { - line[col] = val; - } - line += (pitch>>1); - } -} - -int main(void) -{ - RECT_VARS_T *vars; - uint32_t screen = 1; - int ret; - VC_RECT_T src_rect; - VC_RECT_T dst_rect; - VC_IMAGE_TYPE_T type = VC_IMAGE_RGB565; - int width = WIDTH, height = HEIGHT; - int pitch = ALIGN_UP(width*2, 32); - int aligned_height = ALIGN_UP(height, 16); - VC_DISPMANX_ALPHA_T alpha = { DISPMANX_FLAGS_ALPHA_FROM_SOURCE | DISPMANX_FLAGS_ALPHA_FIXED_ALL_PIXELS, - 120, /*alpha 0->255*/ - 0 }; - - vars = &gRectVars; - - bcm_host_init(); - - printf("Open display[%i]...\n", screen ); - vars->display = vc_dispmanx_display_open( screen ); - - ret = vc_dispmanx_display_get_info( vars->display, &vars->info); - assert(ret == 0); - printf( "Display is %d x %d\n", vars->info.width, vars->info.height ); - - vars->image = calloc( 1, pitch * height ); - assert(vars->image); - - FillRect( type, vars->image, pitch, aligned_height, 0, 0, width, height, 0xFFFF ); - FillRect( type, vars->image, pitch, aligned_height, 0, 0, width, height, 0xF800 ); - FillRect( type, vars->image, pitch, aligned_height, 20, 20, width - 40, height - 40, 0x07E0 ); - FillRect( type, vars->image, pitch, aligned_height, 40, 40, width - 80, height - 80, 0x001F ); - - vars->resource = vc_dispmanx_resource_create( type, - width, - height, - &vars->vc_image_ptr ); - assert( vars->resource ); - vc_dispmanx_rect_set( &dst_rect, 0, 0, width, height); - ret = vc_dispmanx_resource_write_data( vars->resource, - type, - pitch, - vars->image, - &dst_rect ); - assert( ret == 0 ); - vars->update = vc_dispmanx_update_start( 10 ); - assert( vars->update ); - - vc_dispmanx_rect_set( &src_rect, 0, 0, width << 16, height << 16 ); - - vc_dispmanx_rect_set( &dst_rect, ( vars->info.width - width ) / 2, - ( vars->info.height - height ) / 2, - width, - height ); - - vars->element = vc_dispmanx_element_add( vars->update, - vars->display, - 2000, // layer - &dst_rect, - vars->resource, - &src_rect, - DISPMANX_PROTECTION_NONE, - &alpha, - NULL, // clamp - VC_IMAGE_ROT0 ); - - ret = vc_dispmanx_update_submit_sync( vars->update ); - assert( ret == 0 ); - - printf( "Sleeping for 10 seconds...\n" ); - sleep( 10 ); - - vars->update = vc_dispmanx_update_start( 10 ); - assert( vars->update ); - ret = vc_dispmanx_element_remove( vars->update, vars->element ); - assert( ret == 0 ); - ret = vc_dispmanx_update_submit_sync( vars->update ); - assert( ret == 0 ); - ret = vc_dispmanx_resource_delete( vars->resource ); - assert( ret == 0 ); - ret = vc_dispmanx_display_close( vars->display ); - assert( ret == 0 ); - - return 0; -} - diff --git a/vc/src/hello_pi/hello_dispmanx/hello_dispmanx.bin b/vc/src/hello_pi/hello_dispmanx/hello_dispmanx.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_encode/Makefile b/vc/src/hello_pi/hello_encode/Makefile @@ -1,6 +0,0 @@ -OBJS=encode.o -BIN=hello_encode.bin -LDFLAGS+=-lilclient - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_encode/encode.c b/vc/src/hello_pi/hello_encode/encode.c @@ -1,320 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -Copyright (c) 2012, Kalle Vahlman <zuh@iki> - Tuomas Kulve <tuomas@kulve.fi> -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Video encode demo using OpenMAX IL though the ilcient helper library - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "bcm_host.h" -#include "ilclient.h" - -#define NUMFRAMES 300 -#define WIDTH 640 -#define PITCH ((WIDTH+31)&~31) -#define HEIGHT ((WIDTH)*9/16) -#define HEIGHT16 ((HEIGHT+15)&~15) -#define SIZE ((WIDTH * HEIGHT16 * 3)/2) - -// generate an animated test card in YUV format -static int -generate_test_card(void *buf, OMX_U32 * filledLen, int frame) -{ - int i, j; - char *y = buf, *u = y + PITCH * HEIGHT16, *v = - u + (PITCH >> 1) * (HEIGHT16 >> 1); - - for (j = 0; j < HEIGHT / 2; j++) { - char *py = y + 2 * j * PITCH; - char *pu = u + j * (PITCH >> 1); - char *pv = v + j * (PITCH >> 1); - for (i = 0; i < WIDTH / 2; i++) { - int z = (((i + frame) >> 4) ^ ((j + frame) >> 4)) & 15; - py[0] = py[1] = py[PITCH] = py[PITCH + 1] = 0x80 + z * 0x8; - pu[0] = 0x00 + z * 0x10; - pv[0] = 0x80 + z * 0x30; - py += 2; - pu++; - pv++; - } - } - *filledLen = SIZE; - return 1; -} - -static void -print_def(OMX_PARAM_PORTDEFINITIONTYPE def) -{ - printf("Port %u: %s %u/%u %u %u %s,%s,%s %ux%u %ux%u @%u %u\n", - def.nPortIndex, - def.eDir == OMX_DirInput ? "in" : "out", - def.nBufferCountActual, - def.nBufferCountMin, - def.nBufferSize, - def.nBufferAlignment, - def.bEnabled ? "enabled" : "disabled", - def.bPopulated ? "populated" : "not pop.", - def.bBuffersContiguous ? "contig." : "not cont.", - def.format.video.nFrameWidth, - def.format.video.nFrameHeight, - def.format.video.nStride, - def.format.video.nSliceHeight, - def.format.video.xFramerate, def.format.video.eColorFormat); -} - -static int -video_encode_test(char *outputfilename) -{ - OMX_VIDEO_PARAM_PORTFORMATTYPE format; - OMX_PARAM_PORTDEFINITIONTYPE def; - COMPONENT_T *video_encode = NULL; - COMPONENT_T *list[5]; - OMX_BUFFERHEADERTYPE *buf; - OMX_BUFFERHEADERTYPE *out; - OMX_ERRORTYPE r; - ILCLIENT_T *client; - int status = 0; - int framenumber = 0; - FILE *outf; - - memset(list, 0, sizeof(list)); - - if ((client = ilclient_init()) == NULL) { - return -3; - } - - if (OMX_Init() != OMX_ErrorNone) { - ilclient_destroy(client); - return -4; - } - - // create video_encode - r = ilclient_create_component(client, &video_encode, "video_encode", - ILCLIENT_DISABLE_ALL_PORTS | - ILCLIENT_ENABLE_INPUT_BUFFERS | - ILCLIENT_ENABLE_OUTPUT_BUFFERS); - if (r != 0) { - printf - ("ilclient_create_component() for video_encode failed with %x!\n", - r); - exit(1); - } - list[0] = video_encode; - - // get current settings of video_encode component from port 200 - memset(&def, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); - def.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - def.nVersion.nVersion = OMX_VERSION; - def.nPortIndex = 200; - - if (OMX_GetParameter - (ILC_GET_HANDLE(video_encode), OMX_IndexParamPortDefinition, - &def) != OMX_ErrorNone) { - printf("%s:%d: OMX_GetParameter() for video_encode port 200 failed!\n", - __FUNCTION__, __LINE__); - exit(1); - } - - print_def(def); - - // Port 200: in 1/1 115200 16 enabled,not pop.,not cont. 320x240 320x240 @1966080 20 - def.format.video.nFrameWidth = WIDTH; - def.format.video.nFrameHeight = HEIGHT; - def.format.video.xFramerate = 30 << 16; - def.format.video.nSliceHeight = def.format.video.nFrameHeight; - def.format.video.nStride = def.format.video.nFrameWidth; - def.format.video.eColorFormat = OMX_COLOR_FormatYUV420PackedPlanar; - - print_def(def); - - r = OMX_SetParameter(ILC_GET_HANDLE(video_encode), - OMX_IndexParamPortDefinition, &def); - if (r != OMX_ErrorNone) { - printf - ("%s:%d: OMX_SetParameter() for video_encode port 200 failed with %x!\n", - __FUNCTION__, __LINE__, r); - exit(1); - } - - memset(&format, 0, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); - format.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE); - format.nVersion.nVersion = OMX_VERSION; - format.nPortIndex = 201; - format.eCompressionFormat = OMX_VIDEO_CodingAVC; - - printf("OMX_SetParameter for video_encode:201...\n"); - r = OMX_SetParameter(ILC_GET_HANDLE(video_encode), - OMX_IndexParamVideoPortFormat, &format); - if (r != OMX_ErrorNone) { - printf - ("%s:%d: OMX_SetParameter() for video_encode port 201 failed with %x!\n", - __FUNCTION__, __LINE__, r); - exit(1); - } - - OMX_VIDEO_PARAM_BITRATETYPE bitrateType; - // set current bitrate to 1Mbit - memset(&bitrateType, 0, sizeof(OMX_VIDEO_PARAM_BITRATETYPE)); - bitrateType.nSize = sizeof(OMX_VIDEO_PARAM_BITRATETYPE); - bitrateType.nVersion.nVersion = OMX_VERSION; - bitrateType.eControlRate = OMX_Video_ControlRateVariable; - bitrateType.nTargetBitrate = 1000000; - bitrateType.nPortIndex = 201; - r = OMX_SetParameter(ILC_GET_HANDLE(video_encode), - OMX_IndexParamVideoBitrate, &bitrateType); - if (r != OMX_ErrorNone) { - printf - ("%s:%d: OMX_SetParameter() for bitrate for video_encode port 201 failed with %x!\n", - __FUNCTION__, __LINE__, r); - exit(1); - } - - - // get current bitrate - memset(&bitrateType, 0, sizeof(OMX_VIDEO_PARAM_BITRATETYPE)); - bitrateType.nSize = sizeof(OMX_VIDEO_PARAM_BITRATETYPE); - bitrateType.nVersion.nVersion = OMX_VERSION; - bitrateType.nPortIndex = 201; - - if (OMX_GetParameter - (ILC_GET_HANDLE(video_encode), OMX_IndexParamVideoBitrate, - &bitrateType) != OMX_ErrorNone) { - printf("%s:%d: OMX_GetParameter() for video_encode for bitrate port 201 failed!\n", - __FUNCTION__, __LINE__); - exit(1); - } - printf("Current Bitrate=%u\n",bitrateType.nTargetBitrate); - - - - printf("encode to idle...\n"); - if (ilclient_change_component_state(video_encode, OMX_StateIdle) == -1) { - printf - ("%s:%d: ilclient_change_component_state(video_encode, OMX_StateIdle) failed", - __FUNCTION__, __LINE__); - } - - printf("enabling port buffers for 200...\n"); - if (ilclient_enable_port_buffers(video_encode, 200, NULL, NULL, NULL) != 0) { - printf("enabling port buffers for 200 failed!\n"); - exit(1); - } - - printf("enabling port buffers for 201...\n"); - if (ilclient_enable_port_buffers(video_encode, 201, NULL, NULL, NULL) != 0) { - printf("enabling port buffers for 201 failed!\n"); - exit(1); - } - - printf("encode to executing...\n"); - ilclient_change_component_state(video_encode, OMX_StateExecuting); - - outf = fopen(outputfilename, "w"); - if (outf == NULL) { - printf("Failed to open '%s' for writing video\n", outputfilename); - exit(1); - } - - printf("looping for buffers...\n"); - do { - buf = ilclient_get_input_buffer(video_encode, 200, 1); - if (buf == NULL) { - printf("Doh, no buffers for me!\n"); - } - else { - /* fill it */ - generate_test_card(buf->pBuffer, &buf->nFilledLen, framenumber++); - - if (OMX_EmptyThisBuffer(ILC_GET_HANDLE(video_encode), buf) != - OMX_ErrorNone) { - printf("Error emptying buffer!\n"); - } - - out = ilclient_get_output_buffer(video_encode, 201, 1); - - r = OMX_FillThisBuffer(ILC_GET_HANDLE(video_encode), out); - if (r != OMX_ErrorNone) { - printf("Error filling buffer: %x\n", r); - } - - if (out != NULL) { - if (out->nFlags & OMX_BUFFERFLAG_CODECCONFIG) { - int i; - for (i = 0; i < out->nFilledLen; i++) - printf("%x ", out->pBuffer[i]); - printf("\n"); - } - - r = fwrite(out->pBuffer, 1, out->nFilledLen, outf); - if (r != out->nFilledLen) { - printf("fwrite: Error emptying buffer: %d!\n", r); - } - else { - printf("Writing frame %d/%d\n", framenumber, NUMFRAMES); - } - out->nFilledLen = 0; - } - else { - printf("Not getting it :(\n"); - } - - } - } - while (framenumber < NUMFRAMES); - - fclose(outf); - - printf("Teardown.\n"); - - printf("disabling port buffers for 200 and 201...\n"); - ilclient_disable_port_buffers(video_encode, 200, NULL, NULL, NULL); - ilclient_disable_port_buffers(video_encode, 201, NULL, NULL, NULL); - - ilclient_state_transition(list, OMX_StateIdle); - ilclient_state_transition(list, OMX_StateLoaded); - - ilclient_cleanup_components(list); - - OMX_Deinit(); - - ilclient_destroy(client); - return status; -} - -int -main(int argc, char **argv) -{ - if (argc < 2) { - printf("Usage: %s <filename>\n", argv[0]); - exit(1); - } - bcm_host_init(); - return video_encode_test(argv[1]); -} diff --git a/vc/src/hello_pi/hello_encode/hello_encode.bin b/vc/src/hello_pi/hello_encode/hello_encode.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_fft/gpu_fft.c b/vc/src/hello_pi/hello_fft/gpu_fft.c @@ -1,135 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 3.0 -Copyright (c) 2015, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <string.h> - -#include "gpu_fft.h" - -#define GPU_FFT_BUSY_WAIT_LIMIT (5<<12) // ~1ms - -typedef struct GPU_FFT_COMPLEX COMPLEX; - -int gpu_fft_prepare( - int mb, // mailbox file_desc - int log2_N, // log2(FFT_length) = 8...22 - int direction, // GPU_FFT_FWD: fft(); GPU_FFT_REV: ifft() - int jobs, // number of transforms in batch - struct GPU_FFT **fft) { - - unsigned info_bytes, twid_bytes, data_bytes, code_bytes, unif_bytes, mail_bytes; - unsigned size, *uptr, vc_tw, vc_data; - int i, q, shared, unique, passes, ret; - - struct GPU_FFT_BASE *base; - struct GPU_FFT_PTR ptr; - struct GPU_FFT *info; - - if (gpu_fft_twiddle_size(log2_N, &shared, &unique, &passes)) return -2; - - info_bytes = 4096; - data_bytes = (1+((sizeof(COMPLEX)<<log2_N)|4095)); - code_bytes = gpu_fft_shader_size(log2_N); - twid_bytes = sizeof(COMPLEX)*16*(shared+GPU_FFT_QPUS*unique); - unif_bytes = sizeof(int)*GPU_FFT_QPUS*(5+jobs*2); - mail_bytes = sizeof(int)*GPU_FFT_QPUS*2; - - size = info_bytes + // header - data_bytes*jobs*2 + // ping-pong data, aligned - code_bytes + // shader, aligned - twid_bytes + // twiddles - unif_bytes + // uniforms - mail_bytes; // mailbox message - - ret = gpu_fft_alloc(mb, size, &ptr); - if (ret) return ret; - - // Header - info = (struct GPU_FFT *) ptr.arm.vptr; - base = (struct GPU_FFT_BASE *) info; - gpu_fft_ptr_inc(&ptr, info_bytes); - - // For transpose - info->x = 1<<log2_N; - info->y = jobs; - - // Ping-pong buffers leave results in or out of place - info->in = info->out = ptr.arm.cptr; - info->step = data_bytes / sizeof(COMPLEX); - if (passes&1) info->out += info->step * jobs; // odd => out of place - vc_data = gpu_fft_ptr_inc(&ptr, data_bytes*jobs*2); - - // Shader code - memcpy(ptr.arm.vptr, gpu_fft_shader_code(log2_N), code_bytes); - base->vc_code = gpu_fft_ptr_inc(&ptr, code_bytes); - - // Twiddles - gpu_fft_twiddle_data(log2_N, direction, ptr.arm.fptr); - vc_tw = gpu_fft_ptr_inc(&ptr, twid_bytes); - - uptr = ptr.arm.uptr; - - // Uniforms - for (q=0; q<GPU_FFT_QPUS; q++) { - *uptr++ = vc_tw; - *uptr++ = vc_tw + sizeof(COMPLEX)*16*(shared + q*unique); - *uptr++ = q; - for (i=0; i<jobs; i++) { - *uptr++ = vc_data + data_bytes*i; - *uptr++ = vc_data + data_bytes*i + data_bytes*jobs; - } - *uptr++ = 0; - *uptr++ = (q==0); // For mailbox: IRQ enable, master only - - base->vc_unifs[q] = gpu_fft_ptr_inc(&ptr, sizeof(int)*(5+jobs*2)); - } - - if ((jobs<<log2_N) <= GPU_FFT_BUSY_WAIT_LIMIT) { - // Direct register poking with busy wait - base->vc_msg = 0; - } - else { - // Mailbox message - for (q=0; q<GPU_FFT_QPUS; q++) { - *uptr++ = base->vc_unifs[q]; - *uptr++ = base->vc_code; - } - - base->vc_msg = ptr.vc; - } - - *fft = info; - return 0; -} - -unsigned gpu_fft_execute(struct GPU_FFT *info) { - return gpu_fft_base_exec(&info->base, GPU_FFT_QPUS); -} - -void gpu_fft_release(struct GPU_FFT *info) { - gpu_fft_base_release(&info->base); -} diff --git a/vc/src/hello_pi/hello_fft/gpu_fft.h b/vc/src/hello_pi/hello_fft/gpu_fft.h @@ -1,101 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 3.0 -Copyright (c) 2015, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef __GPU_FFT__ -#define __GPU_FFT__ - -#define GPU_FFT_QPUS 8 - -#define GPU_FFT_PI 3.14159265358979323846 - -#define GPU_FFT_FWD 0 // forward FFT -#define GPU_FFT_REV 1 // inverse FFT - -struct GPU_FFT_COMPLEX { - float re, im; -}; - -struct GPU_FFT_PTR { - unsigned vc; - union { struct GPU_FFT_COMPLEX *cptr; - void *vptr; - char *bptr; - float *fptr; - unsigned *uptr; } arm; -}; - -struct GPU_FFT_BASE { - int mb; - unsigned handle, size, vc_msg, vc_code, vc_unifs[GPU_FFT_QPUS], peri_size; - volatile unsigned *peri; -}; - -struct GPU_FFT { - struct GPU_FFT_BASE base; - struct GPU_FFT_COMPLEX *in, *out; - int x, y, step; -}; - -int gpu_fft_prepare( - int mb, // mailbox file_desc - int log2_N, // log2(FFT_length) = 8...22 - int direction, // GPU_FFT_FWD: fft(); GPU_FFT_REV: ifft() - int jobs, // number of transforms in batch - struct GPU_FFT **fft); - -unsigned gpu_fft_execute( - struct GPU_FFT *info); - -void gpu_fft_release( - struct GPU_FFT *info); - -// private -int gpu_fft_twiddle_size(int, int *, int *, int *); -void gpu_fft_twiddle_data(int, int, float *); -unsigned int gpu_fft_shader_size(int); -unsigned int *gpu_fft_shader_code(int); - -// gpu_fft_base: - -unsigned gpu_fft_base_exec ( - struct GPU_FFT_BASE *base, - int num_qpus); - -int gpu_fft_alloc ( - int mb, - unsigned size, - struct GPU_FFT_PTR *ptr); - -void gpu_fft_base_release( - struct GPU_FFT_BASE *base); - -unsigned gpu_fft_ptr_inc ( - struct GPU_FFT_PTR *ptr, - int bytes); - -#endif // __GPU_FFT__ diff --git a/vc/src/hello_pi/hello_fft/gpu_fft.txt b/vc/src/hello_pi/hello_fft/gpu_fft.txt @@ -1,159 +0,0 @@ -BCM2835 "GPU_FFT" release 3.0 by Andrew Holme, 2015. - -GPU_FFT is an FFT library for the Raspberry Pi which exploits the BCM2835 SoC -3D hardware to deliver ten times more data throughput than is possible on the -700 MHz ARM of the Pi 1. Kernels are provided for all power-of-2 FFT lengths -between 256 and 4,194,304 points inclusive. A transpose function, which also -uses the 3D hardware, is provided to support 2-dimensional transforms. - - -*** Accuracy *** - -GPU_FFT uses single-precision floats for data and twiddle factors. The output -is not scaled. The relative root-mean-square (rms) error in parts-per-million -(ppm) for different transform lengths (N) is typically: - -log2(N) | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 -ppm rms | 0.33 | 0.46 | 0.52 | 0.59 | 0.78 | 0.83 | 0.92 | 0.98 - -log2(N) | 16 | 17 | 18 | 19 | 20 | 21 | 22 -ppm rms | 1.0 | 1.3 | 1.3 | 1.4 | 1.5 | 1.5 | 1.5 - -Accuracy has improved significantly over previous releases at the expense of a -small (2%) performance hit; however, FFTW is still one order of magnitude more -accurate than GPU_FFT. - - -*** Throughput *** - -GPU_FFT 1.0 had to be invoked through a "mailbox" which added a 100us overhead -on every call. To mitigate this, batches of transforms could be submitted via -a single call. GPU_FFT now avoids this 100us overhead by poking GPU registers -directly from the ARM if total batch runtime will be short; but still uses the -mailbox for longer jobs to avoid busy waiting at 100% CPU for too long. - -Typical per-transform runtimes for batch sizes of 1 and 10; and comparative -figures for FFTW (FFTW_MEASURE mode) on a Pi 1 with L2 cache enabled are: - -log2(N) | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 - 1 | 0.033 | 0.049 | 0.070 | 0.12 | 0.25 | 0.61 | 1.2 | 3.5 - 10 | 0.017 | 0.029 | 0.049 | 0.11 | 0.27 | 0.66 | 1.2 | 3.3 - FFTW | 0.092 | 0.22 | 0.48 | 0.95 | 3.0 | 5.1 | 12 | 31 - -log2(N) | 16 | 17 | 18 | 19 | 20 | 21 | 22 All times in - 1 | 7.0 | 17 | 43 | 97 | 194 | 388 | 786 milliseconds - FFTW | 83 | 180 | 560 | 670 | 1600 | 3400 | 8800 2 sig. figs. - - -*** API functions *** - - gpu_fft_prepare() Call once to allocate memory and initialise data - structures. Returns 0 for success. - - gpu_fft_execute() Call one or more times to execute a previously - prepared FFT batch. Returns 0 for success. - - gpu_fft_release() Call once to release resources after use. - GPU memory is permanently lost if not freed. - - -*** Parameters *** - - int mb Mailbox file descriptor obtained by calling mbox_open() - - int log2_N log2(FFT length) = 8 to 22 - - int direction FFT direction: GPU_FFT_FWD for forward FFT - GPU_FFT_REV for inverse FFT - - int jobs Number of transforms in batch = 1 or more - - GPU_FFT ** Output parameter from prepare: control structure. - GPU_FFT * Input parameter to execute and release - - -*** Data format *** - -Complex data arrays are stored as alternate real and imaginary parts: - - struct GPU_FFT_COMPLEX { - float re, im; - }; - -The GPU_FFT struct created by gpu_fft_prepare() contains pointers to the input -and output arrays: - - struct GPU_FFT { - struct GPU_FFT_COMPLEX *in, *out; - -When executing a batch of transforms, buffer pointers are obtained as follows: - - struct GPU_FFT *fft = gpu_fft_prepare( ... , jobs); - for (int j=0; j<jobs; j++) { - struct GPU_FFT_COMPLEX *in = fft->in + j*fft->step; - struct GPU_FFT_COMPLEX *out = fft->out + j*fft->step; - -GPU_FFT.step is greater than FFT length because a guard space is left between -buffers for caching and alignment reasons. - -GPU_FFT performs multiple passes between ping-pong buffers. The final output -lands in the same buffer as input after an even number of passes. Transforms -where log2_N=12...16 use an odd number of passes and the final result is left -out-of-place. The input data is never preserved. - - -*** Example program *** - -The code that produced the above accuracy and performance figures is included -as a demo with the latest Raspbian distro. Build and run it as follows: - -cd /opt/vc/src/hello_pi/hello_fft -make -sudo ./hello_fft.bin 12 - -It accepts three optional command-line arguments: <log2_N> <batch> <loops> - -The special character device is required for the ioctl mailbox through which -the ARM communicates with the Videocore GPU. - - -*** With Open GL on Pi 1 *** - -GPU_FFT and Open GL will run concurrently on Pi 1 if GPU_FFT is configured not -to use VC4 L2 cache by zeroing a define in file gpu_fft_base.c as follows: - -#define GPU_FFT_USE_VC4_L2_CACHE 0 // Pi 1 only: cached=1; direct=0 - -Overall performance will probably be higher if GPU_FFT and Open GL take turns -at using the 3D hardware. Since eglSwapBuffers() returns immediately without -waiting for rendering, call glFlush() and glFinish() afterwards as follows: - - for (;;) { - .... - eglSwapBuffers(....); // non-blocking call returns immediately - glFlush(); - glFinish(); // wait until V3D hardware is idle - .... - gpu_fft_execute(....); // blocking call - .... - } - - -*** 2-dimensional FFT *** - -Please study the hello_fft_2d demo source, which is built and executed thus: - -make hello_fft_2d.bin -sudo ./hello_fft_2d.bin - -This generates a Windows BMP file: "hello_fft_2d.bmp" - -The demo uses a square 512x512 array; however, rectangular arrays are allowed. -The following lines in gpu_fft_trans.c will do what is safe: - - ptr.arm.uptr[6] = src->x < dst->y? src->x : dst->y; - ptr.arm.uptr[7] = src->y < dst->x? src->y : dst->x; - -One may transpose the output from the second FFT pass back into the first pass -input buffer, by preparing and executing a second transposition; however, this -is probably unnecessary. It depends on how the final output will be accessed. diff --git a/vc/src/hello_pi/hello_fft/gpu_fft_base.c b/vc/src/hello_pi/hello_fft/gpu_fft_base.c @@ -1,190 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 3.0 -Copyright (c) 2015, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <dlfcn.h> - -#include "gpu_fft.h" -#include "mailbox.h" - -#define BUS_TO_PHYS(x) ((x)&~0xC0000000) - -// V3D spec: http://www.broadcom.com/docs/support/videocore/VideoCoreIV-AG100-R.pdf -#define V3D_L2CACTL (0xC00020>>2) -#define V3D_SLCACTL (0xC00024>>2) -#define V3D_SRQPC (0xC00430>>2) -#define V3D_SRQUA (0xC00434>>2) -#define V3D_SRQCS (0xC0043c>>2) -#define V3D_DBCFG (0xC00e00>>2) -#define V3D_DBQITE (0xC00e2c>>2) -#define V3D_DBQITC (0xC00e30>>2) - -// Setting this define to zero on Pi 1 allows GPU_FFT and Open GL -// to co-exist and also improves performance of longer transforms: -#define GPU_FFT_USE_VC4_L2_CACHE 1 // Pi 1 only: cached=1; direct=0 - -#define GPU_FFT_NO_FLUSH 1 -#define GPU_FFT_TIMEOUT 2000 // ms - -struct GPU_FFT_HOST { - unsigned mem_flg, mem_map, peri_addr, peri_size; -}; - -int gpu_fft_get_host_info(struct GPU_FFT_HOST *info) { - void *handle; - unsigned (*bcm_host_get_sdram_address) (void); - unsigned (*bcm_host_get_peripheral_address)(void); - unsigned (*bcm_host_get_peripheral_size) (void); - - // Pi 1 defaults - info->peri_addr = 0x20000000; - info->peri_size = 0x01000000; - info->mem_flg = GPU_FFT_USE_VC4_L2_CACHE? 0xC : 0x4; - info->mem_map = GPU_FFT_USE_VC4_L2_CACHE? 0x0 : 0x20000000; // Pi 1 only - - handle = dlopen("libbcm_host.so", RTLD_LAZY); - if (!handle) return -1; - - *(void **) (&bcm_host_get_sdram_address) = dlsym(handle, "bcm_host_get_sdram_address"); - *(void **) (&bcm_host_get_peripheral_address) = dlsym(handle, "bcm_host_get_peripheral_address"); - *(void **) (&bcm_host_get_peripheral_size) = dlsym(handle, "bcm_host_get_peripheral_size"); - - if (bcm_host_get_sdram_address && bcm_host_get_sdram_address()!=0x40000000) { // Pi 2? - info->mem_flg = 0x4; // ARM cannot see VC4 L2 on Pi 2 - info->mem_map = 0x0; - } - - if (bcm_host_get_peripheral_address) info->peri_addr = bcm_host_get_peripheral_address(); - if (bcm_host_get_peripheral_size) info->peri_size = bcm_host_get_peripheral_size(); - - dlclose(handle); - return 0; -} - -unsigned gpu_fft_base_exec_direct ( - struct GPU_FFT_BASE *base, - int num_qpus) { - - unsigned q, t; - - base->peri[V3D_DBCFG] = 0; // Disallow IRQ - base->peri[V3D_DBQITE] = 0; // Disable IRQ - base->peri[V3D_DBQITC] = -1; // Resets IRQ flags - - base->peri[V3D_L2CACTL] = 1<<2; // Clear L2 cache - base->peri[V3D_SLCACTL] = -1; // Clear other caches - - base->peri[V3D_SRQCS] = (1<<7) | (1<<8) | (1<<16); // Reset error bit and counts - - for (q=0; q<num_qpus; q++) { // Launch shader(s) - base->peri[V3D_SRQUA] = base->vc_unifs[q]; - base->peri[V3D_SRQPC] = base->vc_code; - } - - // Busy wait polling - for (;;) { - if (((base->peri[V3D_SRQCS]>>16) & 0xff) == num_qpus) break; // All done? - } - - return 0; -} - -unsigned gpu_fft_base_exec( - struct GPU_FFT_BASE *base, - int num_qpus) { - - if (base->vc_msg) { - // Use mailbox - // Returns: 0x0 for success; 0x80000000 for timeout - return execute_qpu(base->mb, num_qpus, base->vc_msg, GPU_FFT_NO_FLUSH, GPU_FFT_TIMEOUT); - } - else { - // Direct register poking - return gpu_fft_base_exec_direct(base, num_qpus); - } -} - -int gpu_fft_alloc ( - int mb, - unsigned size, - struct GPU_FFT_PTR *ptr) { - - struct GPU_FFT_HOST host; - struct GPU_FFT_BASE *base; - volatile unsigned *peri; - unsigned handle; - - if (gpu_fft_get_host_info(&host)) return -5; - - if (qpu_enable(mb, 1)) return -1; - - // Shared memory - handle = mem_alloc(mb, size, 4096, host.mem_flg); - if (!handle) { - qpu_enable(mb, 0); - return -3; - } - - peri = (volatile unsigned *) mapmem(host.peri_addr, host.peri_size); - if (!peri) { - mem_free(mb, handle); - qpu_enable(mb, 0); - return -4; - } - - ptr->vc = mem_lock(mb, handle); - ptr->arm.vptr = mapmem(BUS_TO_PHYS(ptr->vc+host.mem_map), size); - - base = (struct GPU_FFT_BASE *) ptr->arm.vptr; - base->peri = peri; - base->peri_size = host.peri_size; - base->mb = mb; - base->handle = handle; - base->size = size; - - return 0; -} - -void gpu_fft_base_release(struct GPU_FFT_BASE *base) { - int mb = base->mb; - unsigned handle = base->handle, size = base->size; - unmapmem((void*)base->peri, base->peri_size); - unmapmem((void*)base, size); - mem_unlock(mb, handle); - mem_free(mb, handle); - qpu_enable(mb, 0); -} - -unsigned gpu_fft_ptr_inc ( - struct GPU_FFT_PTR *ptr, - int bytes) { - - unsigned vc = ptr->vc; - ptr->vc += bytes; - ptr->arm.bptr += bytes; - return vc; -} diff --git a/vc/src/hello_pi/hello_fft/gpu_fft_shaders.c b/vc/src/hello_pi/hello_fft/gpu_fft_shaders.c @@ -1,102 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 3.0 -Copyright (c) 2015, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -static unsigned int shader_256[] = { - #include "hex/shader_256.hex" -}; -static unsigned int shader_512[] = { - #include "hex/shader_512.hex" -}; -static unsigned int shader_1k[] = { - #include "hex/shader_1k.hex" -}; -static unsigned int shader_2k[] = { - #include "hex/shader_2k.hex" -}; -static unsigned int shader_4k[] = { - #include "hex/shader_4k.hex" -}; -static unsigned int shader_8k[] = { - #include "hex/shader_8k.hex" -}; -static unsigned int shader_16k[] = { - #include "hex/shader_16k.hex" -}; -static unsigned int shader_32k[] = { - #include "hex/shader_32k.hex" -}; -static unsigned int shader_64k[] = { - #include "hex/shader_64k.hex" -}; -static unsigned int shader_128k[] = { - #include "hex/shader_128k.hex" -}; -static unsigned int shader_256k[] = { - #include "hex/shader_256k.hex" -}; -static unsigned int shader_512k[] = { - #include "hex/shader_512k.hex" -}; -static unsigned int shader_1024k[] = { - #include "hex/shader_1024k.hex" -}; -static unsigned int shader_2048k[] = { - #include "hex/shader_2048k.hex" -}; -static unsigned int shader_4096k[] = { - #include "hex/shader_4096k.hex" -}; - -static struct { - unsigned int size, *code; -} -shaders[] = { - {sizeof(shader_256), shader_256}, - {sizeof(shader_512), shader_512}, - {sizeof(shader_1k), shader_1k}, - {sizeof(shader_2k), shader_2k}, - {sizeof(shader_4k), shader_4k}, - {sizeof(shader_8k), shader_8k}, - {sizeof(shader_16k), shader_16k}, - {sizeof(shader_32k), shader_32k}, - {sizeof(shader_64k), shader_64k}, - {sizeof(shader_128k), shader_128k}, - {sizeof(shader_256k), shader_256k}, - {sizeof(shader_512k), shader_512k}, - {sizeof(shader_1024k), shader_1024k}, - {sizeof(shader_2048k), shader_2048k}, - {sizeof(shader_4096k), shader_4096k} -}; - -unsigned int gpu_fft_shader_size(int log2_N) { - return shaders[log2_N-8].size; -} - -unsigned int *gpu_fft_shader_code(int log2_N) { - return shaders[log2_N-8].code; -} diff --git a/vc/src/hello_pi/hello_fft/gpu_fft_trans.c b/vc/src/hello_pi/hello_fft/gpu_fft_trans.c @@ -1,95 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 2.0 -Copyright (c) 2014, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <string.h> - -#include "gpu_fft_trans.h" - -static unsigned int shader_trans[1024] = { - #include "hex/shader_trans.hex" -}; - -int gpu_fft_trans_prepare( - int mb, - struct GPU_FFT *src, - struct GPU_FFT *dst, - struct GPU_FFT_TRANS **out) { - - unsigned size, info_bytes, code_bytes, unif_bytes, mail_bytes; - int ret; - - struct GPU_FFT_TRANS *info; - struct GPU_FFT_BASE *base; - struct GPU_FFT_PTR ptr; - - info_bytes = code_bytes = unif_bytes = mail_bytes = 4096; // 4k align - - size = info_bytes + // control - code_bytes + // shader, aligned - unif_bytes + // uniforms - mail_bytes; // mailbox message - - ret = gpu_fft_alloc(mb, size, &ptr); - if (ret) return ret; - - // Control header - info = (struct GPU_FFT_TRANS *) ptr.arm.vptr; - base = (struct GPU_FFT_BASE *) info; - gpu_fft_ptr_inc(&ptr, info_bytes); - - // Shader code - memcpy(ptr.arm.vptr, shader_trans, code_bytes); - base->vc_code = gpu_fft_ptr_inc(&ptr, code_bytes); - - // Uniforms - ptr.arm.uptr[0] = src->base.vc_msg; - ptr.arm.uptr[1] = ((char*)src->out) - ((char*)src->in); // output buffer offset - ptr.arm.uptr[2] = dst->base.vc_msg; - ptr.arm.uptr[3] = 0; - ptr.arm.uptr[4] = src->step * sizeof(struct GPU_FFT_COMPLEX); - ptr.arm.uptr[5] = dst->step * sizeof(struct GPU_FFT_COMPLEX); - ptr.arm.uptr[6] = src->x < dst->y? src->x : dst->y; - ptr.arm.uptr[7] = src->y < dst->x? src->y : dst->x; - base->vc_unifs[0] = gpu_fft_ptr_inc(&ptr, unif_bytes); - - // Mailbox message - ptr.arm.uptr[0] = base->vc_unifs[0]; - ptr.arm.uptr[1] = base->vc_code; - base->vc_msg = gpu_fft_ptr_inc(&ptr, mail_bytes); - - *out = info; - return 0; -} - -unsigned gpu_fft_trans_execute(struct GPU_FFT_TRANS *info) { - return gpu_fft_base_exec(&info->base, 1); -} - -void gpu_fft_trans_release(struct GPU_FFT_TRANS *info) { - gpu_fft_base_release(&info->base); -} diff --git a/vc/src/hello_pi/hello_fft/gpu_fft_trans.h b/vc/src/hello_pi/hello_fft/gpu_fft_trans.h @@ -1,45 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 2.0 -Copyright (c) 2014, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "gpu_fft.h" - -struct GPU_FFT_TRANS { - struct GPU_FFT_BASE base; -}; - -int gpu_fft_trans_prepare( - int mb, - struct GPU_FFT *src, - struct GPU_FFT *dst, - struct GPU_FFT_TRANS **out); - -unsigned gpu_fft_trans_execute( // src->out ==> T ==> dst->in - struct GPU_FFT_TRANS *info); - -void gpu_fft_trans_release( - struct GPU_FFT_TRANS *info); diff --git a/vc/src/hello_pi/hello_fft/gpu_fft_twiddles.c b/vc/src/hello_pi/hello_fft/gpu_fft_twiddles.c @@ -1,315 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 3.0 -Copyright (c) 2015, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <math.h> - -#include "gpu_fft.h" - -#define ALPHA(dx) (2*pow(sin((dx)/2),2)) -#define BETA(dx) (sin(dx)) - -static double k[16] = {0,8,4,4,2,2,2,2,1,1,1,1,1,1,1,1}; -static double m[16] = {0,0,0,1,0,1,2,3,0,1,2,3,4,5,6,7}; - -/****************************************************************************/ - -static float *twiddles_base_16(double two_pi, float *out, double theta) { - int i; - for (i=0; i<16; i++) { - *out++ = cos(two_pi/16*k[i]*m[i] + theta*k[i]); - *out++ = sin(two_pi/16*k[i]*m[i] + theta*k[i]); - } - return out; -} - -static float *twiddles_base_32(double two_pi, float *out, double theta) { - int i; - for (i=0; i<16; i++) { - *out++ = cos(two_pi/32*i + theta); - *out++ = sin(two_pi/32*i + theta); - } - return twiddles_base_16(two_pi, out, 2*theta); -} - -static float *twiddles_base_64(double two_pi, float *out) { - int i; - for (i=0; i<32; i++) { - *out++ = cos(two_pi/64*i); - *out++ = sin(two_pi/64*i); - } - return twiddles_base_32(two_pi, out, 0); -} - -/****************************************************************************/ - -static float *twiddles_step_16(double two_pi, float *out, double theta) { - int i; - for (i=0; i<16; i++) { - *out++ = ALPHA(theta*k[i]); - *out++ = BETA(theta*k[i]); - } - return out; -} - -static float *twiddles_step_32(double two_pi, float *out, double theta) { - int i; - for (i=0; i<16; i++) { - *out++ = ALPHA(theta); - *out++ = BETA(theta); - } - return twiddles_step_16(two_pi, out, 2*theta); -} - -static float *twiddles_step_64(double two_pi, float *out, double theta) { - int i; - for (i=0; i<32; i++) { - *out++ = ALPHA(theta); - *out++ = BETA(theta); - } - return twiddles_step_32(two_pi, out, 2*theta); -} - -/****************************************************************************/ - -static void twiddles_256(double two_pi, float *out) { - double N=256; - int q; - - out = twiddles_base_16(two_pi, out, 0); - out = twiddles_step_16(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_16(two_pi, out, two_pi/N*q); -} - -static void twiddles_512(double two_pi, float *out) { - double N=512; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_16(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_16(two_pi, out, two_pi/N*q); -} - -static void twiddles_1k(double two_pi, float *out) { - double N=1024; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_2k(double two_pi, float *out) { - double N=2048; - int q; - - out = twiddles_base_64(two_pi, out); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_4k(double two_pi, float *out) { - double N=4096; - int q; - - out = twiddles_base_16(two_pi, out, 0); - out = twiddles_step_16(two_pi, out, two_pi/N * 16); - out = twiddles_step_16(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_16(two_pi, out, two_pi/N*q); -} - -static void twiddles_8k(double two_pi, float *out) { - double N=8192; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_16(two_pi, out, two_pi/N * 16); - out = twiddles_step_16(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_16(two_pi, out, two_pi/N*q); -} - -static void twiddles_16k(double two_pi, float *out) { - double N=16384; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_32(two_pi, out, two_pi/N * 16); - out = twiddles_step_16(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_16(two_pi, out, two_pi/N*q); -} - -static void twiddles_32k(double two_pi, float *out) { - double N=32768; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_32(two_pi, out, two_pi/N * 32); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_64k(double two_pi, float *out) { - double N=65536; - int q; - - out = twiddles_base_64(two_pi, out); - out = twiddles_step_32(two_pi, out, two_pi/N * 32); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_128k(double two_pi, float *out) { - double N=128*1024; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_16(two_pi, out, two_pi/N * 16*16); - out = twiddles_step_16(two_pi, out, two_pi/N * 16); - out = twiddles_step_16(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_16(two_pi, out, two_pi/N*q); -} - -static void twiddles_256k(double two_pi, float *out) { - double N=256*1024; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_16(two_pi, out, two_pi/N * 32*16); - out = twiddles_step_16(two_pi, out, two_pi/N * 32); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_512k(double two_pi, float *out) { - double N=512*1024; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_16(two_pi, out, two_pi/N * 32*32); - out = twiddles_step_32(two_pi, out, two_pi/N * 32); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_1024k(double two_pi, float *out) { - double N=1024*1024; - int q; - - out = twiddles_base_32(two_pi, out, 0); - out = twiddles_step_32(two_pi, out, two_pi/N * 32*32); - out = twiddles_step_32(two_pi, out, two_pi/N * 32); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_2048k(double two_pi, float *out) { - double N=2048*1024; - int q; - - out = twiddles_base_64(two_pi, out); - out = twiddles_step_32(two_pi, out, two_pi/N * 32*32); - out = twiddles_step_32(two_pi, out, two_pi/N * 32); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -static void twiddles_4096k(double two_pi, float *out) { - double N=4096*1024; - int q; - - out = twiddles_base_64(two_pi, out); - out = twiddles_step_64(two_pi, out, two_pi/N * 32*32); - out = twiddles_step_32(two_pi, out, two_pi/N * 32); - out = twiddles_step_32(two_pi, out, two_pi/N * GPU_FFT_QPUS); - - for (q=0; q<GPU_FFT_QPUS; q++) - out = twiddles_base_32(two_pi, out, two_pi/N*q); -} - -/****************************************************************************/ - -static struct { - int passes, shared, unique; - void (*twiddles)(double, float *); -} -shaders[] = { - {2, 2, 1, twiddles_256}, - {2, 3, 1, twiddles_512}, - {2, 4, 2, twiddles_1k}, - {2, 6, 2, twiddles_2k}, - {3, 3, 1, twiddles_4k}, - {3, 4, 1, twiddles_8k}, - {3, 5, 1, twiddles_16k}, - {3, 6, 2, twiddles_32k}, - {3, 8, 2, twiddles_64k}, - {4, 5, 1, twiddles_128k}, - {4, 6, 2, twiddles_256k}, - {4, 7, 2, twiddles_512k}, - {4, 8, 2, twiddles_1024k}, - {4,10, 2, twiddles_2048k}, - {4,12, 2, twiddles_4096k} -}; - -int gpu_fft_twiddle_size(int log2_N, int *shared, int *unique, int *passes) { - if (log2_N<8 || log2_N>22) return -1; - *shared = shaders[log2_N-8].shared; - *unique = shaders[log2_N-8].unique; - *passes = shaders[log2_N-8].passes; - return 0; -} - -void gpu_fft_twiddle_data(int log2_N, int direction, float *out) { - shaders[log2_N-8].twiddles((direction==GPU_FFT_FWD?-2:2)*GPU_FFT_PI, out); -} diff --git a/vc/src/hello_pi/hello_fft/hello_fft.bin b/vc/src/hello_pi/hello_fft/hello_fft.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_fft/hello_fft.c b/vc/src/hello_pi/hello_fft/hello_fft.c @@ -1,109 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 3.0 -Copyright (c) 2015, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <stdlib.h> -#include <unistd.h> -#include <stdio.h> -#include <math.h> -#include <time.h> - -#include "mailbox.h" -#include "gpu_fft.h" - -char Usage[] = - "Usage: hello_fft.bin log2_N [jobs [loops]]\n" - "log2_N = log2(FFT_length), log2_N = 8...22\n" - "jobs = transforms per batch, jobs>0, default 1\n" - "loops = number of test repeats, loops>0, default 1\n"; - -unsigned Microseconds(void) { - struct timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - return ts.tv_sec*1000000 + ts.tv_nsec/1000; -} - -int main(int argc, char *argv[]) { - int i, j, k, ret, loops, freq, log2_N, jobs, N, mb = mbox_open(); - unsigned t[2]; - double tsq[2]; - - struct GPU_FFT_COMPLEX *base; - struct GPU_FFT *fft; - - log2_N = argc>1? atoi(argv[1]) : 12; // 8 <= log2_N <= 22 - jobs = argc>2? atoi(argv[2]) : 1; // transforms per batch - loops = argc>3? atoi(argv[3]) : 1; // test repetitions - - if (argc<2 || jobs<1 || loops<1) { - printf(Usage); - return -1; - } - - N = 1<<log2_N; // FFT length - ret = gpu_fft_prepare(mb, log2_N, GPU_FFT_REV, jobs, &fft); // call once - - switch(ret) { - case -1: printf("Unable to enable V3D. Please check your firmware is up to date.\n"); return -1; - case -2: printf("log2_N=%d not supported. Try between 8 and 22.\n", log2_N); return -1; - case -3: printf("Out of memory. Try a smaller batch or increase GPU memory.\n"); return -1; - case -4: printf("Unable to map Videocore peripherals into ARM memory space.\n"); return -1; - case -5: printf("Can't open libbcm_host.\n"); return -1; - } - - for (k=0; k<loops; k++) { - - for (j=0; j<jobs; j++) { - base = fft->in + j*fft->step; // input buffer - for (i=0; i<N; i++) base[i].re = base[i].im = 0; - freq = j+1; - base[freq].re = base[N-freq].re = 0.5; - } - - usleep(1); // Yield to OS - t[0] = Microseconds(); - gpu_fft_execute(fft); // call one or many times - t[1] = Microseconds(); - - tsq[0]=tsq[1]=0; - for (j=0; j<jobs; j++) { - base = fft->out + j*fft->step; // output buffer - freq = j+1; - for (i=0; i<N; i++) { - double re = cos(2*GPU_FFT_PI*freq*i/N); - tsq[0] += pow(re, 2); - tsq[1] += pow(re - base[i].re, 2) + pow(base[i].im, 2); - } - } - - printf("rel_rms_err = %0.2g, usecs = %d, k = %d\n", - sqrt(tsq[1]/tsq[0]), (t[1]-t[0])/jobs, k); - } - - gpu_fft_release(fft); // Videocore memory lost if not freed ! - return 0; -} diff --git a/vc/src/hello_pi/hello_fft/hello_fft_2d.bin b/vc/src/hello_pi/hello_fft/hello_fft_2d.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_fft/hello_fft_2d.c b/vc/src/hello_pi/hello_fft/hello_fft_2d.c @@ -1,135 +0,0 @@ -/* -BCM2835 "GPU_FFT" release 2.0 -Copyright (c) 2014, Andrew Holme. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <string.h> -#include <stdio.h> -#include <time.h> - -#include "gpu_fft_trans.h" -#include "hello_fft_2d_bitmap.h" - -#define log2_N 9 -#define N (1<<log2_N) - -#define GPU_FFT_ROW(fft, io, y) ((fft)->io+(fft)->step*(y)) - -unsigned Microseconds(void) { - struct timespec ts; - clock_gettime(CLOCK_REALTIME, &ts); - return ts.tv_sec*1000000 + ts.tv_nsec/1000; -} - -int main(int argc, char *argv[]) { - int x, y, ret, mb = mbox_open(); - unsigned t[4]; - - struct GPU_FFT_COMPLEX *row; - struct GPU_FFT_TRANS *trans; - struct GPU_FFT *fft_pass[2]; - - BITMAPFILEHEADER bfh; - BITMAPINFOHEADER bih; - - // Create Windows bitmap file - FILE *fp = fopen("hello_fft_2d.bmp", "wb"); - if (!fp) return -666; - - // Write bitmap header - memset(&bfh, 0, sizeof(bfh)); - bfh.bfType = 0x4D42; //"BM" - bfh.bfSize = N*N*3; - bfh.bfOffBits = sizeof(bfh) + sizeof(bih); - fwrite(&bfh, sizeof(bfh), 1, fp); - - // Write bitmap info - memset(&bih, 0, sizeof(bih)); - bih.biSize = sizeof(bih); - bih.biWidth = N; - bih.biHeight = N; - bih.biPlanes = 1; - bih.biBitCount = 24; - bih.biCompression = BI_RGB; - fwrite(&bih, sizeof(bih), 1, fp); - - // Prepare 1st FFT pass - ret = gpu_fft_prepare(mb, log2_N, GPU_FFT_REV, N, fft_pass+0); - if (ret) { - return ret; - } - // Prepare 2nd FFT pass - ret = gpu_fft_prepare(mb, log2_N, GPU_FFT_REV, N, fft_pass+1); - if (ret) { - gpu_fft_release(fft_pass[0]); - return ret; - } - // Transpose from 1st pass output to 2nd pass input - ret = gpu_fft_trans_prepare(mb, fft_pass[0], fft_pass[1], &trans); - if (ret) { - gpu_fft_release(fft_pass[0]); - gpu_fft_release(fft_pass[1]); - return ret; - } - - // Clear input array - for (y=0; y<N; y++) { - row = GPU_FFT_ROW(fft_pass[0], in, y); - for (x=0; x<N; x++) row[x].re = row[x].im = 0; - } - - // Setup input data - GPU_FFT_ROW(fft_pass[0], in, 2)[ 2].re = 60; - GPU_FFT_ROW(fft_pass[0], in, N-2)[N-2].re = 60; - - // ==> FFT() ==> T() ==> FFT() ==> - usleep(1); /* yield to OS */ t[0] = Microseconds(); - gpu_fft_execute(fft_pass[0]); t[1] = Microseconds(); - gpu_fft_trans_execute(trans); t[2] = Microseconds(); - gpu_fft_execute(fft_pass[1]); t[3] = Microseconds(); - - // Write output to bmp file - for (y=0; y<N; y++) { - row = GPU_FFT_ROW(fft_pass[1], out, y); - for (x=0; x<N; x++) { - fputc(128+row[x].re, fp); // blue - fputc(128+row[x].re, fp); // green - fputc(128+row[x].re, fp); // red - } - } - - printf( "1st FFT %6d usecs\n" - "Transpose %6d usecs\n" - "2nd FFT %6d usecs\n", - t[3]-t[2], t[2]-t[1], t[1]-t[0]); - - // Clean-up properly. Videocore memory lost if not freed ! - gpu_fft_release(fft_pass[0]); - gpu_fft_release(fft_pass[1]); - gpu_fft_trans_release(trans); - - return 0; -} diff --git a/vc/src/hello_pi/hello_fft/hello_fft_2d_bitmap.h b/vc/src/hello_pi/hello_fft/hello_fft_2d_bitmap.h @@ -1,53 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -typedef struct __attribute__((packed)) { - unsigned short bfType; /* Magic number for file */ - unsigned int bfSize; /* Size of file */ - unsigned short bfReserved1; /* Reserved */ - unsigned short bfReserved2; /* ... */ - unsigned int bfOffBits; /* Offset to bitmap data */ -} BITMAPFILEHEADER; - -typedef struct __attribute__((packed)) { - unsigned int biSize; /* Size of info header */ - int biWidth; /* Width of image */ - int biHeight; /* Height of image */ - unsigned short biPlanes; /* Number of color planes */ - unsigned short biBitCount; /* Number of bits per pixel */ - unsigned int biCompression; /* Type of compression to use */ - unsigned int biSizeImage; /* Size of image data */ - int biXPelsPerMeter; /* X pixels per meter */ - int biYPelsPerMeter; /* Y pixels per meter */ - unsigned int biClrUsed; /* Number of colors used */ - unsigned int biClrImportant; /* Number of important colors */ -} BITMAPINFOHEADER; - -/* - * Constant for the biCompression field... - */ - -# define BI_RGB 0 /* No compression - straight BGR data */ diff --git a/vc/src/hello_pi/hello_fft/hex/shader_1024k.hex b/vc/src/hello_pi/hello_fft/hex/shader_1024k.hex @@ -1,948 +0,0 @@ -0x00000014, 0xe0021227, // mov rb_STAGES, STAGES -0x00000010, 0xe00216e7, // mov rb_0x10, 0x10 -0x00000040, 0xe0021727, // mov rb_0x40, 0x40 -0x00000080, 0xe0021767, // mov rb_0x80, 0x80 -0x000000f0, 0xe00217a7, // mov rb_0xF0, 0xF0 -0x00000100, 0xe00217e7, // mov rb_0x100, 0x100 -0x55555555, 0xe0020767, // mov rx_0x55555555, 0x55555555 -0x33333333, 0xe00207a7, // mov rx_0x33333333, 0x33333333 -0x0f0f0f0f, 0xe00207e7, // mov rx_0x0F0F0F0F, 0x0F0F0F0F -0x00ff00ff, 0xe0021027, // mov rx_0x00FF00FF, 0x00FF00FF -0x0000ffff, 0xe00216a7, // mov rx_0x0000FFFF, 0x0000FFFF -0x80904000, 0xe0020727, // mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) -0x80905000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) -0x15827d80, 0x100202e7, // mov rx_tw_shared, unif -0x15827d80, 0x100212e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x100246a0, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100246e0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000002e8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156e7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x15727d80, 0x10020827, // mov r0, ra_vdw_32 -0x8c05cdf6, 0x10024061, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00040000, 0xe00208e7, // mov r3, PASS32_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000050, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156e7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x000005d8, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20467030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d1039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22091cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20467031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149c01c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149c01c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9db1c0, 0x10020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119db3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c91c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffd78, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149c01c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149c01c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9db1c0, 0x10020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119db3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c91c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc30, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95682ff6, 0x10024682, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c7ff6, 0x100246c7, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffba0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb50, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95682ff6, 0x10024682, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c7ff6, 0x100246c7, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00001258, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149c01c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149c01c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9db1c0, 0x10020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119db3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c91c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff998, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff970, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff9d0, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00007fff, 0xe0020827, // mov r0, 0x7FFF -0x141e7c00, 0x100229e7, // and.setf -, ra_points, r0 -0xfffff9a0, 0xf01809e7, // brr.allnz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100601e7, // add.ifnz ra_points, ra_points, rb_0x100 -0x954d3dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20367016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2136709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024e7c80, 0x10020827, // fsub r0, a, b -0x024e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01527380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020527, // fadd a+1, r0, r1 -0x029d3ec0, 0x10020827, // fsub r0, a, b -0x029d31c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d3e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d43c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d3e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021527, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff710, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff4a0, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff480, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff460, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff440, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x954d3dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20367016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2136709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024e7c80, 0x10020827, // fsub r0, a, b -0x024e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01527380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020527, // fadd a+1, r0, r1 -0x029d3ec0, 0x10020827, // fsub r0, a, b -0x029d31c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d3e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d43c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d3e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021527, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff1b0, 0xf00809e7, // brr.allz -, r:pass_3 -0x00000060, 0xe0020827, // mov r0, 3*4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000007, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000006, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xffffef40, 0xf0f80227, // brr ra_link_1, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x954d3dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20367016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2136709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024e7c80, 0x10020827, // fsub r0, a, b -0x024e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01527380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020527, // fadd a+1, r0, r1 -0x029d3ec0, 0x10020827, // fsub r0, a, b -0x029d31c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d3e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d43c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d3e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021527, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xffffecb0, 0xf00809e7, // brr.allz -, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xffffed78, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_128k.hex b/vc/src/hello_pi/hello_fft/hex/shader_128k.hex @@ -1,735 +0,0 @@ -0x00000011, 0xe0021227, // mov rb_STAGES, STAGES -0x00000010, 0xe00216a7, // mov rb_0x10, 0x10 -0x00000040, 0xe00216e7, // mov rb_0x40, 0x40 -0x00000080, 0xe0021727, // mov rb_0x80, 0x80 -0x000000f0, 0xe0021767, // mov rb_0xF0, 0xF0 -0x00000100, 0xe00217a7, // mov rb_0x100, 0x100 -0x00000fff, 0xe00217e7, // mov rb_0xFFF, 0xFFF -0x55555555, 0xe0020767, // mov rx_0x55555555, 0x55555555 -0x33333333, 0xe00207a7, // mov rx_0x33333333, 0x33333333 -0x0f0f0f0f, 0xe00207e7, // mov rx_0x0F0F0F0F, 0x0F0F0F0F -0x00ff00ff, 0xe0021627, // mov rx_0x00FF00FF, 0x00FF00FF -0x0000ffff, 0xe0021667, // mov rx_0x0000FFFF, 0x0000FFFF -0x88104000, 0xe00206e7, // mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -0x88105000, 0xe0021027, // mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -0x90104000, 0xe0020727, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x15827d80, 0x100202e7, // mov rx_tw_shared, unif -0x15827d80, 0x100212e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10024660, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100246a0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000b0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x156e7d80, 0x10021c67, // mov vw_setup, arg_vdw -0xc000ffc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS16_STRIDE-16*4 -0x8c05bdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x000000c8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x15727d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc0007fc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05bdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000560, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20467030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d1039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22091cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20467031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d81c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d81c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9da1c0, 0x10020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119da3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9cc1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffd78, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15adf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d81c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d81c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9da1c0, 0x10020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119da3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9cc1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc30, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffba0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x00000000, 0xf0f489e7, // bra -, ra_save_16 -0x009e7000, 0x100009e7, // nop -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c0ff6, 0x100246c0, // mov ra_vdw_16, rb_vdw_16; mov rb_vdw_16, ra_vdw_16 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000d00, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15adf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d81c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d81c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9da1c0, 0x10020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119da3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9cc1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffa08, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff9e0, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffaf0, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x141dfdc0, 0x100229e7, // and.setf -, ra_points, rb_0xFFF -0xfffffac8, 0xf01809e7, // brr.allnz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100601e7, // add.ifnz ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff938, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff778, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0xfffff758, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff5c8, 0xf00809e7, // brr.allz -, r:pass_3 -0x00000020, 0xe0020827, // mov r0, 4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff408, 0xf0f80227, // brr ra_link_1, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff278, 0xf00809e7, // brr.allz -, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff2d0, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_16k.hex b/vc/src/hello_pi/hello_fft/hex/shader_16k.hex @@ -1,688 +0,0 @@ -0x00000010, 0xe00216e7, // mov rb_0x10, 0x10 -0x00000040, 0xe0021727, // mov rb_0x40, 0x40 -0x00000080, 0xe0021767, // mov rb_0x80, 0x80 -0x000000f0, 0xe00217a7, // mov rb_0xF0, 0xF0 -0x00000100, 0xe00217e7, // mov rb_0x100, 0x100 -0x00005555, 0xe0020767, // mov rx_0x5555, 0x5555 -0x00003333, 0xe00207a7, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207e7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00216a7, // mov rx_0x00FF, 0x00FF -0x88104000, 0xe00206e7, // mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -0x88105000, 0xe0021027, // mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -0x90104000, 0xe0020727, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x15827d80, 0x100202e7, // mov rx_tw_shared, unif -0x15827d80, 0x100212e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10024660, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100246a0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000b0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x156e7d80, 0x10021c67, // mov vw_setup, arg_vdw -0xc0001fc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS16_STRIDE-16*4 -0x8c05cdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x000000c8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x15727d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc0000fc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05cdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x000005f0, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20467030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d1039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22091cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20467031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c11c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffda0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c11c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc80, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffbf0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffba0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb10, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x00000000, 0xf0f489e7, // bra -, ra_save_16 -0x009e7000, 0x100009e7, // nop -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c0ff6, 0x100246c0, // mov ra_vdw_16, rb_vdw_16; mov rb_vdw_16, ra_vdw_16 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000b10, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c11c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff9a0, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x0e1cedc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff978, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff988, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff968, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x954d3dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20367016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2136709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024e7c80, 0x10020827, // fsub r0, a, b -0x024e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01527380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020527, // fadd a+1, r0, r1 -0x029d3ec0, 0x10020827, // fsub r0, a, b -0x029d31c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d3e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d43c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d3e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021527, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cedc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff6d8, 0xf00809e7, // brr.allz -, r:pass_2 -0x00000020, 0xe0020827, // mov r0, 4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff5f8, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cedc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff468, 0xf00809e7, // brr.allz -, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff4c0, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_1k.hex b/vc/src/hello_pi/hello_fft/hex/shader_1k.hex @@ -1,523 +0,0 @@ -0x00000010, 0xe00216e7, // mov rb_0x10, 0x10 -0x00000040, 0xe0021727, // mov rb_0x40, 0x40 -0x000000f0, 0xe0021767, // mov rb_0xF0, 0xF0 -0x00005555, 0xe00207a7, // mov rx_0x5555, 0x5555 -0x00003333, 0xe00217a7, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207e7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00217e7, // mov rx_0x00FF, 0x00FF -0x90104000, 0xe0020767, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x15827d80, 0x100202a7, // mov rx_tw_shared, unif -0x15827d80, 0x100212a7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x100246e0, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x10024720, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000c8, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15727d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x15767d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc00000c0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05cdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15727d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x156e7d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000588, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20367030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cd039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208dcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20367031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c31c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffda0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c31c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc80, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204a7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d200f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204a700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22092c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x956c2ff6, 0x100246c2, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95707ff6, 0x10024707, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95741ff6, 0x10024741, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffbf0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffba0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x204a7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d200f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204a700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22092c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x956c2ff6, 0x100246c2, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95707ff6, 0x10024707, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95741ff6, 0x10024741, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x000007a0, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214a7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024451, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe00244d3, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c31c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffa10, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x0e1cadc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff9e8, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cae00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cae40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cae00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cae40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214a7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100202e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100212e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024451, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe00244d3, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff9f8, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x95492dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024a7c80, 0x10020827, // fsub r0, a, b -0x024a7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024a7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014e7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025892, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024a7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204e7, // fadd a+1, r0, r1 -0x029d2ec0, 0x10020827, // fsub r0, a, b -0x029d21c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d2e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d33c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024892, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d2e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214e7, // fadd a+1, r0, r1 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x202e7016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cb017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cb01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x212e709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02427c80, 0x10020827, // fsub r0, a, b -0x02427180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02427c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01467380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025890, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02427c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020467, // fadd a+1, r0, r1 -0x029d0ec0, 0x10020827, // fsub r0, a, b -0x029d01c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d0e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d13c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024890, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d0e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021467, // fadd a+1, r0, r1 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cadc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff768, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff830, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_2048k.hex b/vc/src/hello_pi/hello_fft/hex/shader_2048k.hex @@ -1,1353 +0,0 @@ -0x00000010, 0xe0021227, // mov rb_0x10, 0x10 -0x000001d0, 0xe0021967, // mov r5rep, 0x1D0 -0x15827d80, 0x100203e7, // mov rx_tw_shared, unif -0x15827d80, 0x100213e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10025020, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x10025060, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000002e8, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x153a7d80, 0x10020827, // mov r0, ra_vdw_32 -0x8c04ddf6, 0x10024061, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00080000, 0xe00208e7, // mov r3, PASS32_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000050, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000520, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x80904000, 0xe0020827, // mov r0, vdw_setup_0(1, 16, dma_h32(0,0)) -0x00000040, 0xe0020867, // mov r1, 0x40 -0x8c067c76, 0x10024061, // add ra_save_ptr, ra_save_ptr, r1; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00040000, 0xe00208e7, // mov r3, PASS64_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000002b8, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd00200a7, // shl ra_temp, r0, 5 -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000e0, 0xf0f809e7, // brr -, r:2f -0x00000010, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000c0, 0xf0f809e7, // brr -, r:2f -0x00000011, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000a0, 0xf0f809e7, // brr -, r:2f -0x00000012, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000080, 0xf0f809e7, // brr -, r:2f -0x00000013, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000060, 0xf0f809e7, // brr -, r:2f -0x00000014, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000040, 0xf0f809e7, // brr -, r:2f -0x00000015, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000020, 0xf0f809e7, // brr -, r:2f -0x00000016, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f809e7, // brr -, r:2f -0x00000017, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000008, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000009, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000a, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000b, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000c, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000d, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000e, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000f, 0xe80009e7, // mov -, srel(i+8) -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000998, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d2039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22092cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d3039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22093cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20527030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d4039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22094cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20527031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20567030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d5039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22095cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20567031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c81c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffd50, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c81c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffbe0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x01267c00, 0x100202e7, // fadd ra_64+0, ra_32_re, r0 -0x019c9e40, 0x10020327, // fadd ra_64+1, rb_32_im, r1 -0x02267c00, 0x10020367, // fsub ra_64+2, ra_32_re, r0 -0x029c9e40, 0x100203a7, // fsub ra_64+3, rb_32_im, r1 -0x8c167d76, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c81c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffa30, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c81c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffff8c0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x029c9e40, 0x100208e7, // fsub r3, rb_32_im, r1 -0x02267c00, 0x100208a7, // fsub r2, ra_32_re, r0 -0x019c9e40, 0x10020867, // fadd r1, rb_32_im, r1 -0x01267c00, 0x10020827, // fadd r0, ra_32_re, r0 -0x2066700e, 0x100049c9, // nop; fmul rb_32_im, r1, ra_tw_re+TW48 -0x209d900f, 0x100059c9, // nop; fmul ra_32_re, r1, rb_tw_im+TW48 -0x209d9007, 0x100049e1, // nop; fmul r1, r0, rb_tw_im+TW48 -0x216493c6, 0x10025320, // fadd rb_64+1, r1, rb_32_im; fmul r0, r0, ra_tw_re+TW48 -0x2225a19f, 0x100252c9, // fsub rb_64+0, r0, ra_32_re; fmul ra_32_re, r3, rb_tw_im+TW64 -0x206a701e, 0x100049c9, // nop; fmul rb_32_im, r3, ra_tw_re+TW64 -0x00000000, 0xf0f549e7, // bra -, ra_save_64 -0x209da017, 0x100049e3, // nop; fmul r3, r2, rb_tw_im+TW64 -0x216897d6, 0x100253a2, // fadd rb_64+3, r3, rb_32_im; fmul r2, r2, ra_tw_re+TW64 -0x02267580, 0x10021367, // fsub rb_64+2, r2, ra_32_re -0x8c14cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff7e0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff790, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x952c2ff6, 0x100242c2, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95307ff6, 0x10024307, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x9538eff6, 0x1002438e, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_32, rx_save_slave_32 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_64, rx_save_slave_64 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00001378, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020667, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021667, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100206a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100216a7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c61c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c81c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff4f8, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000015, 0xe0020867, // mov r1, STAGES -0x0e1e7c40, 0x100229e7, // shr.setf -, ra_points, r1 -0xfffff4c8, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159c0fc0, 0x100202e7, // mov ra_vpm_lo, rb_vpm -0x159c1fc0, 0x10020327, // mov ra_vpm_hi, rb_vpm_16 -0x80904000, 0xe00203a7, // mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) -0x80905000, 0xe00213a7, // mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) -0x00000015, 0xe00212e7, // mov rb_STAGES, STAGES -0x000000f0, 0xe0021327, // mov rb_0xF0, 0xF0 -0x00000040, 0xe0021367, // mov rb_0x40, 0x40 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff8b0, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00007fff, 0xe0020827, // mov r0, 0x7FFF -0x141e7c00, 0x100229e7, // and.setf -, ra_points, r0 -0xfffff880, 0xf01809e7, // brr.allnz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100601e7, // add.ifnz ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cbdc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff5f0, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000007, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000006, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff380, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0xfffff360, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0xfffff340, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0xfffff320, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cbdc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0x00000100, 0xe0020827, // mov r0, 0x100 -0xfffff088, 0xf00809e7, // brr.allz -, r:pass_3 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000060, 0xe0020827, // mov r0, (4-1)*4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000009, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000008, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xffffee18, 0xf0f80227, // brr ra_link_1, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cbdc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xffffeb88, 0xf00809e7, // brr.allz -, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xffffec58, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_256.hex b/vc/src/hello_pi/hello_fft/hex/shader_256.hex @@ -1,359 +0,0 @@ -0x00000040, 0xe00217a7, // mov rb_0x40, 0x40 -0x00000080, 0xe00217e7, // mov rb_0x80, 0x80 -0x00005555, 0xe0020767, // mov rx_0x5555, 0x5555 -0x00003333, 0xe00207a7, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207e7, // mov rx_0x0F0F, 0x0F0F -0x88104000, 0xe0020727, // mov ra_vdw, vdw_setup_0(16, 16, dma_h32( 0,0)) -0x88104800, 0xe0021727, // mov rb_vdw, vdw_setup_0(16, 16, dma_h32(16,0)) -0x15827d80, 0x10020227, // mov rx_tw_shared, unif -0x15827d80, 0x10021227, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x100246e0, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100256e0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100049e0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100009e7, // add out_3, r0, r2 -0x000000b0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156e7d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x15727d80, 0x10021c67, // mov vw_setup, arg_vdw -0xc0000040, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS16_STRIDE-16*4 -0x8c05edf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156e7d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x156e7d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000248, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x202a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ca039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208acb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x202a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x202e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cb039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208bcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x202e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20327030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cc039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ccb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20327031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20367030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cd039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208dcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20367031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f489e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0xfffffe98, 0xf0f809e7, // brr -, r:fft_16 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000600, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c227c00, 0x10020e27, // add t0s, ptr, r0 -0x0c227c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe002438e, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffd50, 0xf0f80027, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x956dbff6, 0x100246db, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x9571cff6, 0x1002471c, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0xfffffd30, 0xf0f80027, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x956dbff6, 0x100246db, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x9571cff6, 0x1002471c, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x00000000, 0xf0f4c027, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9c8e00, 0x10020e27, // add t0s, ptr, r0 -0x0c9c8e40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c227c00, 0x10020e27, // add t0s, ptr, r0 -0x0c227c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020267, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021267, // mov rb_tw_im+dst, r4 -0x00000000, 0xe002438e, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb50, 0xf0f80027, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x956dbff6, 0x100246db, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x9571cff6, 0x1002471c, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20267016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209c9017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209c901f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2126709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02367c80, 0x10020827, // fsub r0, a, b -0x02367180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02367c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x013a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002588d, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02367c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100203a7, // fadd a+1, r0, r1 -0x029cdec0, 0x10020827, // fsub r0, a, b -0x029cd1c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029cde40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019ce3c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002488d, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029cde80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100213a7, // fadd a+1, r0, r1 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0xfffff9c8, 0xf0f80027, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x956dbff6, 0x100246db, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x9571cff6, 0x1002471c, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x00000000, 0xf0f4c027, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0xfffff9d0, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_256k.hex b/vc/src/hello_pi/hello_fft/hex/shader_256k.hex @@ -1,861 +0,0 @@ -0x00000012, 0xe0021227, // mov rb_STAGES, STAGES -0x00000010, 0xe00216a7, // mov rb_0x10, 0x10 -0x00000040, 0xe00216e7, // mov rb_0x40, 0x40 -0x00000080, 0xe0021727, // mov rb_0x80, 0x80 -0x000000f0, 0xe0021767, // mov rb_0xF0, 0xF0 -0x00000100, 0xe00217a7, // mov rb_0x100, 0x100 -0x00001fff, 0xe00217e7, // mov rb_0x1FFF, 0x1FFF -0x55555555, 0xe0020767, // mov rx_0x55555555, 0x55555555 -0x33333333, 0xe00207a7, // mov rx_0x33333333, 0x33333333 -0x0f0f0f0f, 0xe00207e7, // mov rx_0x0F0F0F0F, 0x0F0F0F0F -0x00ff00ff, 0xe0021627, // mov rx_0x00FF00FF, 0x00FF00FF -0x0000ffff, 0xe0021667, // mov rx_0x0000FFFF, 0x0000FFFF -0x80904000, 0xe00206e7, // mov ra_vdw_16, vdw_setup_0( 1, 16, dma_h32( 0,0)) -0x80905000, 0xe0021027, // mov rb_vdw_16, vdw_setup_0( 1, 16, dma_h32(32,0)) -0x90104000, 0xe0020727, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x15827d80, 0x100202e7, // mov rx_tw_shared, unif -0x15827d80, 0x100212e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10024660, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100246a0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000001d0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x156e7d80, 0x10020827, // mov r0, arg_vdw -0x8c05bdf6, 0x10024061, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00020000, 0xe00208e7, // mov r3, PASS16_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x000000c8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x15727d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc000ffc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05bdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000640, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20467030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d1039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22091cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20467031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d81c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d81c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9da1c0, 0x10020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119da3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9cb1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffd78, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15adf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d81c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d81c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9da1c0, 0x10020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119da3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9cb1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc30, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffba0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x00000000, 0xf0f489e7, // bra -, ra_save_16 -0x009e7000, 0x100009e7, // nop -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c0ff6, 0x100246c0, // mov ra_vdw_16, rb_vdw_16; mov rb_vdw_16, ra_vdw_16 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb38, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15adf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffae8, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000ef0, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15adf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d81c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d81c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9da1c0, 0x10020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119da3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9cb1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff928, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff900, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffa10, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x141dfdc0, 0x100229e7, // and.setf -, ra_points, rb_0x1FFF -0xfffff9e8, 0xf01809e7, // brr.allnz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100601e7, // add.ifnz ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff858, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff698, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0xfffff678, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0xfffff658, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0xfffff638, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff4a8, 0xf00809e7, // brr.allz -, r:pass_3 -0x00000060, 0xe0020827, // mov r0, 3*4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x0c1dcdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15adf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff2a0, 0xf0f80227, // brr ra_link_1, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x954d3dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20367016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2136709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024e7c80, 0x10020827, // fsub r0, a, b -0x024e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01527380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020527, // fadd a+1, r0, r1 -0x029d3ec0, 0x10020827, // fsub r0, a, b -0x029d31c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d3e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d43c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d3e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021527, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff010, 0xf00809e7, // brr.allz -, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff0e0, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_2k.hex b/vc/src/hello_pi/hello_fft/hex/shader_2k.hex @@ -1,765 +0,0 @@ -0x00000010, 0xe0021727, // mov rb_0x10, 0x10 -0x00000040, 0xe0021767, // mov rb_0x40, 0x40 -0x000000f0, 0xe00217a7, // mov rb_0xF0, 0xF0 -0x000001d0, 0xe00217e7, // mov rb_0x1D0, 0x1D0 -0x00005555, 0xe0020727, // mov rx_0x5555, 0x5555 -0x00003333, 0xe0020767, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207a7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00207e7, // mov rx_0x00FF, 0x00FF -0x15827d80, 0x100203e7, // mov rx_tw_shared, unif -0x15827d80, 0x100213e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10025020, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x10025060, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000c8, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x15367d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc00001c0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05ddf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x000000f8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0xa0104000, 0xe0021c67, // mov vw_setup, vdw_setup_0(64, 16, dma_h32(0,0)) -0xc00000c0, 0xe0021c67, // mov vw_setup, vdw_setup_1(PASS64_STRIDE-16*4) -0x8c05ddf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, step; mov vw_addr, ra_save_ptr -0x000002b8, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd00200a7, // shl ra_temp, r0, 5 -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000e0, 0xf0f809e7, // brr -, r:2f -0x00000010, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000c0, 0xf0f809e7, // brr -, r:2f -0x00000011, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000a0, 0xf0f809e7, // brr -, r:2f -0x00000012, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000080, 0xf0f809e7, // brr -, r:2f -0x00000013, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000060, 0xf0f809e7, // brr -, r:2f -0x00000014, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000040, 0xf0f809e7, // brr -, r:2f -0x00000015, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000020, 0xf0f809e7, // brr -, r:2f -0x00000016, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f809e7, // brr -, r:2f -0x00000017, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000008, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000009, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000a, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000b, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000c, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000d, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000e, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000f, 0xe80009e7, // mov -, srel(i+8) -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000858, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d2039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22092cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d3039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22093cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20527030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d4039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22094cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20527031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20567030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d5039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22095cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20567031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c21c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffda0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c21c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc80, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x01267c00, 0x100202e7, // fadd ra_64+0, ra_32_re, r0 -0x019c9e40, 0x10020327, // fadd ra_64+1, rb_32_im, r1 -0x02267c00, 0x10020367, // fsub ra_64+2, ra_32_re, r0 -0x029c9e40, 0x100203a7, // fsub ra_64+3, rb_32_im, r1 -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c21c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffb20, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c21c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffa00, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x029c9e40, 0x100208e7, // fsub r3, rb_32_im, r1 -0x02267c00, 0x100208a7, // fsub r2, ra_32_re, r0 -0x019c9e40, 0x10020867, // fadd r1, rb_32_im, r1 -0x01267c00, 0x10020827, // fadd r0, ra_32_re, r0 -0x2066700e, 0x100049c9, // nop; fmul rb_32_im, r1, ra_tw_re+TW48 -0x209d900f, 0x100059c9, // nop; fmul ra_32_re, r1, rb_tw_im+TW48 -0x209d9007, 0x100049e1, // nop; fmul r1, r0, rb_tw_im+TW48 -0x216493c6, 0x10025320, // fadd rb_64+1, r1, rb_32_im; fmul r0, r0, ra_tw_re+TW48 -0x2225a19f, 0x100252c9, // fsub rb_64+0, r0, ra_32_re; fmul ra_32_re, r3, rb_tw_im+TW64 -0x206a701e, 0x100049c9, // nop; fmul rb_32_im, r3, ra_tw_re+TW64 -0x00000000, 0xf0f549e7, // bra -, ra_save_64 -0x209da017, 0x100049e3, // nop; fmul r3, r2, rb_tw_im+TW64 -0x216897d6, 0x100253a2, // fadd rb_64+3, r3, rb_32_im; fmul r2, r2, ra_tw_re+TW64 -0x02267580, 0x10021367, // fsub rb_64+2, r2, ra_32_re -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff920, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff8d0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x952c2ff6, 0x100242c2, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95307ff6, 0x10024307, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x9534dff6, 0x1002434d, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_32, rx_save_slave_32 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_64, rx_save_slave_64 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000870, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020667, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021667, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100206a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100216a7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c61c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c21c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff688, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x0e1cbdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff660, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159c0fc0, 0x100202e7, // mov ra_vpm_lo, rb_vpm -0x159c1fc0, 0x10020327, // mov ra_vpm_hi, rb_vpm_16 -0x90104000, 0xe0020367, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021367, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff920, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cbdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff690, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff760, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_32k.hex b/vc/src/hello_pi/hello_fft/hex/shader_32k.hex @@ -1,697 +0,0 @@ -0x00000010, 0xe00216e7, // mov rb_0x10, 0x10 -0x00000040, 0xe0021727, // mov rb_0x40, 0x40 -0x00000080, 0xe0021767, // mov rb_0x80, 0x80 -0x000000f0, 0xe00217a7, // mov rb_0xF0, 0xF0 -0x00000100, 0xe00217e7, // mov rb_0x100, 0x100 -0x00005555, 0xe0020767, // mov rx_0x5555, 0x5555 -0x00003333, 0xe00207a7, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207e7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00216a7, // mov rx_0x00FF, 0x00FF -0x90104000, 0xe0020727, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x15827d80, 0x100202a7, // mov rx_tw_shared, unif -0x15827d80, 0x100212a7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x100246a0, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100246e0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000c8, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156e7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x15727d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc0001fc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05cdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156e7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000588, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20367030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cd039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208dcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20367031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c21c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffda0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c21c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc80, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204a7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d200f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204a700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22092c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x95682ff6, 0x10024682, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c7ff6, 0x100246c7, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffbf0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffba0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x204a7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d200f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204a700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22092c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x95682ff6, 0x10024682, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c7ff6, 0x100246c7, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000d00, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214a7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024451, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe00244d3, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c21c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffa10, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x0e1cfdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff9e8, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214a7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100202e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100212e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024451, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe00244d3, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff9f8, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff9d8, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff9b8, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff998, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x95492dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024a7c80, 0x10020827, // fsub r0, a, b -0x024a7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024a7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014e7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025892, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024a7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204e7, // fadd a+1, r0, r1 -0x029d2ec0, 0x10020827, // fsub r0, a, b -0x029d21c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d2e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d33c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024892, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d2e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214e7, // fadd a+1, r0, r1 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x202e7016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cb017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cb01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x212e709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02427c80, 0x10020827, // fsub r0, a, b -0x02427180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02427c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01467380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025890, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02427c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020467, // fadd a+1, r0, r1 -0x029d0ec0, 0x10020827, // fsub r0, a, b -0x029d01c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d0e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d13c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024890, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d0e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021467, // fadd a+1, r0, r1 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cfdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff708, 0xf00809e7, // brr.allz -, r:pass_2 -0x00000060, 0xe0020827, // mov r0, 3*4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cae00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cae40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cae00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cae40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214a7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100202e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100212e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2a7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2a7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024451, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe00244d3, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff498, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x95492dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024a7c80, 0x10020827, // fsub r0, a, b -0x024a7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024a7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014e7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025892, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024a7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204e7, // fadd a+1, r0, r1 -0x029d2ec0, 0x10020827, // fsub r0, a, b -0x029d21c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d2e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d33c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024892, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d2e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214e7, // fadd a+1, r0, r1 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x202e7016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cb017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cb01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x212e709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02427c80, 0x10020827, // fsub r0, a, b -0x02427180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02427c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01467380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025890, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02427c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020467, // fadd a+1, r0, r1 -0x029d0ec0, 0x10020827, // fsub r0, a, b -0x029d01c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d0e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d13c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024890, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d0e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021467, // fadd a+1, r0, r1 -0x95410dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cfdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff208, 0xf00809e7, // brr.allz -, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff2d0, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_4096k.hex b/vc/src/hello_pi/hello_fft/hex/shader_4096k.hex @@ -1,1523 +0,0 @@ -0x00000010, 0xe0021227, // mov rb_0x10, 0x10 -0x000001d0, 0xe0021967, // mov r5rep, 0x1D0 -0x15827d80, 0x100203e7, // mov rx_tw_shared, unif -0x15827d80, 0x100213e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10025020, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x10025060, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000002e8, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x153a7d80, 0x10020827, // mov r0, ra_vdw_32 -0x8c04ddf6, 0x10024061, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00100000, 0xe00208e7, // mov r3, PASS32_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000050, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000520, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x80904000, 0xe0020827, // mov r0, vdw_setup_0(1, 16, dma_h32(0,0)) -0x00000040, 0xe0020867, // mov r1, 0x40 -0x8c067c76, 0x10024061, // add ra_save_ptr, ra_save_ptr, r1; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00080000, 0xe00208e7, // mov r3, PASS64_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000002b8, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd00200a7, // shl ra_temp, r0, 5 -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000e0, 0xf0f809e7, // brr -, r:2f -0x00000010, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000c0, 0xf0f809e7, // brr -, r:2f -0x00000011, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000a0, 0xf0f809e7, // brr -, r:2f -0x00000012, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000080, 0xf0f809e7, // brr -, r:2f -0x00000013, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000060, 0xf0f809e7, // brr -, r:2f -0x00000014, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000040, 0xf0f809e7, // brr -, r:2f -0x00000015, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000020, 0xf0f809e7, // brr -, r:2f -0x00000016, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f809e7, // brr -, r:2f -0x00000017, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000008, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000009, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000a, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000b, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000c, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000d, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000e, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000f, 0xe80009e7, // mov -, srel(i+8) -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000ba8, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d2039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22092cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d3039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22093cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20527030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d4039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22094cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20527031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20567030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d5039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22095cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20567031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c71c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffd50, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c71c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffbe0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x01267c00, 0x100202e7, // fadd ra_64+0, ra_32_re, r0 -0x019c9e40, 0x10020327, // fadd ra_64+1, rb_32_im, r1 -0x02267c00, 0x10020367, // fsub ra_64+2, ra_32_re, r0 -0x029c9e40, 0x100203a7, // fsub ra_64+3, rb_32_im, r1 -0x8c167d76, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c71c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffa30, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c71c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffff8c0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x029c9e40, 0x100208e7, // fsub r3, rb_32_im, r1 -0x02267c00, 0x100208a7, // fsub r2, ra_32_re, r0 -0x019c9e40, 0x10020867, // fadd r1, rb_32_im, r1 -0x01267c00, 0x10020827, // fadd r0, ra_32_re, r0 -0x2066700e, 0x100049c9, // nop; fmul rb_32_im, r1, ra_tw_re+TW48 -0x209d900f, 0x100059c9, // nop; fmul ra_32_re, r1, rb_tw_im+TW48 -0x209d9007, 0x100049e1, // nop; fmul r1, r0, rb_tw_im+TW48 -0x216493c6, 0x10025320, // fadd rb_64+1, r1, rb_32_im; fmul r0, r0, ra_tw_re+TW48 -0x2225b19f, 0x100252c9, // fsub rb_64+0, r0, ra_32_re; fmul ra_32_re, r3, rb_tw_im+TW64 -0x206e701e, 0x100049c9, // nop; fmul rb_32_im, r3, ra_tw_re+TW64 -0x00000000, 0xf0f549e7, // bra -, ra_save_64 -0x209db017, 0x100049e3, // nop; fmul r3, r2, rb_tw_im+TW64 -0x216c97d6, 0x100253a2, // fadd rb_64+3, r3, rb_32_im; fmul r2, r2, ra_tw_re+TW64 -0x02267580, 0x10021367, // fsub rb_64+2, r2, ra_32_re -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff7e0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff790, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x01267c00, 0x100202e7, // fadd ra_64+0, ra_32_re, r0 -0x019c9e40, 0x10020327, // fadd ra_64+1, rb_32_im, r1 -0x02267c00, 0x10020367, // fsub ra_64+2, ra_32_re, r0 -0x029c9e40, 0x100203a7, // fsub ra_64+3, rb_32_im, r1 -0x8c167d76, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff700, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff6b0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x029c9e40, 0x100208e7, // fsub r3, rb_32_im, r1 -0x02267c00, 0x100208a7, // fsub r2, ra_32_re, r0 -0x019c9e40, 0x10020867, // fadd r1, rb_32_im, r1 -0x01267c00, 0x10020827, // fadd r0, ra_32_re, r0 -0x2066700e, 0x100049c9, // nop; fmul rb_32_im, r1, ra_tw_re+TW48 -0x209d900f, 0x100059c9, // nop; fmul ra_32_re, r1, rb_tw_im+TW48 -0x209d9007, 0x100049e1, // nop; fmul r1, r0, rb_tw_im+TW48 -0x216493c6, 0x10025320, // fadd rb_64+1, r1, rb_32_im; fmul r0, r0, ra_tw_re+TW48 -0x2225b19f, 0x100252c9, // fsub rb_64+0, r0, ra_32_re; fmul ra_32_re, r3, rb_tw_im+TW64 -0x206e701e, 0x100049c9, // nop; fmul rb_32_im, r3, ra_tw_re+TW64 -0x00000000, 0xf0f549e7, // bra -, ra_save_64 -0x209db017, 0x100049e3, // nop; fmul r3, r2, rb_tw_im+TW64 -0x216c97d6, 0x100253a2, // fadd rb_64+3, r3, rb_32_im; fmul r2, r2, ra_tw_re+TW64 -0x02267580, 0x10021367, // fsub rb_64+2, r2, ra_32_re -0x8c14cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff5d0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff580, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x952c2ff6, 0x100242c2, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95307ff6, 0x10024307, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x9538eff6, 0x1002438e, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_32, rx_save_slave_32 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_64, rx_save_slave_64 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x000016b8, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020667, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021667, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100206e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100216e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c61c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x55555555, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x33333333, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0f0f0f0f, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x00ff00ff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0000ffff, 0xe00208a7, // mov r2, mask -0x149e7080, 0x10020867, // and r1, r0, r2 -0x0e9c81c0, 0x10020827, // shr r0, r0, shift -0x149e7080, 0x10020827, // and r0, r0, r2 -0x119c83c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c71c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff2e8, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000016, 0xe0020867, // mov r1, STAGES -0x0e1e7c40, 0x100229e7, // shr.setf -, ra_points, r1 -0xfffff2b8, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020667, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021667, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100206e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100216e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe002469a, // mov ra_tw_re+TW48+1, 0; mov rb_tw_im+TW48+1, 0 -0x00000000, 0xe002471c, // mov ra_tw_re+TW64+1, 0; mov rb_tw_im+TW64+1, 0 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000007, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000006, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020767, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021767, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100207a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100217a7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c61c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff568, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x0000ffff, 0xe0020827, // mov r0, 0xFFFF -0x141e7c00, 0x100229e7, // and.setf -, ra_points, r0 -0xfffff538, 0xf01809e7, // brr.allnz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100601e7, // add.ifnz ra_points, ra_points, r0 -0x956dbdbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x207a7016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209de017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209de01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x217a709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x026e7c80, 0x10020827, // fsub r0, a, b -0x026e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x026e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01727380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002589b, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x026e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020727, // fadd a+1, r0, r1 -0x029dbec0, 0x10020827, // fsub r0, a, b -0x029db1c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029dbe40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019dc3c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002489b, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029dbe80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021727, // fadd a+1, r0, r1 -0x95659dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20767016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209dd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209dd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2176709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02667c80, 0x10020827, // fsub r0, a, b -0x02667180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02667c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x016a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025899, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02667c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100206a7, // fadd a+1, r0, r1 -0x029d9ec0, 0x10020827, // fsub r0, a, b -0x029d91c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d9e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019da3c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024899, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d9e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100216a7, // fadd a+1, r0, r1 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x00000016, 0xe0020867, // mov r1, STAGES -0x0e1e7c40, 0x100229e7, // shr.setf -, ra_points, r1 -0xfffff0a0, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159c0fc0, 0x100202e7, // mov ra_vpm_lo, rb_vpm -0x159c1fc0, 0x10020327, // mov ra_vpm_hi, rb_vpm_16 -0x80904000, 0xe00203a7, // mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) -0x80905000, 0xe00213a7, // mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) -0x00000016, 0xe00212e7, // mov rb_STAGES, STAGES -0x000000f0, 0xe0021327, // mov rb_0xF0, 0xF0 -0x00000040, 0xe0021367, // mov rb_0x40, 0x40 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000009, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000008, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff008, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x000003ff, 0xe0020827, // mov r0, 0x3FF -0x141e7c00, 0x100229e7, // and.setf -, ra_points, r0 -0xffffefd8, 0xf01809e7, // brr.allnz -, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100601e7, // add.ifnz ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cbdc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xffffed48, 0xf00809e7, // brr.allz -, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x0000000b, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x0000000a, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xffffead8, 0xf0f80227, // brr ra_link_1, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cbdc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xffffe848, 0xf00809e7, // brr.allz -, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xffffe918, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_4k.hex b/vc/src/hello_pi/hello_fft/hex/shader_4k.hex @@ -1,514 +0,0 @@ -0x00000020, 0xe0021767, // mov rb_0x20, 0x20 -0x00000040, 0xe00217a7, // mov rb_0x40, 0x40 -0x00000080, 0xe00217e7, // mov rb_0x80, 0x80 -0x00005555, 0xe0020727, // mov rx_0x5555, 0x5555 -0x00003333, 0xe0020767, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207a7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00207e7, // mov rx_0x00FF, 0x00FF -0x88104000, 0xe00206e7, // mov ra_vdw, vdw_setup_0(16, 16, dma_h32( 0,0)) -0x88104800, 0xe00216e7, // mov rb_vdw, vdw_setup_0(16, 16, dma_h32(16,0)) -0x15827d80, 0x10020227, // mov rx_tw_shared, unif -0x15827d80, 0x10021227, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x100246a0, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100256a0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100049e0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100009e7, // add out_3, r0, r2 -0x000000b0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x156e7d80, 0x10021c67, // mov vw_setup, arg_vdw -0xc00007c0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS16_STRIDE-16*4 -0x8c05edf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x156a7d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x000003e8, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f409e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x202a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ca039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208acb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x202a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x202e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cb039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208bcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x202e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20327030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cc039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ccb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20327031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20367030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cd039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208dcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20367031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f489e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c11c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x000000cc, 0xe20229e7, // mov.setf -, [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0] -0x959fa000, 0xd002c8a0, // mov r2, r0; mov.ifnz r0, r0 << 6 -0x959fa249, 0xd002c8e1, // mov r3, r1; mov.ifnz r1, r1 << 6 -0x00003300, 0xe20229e7, // mov.setf -, [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0] -0x809f6012, 0xd000c9e0, // nop; mov.ifnz r0, r2 >> 6 -0x809f601b, 0xd000c9e1, // nop; mov.ifnz r1, r3 >> 6 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x000000cc, 0xe20229e7, // mov.setf -, [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0] -0x959fa000, 0xd002c8a0, // mov r2, r0; mov.ifnz r0, r0 << 6 -0x959fa249, 0xd002c8e1, // mov r3, r1; mov.ifnz r1, r1 << 6 -0x00003300, 0xe20229e7, // mov.setf -, [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0] -0x809f6012, 0xd000c9e0, // nop; mov.ifnz r0, r2 >> 6 -0x809f601b, 0xd000c9e1, // nop; mov.ifnz r1, r3 >> 6 -0xfffffd40, 0xf0f809e7, // brr -, r:fft_16 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffcf8, 0xf0f809e7, // brr -, r:fft_16 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000928, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c227c00, 0x10020e27, // add t0s, ptr, r0 -0x0c227c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe002438e, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c11c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x000000cc, 0xe20229e7, // mov.setf -, [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0] -0x959fa000, 0xd002c8a0, // mov r2, r0; mov.ifnz r0, r0 << 6 -0x959fa249, 0xd002c8e1, // mov r3, r1; mov.ifnz r1, r1 << 6 -0x00003300, 0xe20229e7, // mov.setf -, [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0] -0x809f6012, 0xd000c9e0, // nop; mov.ifnz r0, r2 >> 6 -0x809f601b, 0xd000c9e1, // nop; mov.ifnz r1, r3 >> 6 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffbe0, 0xf0f80027, // brr ra_link_1, r:pass_1 -0x9569aff6, 0x1002469a, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x956dbff6, 0x100246db, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x0e1ccdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffffbb8, 0xf00809e7, // brr.allz -, r:pass_1 -0x9569aff6, 0x1002469a, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x956dbff6, 0x100246db, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c027, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c227c00, 0x10020e27, // add t0s, ptr, r0 -0x0c227c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c227c00, 0x10020e27, // add t0s, ptr, r0 -0x0c227c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020267, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021267, // mov rb_tw_im+dst, r4 -0x00000000, 0xe002438e, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb78, 0xf0f80027, // brr ra_link_1, r:pass_2 -0x9569aff6, 0x1002469a, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x956dbff6, 0x100246db, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0xfffffb58, 0xf0f80027, // brr ra_link_1, r:pass_2 -0x9569aff6, 0x1002469a, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x956dbff6, 0x100246db, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x0d01ddc0, 0x10020027, // sub ra_link_1, ra_link_1, rb_0x20 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20267016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209c9017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209c901f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2126709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02367c80, 0x10020827, // fsub r0, a, b -0x02367180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02367c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x013a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002588d, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02367c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100203a7, // fadd a+1, r0, r1 -0x029cdec0, 0x10020827, // fsub r0, a, b -0x029cd1c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029cde40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019ce3c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002488d, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029cde80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100213a7, // fadd a+1, r0, r1 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1ccdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff9c0, 0xf00809e7, // brr.allz -, r:pass_2 -0x9569aff6, 0x1002469a, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x956dbff6, 0x100246db, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c027, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9c8e00, 0x10020e27, // add t0s, ptr, r0 -0x0c9c8e40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c227c00, 0x10020e27, // add t0s, ptr, r0 -0x0c227c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020267, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021267, // mov rb_tw_im+dst, r4 -0x00000000, 0xe002438e, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff808, 0xf0f80027, // brr ra_link_1, r:pass_3 -0x9569aff6, 0x1002469a, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x956dbff6, 0x100246db, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20267016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209c9017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209c901f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2126709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02367c80, 0x10020827, // fsub r0, a, b -0x02367180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02367c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x013a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002588d, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02367c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100203a7, // fadd a+1, r0, r1 -0x029cdec0, 0x10020827, // fsub r0, a, b -0x029cd1c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029cde40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019ce3c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x1002488d, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029cde80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100213a7, // fadd a+1, r0, r1 -0x9534ddbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c362, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d363, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c322, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d323, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c2e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d2e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c2a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d2a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1ccdc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff678, 0xf00809e7, // brr.allz -, r:pass_3 -0x9569aff6, 0x1002469a, // mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm -0x956dbff6, 0x100246db, // mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c027, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff6a8, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_512.hex b/vc/src/hello_pi/hello_fft/hex/shader_512.hex @@ -1,494 +0,0 @@ -0x00000010, 0xe0021727, // mov rb_0x10, 0x10 -0x00000040, 0xe0021767, // mov rb_0x40, 0x40 -0x00000080, 0xe00217a7, // mov rb_0x80, 0x80 -0x000000f0, 0xe00217e7, // mov rb_0xF0, 0xF0 -0x00005555, 0xe0020727, // mov rx_0x5555, 0x5555 -0x00003333, 0xe0020767, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207a7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00207e7, // mov rx_0x00FF, 0x00FF -0x88104000, 0xe00206a7, // mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -0x88105000, 0xe0021027, // mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -0x90104000, 0xe00206e7, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x15827d80, 0x100202e7, // mov rx_tw_shared, unif -0x15827d80, 0x100212e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10024620, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x10024660, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000b0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15627d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x156a7d80, 0x10021c67, // mov vw_setup, arg_vdw -0xc00000c0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS16_STRIDE-16*4 -0x8c05ddf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15627d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15627d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x000000c8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15627d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x156e7d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc0000040, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05ddf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15627d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15627d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000510, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20467030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d1039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22091cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20467031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15fdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c41c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffda0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c41c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc80, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95602ff6, 0x10024602, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95647ff6, 0x10024647, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x956c1ff6, 0x100246c1, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffbf0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x00000000, 0xf0f489e7, // bra -, ra_save_16 -0x009e7000, 0x100009e7, // nop -0x95602ff6, 0x10024602, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95680ff6, 0x10024680, // mov ra_vdw_16, rb_vdw_16; mov rb_vdw_16, ra_vdw_16 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x000005e8, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14727180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14727180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9c41c0, 0xd0020827, // shr r0, r0, 13-STAGES -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffa80, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0xfffffa60, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb20, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c9dc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff990, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dedc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff9e8, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_512k.hex b/vc/src/hello_pi/hello_fft/hex/shader_512k.hex @@ -1,983 +0,0 @@ -0x00000013, 0xe0021227, // mov rb_STAGES, STAGES -0x00000010, 0xe00216e7, // mov rb_0x10, 0x10 -0x00000040, 0xe0021727, // mov rb_0x40, 0x40 -0x00000080, 0xe0021767, // mov rb_0x80, 0x80 -0x000000f0, 0xe00217a7, // mov rb_0xF0, 0xF0 -0x00000100, 0xe00217e7, // mov rb_0x100, 0x100 -0x55555555, 0xe0020767, // mov rx_0x55555555, 0x55555555 -0x33333333, 0xe00207a7, // mov rx_0x33333333, 0x33333333 -0x0f0f0f0f, 0xe00207e7, // mov rx_0x0F0F0F0F, 0x0F0F0F0F -0x00ff00ff, 0xe0021667, // mov rx_0x00FF00FF, 0x00FF00FF -0x0000ffff, 0xe00216a7, // mov rx_0x0000FFFF, 0x0000FFFF -0x80904000, 0xe00206e7, // mov ra_vdw_16, vdw_setup_0(1, 16, dma_h32( 0,0)) -0x80905000, 0xe0021027, // mov rb_vdw_16, vdw_setup_0(1, 16, dma_h32(32,0)) -0x80904000, 0xe0020727, // mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) -0x80905000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) -0x15827d80, 0x100202e7, // mov rx_tw_shared, unif -0x15827d80, 0x100212e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10024660, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100246a0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000001d0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x156e7d80, 0x10020827, // mov r0, arg_vdw -0x8c05cdf6, 0x10024061, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00040000, 0xe00208e7, // mov r3, PASS16_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x000002e8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x15727d80, 0x10020827, // mov r0, ra_vdw_32 -0x8c05cdf6, 0x10024061, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr -0x00000080, 0xe00208a7, // mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) -0x00020000, 0xe00208e7, // mov r3, PASS32_STRIDE -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x8c9e7080, 0x10024831, // add r0, r0, r2; mov vw_setup, r0 -0x8c9e72c9, 0x10024872, // add r1, r1, r3; mov vw_addr, r1 -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000050, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000640, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20467030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d1039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22091cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20467031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9db1c0, 0x10020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119db3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9ca1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffd78, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9db1c0, 0x10020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119db3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9ca1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc30, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffba0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x00000000, 0xf0f489e7, // bra -, ra_save_16 -0x009e7000, 0x100009e7, // nop -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c0ff6, 0x100246c0, // mov ra_vdw_16, rb_vdw_16; mov rb_vdw_16, ra_vdw_16 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb38, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffae8, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x000010a8, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149d91c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149d91c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9db1c0, 0x10020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119db3c0, 0x10020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0e9ca1c0, 0xd0020827, // shr r0, r0, 32-STAGES-3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff928, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff900, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffa10, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00003fff, 0xe0020827, // mov r0, 0x3FFF -0x141e7c00, 0x100229e7, // and.setf -, ra_points, r0 -0xfffff9e0, 0xf01809e7, // brr.allnz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100601e7, // add.ifnz ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff850, 0xf00809e7, // brr.allz -, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff648, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff628, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff608, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0xfffff5e8, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x954d3dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20367016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2136709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024e7c80, 0x10020827, // fsub r0, a, b -0x024e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01527380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020527, // fadd a+1, r0, r1 -0x029d3ec0, 0x10020827, // fsub r0, a, b -0x029d31c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d3e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d43c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d3e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021527, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff358, 0xf00809e7, // brr.allz -, r:pass_3 -0x00000060, 0xe0020827, // mov r0, 3*4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000006, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020367, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021367, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff0e8, 0xf0f80227, // brr ra_link_1, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x954d3dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20367016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cd017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cd01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2136709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x024e7c80, 0x10020827, // fsub r0, a, b -0x024e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x024e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01527380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x024e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020527, // fadd a+1, r0, r1 -0x029d3ec0, 0x10020827, // fsub r0, a, b -0x029d31c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d3e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d43c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024893, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d3e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021527, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xffffee58, 0xf00809e7, // brr.allz -, r:pass_4 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xffffef28, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_64k.hex b/vc/src/hello_pi/hello_fft/hex/shader_64k.hex @@ -1,940 +0,0 @@ -0x00000010, 0xe0021227, // mov rb_0x10, 0x10 -0x000001d0, 0xe0021967, // mov r5rep, 0x1D0 -0x00005555, 0xe00207a7, // mov rx_0x5555, 0x5555 -0x00003333, 0xe00217a7, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207e7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00217e7, // mov rx_0x00FF, 0x00FF -0x15827d80, 0x100203e7, // mov rx_tw_shared, unif -0x15827d80, 0x100213e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10025020, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x10025060, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000c8, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x153a7d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc0003fc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c04ddf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x15327d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x152e7d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000100, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000040, 0xe0020827, // mov r0, 0x40 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0xa0104000, 0xe0021c67, // mov vw_setup, vdw_setup_0(64, 16, dma_h32(0,0)) -0xc0001fc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(PASS64_STRIDE-16*4) -0x8c067c36, 0x10024072, // add ra_save_ptr, ra_save_ptr, step; mov vw_addr, ra_save_ptr -0x000002b8, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd00200a7, // shl ra_temp, r0, 5 -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000e0, 0xf0f809e7, // brr -, r:2f -0x00000010, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000c0, 0xf0f809e7, // brr -, r:2f -0x00000011, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x000000a0, 0xf0f809e7, // brr -, r:2f -0x00000012, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000080, 0xf0f809e7, // brr -, r:2f -0x00000013, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000060, 0xf0f809e7, // brr -, r:2f -0x00000014, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000040, 0xf0f809e7, // brr -, r:2f -0x00000015, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000020, 0xf0f809e7, // brr -, r:2f -0x00000016, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f809e7, // brr -, r:2f -0x00000017, 0xe80009e7, // mov -, sacq(i) -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c0fc0, 0x10021c67, // mov vw_setup, rb_vpm -0x012cbdc0, 0x10020c27, // fadd vpm, ra_64+0, rb_64+0 -0x0130cdc0, 0x10020c27, // fadd vpm, ra_64+1, rb_64+1 -0x159c1fc0, 0x10021c67, // mov vw_setup, rb_vpm_16 -0x0134ddc0, 0x10020c27, // fadd vpm, ra_64+2, rb_64+2 -0x0138edc0, 0x10020c27, // fadd vpm, ra_64+3, rb_64+3 -0x159c2fc0, 0x10021c67, // mov vw_setup, rb_vpm_32 -0x022cbdc0, 0x10020c27, // fsub vpm, ra_64+0, rb_64+0 -0x0230cdc0, 0x10020c27, // fsub vpm, ra_64+1, rb_64+1 -0x159c7fc0, 0x10021c67, // mov vw_setup, rb_vpm_48 -0x0234ddc0, 0x10020c27, // fsub vpm, ra_64+2, rb_64+2 -0x0238edc0, 0x10020c27, // fsub vpm, ra_64+3, rb_64+3 -0x00000000, 0xf0fc49e7, // brr -, ra_temp -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000008, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000009, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000a, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000b, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000c, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000d, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000e, 0xe80009e7, // mov -, srel(i+8) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x159c0fc0, 0x10020c67, // mov vr_setup, rb_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x0000000f, 0xe80009e7, // mov -, srel(i+8) -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000858, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d2039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22092cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x204e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d3039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22093cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x204e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20527030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d4039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22094cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20527031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20567030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d5039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22095cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20567031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c31c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffda0, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c31c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc80, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x01267c00, 0x100202e7, // fadd ra_64+0, ra_32_re, r0 -0x019c9e40, 0x10020327, // fadd ra_64+1, rb_32_im, r1 -0x02267c00, 0x10020367, // fsub ra_64+2, ra_32_re, r0 -0x029c9e40, 0x100203a7, // fsub ra_64+3, rb_32_im, r1 -0x8c167d76, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c31c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffb20, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c31c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffa00, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x029c9e40, 0x100208e7, // fsub r3, rb_32_im, r1 -0x02267c00, 0x100208a7, // fsub r2, ra_32_re, r0 -0x019c9e40, 0x10020867, // fadd r1, rb_32_im, r1 -0x01267c00, 0x10020827, // fadd r0, ra_32_re, r0 -0x2066700e, 0x100049c9, // nop; fmul rb_32_im, r1, ra_tw_re+TW48 -0x209d900f, 0x100059c9, // nop; fmul ra_32_re, r1, rb_tw_im+TW48 -0x209d9007, 0x100049e1, // nop; fmul r1, r0, rb_tw_im+TW48 -0x216493c6, 0x10025320, // fadd rb_64+1, r1, rb_32_im; fmul r0, r0, ra_tw_re+TW48 -0x2225a19f, 0x100252c9, // fsub rb_64+0, r0, ra_32_re; fmul ra_32_re, r3, rb_tw_im+TW64 -0x206a701e, 0x100049c9, // nop; fmul rb_32_im, r3, ra_tw_re+TW64 -0x00000000, 0xf0f549e7, // bra -, ra_save_64 -0x209da017, 0x100049e3, // nop; fmul r3, r2, rb_tw_im+TW64 -0x216897d6, 0x100253a2, // fadd rb_64+3, r3, rb_32_im; fmul r2, r2, ra_tw_re+TW64 -0x02267580, 0x10021367, // fsub rb_64+2, r2, ra_32_re -0x8c14cdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff920, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff8d0, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x205e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d700f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x205e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22097c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f489e7, // bra -, ra_save_32 -0x952c2ff6, 0x100242c2, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95307ff6, 0x10024307, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x9538eff6, 0x1002438e, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_32, rx_save_slave_32 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_64, rx_save_slave_64 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000df0, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020667, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021667, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100206a7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100216a7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c61c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149de1c0, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x149de1c0, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149df1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149df1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x119c31c0, 0xd0020827, // shl r0, r0, STAGES-13 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff688, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000010, 0xe0020867, // mov r1, STAGES -0x0e1e7c40, 0x100229e7, // shr.setf -, ra_points, r1 -0xfffff658, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x00000200, 0xe0020827, // mov r0, 0x200 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159c0fc0, 0x100202e7, // mov ra_vpm_lo, rb_vpm -0x159c1fc0, 0x10020327, // mov ra_vpm_hi, rb_vpm_16 -0x90104000, 0xe00203a7, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe00213a7, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x00000060, 0xe00212e7, // mov rb_3x4x8, 3*4*8 -0x000000f0, 0xe0021327, // mov rb_0xF0, 0xF0 -0x00000040, 0xe0021367, // mov rb_0x40, 0x40 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000005, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000004, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff900, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0xfffff8e0, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0xfffff8c0, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0xfffff8a0, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff610, 0xf00809e7, // brr.allz -, r:pass_2 -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x0d20bdc0, 0x10020227, // sub ra_link_1, ra_link_1, rb_3x4x8 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020567, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021567, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cfe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cfe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100205e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100215e7, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000007, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020427, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021427, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000006, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c3e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c3e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024596, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024618, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c148df6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff3a0, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x955d7dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20467016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d1017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d101f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2146709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x025e7c80, 0x10020827, // fsub r0, a, b -0x025e7180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x025e7c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x01627380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x025e7c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10020627, // fadd a+1, r0, r1 -0x029d7ec0, 0x10020827, // fsub r0, a, b -0x029d71c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d7e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d83c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024897, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d7e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x10021627, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20427016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209d0017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209d001f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2142709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02567c80, 0x10020827, // fsub r0, a, b -0x02567180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02567c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x015a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02567c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100205a7, // fadd a+1, r0, r1 -0x029d5ec0, 0x10020827, // fsub r0, a, b -0x029d51c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d5e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d63c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024895, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d5e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100215a7, // fadd a+1, r0, r1 -0x95555dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c562, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d563, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c522, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d523, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c4e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d4e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c4a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d4a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1c8dc0, 0x100229e7, // shr.setf -, ra_points, rb_STAGES -0xfffff110, 0xf00809e7, // brr.allz -, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x00000100, 0xe0020827, // mov r0, 0x100 -0x0c1e7c00, 0x100201e7, // add ra_points, ra_points, r0 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff1e0, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_8k.hex b/vc/src/hello_pi/hello_fft/hex/shader_8k.hex @@ -1,603 +0,0 @@ -0x00000010, 0xe00216e7, // mov rb_0x10, 0x10 -0x00000040, 0xe0021727, // mov rb_0x40, 0x40 -0x00000080, 0xe0021767, // mov rb_0x80, 0x80 -0x000000f0, 0xe00217a7, // mov rb_0xF0, 0xF0 -0x00000100, 0xe00217e7, // mov rb_0x100, 0x100 -0x00005555, 0xe0020767, // mov rx_0x5555, 0x5555 -0x00003333, 0xe00207a7, // mov rx_0x3333, 0x3333 -0x00000f0f, 0xe00207e7, // mov rx_0x0F0F, 0x0F0F -0x000000ff, 0xe00216a7, // mov rx_0x00FF, 0x00FF -0x88104000, 0xe00206e7, // mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -0x88105000, 0xe0021027, // mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -0x90104000, 0xe0020727, // mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -0x90105000, 0xe0021067, // mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) -0x15827d80, 0x100202e7, // mov rx_tw_shared, unif -0x15827d80, 0x100212e7, // mov rx_tw_unique, unif -0x15827d80, 0x10021167, // mov rb_inst, unif -0x00101200, 0xe0020827, // mov r0, vpm_setup(1, 1, v32( 0,0)) -0x00000010, 0xe0020867, // mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) -0x00000002, 0xe00208a7, // mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) -0x409c5017, 0x100049e2, // nop; mul24 r2, r2, in_inst -0xcc9e7081, 0x10024660, // add out_0, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100246a0, // add out_1, r0, r2; v8adds r0, r0, r1 -0xcc9e7081, 0x100250a0, // add out_2, r0, r2; v8adds r0, r0, r1 -0x0c9e7080, 0x100211e7, // add out_3, r0, r2 -0x000000b0, 0xf0f80127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x156e7d80, 0x10021c67, // mov vw_setup, arg_vdw -0xc0000fc0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS16_STRIDE-16*4 -0x8c05cdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000038, 0xf0f81127, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, arg -0x159e7000, 0x10020c27, // mov vpm, r0 -0x159e7240, 0x10020c27, // mov vpm, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, arg_vpm -0x15c27d80, 0x100009e7, // mov -, vpm -0x000000c8, 0xf0f802a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x15727d80, 0x10021c67, // mov vw_setup, ra_vdw_32 -0xc00007c0, 0xe0021c67, // mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 -0x8c05cdf6, 0x10024072, // add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -0x00000050, 0xf0f812a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10021c67, // mov vw_setup, ra_vpm_lo -0x01267c00, 0x10020c27, // fadd vpm, ra_32_re, r0 -0x019c9e40, 0x10020c27, // fadd vpm, rb_32_im, r1 -0x156a7d80, 0x10021c67, // mov vw_setup, ra_vpm_hi -0x02267c00, 0x10020c27, // fsub vpm, ra_32_re, r0 -0x029c9e40, 0x10020c27, // fsub vpm, rb_32_im, r1 -0x00000000, 0xf0f4c9e7, // bra -, ra_sync -0x009e7000, 0x100009e7, // nop -0x15667d80, 0x10020c67, // mov vr_setup, ra_vpm_lo -0x15c27d80, 0x100009e7, // mov -, vpm -0x00000080, 0xf0f801a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x00000019, 0xe80009e7, // mov -, sacq(i+9) -0x00000001, 0xe80009e7, // mov -, srel(i+1) -0x0000001a, 0xe80009e7, // mov -, sacq(i+9) -0x00000002, 0xe80009e7, // mov -, srel(i+1) -0x0000001b, 0xe80009e7, // mov -, sacq(i+9) -0x00000003, 0xe80009e7, // mov -, srel(i+1) -0x0000001c, 0xe80009e7, // mov -, sacq(i+9) -0x00000004, 0xe80009e7, // mov -, srel(i+1) -0x0000001d, 0xe80009e7, // mov -, sacq(i+9) -0x00000005, 0xe80009e7, // mov -, srel(i+1) -0x0000001e, 0xe80009e7, // mov -, sacq(i+9) -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000006, 0xe80009e7, // mov -, srel(i+1) -0x0000001f, 0xe80009e7, // mov -, sacq(i+9) -0x00000007, 0xe80009e7, // mov -, srel(i+1) -0x00000500, 0xf0f811a7, // brr rx_ptr, label -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x00000009, 0xe80009e7, // mov -, srel(i+9) -0x00000011, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000a, 0xe80009e7, // mov -, srel(i+9) -0x00000012, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000b, 0xe80009e7, // mov -, srel(i+9) -0x00000013, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000c, 0xe80009e7, // mov -, srel(i+9) -0x00000014, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000d, 0xe80009e7, // mov -, srel(i+9) -0x00000015, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000e, 0xe80009e7, // mov -, srel(i+9) -0x00000016, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x00000000, 0xf0f509e7, // bra -, ra_link_1 -0x0000000f, 0xe80009e7, // mov -, srel(i+9) -0x00000017, 0xe80009e7, // mov -, sacq(i+1) -0x009e7000, 0x100009e7, // nop -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203a7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209ce039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208ecb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203a7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819ff2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f1400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829ff609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f1449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x203e7030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209cf039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x2208fcb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x203e7031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fe2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f2400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fe609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f2449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20427030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d0039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22090cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20427031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819fc2c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f4400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x829fc609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f4449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (1<<i) -0x20467030, 0x1000d9c2, // nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 -0x209d1039, 0x1000c9e2, // nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 -0x22091cb8, 0x1006c823, // fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 -0x20467031, 0x1000c9e1, // nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 -0x819f82c0, 0xd0064862, // fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) -0x819f8400, 0xd0044823, // fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -0x00000000, 0xf0f409e7, // bra -, ra_link_0 -0x829f8609, 0xd0064822, // fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) -0x819f8449, 0xd0044863, // fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) -0x029e7640, 0x10060867, // fsub.ifnz r1, r3, r1 -0x8c15edf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffda8, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x959e7009, 0x10024249, // mov ra_32_re, r0; mov rb_32_im, r1 -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0xfffffc90, 0xf0f80027, // brr ra_link_0, call -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x204e7006, 0x100059c2, // nop; fmul ra_temp, r0, ra_tw_re+TW32 -0x209d300f, 0x100049e2, // nop; fmul r2, r1, rb_tw_im+TW32 -0x204e700e, 0x100049e3, // nop; fmul r3, r1, ra_tw_re+TW32 -0x22093c87, 0x10024821, // fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 -0x019e72c0, 0x10020867, // fadd r1, r1, r3 -0x00000000, 0xf0f549e7, // bra -, ra_save_32 -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x95687ff6, 0x10024687, // mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi -0x95701ff6, 0x10024701, // mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffc00, 0xf0f80027, // brr ra_link_0, call -0x009e7000, 0xa00009e7, // nop; ldtmu0 -0x159e7900, 0xa0020827, // mov r0, r4; ldtmu0 -0x159e7900, 0x10020867, // mov r1, r4 -0x00000000, 0xf0f489e7, // bra -, ra_save_16 -0x009e7000, 0x100009e7, // nop -0x95642ff6, 0x10024642, // mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo -0x956c0ff6, 0x100246c0, // mov ra_vdw_16, rb_vdw_16; mov rb_vdw_16, ra_vdw_16 -0x159c5fc0, 0x10022827, // mov.setf r0, rb_inst -0x0d9c11c0, 0xd0020827, // sub r0, r0, 1 -0x119c51c0, 0xd0020827, // shl r0, r0, 5 -0x0c9c6e00, 0x100601a7, // add.ifnz ra_sync, rx_sync_slave, r0 -0x159c4fc0, 0x10060127, // mov.ifnz ra_save_16, rx_save_slave_16 -0x159cafc0, 0x100602a7, // mov.ifnz ra_save_32, rx_save_slave_32 -0x15827d80, 0x100220e7, // mov.setf ra_addr_x, unif -0x15827d80, 0x100210e7, // mov rb_addr_y, unif -0x00000958, 0xf00809e7, // brr.allz -, r:end -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100204e7, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x100214e7, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c51c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15bdf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x14767180, 0x10020867, // and r1, r0, mask -0x0e9c11c0, 0xd0020827, // shr r0, r0, shift -0x14767180, 0x10020827, // and r0, r0, mask -0x119c13c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147a7180, 0x10020867, // and r1, r0, mask -0x0e9c21c0, 0xd0020827, // shr r0, r0, shift -0x147a7180, 0x10020827, // and r0, r0, mask -0x119c23c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x147e7180, 0x10020867, // and r1, r0, mask -0x0e9c41c0, 0xd0020827, // shr r0, r0, shift -0x147e7180, 0x10020827, // and r0, r0, mask -0x119c43c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x149da1c0, 0x10020867, // and r1, r0, mask -0x0e9c81c0, 0xd0020827, // shr r0, r0, shift -0x149da1c0, 0x10020827, // and r0, r0, mask -0x119c83c0, 0xd0020867, // shl r1, r1, shift -0x159e7040, 0x10020827, // or r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x94981dc0, 0xd00269e2, // and.setf -, elem_num, 1; mov r2, r0 -0x959f1489, 0xd004c820, // mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 -0x959ff252, 0xd0068861, // mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffa98, 0xf0f80227, // brr ra_link_1, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x0e1cddc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffffa70, 0xf00809e7, // brr.allz -, r:pass_1 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dfdc0, 0x100201e7, // add ra_points, ra_points, rb_0x100 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000001, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000002, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffffb20, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0xfffffb00, 0xf0f80227, // brr ra_link_1, r:pass_2 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cddc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff970, 0xf00809e7, // brr.allz -, r:pass_2 -0x00000020, 0xe0020827, // mov r0, 4*8 -0x0d227c00, 0x10020227, // sub ra_link_1, ra_link_1, r0 -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0x950c3dbf, 0x100250c3, // mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000000, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c9cbe00, 0x10020e27, // add t0s, ptr, r0 -0x0c9cbe40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020467, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021467, // mov rb_tw_im+dst, r4 -0x11983dc0, 0xd0020827, // shl r0, elem_num, 3 -0x00000003, 0xe0020867, // mov r1, src -0x119c73c0, 0xd0020867, // shl r1, r1, 7 -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c2e7c00, 0x10020e27, // add t0s, ptr, r0 -0x0c2e7c40, 0x10020e27, // add t0s, ptr, r1 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020327, // mov ra_tw_re+dst, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10021327, // mov rb_tw_im+dst, r4 -0x00000000, 0xe0024492, // mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -0x00000000, 0xe0024514, // mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x159c5fc0, 0x10020827, // mov r0, rb_inst -0x119c41c0, 0xd0020827, // shl r0, r0, m -0x0c9a7180, 0x10020167, // add ra_load_idx, r0, elem_num -0x00000000, 0xe00201e7, // mov ra_points, 0 -0x159c3fc0, 0x10020067, // mov ra_save_ptr, rb_addr_y -0x8c15ddf6, 0x10024160, // add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx -0x119c31c0, 0xd0020827, // shl r0, r0, 3 -0x0c9c41c0, 0xd0020867, // add r1, r0, 4 -0x0c0e7c00, 0x10020e27, // add t0s, ra_addr_x, r0 -0x0c0e7c40, 0x10020e27, // add t0s, ra_addr_x, r1 -0xfffff7b0, 0xf0f80227, // brr ra_link_1, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+base; mov r3, rb_tw_im+base -0x20327016, 0x100049e0, // nop; fmul r0, r2, ra_tw_re+step -0x209cc017, 0x100049e1, // nop; fmul r1, r2, rb_tw_im+step -0x209cc01f, 0x100049e2, // nop; fmul r2, r3, rb_tw_im+step -0x2132709e, 0x100248a3, // fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step -0x029e7640, 0x100208e7, // fsub r3, r3, r1 -0x02467c80, 0x10020827, // fsub r0, a, b -0x02467180, 0x10020867, // fsub r1, r0, a -0x019e7280, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x02467c40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x014a7380, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10025891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x02467c80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100204a7, // fadd a+1, r0, r1 -0x029d1ec0, 0x10020827, // fsub r0, a, b -0x029d11c0, 0x10020867, // fsub r1, r0, a -0x019e72c0, 0x100208a7, // fadd r2, r1, b -0x029e7040, 0x10020867, // fsub r1, r0, r1 -0x029d1e40, 0x10020867, // fsub r1, a, r1 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x019d23c0, 0x10020867, // fadd r1, r1, a+1 -0x019e7040, 0x100208a7, // fadd r2, r0, r1 -0x829e7412, 0x10024891, // fsub r2, r2, r0; mov a, r2 -0x029e7280, 0x10020867, // fsub r1, r1, r2 -0x029d1e80, 0x100208a7, // fsub r2, a, r2 -0x029e7080, 0x10020827, // fsub r0, r0, r2 -0x019e7040, 0x100214a7, // fadd a+1, r0, r1 -0x95451dbf, 0x100248a3, // mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -0x14988dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f8492, 0xd002c462, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f86db, 0xd002d463, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14984dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f4492, 0xd002c422, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f46db, 0xd002d423, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14982dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f2492, 0xd002c3e2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f26db, 0xd002d3e3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x14981dc0, 0xd00229e7, // and.setf -, elem_num, (8>>i) -0x959f1492, 0xd002c3a2, // mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) -0x959f16db, 0xd002d3a3, // mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -0x0e1cddc0, 0xd00229e7, // shr.setf -, ra_points, STAGES -0xfffff620, 0xf00809e7, // brr.allz -, r:pass_3 -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c1dddc0, 0x100201e7, // add ra_points, ra_points, rb_0x80 -0x00000000, 0xf0f4c227, // bra ra_link_1, ra_sync -0x009e7000, 0x100009e7, // nop -0x009e7000, 0xa00009e7, // ldtmu0 -0x009e7000, 0xa00009e7, // ldtmu0 -0xfffff678, 0xf0f809e7, // brr -, r:loop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x159c3fc0, 0x100209a7, // mov interrupt, flag -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/hex/shader_trans.hex b/vc/src/hello_pi/hello_fft/hex/shader_trans.hex @@ -1,126 +0,0 @@ -0x15827d80, 0x10020e27, // mov t0s, unif -0x009e7000, 0xa00009e7, // ldtmu0 -0x0c9cc9c0, 0xd0020e27, // add t0s, r4, 3*4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x0c827980, 0x100200a7, // add ra_src_base, r4, unif -0x15827d80, 0x10020e27, // mov t0s, unif -0x009e7000, 0xa00009e7, // ldtmu0 -0x0c9cc9c0, 0xd0020e27, // add t0s, r4, 3*4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x0c827980, 0x100200e7, // add ra_dst_base, r4, unif -0x15827d80, 0x100214a7, // mov rb_Y_STRIDE_SRC, unif -0x15827d80, 0x100214e7, // mov rb_Y_STRIDE_DST, unif -0x15827d80, 0x10021527, // mov rb_NX, unif -0x15827d80, 0x10021567, // mov rb_NY, unif -0x00000008, 0xe0021467, // mov rb_X_STRIDE, 2*4 -0x00000010, 0xe0021427, // mov rb_0x10, 0x10 -0xc0000000, 0xe0020827, // mov r0, vdw_setup_1(0) -0x0c9d31c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_DST -0x00000040, 0xe0020867, // mov r1, 16*4 -0x0d9e7040, 0x100201a7, // sub ra_vdw_stride, r0, r1 -0x40991037, 0x100049e0, // nop; mul24 r0, elem_num, rb_X_STRIDE -0x159e7000, 0x10021027, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd0021227, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x159e7000, 0x10021067, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd0021267, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x159e7000, 0x100210a7, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd00212a7, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x159e7000, 0x100210e7, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd00212e7, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x159e7000, 0x10021127, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd0021327, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x159e7000, 0x10021167, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd0021367, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x159e7000, 0x100211a7, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd00213a7, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x159e7000, 0x100211e7, // mov rb_offsets_re+i, r0 -0x0c9c41c0, 0xd00213e7, // add rb_offsets_im+i, r0, 4 -0x0c9d21c0, 0x10020827, // add r0, r0, rb_Y_STRIDE_SRC -0x00000000, 0xe0020067, // mov ra_y, 0 -0x00000000, 0xe0020027, // mov ra_x, 0 -0x40052037, 0x100049e1, // nop; mul24 r1, ra_y, rb_Y_STRIDE_SRC -0x40011037, 0x100049e0, // nop; mul24 r0, ra_x, rb_X_STRIDE -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c0a7c00, 0x10020127, // add ra_src_cell, ra_src_base, r0 -0x40013037, 0x100049e1, // nop; mul24 r1, ra_x, rb_Y_STRIDE_DST -0x40051037, 0x100049e0, // nop; mul24 r0, ra_y, rb_X_STRIDE -0x0c9e7040, 0x10020827, // add r0, r0, r1 -0x0c0e7c00, 0x10020167, // add ra_dst_cell, ra_dst_base, r0 -0x00001200, 0xe0021c67, // mov vw_setup, vpm_setup(16, 1, v32(0,0)) -0x0c100dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re -0x0c108dc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im -0x0c101dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re+1+i -0x0c109dc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im+1+i -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x0c102dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re+1+i -0x0c10adc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im+1+i -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x0c103dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re+1+i -0x0c10bdc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im+1+i -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x0c104dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re+1+i -0x0c10cdc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im+1+i -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x0c105dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re+1+i -0x0c10ddc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im+1+i -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x0c106dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re+1+i -0x0c10edc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im+1+i -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x0c107dc0, 0x10020e27, // add t0s, ra_src_cell, rb_offsets_re+1+i -0x0c10fdc0, 0x10020f27, // add t1s, ra_src_cell, rb_offsets_im+1+i -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xa00009e7, // ldtmu0 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x009e7000, 0xb00009e7, // ldtmu1 -0x159e7900, 0x10020c27, // mov vpm, r4 -0x88104000, 0xe0021c67, // mov vw_setup, vdw_setup_0(16, 16, dma_h32(0,0)) -0x151a7d80, 0x10021c67, // mov vw_setup, ra_vdw_stride -0x15167d80, 0x10021ca7, // mov vw_addr, ra_dst_cell -0x159f2fc0, 0x100009e7, // mov -, vw_wait -0x0c010dc0, 0x10020027, // add ra_x, ra_x, rb_0x10 -0x009e7000, 0x100009e7, // nop -0x0d014dc0, 0x100229e7, // sub.setf -, ra_x, rb_NX -0xfffffde0, 0xf01809e7, // brr.allnz -, r:inner -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x0c048dc0, 0xd0020067, // add ra_y, ra_y, 8 -0x009e7000, 0x100009e7, // nop -0x0d055dc0, 0x100229e7, // sub.setf -, ra_y, rb_NY -0xfffffda0, 0xf01809e7, // brr.allnz -, r:outer -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop -0x00000001, 0xe00209a7, // mov interrupt, 1 -0x009e7000, 0x300009e7, // nop; nop; thrend -0x009e7000, 0x100009e7, // nop -0x009e7000, 0x100009e7, // nop diff --git a/vc/src/hello_pi/hello_fft/mailbox.c b/vc/src/hello_pi/hello_fft/mailbox.c @@ -1,258 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <fcntl.h> -#include <unistd.h> -#include <assert.h> -#include <stdint.h> -#include <sys/mman.h> -#include <sys/ioctl.h> - -#include "mailbox.h" - -#define PAGE_SIZE (4*1024) - -void *mapmem(unsigned base, unsigned size) -{ - int mem_fd; - unsigned offset = base % PAGE_SIZE; - base = base - offset; - /* open /dev/mem */ - if ((mem_fd = open("/dev/mem", O_RDWR|O_SYNC) ) < 0) { - printf("can't open /dev/mem\nThis program should be run as root. Try prefixing command with: sudo\n"); - exit (-1); - } - void *mem = mmap( - 0, - size, - PROT_READ|PROT_WRITE, - MAP_SHARED/*|MAP_FIXED*/, - mem_fd, - base); -#ifdef DEBUG - printf("base=0x%x, mem=%p\n", base, mem); -#endif - if (mem == MAP_FAILED) { - printf("mmap error %d\n", (int)mem); - exit (-1); - } - close(mem_fd); - return (char *)mem + offset; -} - -void unmapmem(void *addr, unsigned size) -{ - int s = munmap(addr, size); - if (s != 0) { - printf("munmap error %d\n", s); - exit (-1); - } -} - -/* - * use ioctl to send mbox property message - */ - -static int mbox_property(int file_desc, void *buf) -{ - int ret_val = ioctl(file_desc, IOCTL_MBOX_PROPERTY, buf); - - if (ret_val < 0) { - printf("ioctl_set_msg failed:%d\n", ret_val); - } - -#ifdef DEBUG - unsigned *p = buf; int i; unsigned size = *(unsigned *)buf; - for (i=0; i<size/4; i++) - printf("%04x: 0x%08x\n", i*sizeof *p, p[i]); -#endif - return ret_val; -} - -unsigned mem_alloc(int file_desc, unsigned size, unsigned align, unsigned flags) -{ - int i=0; - unsigned p[32]; - p[i++] = 0; // size - p[i++] = 0x00000000; // process request - - p[i++] = 0x3000c; // (the tag id) - p[i++] = 12; // (size of the buffer) - p[i++] = 12; // (size of the data) - p[i++] = size; // (num bytes? or pages?) - p[i++] = align; // (alignment) - p[i++] = flags; // (MEM_FLAG_L1_NONALLOCATING) - - p[i++] = 0x00000000; // end tag - p[0] = i*sizeof *p; // actual size - - mbox_property(file_desc, p); - return p[5]; -} - -unsigned mem_free(int file_desc, unsigned handle) -{ - int i=0; - unsigned p[32]; - p[i++] = 0; // size - p[i++] = 0x00000000; // process request - - p[i++] = 0x3000f; // (the tag id) - p[i++] = 4; // (size of the buffer) - p[i++] = 4; // (size of the data) - p[i++] = handle; - - p[i++] = 0x00000000; // end tag - p[0] = i*sizeof *p; // actual size - - mbox_property(file_desc, p); - return p[5]; -} - -unsigned mem_lock(int file_desc, unsigned handle) -{ - int i=0; - unsigned p[32]; - p[i++] = 0; // size - p[i++] = 0x00000000; // process request - - p[i++] = 0x3000d; // (the tag id) - p[i++] = 4; // (size of the buffer) - p[i++] = 4; // (size of the data) - p[i++] = handle; - - p[i++] = 0x00000000; // end tag - p[0] = i*sizeof *p; // actual size - - mbox_property(file_desc, p); - return p[5]; -} - -unsigned mem_unlock(int file_desc, unsigned handle) -{ - int i=0; - unsigned p[32]; - p[i++] = 0; // size - p[i++] = 0x00000000; // process request - - p[i++] = 0x3000e; // (the tag id) - p[i++] = 4; // (size of the buffer) - p[i++] = 4; // (size of the data) - p[i++] = handle; - - p[i++] = 0x00000000; // end tag - p[0] = i*sizeof *p; // actual size - - mbox_property(file_desc, p); - return p[5]; -} - -unsigned execute_code(int file_desc, unsigned code, unsigned r0, unsigned r1, unsigned r2, unsigned r3, unsigned r4, unsigned r5) -{ - int i=0; - unsigned p[32]; - p[i++] = 0; // size - p[i++] = 0x00000000; // process request - - p[i++] = 0x30010; // (the tag id) - p[i++] = 28; // (size of the buffer) - p[i++] = 28; // (size of the data) - p[i++] = code; - p[i++] = r0; - p[i++] = r1; - p[i++] = r2; - p[i++] = r3; - p[i++] = r4; - p[i++] = r5; - - p[i++] = 0x00000000; // end tag - p[0] = i*sizeof *p; // actual size - - mbox_property(file_desc, p); - return p[5]; -} - -unsigned qpu_enable(int file_desc, unsigned enable) -{ - int i=0; - unsigned p[32]; - - p[i++] = 0; // size - p[i++] = 0x00000000; // process request - - p[i++] = 0x30012; // (the tag id) - p[i++] = 4; // (size of the buffer) - p[i++] = 4; // (size of the data) - p[i++] = enable; - - p[i++] = 0x00000000; // end tag - p[0] = i*sizeof *p; // actual size - - mbox_property(file_desc, p); - return p[5]; -} - -unsigned execute_qpu(int file_desc, unsigned num_qpus, unsigned control, unsigned noflush, unsigned timeout) { - int i=0; - unsigned p[32]; - - p[i++] = 0; // size - p[i++] = 0x00000000; // process request - p[i++] = 0x30011; // (the tag id) - p[i++] = 16; // (size of the buffer) - p[i++] = 16; // (size of the data) - p[i++] = num_qpus; - p[i++] = control; - p[i++] = noflush; - p[i++] = timeout; // ms - - p[i++] = 0x00000000; // end tag - p[0] = i*sizeof *p; // actual size - - mbox_property(file_desc, p); - return p[5]; -} - -int mbox_open() { - int file_desc; - - // open a char device file used for communicating with kernel mbox driver - file_desc = open(DEVICE_FILE_NAME, 0); - if (file_desc < 0) { - printf("Can't open device file: %s\n", DEVICE_FILE_NAME); - printf("Try creating a device file with: sudo mknod %s c %d 0\n", DEVICE_FILE_NAME, MAJOR_NUM); - exit(-1); - } - return file_desc; -} - -void mbox_close(int file_desc) { - close(file_desc); -} diff --git a/vc/src/hello_pi/hello_fft/mailbox.h b/vc/src/hello_pi/hello_fft/mailbox.h @@ -1,47 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <linux/ioctl.h> - -#define MAJOR_NUM 100 -#define IOCTL_MBOX_PROPERTY _IOWR(MAJOR_NUM, 0, char *) -#define DEVICE_FILE_NAME "/dev/vcio" - -int mbox_open(); -void mbox_close(int file_desc); - -unsigned get_version(int file_desc); -unsigned mem_alloc(int file_desc, unsigned size, unsigned align, unsigned flags); -unsigned mem_free(int file_desc, unsigned handle); -unsigned mem_lock(int file_desc, unsigned handle); -unsigned mem_unlock(int file_desc, unsigned handle); -void *mapmem(unsigned base, unsigned size); -void unmapmem(void *addr, unsigned size); - -unsigned execute_code(int file_desc, unsigned code, unsigned r0, unsigned r1, unsigned r2, unsigned r3, unsigned r4, unsigned r5); -unsigned execute_qpu(int file_desc, unsigned num_qpus, unsigned control, unsigned noflush, unsigned timeout); -unsigned qpu_enable(int file_desc, unsigned enable); diff --git a/vc/src/hello_pi/hello_fft/makefile b/vc/src/hello_pi/hello_fft/makefile @@ -1,36 +0,0 @@ -S = hex/shader_256.hex \ - hex/shader_512.hex \ - hex/shader_1k.hex \ - hex/shader_2k.hex \ - hex/shader_4k.hex \ - hex/shader_8k.hex \ - hex/shader_16k.hex \ - hex/shader_32k.hex \ - hex/shader_64k.hex \ - hex/shader_128k.hex \ - hex/shader_256k.hex \ - hex/shader_512k.hex \ - hex/shader_1024k.hex \ - hex/shader_2048k.hex \ - hex/shader_4096k.hex - -C = mailbox.c gpu_fft.c gpu_fft_base.c gpu_fft_twiddles.c gpu_fft_shaders.c - -C1D = $(C) hello_fft.c -C2D = $(C) hello_fft_2d.c gpu_fft_trans.c - -H1D = gpu_fft.h mailbox.h -H2D = gpu_fft.h mailbox.h gpu_fft_trans.h hello_fft_2d_bitmap.h - -F = -lrt -lm -ldl - -all: hello_fft.bin hello_fft_2d.bin - -hello_fft.bin: $(S) $(C1D) $(H1D) - gcc -o hello_fft.bin $(F) $(C1D) - -hello_fft_2d.bin: $(S) hex/shader_trans.hex $(C2D) $(H2D) - gcc -o hello_fft_2d.bin $(F) $(C2D) - -clean: - rm -f *.bin diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft.qinc b/vc/src/hello_pi/hello_fft/qasm/gpu_fft.qinc @@ -1,509 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -############################################################################## -# Bit-rotated write - -.set PASS16_STRIDE, ((1<<STAGES)/16*8) -.set PASS32_STRIDE, ((1<<STAGES)/32*8) -.set PASS64_STRIDE, ((1<<STAGES)/64*8) - -############################################################################## -# Load twiddle factors - -.macro load_tw, ptr, dst, src - shl r0, elem_num, 3 - mov r1, src - shl r1, r1, 7 - add r0, r0, r1 - add r1, r0, 4 - add t0s, ptr, r0 - add t0s, ptr, r1 - ldtmu0 - mov ra_tw_re+dst, r4 - ldtmu0 - mov rb_tw_im+dst, r4 -.endm - -############################################################################## -# VPM pointers - -.macro inst_vpm, in_inst, out_0, out_1, out_2, out_3 - mov r0, vpm_setup(1, 1, v32( 0,0)) - mov r1, vpm_setup(1, 1, v32(16,0)) - vpm_setup(1, 1, v32(0,0)) - mov r2, vpm_setup(1, 1, v32( 0,2)) - vpm_setup(1, 1, v32(0,0)) - - nop; mul24 r2, r2, in_inst - - add out_0, r0, r2; v8adds r0, r0, r1 - add out_1, r0, r2; v8adds r0, r0, r1 - add out_2, r0, r2; v8adds r0, r0, r1 - add out_3, r0, r2 -.endm - -############################################################################## - -.macro proc, rx_ptr, label - brr rx_ptr, label - nop - nop - nop -.endm - -############################################################################## - -.macro write_vpm_16, arg - mov vw_setup, arg - mov vpm, r0 - mov vpm, r1 -.endm - -.macro write_vpm_32 - mov vw_setup, ra_vpm_lo - fadd vpm, ra_32_re, r0 - fadd vpm, rb_32_im, r1 - mov vw_setup, ra_vpm_hi - fsub vpm, ra_32_re, r0 - fsub vpm, rb_32_im, r1 -.endm - -.macro write_vpm_64 - mov vw_setup, rb_vpm - fadd vpm, ra_64+0, rb_64+0 - fadd vpm, ra_64+1, rb_64+1 - mov vw_setup, rb_vpm_16 - fadd vpm, ra_64+2, rb_64+2 - fadd vpm, ra_64+3, rb_64+3 - mov vw_setup, rb_vpm_32 - fsub vpm, ra_64+0, rb_64+0 - fsub vpm, ra_64+1, rb_64+1 - mov vw_setup, rb_vpm_48 - fsub vpm, ra_64+2, rb_64+2 - fsub vpm, ra_64+3, rb_64+3 -.endm - -############################################################################## - -.macro body_ra_save_16, arg_vpm, arg_vdw - write_vpm_16 arg_vpm - - mov -, vw_wait - - .rep i, 7 - mov -, sacq(i+9) # Master waits for slave - mov -, srel(i+1) # Master releases slave - .endr - - bra -, ra_link_1 - - mov vw_setup, arg_vdw - mov vw_setup, vdw_setup_1(0) + PASS16_STRIDE-16*4 - add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -.endm - -############################################################################## - -.macro body_rx_save_slave_16, arg_vpm - write_vpm_16 arg_vpm - - bra -, ra_sync - - nop - mov vr_setup, arg_vpm - mov -, vpm -.endm - -############################################################################## - -.macro body_ra_save_32 - write_vpm_32 - - mov -, vw_wait - - .rep i, 7 - mov -, sacq(i+9) # Master waits for slave - mov -, srel(i+1) # Master releases slave - .endr - - bra -, ra_link_1 - - mov vw_setup, ra_vdw_32 - mov vw_setup, vdw_setup_1(0) + PASS32_STRIDE-16*4 - add ra_save_ptr, ra_save_ptr, rb_0x40; mov vw_addr, ra_save_ptr -.endm - -############################################################################## - -.macro body_rx_save_slave_32 - write_vpm_32 - - bra -, ra_sync - - nop - mov vr_setup, ra_vpm_lo - mov -, vpm -.endm - -############################################################################## - -.macro body_ra_save_64, step - mov -, vw_wait - - .rep i, 7 - mov -, srel(i+1) # Master releases slaves - .endr - - write_vpm_64 - - .rep i, 7 - mov -, sacq(i+9) # Master waits for slaves - .endr - - bra -, ra_link_1 - - mov vw_setup, vdw_setup_0(64, 16, dma_h32(0,0)) - mov vw_setup, vdw_setup_1(PASS64_STRIDE-16*4) - add ra_save_ptr, ra_save_ptr, step; mov vw_addr, ra_save_ptr -.endm - -############################################################################## - -.macro body_rx_save_slave_64 - mov r0, rb_inst - shl ra_temp, r0, 5 - nop - brr -, ra_temp - nop - nop - nop - - .rep i, 8 - brr -, r:2f - mov -, sacq(i) # Slave waits for master - nop - nop - .endr -:2 - write_vpm_64 - - brr -, ra_temp - nop - nop - nop - - .rep i, 8 - bra -, ra_link_1 - mov vr_setup, rb_vpm - mov -, vpm - mov -, srel(i+8) # Slave releases master - .endr -.endm - -############################################################################## - -.macro body_ra_sync - mov -, vw_wait - - .rep i, 7 - mov -, sacq(i+9) # Master waits for slave - .if i==5 - bra -, ra_link_1 - .endif - mov -, srel(i+1) # Master releases slave - .endr -.endm - -############################################################################## - -.macro body_rx_sync_slave - .rep i, 7 - bra -, ra_link_1 - mov -, srel(i+9) # Slave releases master - mov -, sacq(i+1) # Slave waits for master - nop - .endr -.endm - -############################################################################## - -.macro fft_twiddles_32 - nop; fmul ra_temp, r0, ra_tw_re+TW32 # rr - nop; fmul r2, r1, rb_tw_im+TW32 # ii - nop; fmul r3, r1, ra_tw_re+TW32 # ir - fsub r0, ra_temp, r2; fmul r1, r0, rb_tw_im+TW32 # ri - fadd r1, r1, r3 -.endm - -############################################################################## -# FFT-16 codelet - -.macro body_fft_16 -.rep i, 4 - and.setf -, elem_num, (1<<i) - nop; fmul.ifnz ra_temp, ra_tw_re+TW16+i, r0 - nop; fmul.ifnz r2, rb_tw_im+TW16+i, r1 - fsub.ifnz r0, ra_temp, r2; fmul.ifnz r3, rb_tw_im+TW16+i, r0 - nop; fmul.ifnz r1, ra_tw_re+TW16+i, r1 - fadd.ifnz r1, r1, r3; mov r2, r0 << (1<<i) - fadd.ifz r0, r2, r0; mov r3, r0 >> (1<<i) -.if i==3 - bra -, ra_link_0 -.endif - fsub.ifnz r0, r3, r0; mov r2, r1 << (1<<i) - fadd.ifz r1, r2, r1; mov r3, r1 >> (1<<i) - fsub.ifnz r1, r3, r1 -.endr -.endm - -############################################################################## - -.macro bit_rev, shift, mask - and r1, r0, mask - shr r0, r0, shift - and r0, r0, mask - shl r1, r1, shift - or r0, r0, r1 -.endm - -############################################################################## - -.macro swizzle -.endm - -.macro interleave - and.setf -, elem_num, 1; mov r2, r0 - mov.ifz r0, r2; mov.ifnz r0, r1 >> 1 - mov.ifnz r1, r1; mov.ifz r1, r2 << 1 -.endm - -############################################################################## - -.macro read_rev, stride - add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx - - bit_rev 1, rx_0x5555 # 16 SIMD - bit_rev 2, rx_0x3333 - bit_rev 4, rx_0x0F0F - bit_rev 8, rx_0x00FF # reversal creates left shift by 16-STAGES -.if STAGES>13 - shl r0, r0, STAGES-13 -.endif -.if STAGES<13 - shr r0, r0, 13-STAGES -.endif # r0 = re = {idx[0:STAGES-1], 1'b0, 2'b0} - add r1, r0, 4 # r1 = im = {idx[0:STAGES-1], 1'b1, 2'b0} - - interleave - swizzle - - add t0s, ra_addr_x, r0 - add t0s, ra_addr_x, r1 -.endm - -.macro load_rev, stride, call - read_rev stride - nop; ldtmu0 - mov r0, r4; ldtmu0 - mov r1, r4 - brr ra_link_0, call - interleave -.endm - -############################################################################## - -.macro read_lin, stride - add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx - - shl r0, r0, 3 - add r1, r0, 4 - - add t0s, ra_addr_x, r0 - add t0s, ra_addr_x, r1 -.endm - -.macro load_lin, stride, call - read_lin stride - brr ra_link_0, call - nop; ldtmu0 - mov r0, r4; ldtmu0 - mov r1, r4 -.endm - -############################################################################## -# Unpack twiddles - -.macro unpack_twiddles - mov r2, ra_tw_re+TW16+3; mov r3, rb_tw_im+TW16+3 -.rep i, 4 - and.setf -, elem_num, (8>>i) - mov ra_tw_re+TW16+3-i, r2; mov.ifnz r2, r2 >> (8>>i) - mov rb_tw_im+TW16+3-i, r3; mov.ifnz r3, r3 >> (8>>i) -.endr -.endm - -############################################################################## -# float-float enhanced-precision subtract (corrects rounding errors) - -.macro df64_sub32, a, b # df64_sub32(float2 &a, float b) - fsub r0, a, b # float2 s = twoSub(a.x, b); - fsub r1, r0, a - fadd r2, r1, b - fsub r1, r0, r1 - fsub r1, a, r1 - fsub r1, r1, r2 - - fadd r1, r1, a+1 # s.y += a.y; - - fadd r2, r0, r1 # a = twoSum(s.x, s,y); - fsub r2, r2, r0; mov a, r2 - fsub r1, r1, r2 - fsub r2, a, r2 - fsub r0, r0, r2 - fadd a+1, r0, r1 -.endm - -############################################################################## -# Rotate twiddles using enhanced-precision trig recurrence - -.macro rotate, base, step - mov r2, ra_tw_re+base; mov r3, rb_tw_im+base - nop; fmul r0, r2, ra_tw_re+step # a.cos - nop; fmul r1, r2, rb_tw_im+step # b.cos - nop; fmul r2, r3, rb_tw_im+step # b.sin - fadd r2, r0, r2; fmul r3, r3, ra_tw_re+step # a.sin - fsub r3, r3, r1 - df64_sub32 ra_tw_re+base, r2 - df64_sub32 rb_tw_im+base, r3 -.endm - -.macro next_twiddles_32 - rotate TW32, TW32_STEP -.endm - -.macro next_twiddles_16 - rotate TW16+3, TW16_STEP - unpack_twiddles -.endm - -############################################################################## -# Alternate input/output buffers between stages - -.macro swap_buffers - mov rb_addr_y, ra_addr_x; mov ra_addr_x, rb_addr_y -.endm - -############################################################################## -# Reset counters and twiddles - -.macro init_stage, m - mov ra_tw_re+TW16+4, 0; mov rb_tw_im+TW16+4, 0 -.ifset TW32 - mov ra_tw_re+TW32+1, 0; mov rb_tw_im+TW32+1, 0 -.endif - unpack_twiddles - mov r0, rb_inst - shl r0, r0, m - add ra_load_idx, r0, elem_num - mov ra_points, 0 - mov ra_save_ptr, rb_addr_y -.endm - -############################################################################## - -.set LOAD_STRAIGHT, 0 -.set LOAD_REVERSED, 1 - -.macro loader_16, stride, mode - .if mode==LOAD_REVERSED - load_rev stride, r:fft_16 - .else - load_lin stride, r:fft_16 - .endif -.endm - -.macro body_pass_16, mode - loader_16 rb_0x80, mode - bra -, ra_save_16 - nop - mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo - mov ra_vdw_16, rb_vdw_16; mov rb_vdw_16, ra_vdw_16 -.endm - -.macro body_pass_32, mode - loader_16 rb_0xF0, mode - mov ra_32_re, r0; mov rb_32_im, r1 - loader_16 rb_0x10, mode - fft_twiddles_32 - bra -, ra_save_32 - mov ra_vpm_lo, rb_vpm_lo; mov rb_vpm_lo, ra_vpm_lo - mov ra_vpm_hi, rb_vpm_hi; mov rb_vpm_hi, ra_vpm_hi - mov ra_vdw_32, rb_vdw_32; mov rb_vdw_32, ra_vdw_32 -.endm - -.macro body_pass_64, mode, step - loader_16 rb_0x10, mode - mov ra_32_re, r0; mov rb_32_im, r1 - loader_16 rb_0x10, mode - fft_twiddles_32 - - fadd ra_64+0, ra_32_re, r0 - fadd ra_64+1, rb_32_im, r1 - fsub ra_64+2, ra_32_re, r0 - fsub ra_64+3, rb_32_im, r1 - - loader_16 step, mode - mov ra_32_re, r0; mov rb_32_im, r1 - loader_16 rb_0x10, mode - fft_twiddles_32 - - fsub r3, rb_32_im, r1 - fsub r2, ra_32_re, r0 - fadd r1, rb_32_im, r1 - fadd r0, ra_32_re, r0 - - nop; fmul rb_32_im, r1, ra_tw_re+TW48 # ir - nop; fmul ra_32_re, r1, rb_tw_im+TW48 # ii - nop; fmul r1, r0, rb_tw_im+TW48 # ri - fadd rb_64+1, r1, rb_32_im; fmul r0, r0, ra_tw_re+TW48 # rr - fsub rb_64+0, r0, ra_32_re; fmul ra_32_re, r3, rb_tw_im+TW64 # ii - nop; fmul rb_32_im, r3, ra_tw_re+TW64 # ir - bra -, ra_save_64 - nop; fmul r3, r2, rb_tw_im+TW64 # ri - fadd rb_64+3, r3, rb_32_im; fmul r2, r2, ra_tw_re+TW64 # rr - fsub rb_64+2, r2, ra_32_re -.endm - -############################################################################## - -.macro exit, flag - mov interrupt, flag - nop; nop; thrend - nop - nop -.endm - -############################################################################## diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_1024k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_1024k.qasm @@ -1,319 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 20 - -.include "gpu_fft_ex.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_BASE, 0 # rx_tw_shared -.set TW16_BASE, 1 -.set TW32_P2_STEP, 2 -.set TW16_P2_STEP, 3 -.set TW32_P3_STEP, 4 -.set TW16_P3_STEP, 5 -.set TW32_P4_STEP, 6 -.set TW16_P4_STEP, 7 - -.set TW32_P4_BASE, 0 # rx_tw_unique -.set TW16_P4_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -# rx_0x00FF00FF rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -# spare ra4 -# spare rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -.set rb_STAGES, rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_32, ra10 -.set rx_save_slave_32, rb10 - -.set rx_tw_shared, ra11 -.set rx_tw_unique, rb11 - -.set ra_tw_re, ra12 # 9 -.set rb_tw_im, rb12 # 9 - -.set ra_vpm_lo, ra26 -.set ra_vpm_hi, ra27 -.set ra_vdw_32, ra28 - -.set rx_0x55555555, ra29 -.set rx_0x33333333, ra30 -.set rx_0x0F0F0F0F, ra31 -.set rx_0x00FF00FF, rb0 -.set rx_0x0000FFFF, rb26 - -.set rb_0x10, rb27 -.set rb_0x40, rb28 -.set rb_0x80, rb29 -.set rb_0xF0, rb30 -.set rb_0x100, rb31 - -############################################################################## -# Constants - -mov rb_STAGES, STAGES - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 -mov rb_0x100, 0x100 - -mov rx_0x55555555, 0x55555555 -mov rx_0x33333333, 0x33333333 -mov rx_0x0F0F0F0F, 0x0F0F0F0F -mov rx_0x00FF00FF, 0x00FF00FF -mov rx_0x0000FFFF, 0x0000FFFF - -mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 -:pass_3 -:pass_4 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x100 - - mov r0, 0x7FFF - and.setf -, ra_points, r0 - - brr.allnz -, r:pass_2 - nop - nop - add.ifnz ra_points, ra_points, rb_0x100 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P3_STEP - init_stage 5 - read_lin rb_0x10 - - .rep i, 4 - brr ra_link_1, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x100 - .endr - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_3 - mov r0, 3*4*8 - sub ra_link_1, ra_link_1, r0 - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 4 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P4_BASE - load_tw rx_tw_unique, TW32+0, TW32_P4_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P4_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P4_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x100 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_128k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_128k.qasm @@ -1,319 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 17 - -.include "gpu_fft_ex.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_BASE, 0 # rx_tw_shared -.set TW16_BASE, 1 -.set TW16_P2_STEP, 2 -.set TW16_P3_STEP, 3 -.set TW16_P4_STEP, 4 - -.set TW16_P4_BASE, 0 # rx_tw_unique - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vdw_16, rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -.set rb_STAGES, rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_32, ra10 -.set rx_save_slave_32, rb10 - -.set rx_tw_shared, ra11 -.set rx_tw_unique, rb11 - -.set ra_tw_re, ra12 # 9 -.set rb_tw_im, rb12 # 9 - -.set ra_vpm_lo, ra25 -.set ra_vpm_hi, ra26 -.set ra_vdw_16, ra27 -.set ra_vdw_32, ra28 - -.set rx_0x55555555, ra29 -.set rx_0x33333333, ra30 -.set rx_0x0F0F0F0F, ra31 -.set rx_0x00FF00FF, rb24 -.set rx_0x0000FFFF, rb25 - -.set rb_0x10, rb26 -.set rb_0x40, rb27 -.set rb_0x80, rb28 -.set rb_0xF0, rb29 -.set rb_0x100, rb30 -.set rb_0xFFF, rb31 - -############################################################################## -# Constants - -mov rb_STAGES, STAGES - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 -mov rb_0x100, 0x100 -mov rb_0xFFF, 0xFFF - -mov rx_0x55555555, 0x55555555 -mov rx_0x33333333, 0x33333333 -mov rx_0x0F0F0F0F, 0x0F0F0F0F -mov rx_0x00FF00FF, 0x00FF00FF -mov rx_0x0000FFFF, 0x0000FFFF - -mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm_lo, ra_vdw_16 -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm_lo -:1 - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 -:pass_3 -:pass_4 - body_pass_16 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - and.setf -, ra_points, rb_0xFFF - - brr.allnz -, r:pass_2 - nop - nop - add.ifnz ra_points, ra_points, rb_0x80 - - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - init_stage 4 - read_lin rb_0x80 - - .rep i, 2 - brr ra_link_1, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x80 - .endr - - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_3 - mov r0, 4*8 - sub ra_link_1, ra_link_1, r0 - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 4 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P4_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P4_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x80 - - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_16k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_16k.qasm @@ -1,282 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 14 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_BASE, 0 # rx_tw_shared -.set TW16_BASE, 1 -.set TW32_P2_STEP, 2 -.set TW16_P2_STEP, 3 -.set TW16_P3_STEP, 4 - -.set TW16_P3_BASE, 0 # rx_tw_unique - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vdw_16, rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -# rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_32, ra10 -.set rx_save_slave_32, rb10 - -.set rx_tw_shared, ra11 -.set rx_tw_unique, rb11 - -.set ra_tw_re, ra12 # 9 -.set rb_tw_im, rb12 # 9 - -.set ra_vpm_lo, ra25 -.set ra_vpm_hi, ra26 -.set ra_vdw_16, ra27 -.set ra_vdw_32, ra28 - -.set rx_0x5555, ra29 -.set rx_0x3333, ra30 -.set rx_0x0F0F, ra31 - -.set rx_0x00FF, rb26 -.set rb_0x10, rb27 -.set rb_0x40, rb28 -.set rb_0x80, rb29 -.set rb_0xF0, rb30 -.set rb_0x100, rb31 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 -mov rb_0x100, 0x100 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm_lo, ra_vdw_16 -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm_lo -:1 - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 - body_pass_32 LOAD_STRAIGHT - -:pass_3 - body_pass_16 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - init_stage 5 - read_lin rb_0x10 - - .rep i, 2 - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x100 - .endr - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_2 - mov r0, 4*8 - sub ra_link_1, ra_link_1, r0 - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P3_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x80 - - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_1k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_1k.qasm @@ -1,231 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 10 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_P1_BASE, 0 # rx_tw_shared -.set TW16_P1_BASE, 1 -.set TW32_P2_STEP, 2 -.set TW16_P2_STEP, 3 - -.set TW32_P2_BASE, 0 # rx_tw_unique -.set TW16_P2_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -# rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_32, ra4 -.set rx_save_slave_32, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -# rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 - -.set rx_tw_shared, ra10 -.set rx_tw_unique, rb10 - -.set ra_tw_re, ra11 # 9 -.set rb_tw_im, rb11 # 9 - -.set ra_vpm_lo, ra27 -.set ra_vpm_hi, ra28 -.set ra_vdw_32, ra29 - -.set rb_0x10, rb27 -.set rb_0x40, rb28 -.set rb_0xF0, rb29 - -.set rx_0x5555, ra30 -.set rx_0x3333, rb30 -.set rx_0x0F0F, ra31 -.set rx_0x00FF, rb31 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0xF0, 0xF0 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_P1_BASE - load_tw rx_tw_shared, TW32+0, TW32_P1_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_1 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P2_BASE - load_tw rx_tw_unique, TW32+0, TW32_P2_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_2 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_2 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_2048k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_2048k.qasm @@ -1,336 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 21 - -.include "gpu_fft_2048k.qinc" - -############################################################################## -# Twiddles: src - -.set TW64_BASE0, 0 # rx_tw_shared -.set TW64_BASE1, 1 -.set TW32_BASE, 2 -.set TW16_BASE, 3 -.set TW32_P2_STEP, 4 -.set TW16_P2_STEP, 5 -.set TW32_P3_STEP, 6 -.set TW16_P3_STEP, 7 -.set TW32_P4_STEP, 8 -.set TW16_P4_STEP, 9 - -.set TW32_P4_BASE, 0 # rx_tw_unique -.set TW16_P4_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 -.set TW48, 9 # 1 -.set TW64, 10 # 1 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vpm, rb0 -.set ra_save_ptr, ra1 -.set rb_vpm_16, rb1 -.set ra_temp, ra2 -.set rb_vpm_32, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_32, ra4 -.set rx_save_slave_32, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_48, rb7 -.set ra_link_1, ra8 -.set rb_0x10, rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_64, ra10 -.set rx_save_slave_64, rb10 - -.set ra_64, ra11 # 4 -.set rb_64, rb11 # 4 - -.set rx_tw_shared, ra15 -.set rx_tw_unique, rb15 - -.set ra_tw_re, ra16 # 11 -.set rb_tw_im, rb16 # 11 - -############################################################################## -# Dual-use registers - -.set rb_STAGES, rb_64+0 -.set rb_0xF0, rb_64+1 -.set rb_0x40, rb_64+2 - -.set ra_vpm_lo, ra_64+0 -.set ra_vpm_hi, ra_64+1 -.set rb_vpm_lo, rb_vpm_32 -.set rb_vpm_hi, rb_vpm_48 -.set ra_vdw_32, ra_64+3 -.set rb_vdw_32, rb_64+3 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov r5rep, 0x1D0 - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, rb_vpm, rb_vpm_16, rb_vpm_32, rb_vpm_48 - -############################################################################## -# Master/slave procedures - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_save_64, r:1f -body_ra_save_64 -:1 - -proc rx_save_slave_64, r:1f -body_rx_save_slave_64 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_64 LOAD_REVERSED, r5 - -:pass_2 -:pass_3 -:pass_4 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_32, rx_save_slave_32 - mov.ifnz ra_save_64, rx_save_slave_64 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW48, TW64_BASE0 - load_tw rx_tw_shared, TW64, TW64_BASE1 - init_stage 6 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - mov r1, STAGES - shr.setf -, ra_points, r1 - - brr.allz -, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Dual-use registers - - mov ra_vpm_lo, rb_vpm - mov ra_vpm_hi, rb_vpm_16 - - mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) - mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) - - mov rb_STAGES, STAGES - mov rb_0xF0, 0xF0 - mov rb_0x40, 0x40 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_2 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - mov r0, 0x7FFF - and.setf -, ra_points, r0 - - brr.allnz -, r:pass_2 - nop - mov r0, 0x100 - add.ifnz ra_points, ra_points, r0 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_2 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P3_STEP - init_stage 5 - read_lin rb_0x10 - - .rep i, 4 - brr ra_link_1, r:pass_3 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - .endr - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - mov r0, 0x100 - brr.allz -, r:pass_3 - add ra_points, ra_points, r0 - mov r0, (4-1)*4*8 - sub ra_link_1, ra_link_1, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 4 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P4_BASE - load_tw rx_tw_unique, TW32+0, TW32_P4_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P4_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P4_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_4 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_4 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_2048k.qinc b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_2048k.qinc @@ -1,91 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -############################################################################## -# Macro baseline - -.include "gpu_fft_ex.qinc" - -############################################################################## -# Redefining some macros - -.macro body_ra_save_64 - mov -, vw_wait - - .rep i, 7 - mov -, srel(i+1) # Master releases slaves - .endr - - write_vpm_64 - - .rep i, 7 - mov -, sacq(i+9) # Master waits for slaves - .endr - - mov r0, vdw_setup_0(1, 16, dma_h32(0,0)) - mov r1, 0x40 - add ra_save_ptr, ra_save_ptr, r1; mov r1, ra_save_ptr - mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) - mov r3, PASS64_STRIDE - - .rep i, 64 - add r0, r0, r2; mov vw_setup, r0 - add r1, r1, r3; mov vw_addr, r1 - .endr - - bra -, ra_link_1 - nop - nop - nop -.endm - -.macro bit_rev, shift, mask - mov r2, mask - and r1, r0, r2 - shr r0, r0, shift - and r0, r0, r2 - shl r1, r1, shift - or r0, r0, r1 -.endm - -.macro read_rev, stride - add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx - - bit_rev 1, 0x55555555 # 16 SIMD - bit_rev 2, 0x33333333 - bit_rev 4, 0x0F0F0F0F - bit_rev 8, 0x00FF00FF - bit_rev rb_0x10, 0x0000FFFF - - shr r0, r0, 32-STAGES-3 # r0 = re = {idx[0:STAGES-1], 1'b0, 2'b0} - add r1, r0, 4 # r1 = im = {idx[0:STAGES-1], 1'b1, 2'b0} - - interleave - - add t0s, ra_addr_x, r0 - add t0s, ra_addr_x, r1 -.endm diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_256.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_256.qasm @@ -1,233 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 8 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW16_P1_BASE, 0 # rx_tw_shared -.set TW16_P2_STEP, 1 - -.set TW16_P2_BASE, 0 # rx_tw_unique - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW16, 1 # 5 - -############################################################################## -# Registers - -.set ra_link_1, ra0 -# rb0 -.set ra_save_ptr, ra1 -# rb1 -.set ra_temp, ra2 -# rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -# rb7 - -.set rx_tw_shared, ra8 -.set rx_tw_unique, rb8 - -.set ra_tw_re, ra9 # 6 -.set rb_tw_im, rb9 # 6 - -.set ra_vpm, ra27 -.set rb_vpm, rb27 -.set ra_vdw, ra28 -.set rb_vdw, rb28 - -.set rx_0x5555, ra29 -.set rx_0x3333, ra30 -.set rx_0x0F0F, ra31 - -.set rb_0x40, rb30 -.set rb_0x80, rb31 - -############################################################################## -# Register alias - -.set ra_link_0, ra_save_16 - -############################################################################## -# Constants - -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F - -mov ra_vdw, vdw_setup_0(16, 16, dma_h32( 0,0)) -mov rb_vdw, vdw_setup_0(16, 16, dma_h32(16,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm, rb_vpm, -, - - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm, ra_vdw -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Redefining this macro - -.macro read_rev, stride - add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx - - bit_rev 1, rx_0x5555 # 16 SIMD - bit_rev 2, rx_0x3333 - bit_rev 4, rx_0x0F0F - - shl r0, r0, 3 # {idx[0:7], 1'b0, 2'b0} - add r1, r0, 4 # {idx[0:7], 1'b1, 2'b0} - - add t0s, ra_addr_x, r0 - add t0s, ra_addr_x, r1 -.endm - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 -:pass_2 - brr -, r:fft_16 - nop; ldtmu0 - mov r0, r4; ldtmu0 - mov r1, r4 - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_P1_BASE - init_stage 4 - read_rev rb_0x80 - read_rev rb_0x80 - -.rep i, 2 - brr ra_link_1, r:pass_1 - nop - mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm - mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -.endr - - bra ra_link_1, ra_sync - nop - nop - nop - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P2_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - init_stage 4 - read_lin rb_0x80 - read_lin rb_0x80 - - brr ra_link_1, r:pass_2 - nop - mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm - mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw - - next_twiddles_16 - - brr ra_link_1, r:pass_2 - nop - mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm - mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw - - bra ra_link_1, ra_sync - nop - nop - nop - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_256k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_256k.qasm @@ -1,326 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 18 - -.include "gpu_fft_ex.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_BASE, 0 # rx_tw_shared -.set TW16_BASE, 1 -.set TW16_P2_STEP, 2 -.set TW16_P3_STEP, 3 -.set TW32_P4_STEP, 4 -.set TW16_P4_STEP, 5 - -.set TW32_P4_BASE, 0 # rx_tw_unique -.set TW16_P4_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vdw_16, rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -.set rb_STAGES, rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_32, ra10 -.set rx_save_slave_32, rb10 - -.set rx_tw_shared, ra11 -.set rx_tw_unique, rb11 - -.set ra_tw_re, ra12 # 9 -.set rb_tw_im, rb12 # 9 - -.set ra_vpm_lo, ra25 -.set ra_vpm_hi, ra26 -.set ra_vdw_16, ra27 -.set ra_vdw_32, ra28 - -.set rx_0x55555555, ra29 -.set rx_0x33333333, ra30 -.set rx_0x0F0F0F0F, ra31 -.set rx_0x00FF00FF, rb24 -.set rx_0x0000FFFF, rb25 - -.set rb_0x10, rb26 -.set rb_0x40, rb27 -.set rb_0x80, rb28 -.set rb_0xF0, rb29 -.set rb_0x100, rb30 -.set rb_0x1FFF, rb31 - -############################################################################## -# Constants - -mov rb_STAGES, STAGES - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 -mov rb_0x100, 0x100 -mov rb_0x1FFF, 0x1FFF - -mov rx_0x55555555, 0x55555555 -mov rx_0x33333333, 0x33333333 -mov rx_0x0F0F0F0F, 0x0F0F0F0F -mov rx_0x00FF00FF, 0x00FF00FF -mov rx_0x0000FFFF, 0x0000FFFF - -mov ra_vdw_16, vdw_setup_0( 1, 16, dma_h32( 0,0)) -mov rb_vdw_16, vdw_setup_0( 1, 16, dma_h32(32,0)) -mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm_lo, ra_vdw_16 -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm_lo -:1 - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 -:pass_3 - body_pass_16 LOAD_STRAIGHT - -:pass_4 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - and.setf -, ra_points, rb_0x1FFF - - brr.allnz -, r:pass_2 - nop - nop - add.ifnz ra_points, ra_points, rb_0x80 - - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - init_stage 4 - read_lin rb_0x80 - - .rep i, 4 - brr ra_link_1, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x80 - .endr - - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_3 - mov r0, 3*4*8 - sub ra_link_1, ra_link_1, r0 - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 4 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P4_BASE - load_tw rx_tw_unique, TW32+0, TW32_P4_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P4_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P4_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x100 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_2k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_2k.qasm @@ -1,265 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 11 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW64_P1_BASE0, 0 # rx_tw_shared -.set TW64_P1_BASE1, 1 -.set TW32_P1_BASE, 2 -.set TW16_P1_BASE, 3 -.set TW32_P2_STEP, 4 -.set TW16_P2_STEP, 5 - -.set TW32_P2_BASE, 0 # rx_tw_unique -.set TW16_P2_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 -.set TW48, 9 # 1 -.set TW64, 10 # 1 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vpm, rb0 -.set ra_save_ptr, ra1 -.set rb_vpm_16, rb1 -.set ra_temp, ra2 -.set rb_vpm_32, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_32, ra4 -.set rx_save_slave_32, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_48, rb7 -.set ra_link_1, ra8 -# rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_64, ra10 -.set rx_save_slave_64, rb10 - -.set ra_64, ra11 # 4 -.set rb_64, rb11 # 4 - -.set rx_tw_shared, ra15 -.set rx_tw_unique, rb15 - -.set ra_tw_re, ra16 # 11 -.set rb_tw_im, rb16 # 11 - -.set rx_0x5555, ra28 -.set rx_0x3333, ra29 -.set rx_0x0F0F, ra30 -.set rx_0x00FF, ra31 - -.set rb_0x10, rb28 -.set rb_0x40, rb29 -.set rb_0xF0, rb30 -.set rb_0x1D0, rb31 - -############################################################################## -# Dual-use registers - -.set ra_vpm_lo, ra_64+0 -.set ra_vpm_hi, ra_64+1 -.set rb_vpm_lo, rb_vpm_32 -.set rb_vpm_hi, rb_vpm_48 -.set ra_vdw_32, ra_64+2 -.set rb_vdw_32, rb_64+2 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0xF0, 0xF0 -mov rb_0x1D0, 0x1D0 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, rb_vpm, rb_vpm_16, rb_vpm_32, rb_vpm_48 - -############################################################################## -# Master/slave procedures - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_save_64, r:1f -body_ra_save_64 rb_0x40 -:1 - -proc rx_save_slave_64, r:1f -body_rx_save_slave_64 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_64 LOAD_REVERSED, rb_0x1D0 - -:pass_2 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_32, rx_save_slave_32 - mov.ifnz ra_save_64, rx_save_slave_64 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_P1_BASE - load_tw rx_tw_shared, TW32+0, TW32_P1_BASE - load_tw rx_tw_shared, TW48, TW64_P1_BASE0 - load_tw rx_tw_shared, TW64, TW64_P1_BASE1 - init_stage 6 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Dual-use registers - - mov ra_vpm_lo, rb_vpm - mov ra_vpm_hi, rb_vpm_16 - - mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) - mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P2_BASE - load_tw rx_tw_unique, TW32+0, TW32_P2_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_2 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_2 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_32k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_32k.qasm @@ -1,271 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 15 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_BASE, 0 # rx_tw_shared -.set TW16_BASE, 1 -.set TW32_P2_STEP, 2 -.set TW16_P2_STEP, 3 -.set TW32_P3_STEP, 4 -.set TW16_P3_STEP, 5 - -.set TW32_P3_BASE, 0 # rx_tw_unique -.set TW16_P3_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -# rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_32, ra4 -.set rx_save_slave_32, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -# rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 - -.set rx_tw_shared, ra10 -.set rx_tw_unique, rb10 - -.set ra_tw_re, ra11 # 9 -.set rb_tw_im, rb11 # 9 - -.set ra_vpm_lo, ra26 -.set ra_vpm_hi, ra27 -.set ra_vdw_32, ra28 - -.set rx_0x5555, ra29 -.set rx_0x3333, ra30 -.set rx_0x0F0F, ra31 - -.set rx_0x00FF, rb26 -.set rb_0x10, rb27 -.set rb_0x40, rb28 -.set rb_0x80, rb29 -.set rb_0xF0, rb30 -.set rb_0x100, rb31 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 -mov rb_0x100, 0x100 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 -:pass_3 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - init_stage 5 - read_lin rb_0x10 - - .rep i, 4 - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x100 - .endr - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_2 - mov r0, 3*4*8 - sub ra_link_1, ra_link_1, r0 - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P3_BASE - load_tw rx_tw_unique, TW32+0, TW32_P3_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P3_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x100 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_4096k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_4096k.qasm @@ -1,356 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 22 - -.include "gpu_fft_2048k.qinc" - -############################################################################## -# Twiddles: src - -.set TW64_BASE0, 0 # rx_tw_shared -.set TW64_BASE1, 1 -.set TW32_BASE, 2 -.set TW16_BASE, 3 - -.set TW48_P2_STEP, 4 -.set TW64_P2_STEP, 5 - -.set TW32_P2_STEP, 6 -.set TW16_P2_STEP, 7 -.set TW32_P3_STEP, 8 -.set TW16_P3_STEP, 9 -.set TW32_P4_STEP, 10 -.set TW16_P4_STEP, 11 - -.set TW32_P4_BASE, 0 # rx_tw_unique -.set TW16_P4_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 -.set TW48, 9 # 2 -.set TW64, 11 # 2 -.set TW48_STEP, 13 # 1 -.set TW64_STEP, 14 # 1 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vpm, rb0 -.set ra_save_ptr, ra1 -.set rb_vpm_16, rb1 -.set ra_temp, ra2 -.set rb_vpm_32, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_32, ra4 -.set rx_save_slave_32, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_48, rb7 -.set ra_link_1, ra8 -.set rb_0x10, rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_64, ra10 -.set rx_save_slave_64, rb10 - -.set ra_64, ra11 # 4 -.set rb_64, rb11 # 4 - -.set rx_tw_shared, ra15 -.set rx_tw_unique, rb15 - -.set ra_tw_re, ra16 # 15 -.set rb_tw_im, rb16 # 15 - -############################################################################## -# Dual-use registers - -.set rb_STAGES, rb_64+0 -.set rb_0xF0, rb_64+1 -.set rb_0x40, rb_64+2 - -.set ra_vpm_lo, ra_64+0 -.set ra_vpm_hi, ra_64+1 -.set rb_vpm_lo, rb_vpm_32 -.set rb_vpm_hi, rb_vpm_48 -.set ra_vdw_32, ra_64+3 -.set rb_vdw_32, rb_64+3 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov r5rep, 0x1D0 - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, rb_vpm, rb_vpm_16, rb_vpm_32, rb_vpm_48 - -############################################################################## -# Master/slave procedures - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_save_64, r:1f -body_ra_save_64 -:1 - -proc rx_save_slave_64, r:1f -body_rx_save_slave_64 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_64 LOAD_REVERSED, r5 -:pass_2 - body_pass_64 LOAD_STRAIGHT, r5 -:pass_3 -:pass_4 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_32, rx_save_slave_32 - mov.ifnz ra_save_64, rx_save_slave_64 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW48+0, TW64_BASE0 - load_tw rx_tw_shared, TW64+0, TW64_BASE1 - init_stage 6 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - mov r1, STAGES - shr.setf -, ra_points, r1 - - brr.allz -, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW48+0, TW64_BASE0 - load_tw rx_tw_shared, TW64+0, TW64_BASE1 - mov ra_tw_re+TW48+1, 0; mov rb_tw_im+TW48+1, 0 - mov ra_tw_re+TW64+1, 0; mov rb_tw_im+TW64+1, 0 - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - load_tw rx_tw_shared, TW48_STEP, TW48_P2_STEP - load_tw rx_tw_shared, TW64_STEP, TW64_P2_STEP - init_stage 6 - read_lin rb_0x10 - - brr ra_link_1, r:pass_2 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - mov r0, 0xFFFF - and.setf -, ra_points, r0 - - brr.allnz -, r:pass_2 - nop - mov r0, 0x200 - add.ifnz ra_points, ra_points, r0 - - rotate TW64, TW64_STEP - rotate TW48, TW48_STEP - next_twiddles_32 - next_twiddles_16 - - mov r1, STAGES - shr.setf -, ra_points, r1 - - brr.allz -, r:pass_2 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Dual-use registers - - mov ra_vpm_lo, rb_vpm - mov ra_vpm_hi, rb_vpm_16 - - mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) - mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) - - mov rb_STAGES, STAGES - mov rb_0xF0, 0xF0 - mov rb_0x40, 0x40 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P3_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_3 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - mov r0, 0x3FF - and.setf -, ra_points, r0 - - brr.allnz -, r:pass_3 - nop - mov r0, 0x100 - add.ifnz ra_points, ra_points, r0 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_3 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 4 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P4_BASE - load_tw rx_tw_unique, TW32+0, TW32_P4_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P4_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P4_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_4 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_4 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_4k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_4k.qasm @@ -1,276 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 12 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW16_BASE, 0 # rx_tw_shared -.set TW16_P2_STEP, 1 -.set TW16_P3_STEP, 2 - -.set TW16_P3_BASE, 0 # rx_tw_unique - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW16, 1 # 5 - -############################################################################## -# Registers - -.set ra_link_1, ra0 -# rb0 -.set ra_save_ptr, ra1 -# rb1 -.set ra_temp, ra2 -# rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -# rb7 - -.set rx_tw_shared, ra8 -.set rx_tw_unique, rb8 - -.set ra_tw_re, ra9 # 6 -.set rb_tw_im, rb9 # 6 - -.set ra_vpm, ra26 -.set rb_vpm, rb26 -.set ra_vdw, ra27 -.set rb_vdw, rb27 - -.set rx_0x5555, ra28 -.set rx_0x3333, ra29 -.set rx_0x0F0F, ra30 -.set rx_0x00FF, ra31 - -.set rb_0x20, rb29 -.set rb_0x40, rb30 -.set rb_0x80, rb31 - -############################################################################## -# Register alias - -.set ra_link_0, ra_save_16 - -############################################################################## -# Constants - -mov rb_0x20, 0x20 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -mov ra_vdw, vdw_setup_0(16, 16, dma_h32( 0,0)) -mov rb_vdw, vdw_setup_0(16, 16, dma_h32(16,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm, rb_vpm, -, - - -############################################################################## -# Macros - -.macro swap_vpm_vdw - mov ra_vpm, rb_vpm; mov rb_vpm, ra_vpm - mov ra_vdw, rb_vdw; mov rb_vdw, ra_vdw -.endm - -.macro swizzle - mov.setf -, [0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0] - mov r2, r0; mov.ifnz r0, r0 << 6 - mov r3, r1; mov.ifnz r1, r1 << 6 - mov.setf -, [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0] - nop; mov.ifnz r0, r2 >> 6 - nop; mov.ifnz r1, r3 >> 6 -.endm - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm, ra_vdw -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - read_rev rb_0x80 - nop; ldtmu0 - mov r0, r4; ldtmu0 - mov r1, r4 - swizzle - brr -, r:fft_16 - interleave - -:pass_2 -:pass_3 - read_lin rb_0x80 - brr -, r:fft_16 - nop; ldtmu0 - mov r0, r4; ldtmu0 - mov r1, r4 - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - init_stage 4 - read_rev rb_0x80 - - brr ra_link_1, r:pass_1 - swap_vpm_vdw - add ra_points, ra_points, rb_0x80 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_1 - swap_vpm_vdw - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - init_stage 4 - read_lin rb_0x80 - - .rep i, 2 - brr ra_link_1, r:pass_2 - swap_vpm_vdw - add ra_points, ra_points, rb_0x80 - .endr - - sub ra_link_1, ra_link_1, rb_0x20 - next_twiddles_16 - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_2 - swap_vpm_vdw - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P3_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_3 - swap_vpm_vdw - add ra_points, ra_points, rb_0x80 - - next_twiddles_16 - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_3 - swap_vpm_vdw - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_512.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_512.qasm @@ -1,240 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 9 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_P1_BASE, 0 # rx_tw_shared -.set TW16_P1_BASE, 1 -.set TW16_P2_STEP, 2 - -.set TW16_P2_BASE, 0 # rx_tw_unique - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vdw_16, rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -# rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_32, ra10 -.set rx_save_slave_32, rb10 - -.set rx_tw_shared, ra11 -.set rx_tw_unique, rb11 - -.set ra_tw_re, ra12 # 9 -.set rb_tw_im, rb12 # 9 - -.set ra_vpm_lo, ra24 -.set ra_vpm_hi, ra25 -.set ra_vdw_16, ra26 -.set ra_vdw_32, ra27 - -.set rx_0x5555, ra28 -.set rx_0x3333, ra29 -.set rx_0x0F0F, ra30 -.set rx_0x00FF, ra31 - -.set rb_0x10, rb28 -.set rb_0x40, rb29 -.set rb_0x80, rb30 -.set rb_0xF0, rb31 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm_lo, ra_vdw_16 -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm_lo -:1 - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 - body_pass_16 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_P1_BASE - load_tw rx_tw_shared, TW32+0, TW32_P1_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - nop - - brr ra_link_1, r:pass_1 - nop - nop - nop - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P2_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_512k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_512k.qasm @@ -1,329 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 19 - -.include "gpu_fft_ex.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_BASE, 0 # rx_tw_shared -.set TW16_BASE, 1 -.set TW16_P2_STEP, 2 -.set TW32_P3_STEP, 3 -.set TW16_P3_STEP, 4 -.set TW32_P4_STEP, 5 -.set TW16_P4_STEP, 6 - -.set TW32_P4_BASE, 0 # rx_tw_unique -.set TW16_P4_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vdw_16, rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -.set rb_STAGES, rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_32, ra10 -.set rx_save_slave_32, rb10 - -.set rx_tw_shared, ra11 -.set rx_tw_unique, rb11 - -.set ra_tw_re, ra12 # 9 -.set rb_tw_im, rb12 # 9 - -.set ra_vpm_lo, ra25 -.set ra_vpm_hi, ra26 -.set ra_vdw_16, ra27 -.set ra_vdw_32, ra28 - -.set rx_0x55555555, ra29 -.set rx_0x33333333, ra30 -.set rx_0x0F0F0F0F, ra31 -.set rx_0x00FF00FF, rb25 -.set rx_0x0000FFFF, rb26 - -.set rb_0x10, rb27 -.set rb_0x40, rb28 -.set rb_0x80, rb29 -.set rb_0xF0, rb30 -.set rb_0x100, rb31 - -############################################################################## -# Constants - -mov rb_STAGES, STAGES - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 -mov rb_0x100, 0x100 - -mov rx_0x55555555, 0x55555555 -mov rx_0x33333333, 0x33333333 -mov rx_0x0F0F0F0F, 0x0F0F0F0F -mov rx_0x00FF00FF, 0x00FF00FF -mov rx_0x0000FFFF, 0x0000FFFF - -mov ra_vdw_16, vdw_setup_0(1, 16, dma_h32( 0,0)) -mov rb_vdw_16, vdw_setup_0(1, 16, dma_h32(32,0)) -mov ra_vdw_32, vdw_setup_0(1, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(1, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm_lo, ra_vdw_16 -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm_lo -:1 - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 - body_pass_16 LOAD_STRAIGHT - -:pass_3 -:pass_4 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - mov r0, 0x3FFF - and.setf -, ra_points, r0 - - brr.allnz -, r:pass_2 - nop - nop - add.ifnz ra_points, ra_points, rb_0x80 - - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P3_STEP - init_stage 5 - read_lin rb_0x10 - - .rep i, 4 - brr ra_link_1, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x100 - .endr - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_3 - mov r0, 3*4*8 - sub ra_link_1, ra_link_1, r0 - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 4 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P4_BASE - load_tw rx_tw_unique, TW32+0, TW32_P4_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P4_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P4_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x100 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_4 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_64k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_64k.qasm @@ -1,306 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 16 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW64_BASE0, 0 # rx_tw_shared -.set TW64_BASE1, 1 -.set TW32_BASE, 2 -.set TW16_BASE, 3 -.set TW32_P2_STEP, 4 -.set TW16_P2_STEP, 5 -.set TW32_P3_STEP, 6 -.set TW16_P3_STEP, 7 - -.set TW32_P3_BASE, 0 # rx_tw_unique -.set TW16_P3_BASE, 1 - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 -.set TW48, 9 # 1 -.set TW64, 10 # 1 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vpm, rb0 -.set ra_save_ptr, ra1 -.set rb_vpm_16, rb1 -.set ra_temp, ra2 -.set rb_vpm_32, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_32, ra4 -.set rx_save_slave_32, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_48, rb7 -.set ra_link_1, ra8 -.set rb_0x10, rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_64, ra10 -.set rx_save_slave_64, rb10 - -.set ra_64, ra11 # 4 -.set rb_64, rb11 # 4 - -.set rx_tw_shared, ra15 -.set rx_tw_unique, rb15 - -.set ra_tw_re, ra16 # 11 -.set rb_tw_im, rb16 # 11 - -.set rx_0x5555, ra30 -.set rx_0x3333, rb30 -.set rx_0x0F0F, ra31 -.set rx_0x00FF, rb31 - -############################################################################## -# Dual-use registers - -.set rb_STAGES, rb_0x10 - -.set rb_3x4x8, rb_64+0 -.set rb_0xF0, rb_64+1 -.set rb_0x40, rb_64+2 - -.set ra_vpm_lo, ra_64+0 -.set ra_vpm_hi, ra_64+1 -.set rb_vpm_lo, rb_vpm_32 -.set rb_vpm_hi, rb_vpm_48 -.set ra_vdw_32, ra_64+3 -.set rb_vdw_32, rb_64+3 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov r5rep, 0x1D0 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, rb_vpm, rb_vpm_16, rb_vpm_32, rb_vpm_48 - -############################################################################## -# Master/slave procedures - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_save_64, r:1f - mov r0, 0x40 -body_ra_save_64 r0 -:1 - -proc rx_save_slave_64, r:1f -body_rx_save_slave_64 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_64 LOAD_REVERSED, r5 - -:pass_2 -:pass_3 - body_pass_32 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_32, rx_save_slave_32 - mov.ifnz ra_save_64, rx_save_slave_64 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW48, TW64_BASE0 - load_tw rx_tw_shared, TW64, TW64_BASE1 - init_stage 6 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - mov r1, STAGES - shr.setf -, ra_points, r1 - - brr.allz -, r:pass_1 - nop - mov r0, 0x200 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Dual-use registers - - mov ra_vpm_lo, rb_vpm - mov ra_vpm_hi, rb_vpm_16 - - mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) - mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - - mov rb_3x4x8, 3*4*8 - mov rb_0xF0, 0xF0 - mov rb_0x40, 0x40 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P2_STEP - init_stage 5 - read_lin rb_0x10 - - .rep i, 4 - brr ra_link_1, r:pass_2 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - .endr - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_2 - mov r0, 0x100 - add ra_points, ra_points, r0 - sub ra_link_1, ra_link_1, rb_3x4x8 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P3_BASE - load_tw rx_tw_unique, TW32+0, TW32_P3_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - load_tw rx_tw_shared, TW32_STEP, TW32_P3_STEP - init_stage 5 - read_lin rb_0x10 - - brr ra_link_1, r:pass_3 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - next_twiddles_32 - next_twiddles_16 - - shr.setf -, ra_points, rb_STAGES - - brr.allz -, r:pass_3 - nop - mov r0, 0x100 - add ra_points, ra_points, r0 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_8k.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_8k.qasm @@ -1,276 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set STAGES, 13 - -.include "gpu_fft.qinc" - -############################################################################## -# Twiddles: src - -.set TW32_BASE, 0 # rx_tw_shared -.set TW16_BASE, 1 -.set TW16_P2_STEP, 2 -.set TW16_P3_STEP, 3 - -.set TW16_P3_BASE, 0 # rx_tw_unique - -############################################################################## -# Twiddles: dst - -.set TW16_STEP, 0 # 1 -.set TW32_STEP, 1 # 1 -.set TW16, 2 # 5 -.set TW32, 7 # 2 - -############################################################################## -# Registers - -.set ra_link_0, ra0 -.set rb_vdw_16, rb0 -.set ra_save_ptr, ra1 -.set rb_vdw_32, rb1 -.set ra_temp, ra2 -.set rb_vpm_lo, rb2 -.set ra_addr_x, ra3 -.set rb_addr_y, rb3 -.set ra_save_16, ra4 -.set rx_save_slave_16, rb4 -.set ra_load_idx, ra5 -.set rb_inst, rb5 -.set ra_sync, ra6 -.set rx_sync_slave, rb6 -.set ra_points, ra7 -.set rb_vpm_hi, rb7 -.set ra_link_1, ra8 -# rb8 -.set ra_32_re, ra9 -.set rb_32_im, rb9 -.set ra_save_32, ra10 -.set rx_save_slave_32, rb10 - -.set rx_tw_shared, ra11 -.set rx_tw_unique, rb11 - -.set ra_tw_re, ra12 # 9 -.set rb_tw_im, rb12 # 9 - -.set ra_vpm_lo, ra25 -.set ra_vpm_hi, ra26 -.set ra_vdw_16, ra27 -.set ra_vdw_32, ra28 - -.set rx_0x5555, ra29 -.set rx_0x3333, ra30 -.set rx_0x0F0F, ra31 - -.set rx_0x00FF, rb26 -.set rb_0x10, rb27 -.set rb_0x40, rb28 -.set rb_0x80, rb29 -.set rb_0xF0, rb30 -.set rb_0x100, rb31 - -############################################################################## -# Constants - -mov rb_0x10, 0x10 -mov rb_0x40, 0x40 -mov rb_0x80, 0x80 -mov rb_0xF0, 0xF0 -mov rb_0x100, 0x100 - -mov rx_0x5555, 0x5555 -mov rx_0x3333, 0x3333 -mov rx_0x0F0F, 0x0F0F -mov rx_0x00FF, 0x00FF - -mov ra_vdw_16, vdw_setup_0(16, 16, dma_h32( 0,0)) -mov rb_vdw_16, vdw_setup_0(16, 16, dma_h32(32,0)) -mov ra_vdw_32, vdw_setup_0(32, 16, dma_h32( 0,0)) -mov rb_vdw_32, vdw_setup_0(32, 16, dma_h32(32,0)) - -############################################################################## -# Twiddles: ptr - -mov rx_tw_shared, unif -mov rx_tw_unique, unif - -############################################################################## -# Instance - -mov rb_inst, unif -inst_vpm rb_inst, ra_vpm_lo, ra_vpm_hi, rb_vpm_lo, rb_vpm_hi - -############################################################################## -# Master/slave procedures - -proc ra_save_16, r:1f -body_ra_save_16 ra_vpm_lo, ra_vdw_16 -:1 - -proc rx_save_slave_16, r:1f -body_rx_save_slave_16 ra_vpm_lo -:1 - -proc ra_save_32, r:1f -body_ra_save_32 -:1 - -proc rx_save_slave_32, r:1f -body_rx_save_slave_32 -:1 - -proc ra_sync, r:1f -body_ra_sync -:1 - -proc rx_sync_slave, r:main -body_rx_sync_slave - -############################################################################## -# Subroutines - -:fft_16 - body_fft_16 - -:pass_1 - body_pass_32 LOAD_REVERSED - -:pass_2 -:pass_3 - body_pass_16 LOAD_STRAIGHT - -############################################################################## -# Top level - -:main - mov.setf r0, rb_inst - sub r0, r0, 1 - shl r0, r0, 5 - add.ifnz ra_sync, rx_sync_slave, r0 - mov.ifnz ra_save_16, rx_save_slave_16 - mov.ifnz ra_save_32, rx_save_slave_32 - -:loop - mov.setf ra_addr_x, unif # Ping buffer or null - mov rb_addr_y, unif # Pong buffer or IRQ enable - - brr.allz -, r:end - -############################################################################## -# Pass 1 - - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW32+0, TW32_BASE - init_stage 5 - read_rev rb_0x10 - - brr ra_link_1, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_1 - nop - nop - add ra_points, ra_points, rb_0x100 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 2 - - swap_buffers - load_tw rx_tw_shared, TW16+3, TW16_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P2_STEP - init_stage 4 - read_lin rb_0x80 - - .rep i, 2 - brr ra_link_1, r:pass_2 - nop - nop - add ra_points, ra_points, rb_0x80 - .endr - - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_2 - mov r0, 4*8 - sub ra_link_1, ra_link_1, r0 - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## -# Pass 3 - - swap_buffers - load_tw rx_tw_unique, TW16+3, TW16_P3_BASE - load_tw rx_tw_shared, TW16_STEP, TW16_P3_STEP - init_stage 4 - read_lin rb_0x80 - - brr ra_link_1, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x80 - - next_twiddles_16 - - shr.setf -, ra_points, STAGES - - brr.allz -, r:pass_3 - nop - nop - add ra_points, ra_points, rb_0x80 - - bra ra_link_1, ra_sync - nop - ldtmu0 - ldtmu0 - -############################################################################## - - brr -, r:loop - nop - nop - nop - -:end - exit rb_addr_y diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_ex.qinc b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_ex.qinc @@ -1,112 +0,0 @@ -# BCM2835 "GPU_FFT" release 3.0 -# -# Copyright (c) 2015, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -############################################################################## -# Macro baseline - -.include "gpu_fft.qinc" - -############################################################################## -# Redefining some macros - -.if STAGES>16 -.macro read_rev, stride - add ra_load_idx, ra_load_idx, stride; mov r0, ra_load_idx - - bit_rev 1, rx_0x55555555 # 16 SIMD - bit_rev 2, rx_0x33333333 - bit_rev 4, rx_0x0F0F0F0F - bit_rev 8, rx_0x00FF00FF - bit_rev rb_0x10, rx_0x0000FFFF - - shr r0, r0, 32-STAGES-3 # r0 = re = {idx[0:STAGES-1], 1'b0, 2'b0} - add r1, r0, 4 # r1 = im = {idx[0:STAGES-1], 1'b1, 2'b0} - - interleave - - add t0s, ra_addr_x, r0 - add t0s, ra_addr_x, r1 -.endm -.endif - -.if STAGES>17 -.macro body_ra_save_16, arg_vpm, arg_vdw - write_vpm_16 arg_vpm - - mov -, vw_wait - - .rep i, 7 - mov -, sacq(i+9) # Master waits for slave - mov -, srel(i+1) # Master releases slave - .endr - - mov r0, arg_vdw - add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr - - mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) - mov r3, PASS16_STRIDE - - .rep i, 16 - add r0, r0, r2; mov vw_setup, r0 - add r1, r1, r3; mov vw_addr, r1 - .endr - - bra -, ra_link_1 - nop - nop - nop -.endm -.endif - -.if STAGES>18 -.macro body_ra_save_32 - write_vpm_32 - - mov -, vw_wait - - .rep i, 7 - mov -, sacq(i+9) # Master waits for slave - mov -, srel(i+1) # Master releases slave - .endr - - mov r0, ra_vdw_32 - add ra_save_ptr, ra_save_ptr, rb_0x40; mov r1, ra_save_ptr - - mov r2, vdw_setup_0(1, 16, dma_h32(1,0)) - vdw_setup_0(1, 16, dma_h32(0,0)) - mov r3, PASS32_STRIDE - - .rep i, 32 - add r0, r0, r2; mov vw_setup, r0 - add r1, r1, r3; mov vw_addr, r1 - .endr - - bra -, ra_link_1 - nop - nop - nop -.endm -.endif diff --git a/vc/src/hello_pi/hello_fft/qasm/gpu_fft_trans.qasm b/vc/src/hello_pi/hello_fft/qasm/gpu_fft_trans.qasm @@ -1,133 +0,0 @@ -# BCM2835 "GPU_FFT" release 2.0 -# -# Copyright (c) 2014, Andrew Holme. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# * Neither the name of the copyright holder nor the -# names of its contributors may be used to endorse or promote products -# derived from this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -.set rb_offsets_re, rb0 # 8 -.set rb_offsets_im, rb8 # 8 -.set rb_0x10, rb16 -.set rb_X_STRIDE, rb17 -.set rb_Y_STRIDE_SRC, rb18 -.set rb_Y_STRIDE_DST, rb19 -.set rb_NX, rb20 -.set rb_NY, rb21 - -.set ra_x, ra0 -.set ra_y, ra1 -.set ra_src_base, ra2 -.set ra_dst_base, ra3 -.set ra_src_cell, ra4 -.set ra_dst_cell, ra5 -.set ra_vdw_stride, ra6 - - mov t0s, unif # src->vc_msg - ldtmu0 # r4 = vc_unifs - add t0s, r4, 3*4 # 3rd unif - ldtmu0 # r4 = src->in - add ra_src_base, r4, unif # optional offset - - mov t0s, unif # dst->vc_msg - ldtmu0 # r4 = vc_unifs - add t0s, r4, 3*4 # 3rd unif - ldtmu0 # r4 = src->in - add ra_dst_base, r4, unif # optional offset - - mov rb_Y_STRIDE_SRC, unif - mov rb_Y_STRIDE_DST, unif - mov rb_NX, unif - mov rb_NY, unif - - mov rb_X_STRIDE, 2*4 # sizeof complex - mov rb_0x10, 0x10 - - mov r0, vdw_setup_1(0) - add r0, r0, rb_Y_STRIDE_DST - mov r1, 16*4 - sub ra_vdw_stride, r0, r1 - - nop; mul24 r0, elem_num, rb_X_STRIDE -.rep i, 8 - mov rb_offsets_re+i, r0 - add rb_offsets_im+i, r0, 4 - add r0, r0, rb_Y_STRIDE_SRC -.endr - - mov ra_y, 0 -:outer - mov ra_x, 0 -:inner - - nop; mul24 r1, ra_y, rb_Y_STRIDE_SRC - nop; mul24 r0, ra_x, rb_X_STRIDE - add r0, r0, r1 - add ra_src_cell, ra_src_base, r0 - - nop; mul24 r1, ra_x, rb_Y_STRIDE_DST - nop; mul24 r0, ra_y, rb_X_STRIDE - add r0, r0, r1 - add ra_dst_cell, ra_dst_base, r0 - - mov vw_setup, vpm_setup(16, 1, v32(0,0)) - - add t0s, ra_src_cell, rb_offsets_re - add t1s, ra_src_cell, rb_offsets_im - .rep i, 7 - add t0s, ra_src_cell, rb_offsets_re+1+i - add t1s, ra_src_cell, rb_offsets_im+1+i - ldtmu0 - mov vpm, r4 - ldtmu1 - mov vpm, r4 - .endr - ldtmu0 - mov vpm, r4 - ldtmu1 - mov vpm, r4 - - mov vw_setup, vdw_setup_0(16, 16, dma_h32(0,0)) - mov vw_setup, ra_vdw_stride - mov vw_addr, ra_dst_cell - mov -, vw_wait - - add ra_x, ra_x, rb_0x10 - nop - sub.setf -, ra_x, rb_NX - brr.allnz -, r:inner - nop - nop - nop - - add ra_y, ra_y, 8 - nop - sub.setf -, ra_y, rb_NY - brr.allnz -, r:outer - nop - nop - nop - - mov interrupt, 1 - nop; nop; thrend - nop - nop diff --git a/vc/src/hello_pi/hello_font/Fixedsys500c.ttf b/vc/src/hello_pi/hello_font/Fixedsys500c.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_font/Makefile b/vc/src/hello_pi/hello_font/Makefile @@ -1,7 +0,0 @@ -OBJS=main.o -BIN=hello_font.bin - -LDFLAGS+=-lvgfont -lfreetype -lz - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_font/TerminusBold.ttf b/vc/src/hello_pi/hello_font/TerminusBold.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_font/Vera.ttf b/vc/src/hello_pi/hello_font/Vera.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_font/fixedsys.ttf b/vc/src/hello_pi/hello_font/fixedsys.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_font/fixedsys500c.zip b/vc/src/hello_pi/hello_font/fixedsys500c.zip Binary files differ. diff --git a/vc/src/hello_pi/hello_font/hello_font.bin b/vc/src/hello_pi/hello_font/hello_font.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_font/interface.txt b/vc/src/hello_pi/hello_font/interface.txt @@ -1 +0,0 @@ -Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right? diff --git a/vc/src/hello_pi/hello_font/main.c b/vc/src/hello_pi/hello_font/main.c @@ -1,148 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Test app for VG font library. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" -#include "vgfont.h" - -int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const uint32_t text_size, const uint32_t y_offset, uint32_t fontcolor) -{ - uint32_t height=0; - uint32_t img_w, img_h; - - graphics_get_resource_size(img, &img_w, &img_h); - - // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line - if (fontcolor == 3) { - graphics_resource_render_text_ext(img, 25, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0,250,250,150), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 57, text_size); - } - if (fontcolor == 2) { - graphics_resource_render_text_ext(img, 25, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0,0,0xff,150), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 57, text_size); - } - if (fontcolor == 1) { - graphics_resource_render_text_ext(img, 25, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0,0xff,0,150), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 57, text_size); - } - return 0; - } - -int main(void) -{ - GRAPHICS_RESOURCE_HANDLE img; - uint32_t width, height; - int LAYER=1; - bcm_host_init(); - int s; - - s = gx_graphics_init("."); - assert(s == 0); - - s = graphics_get_display_size(0, &width, &height); - assert(s == 0); - - s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); - assert(s == 0); - - // transparent before display to avoid screen flash - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); - - uint32_t text_size = 22; - char text[57]; - char text2[57]; - char text3[57]; - char text4[57]; - char text5[57]; - char text6[57]; - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); - while (1) { - // char ch; - FILE *fp; - fp = fopen("/mnt/tmp/vumeter.txt","r"); - while(fgets(text, 57, fp) != NULL); - fclose(fp); - FILE *fp2; - fp2 = fopen("mnt/tmp/interface.txt","r"); - fgets(text2, 56, fp2); - fgets(text3, 56, fp2); - fgets(text4, 56, fp2); - fgets(text5, 56, fp2); - fgets(text6, 56, fp2); - fclose(fp2); - //FILE *fp3; - //fp3 = fopen("interface.txt","r"); - //while(fgets(text3, 57, fp3) != NULL); - //fclose(fp3); - //const char *text = "Never give up on your dreams"; - uint32_t y_offset = 460; - uint32_t y_offset2 = 0; - uint32_t y_offset3 = 25; - uint32_t y_offset4 = 50; - uint32_t y_offset5 = 410; - uint32_t y_offset6 = 435; - // graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - // blue, at the top (y=40) - - // draw the text if updated - render_subtitle(img, text, text_size, y_offset, 1); - render_subtitle(img, text2, text_size, y_offset2, 2); - render_subtitle(img, text3, text_size, y_offset3, 3); - render_subtitle(img, text4, text_size, y_offset4, 1); - render_subtitle(img, text5, text_size, y_offset5, 2); - render_subtitle(img, text6, text_size, y_offset6, 3); - graphics_update_displayed_resource(img, 0, 0, 0, 0); - usleep(100000); - } - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); - graphics_delete_resource(img); - - return 0; -} - diff --git a/vc/src/hello_pi/hello_font/main.c! b/vc/src/hello_pi/hello_font/main.c! @@ -1,132 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Test app for VG font library. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" -#include "vgfont.h" - -static const char *strnchr(const char *str, size_t len, char c) -{ - const char *e = str + len; - do { - if (*str == c) { - return str; - } - } while (++str < e); - return NULL; -} - -int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const int skip, const uint32_t text_size, const uint32_t y_offset) -{ - uint32_t text_length = strlen(text)-skip; - uint32_t width=0, height=0; - const char *split = text; - int32_t s=0; - int len = 0; // length of pre-subtitle - uint32_t img_w, img_h; - - graphics_get_resource_size(img, &img_w, &img_h); - - if (text_length==0) - return 0; - while (split[0]) { - s = graphics_resource_text_dimensions_ext(img, split, text_length-(split-text), &width, &height, text_size); - if (s != 0) return s; - if (width > img_w) { - const char *space = strnchr(split, text_length-(split-text), ' '); - if (!space) { - len = split+1-text; - split = split+1; - } else { - len = space-text; - split = space+1; - } - } else { - break; - } - } - // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line - if (width) { - s = graphics_resource_render_text_ext(img, (img_w - width)>>1, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0xff,0xff,0xff,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0x80), /* bg */ - split, text_length-(split-text), text_size); - if (s!=0) return s; - } - return render_subtitle(img, text, skip+text_length-len, text_size, y_offset - height); -} - -int main(void) -{ - GRAPHICS_RESOURCE_HANDLE img; - uint32_t width, height; - int LAYER=1; - bcm_host_init(); - int s; - - s = gx_graphics_init("."); - assert(s == 0); - - s = graphics_get_display_size(0, &width, &height); - assert(s == 0); - - s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); - assert(s == 0); - - // transparent before display to avoid screen flash - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); - - uint32_t text_size = 10; - while (1) { - const char *text = "Never give up on your dreams"; - uint32_t y_offset = height-60+text_size/2; - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - // blue, at the top (y=40) - graphics_resource_fill(img, 0, 50, width, 100, GRAPHICS_RGBA32(0,0,0xff,0xff)); - - // draw the subtitle text - render_subtitle(img, text, 0, text_size, y_offset); - graphics_update_displayed_resource(img, 0, 0, 0, 0); - } - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); - graphics_delete_resource(img); - - return 0; -} - diff --git a/vc/src/hello_pi/hello_font/main.c.old b/vc/src/hello_pi/hello_font/main.c.old @@ -1,138 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Test app for VG font library. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" -#include "vgfont.h" - -static const char *strnchr(const char *str, size_t len, char c) -{ - const char *e = str + len; - do { - if (*str == c) { - return str; - } - } while (++str < e); - return NULL; -} - -int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const int skip, const uint32_t text_size, const uint32_t y_offset) -{ - uint32_t text_length = strlen(text)-skip; - uint32_t width=0, height=0; - const char *split = text; - int32_t s=0; - int len = 0; // length of pre-subtitle - uint32_t img_w, img_h; - - graphics_get_resource_size(img, &img_w, &img_h); - - if (text_length==0) - return 0; - while (split[0]) { - s = graphics_resource_text_dimensions_ext(img, split, text_length-(split-text), &width, &height, text_size); - if (s != 0) return s; - if (width > img_w) { - const char *space = strnchr(split, text_length-(split-text), ' '); - if (!space) { - len = split+1-text; - split = split+1; - } else { - len = space-text; - split = space+1; - } - } else { - break; - } - } - // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line - if (width) { - s = graphics_resource_render_text_ext(img, (img_w - width)>>1, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0xff,0xff,0xff,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0x80), /* bg */ - split, text_length-(split-text), text_size); - if (s!=0) return s; - } - return render_subtitle(img, text, skip+text_length-len, text_size, y_offset - height); -} - -int main(void) -{ - GRAPHICS_RESOURCE_HANDLE img; - uint32_t width, height; - int LAYER=1; - bcm_host_init(); - int s; - - s = gx_graphics_init("."); - assert(s == 0); - - s = graphics_get_display_size(0, &width, &height); - assert(s == 0); - - s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); - assert(s == 0); - - // transparent before display to avoid screen flash - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); - - uint32_t text_size = 10; - while (1) { - const char *text = "Never give up on your dreams"; - uint32_t y_offset = height-60+text_size/2; - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - // blue, at the top (y=40) - graphics_resource_fill(img, 0, 40, width, 10, GRAPHICS_RGBA32(0,0,0xff,0xff)); - - // green, at the bottom (y=height-40) - graphics_resource_fill(img, 0, height-40, width, 1, GRAPHICS_RGBA32(0,0xff,0,0xff)); - - // draw the subtitle text - render_subtitle(img, text, 0, text_size, y_offset); - graphics_update_displayed_resource(img, 0, 0, 0, 0); - text_size += 1; - if (text_size > 50) - text_size = 10; - } - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); - graphics_delete_resource(img); - - return 0; -} - diff --git a/vc/src/hello_pi/hello_font/unifont-8.0.01.ttf b/vc/src/hello_pi/hello_font/unifont-8.0.01.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_font/unifont.ttf b/vc/src/hello_pi/hello_font/unifont.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_font/vumeter.txt b/vc/src/hello_pi/hello_font/vumeter.txt diff --git a/vc/src/hello_pi/hello_interface/Andale_Mono.ttf b/vc/src/hello_pi/hello_interface/Andale_Mono.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/Fixedsys500c.ttf b/vc/src/hello_pi/hello_interface/Fixedsys500c.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/Makefile b/vc/src/hello_pi/hello_interface/Makefile @@ -1,7 +0,0 @@ -OBJS=main.o -BIN=camerainterface.bin - -LDFLAGS+=-lvgfont -lfreetype -lz - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_interface/TerminusBold.ttf b/vc/src/hello_pi/hello_interface/TerminusBold.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/Vera.ttf b/vc/src/hello_pi/hello_interface/Vera.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/VeraMono.ttf b/vc/src/hello_pi/hello_interface/VeraMono.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/camerainterface.bin b/vc/src/hello_pi/hello_interface/camerainterface.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/fixedsys.ttf b/vc/src/hello_pi/hello_interface/fixedsys.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/fixedsys500c.zip b/vc/src/hello_pi/hello_interface/fixedsys500c.zip Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/hello_font.bin b/vc/src/hello_pi/hello_interface/hello_font.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/interface.txt b/vc/src/hello_pi/hello_interface/interface.txt @@ -1 +0,0 @@ -Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right?Hello world! this is librecam. Up, Down, Left or Right? diff --git a/vc/src/hello_pi/hello_interface/main.c b/vc/src/hello_pi/hello_interface/main.c @@ -1,484 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Test app for VG font library. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" -#include "vgfont.h" - -int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const uint32_t text_size, const uint32_t x_offset, const uint32_t y_offset, uint32_t fontcolor) -{ - uint32_t height=0; - uint32_t img_w, img_h; - - graphics_get_resource_size(img, &img_w, &img_h); - - // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line - if (fontcolor == 5) { - graphics_resource_render_text_ext(img, x_offset, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(180,180,180,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 4) { - graphics_resource_render_text_ext(img, x_offset, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(51,51,51,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 3) { - graphics_resource_render_text_ext(img, x_offset, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(30,30,255,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 2) { - graphics_resource_render_text_ext(img, x_offset, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(255,255,255,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 1) { - graphics_resource_render_text_ext(img, x_offset, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0,0,0,0xff), /* fg */ - GRAPHICS_RGBA32(255,255,255,0xff), /* bg */ - text, 74, text_size); - } - return 0; - } - -int main(void) -{ - GRAPHICS_RESOURCE_HANDLE img; - uint32_t width, height; - int LAYER=1; - bcm_host_init(); - int s; - - s = gx_graphics_init("."); - assert(s == 0); - - s = graphics_get_display_size(0, &width, &height); - assert(s == 0); - - s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); - assert(s == 0); - - // transparent before display to avoid screen flash - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); - - uint32_t text_size = 16; - int selected; - int len_string_header; - int len_string_film; - int len_string_scene; - int len_string_shot; - int len_string_take; - int len_string_rec; - int len_string_shutter; - int len_string_iso; - int len_string_red; - int len_string_blue; - int len_string_bright; - int len_string_cont; - int len_string_sat; - int len_string_flip; - int len_string_beep; - int len_string_lenght; - int len_string_mic; - int len_string_phones; - int len_string_dsk; - int len_string_more1; - int len_string_more2; - int len_string_more3; - int len_string_more4; - int len_string_more5; - int len_string_more6; - int len_string_more7; - char check[500]; - char oldcheck[500]; - char vumeter[80]; - char menu[4]; - char header[100]; - char film[30]; - char scene[20]; - char shot[20]; - char take[20]; - char rec[20]; - char shutter[30]; - char iso[20]; - char red[20]; - char blue[20]; - char bright[20]; - char cont[20]; - char sat[20]; - char flip[20]; - char beep[20]; - char lenght[20]; - char mic[20]; - char phones[20]; - char dsk[20]; - char more1[20]; - char more2[20]; - char more3[20]; - char more4[20]; - char more5[20]; - char more6[20]; - char more7[20]; - //graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); - while (1) { - // char ch; - FILE *fp; - fp = fopen("/dev/shm/vumeter","r"); - while(fgets(vumeter, 74, fp) != NULL); - fclose(fp); - FILE *fp2; - fp2 = fopen("/dev/shm/interface","r"); - fgets(check, 500, fp2); - fclose(fp2); - // check if something has changed - if (strcmp(check, oldcheck) != 0) { - strcpy(oldcheck, check); - fp2 = fopen("/dev/shm/interface","r"); - fgets(menu, 4, fp2); - selected = atoi(menu); - fgets(menu, 4, fp2); - len_string_header = atoi(menu) + 1; - fgets(header, len_string_header, fp2); - fgets(menu, 4, fp2); - len_string_film = atoi(menu) + 1; - fgets(film, len_string_film, fp2); - fgets(menu, 4, fp2); - len_string_scene = atoi(menu) + 1; - fgets(scene, len_string_scene, fp2); - fgets(menu, 4, fp2); - len_string_shot = atoi(menu) + 1; - fgets(shot, len_string_shot, fp2); - fgets(menu, 4, fp2); - len_string_take = atoi(menu) + 1; - fgets(take, len_string_take, fp2); - fgets(menu, 4, fp2); - len_string_rec = atoi(menu) + 1; - fgets(rec, len_string_rec, fp2); - fgets(menu, 4, fp2); - len_string_shutter = atoi(menu) + 1; - fgets(shutter, len_string_shutter, fp2); - fgets(menu, 4, fp2); - len_string_iso = atoi(menu) + 1; - fgets(iso, len_string_iso, fp2); - fgets(menu, 4, fp2); - len_string_red = atoi(menu) + 1; - fgets(red, len_string_red, fp2); - fgets(menu, 4, fp2); - len_string_blue = atoi(menu) + 1; - fgets(blue, len_string_blue, fp2); - fgets(menu, 4, fp2); - len_string_bright = atoi(menu) + 1; - fgets(bright, len_string_bright, fp2); - fgets(menu, 4, fp2); - len_string_cont = atoi(menu) + 1; - fgets(cont, len_string_cont, fp2); - fgets(menu, 4, fp2); - len_string_sat = atoi(menu) + 1; - fgets(sat, len_string_sat, fp2); - fgets(menu, 4, fp2); - len_string_flip = atoi(menu) + 1; - fgets(flip, len_string_flip, fp2); - fgets(menu, 4, fp2); - len_string_beep = atoi(menu) + 1; - fgets(beep, len_string_beep, fp2); - fgets(menu, 4, fp2); - len_string_lenght = atoi(menu) + 1; - fgets(lenght, len_string_lenght, fp2); - fgets(menu, 4, fp2); - len_string_mic = atoi(menu) + 1; - fgets(mic, len_string_mic, fp2); - fgets(menu, 4, fp2); - len_string_phones = atoi(menu) + 1; - fgets(phones, len_string_phones, fp2); - fgets(menu, 4, fp2); - len_string_dsk = atoi(menu) + 1; - fgets(dsk, len_string_dsk, fp2); - fgets(menu, 4, fp2); - len_string_more1 = atoi(menu) + 1; - fgets(more1, len_string_more1, fp2); - fgets(menu, 4, fp2); - len_string_more2 = atoi(menu) + 1; - fgets(more2, len_string_more2, fp2); - fgets(menu, 4, fp2); - len_string_more3 = atoi(menu) + 1; - fgets(more3, len_string_more3, fp2); - fgets(menu, 4, fp2); - len_string_more4 = atoi(menu) + 1; - fgets(more4, len_string_more4, fp2); - fgets(menu, 4, fp2); - len_string_more5 = atoi(menu) + 1; - fgets(more5, len_string_more5, fp2); - fgets(menu, 4, fp2); - len_string_more6 = atoi(menu) + 1; - fgets(more6, len_string_more6, fp2); - fgets(menu, 4, fp2); - len_string_more7 = atoi(menu) + 1; - fgets(more7, len_string_more7, fp2); - fgets(menu, 3, fp2); - fclose(fp2); - if (menu[0] == 'E' && menu[1] == 'O'){ - //FILE *fp3; - //fp3 = fopen("interface.txt","r"); - //while(fgets(text3, 57, fp3) != NULL); - //fclose(fp3); - //const char *text = "Never give up on your dreams"; - uint32_t y_offset2 = 0; - uint32_t y_offset3 = 22; - uint32_t y_offset4 = 44; - uint32_t y_offset5 = 418; - uint32_t y_offset6 = 440; - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); - // blue, at the top (y=40) - // selected 0 1 2 3 4 5 6 7 8 - int space = 10; - int morespace = 6; - int color = 5; - // draw the text if updated - if(strlen(header) != 0) { - render_subtitle(img, header, text_size, 0, y_offset2, 5); - if(selected == 0){ - render_subtitle(img, film, text_size, 0, y_offset3, 1); - } - else{ - render_subtitle(img, film, text_size, 0, y_offset3, color); - } - if(selected == 1){ - render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset3, 1); - } - else{ - render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset3, color); - } - if(selected == 2){ - render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset3, 1); - } - else{ - render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset3, color); - } - if(selected == 3){ - render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset3, 1); - } - else{ - render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset3, color); - } - if(selected == 5){ - render_subtitle(img, shutter, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + morespace * 4, y_offset3, 1); - } - else{ - render_subtitle(img, shutter, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + morespace * 4, y_offset3, color); - } - if(selected == 6){ - render_subtitle(img, iso, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + len_string_shutter * space + morespace * 5, y_offset3, 1); - } - else{ - render_subtitle(img, iso, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + len_string_take * space + len_string_shutter * space + morespace * 5, y_offset3, color); - } - } - if(strlen(header) == 0) { - render_subtitle(img, rec, text_size, 700, y_offset3, 3); - if(selected == 0){ - render_subtitle(img, film, text_size, 0, y_offset2, 1); - } - else{ - render_subtitle(img, film, text_size, 0, y_offset2, color); - } - if(selected == 1){ - render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset2, 1); - } - else{ - render_subtitle(img, scene, text_size, len_string_film * space + morespace, y_offset2, color); - } - if(selected == 2){ - render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset2, 1); - } - else{ - render_subtitle(img, shot, text_size, len_string_film * space + len_string_scene * space + morespace * 2, y_offset2, color); - } - if(selected == 3){ - render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset2, 1); - } - else{ - render_subtitle(img, take, text_size, len_string_film * space + len_string_scene * space + len_string_shot * space + morespace * 3, y_offset2, color); - } - if(selected == 5){ - render_subtitle(img, shutter, text_size, 0, y_offset3, 1); - } - else{ - render_subtitle(img, shutter, text_size, 0, y_offset3, color); - } - if(selected == 6){ - render_subtitle(img, iso, text_size, (len_string_shutter * space) + morespace, y_offset3, 1); - } - else{ - render_subtitle(img, iso, text_size, (len_string_shutter * space) + morespace, y_offset3, color); - } - if(selected == 7){ - render_subtitle(img, red, text_size, (len_string_shutter * space) + (len_string_iso * space) + morespace * 2, y_offset3, 1); - } - else{ - render_subtitle(img, red, text_size, len_string_shutter * space + len_string_iso * space + morespace * 2, y_offset3, color); - } - if(selected == 8){ - render_subtitle(img, blue, text_size, len_string_shutter * space + len_string_iso * space + len_string_red * space + morespace * 3, y_offset3, 1); - } - else{ - render_subtitle(img, blue, text_size, len_string_shutter * space + len_string_iso * space + len_string_red * space + morespace * 3, y_offset3, color); - } - if(selected == 9){ - render_subtitle(img, bright, text_size, 0, y_offset4, 1); - } - else{ - render_subtitle(img, bright, text_size, 0, y_offset4, color); - } - if(selected == 10){ - render_subtitle(img, cont, text_size, len_string_bright * space + morespace, y_offset4, 1); - } - else{ - render_subtitle(img, cont, text_size, len_string_bright * space + morespace, y_offset4, color); - } - if(selected == 11){ - render_subtitle(img, sat, text_size, len_string_bright * space + len_string_cont * space + morespace * 2, y_offset4, 1); - } - else{ - render_subtitle(img, sat, text_size, len_string_bright * space + len_string_cont * space + morespace * 2, y_offset4, color); - } - if(selected == 12){ - render_subtitle(img, flip, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + morespace * 3, y_offset4, 1); - } - else{ - render_subtitle(img, flip, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + morespace * 3, y_offset4, color); - } - if(selected == 13){ - render_subtitle(img, beep, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + morespace * 4, y_offset4, 1); - } - else{ - render_subtitle(img, beep, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + morespace * 4, y_offset4, color); - } - if(selected == 14){ - render_subtitle(img, lenght, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + len_string_beep * space + morespace * 5, y_offset4, 1); - } - else{ - render_subtitle(img, lenght, text_size, len_string_bright * space + len_string_cont * space + len_string_sat * space + len_string_flip * space + len_string_beep * space + morespace * 5, y_offset4, color); - } - if(selected == 15){ - render_subtitle(img, mic, text_size, 0, y_offset5, 1); - } - else{ - render_subtitle(img, mic, text_size, 0, y_offset5, color); - } - if(selected == 16){ - render_subtitle(img, phones, text_size, len_string_mic * space + morespace, y_offset5, 1); - } - else{ - render_subtitle(img, phones, text_size, len_string_mic * space + morespace, y_offset5, color); - } - if(selected == 17){ - render_subtitle(img, dsk, text_size, len_string_mic * space + len_string_phones * space + morespace * 2, y_offset5, 1); - } - else{ - render_subtitle(img, dsk, text_size, len_string_mic * space + len_string_phones * space + morespace * 2, y_offset5, color); - } - if(selected == 18){ - render_subtitle(img, more1, text_size, 0, y_offset6, 1); - } - else{ - render_subtitle(img, more1, text_size, 0, y_offset6, color); - } - if(selected == 19){ - render_subtitle(img, more2, text_size, len_string_more1 * space + morespace, y_offset6, 1); - } - else{ - render_subtitle(img, more2, text_size, len_string_more1 * space + morespace, y_offset6, color); - } - if(selected == 20){ - render_subtitle(img, more3, text_size, len_string_more1 * space + len_string_more2 * space + morespace * 2, y_offset6, 1); - } - else{ - render_subtitle(img, more3, text_size, len_string_more1 * space + len_string_more2 * space + morespace * 2, y_offset6, color); - } - if(selected == 21){ - render_subtitle(img, more4, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + morespace * 3, y_offset6, 1); - } - else{ - render_subtitle(img, more4, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + morespace * 3, y_offset6, color); - } - if(selected == 22){ - render_subtitle(img, more5, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + morespace * 4, y_offset6, 1); - } - else{ - render_subtitle(img, more5, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + morespace * 4, y_offset6, color); - } - if(selected == 23){ - render_subtitle(img, more6, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + morespace * 5, y_offset6, 1); - } - else{ - render_subtitle(img, more6, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + morespace * 5, y_offset6, color); - } - if(selected == 24){ - render_subtitle(img, more7, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + len_string_more6 * space + morespace * 6, y_offset6, 1); - } - else{ - render_subtitle(img, more7, text_size, len_string_more1 * space + len_string_more2 * space + len_string_more3 * space + len_string_more4 * space + len_string_more5 * space + len_string_more6 * space + morespace * 6, y_offset6, color); - } - } - //graphics_update_displayed_resource(img, 0, 0, 0, 0); - } - } - uint32_t y_offset = 460; - render_subtitle(img, vumeter, text_size, 0, y_offset, 5); - graphics_update_displayed_resource(img, 0, 0, 0, 0); - usleep(10000); - } - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); - graphics_delete_resource(img); - return 0; -} - diff --git a/vc/src/hello_pi/hello_interface/main.c! b/vc/src/hello_pi/hello_interface/main.c! @@ -1,132 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Test app for VG font library. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" -#include "vgfont.h" - -static const char *strnchr(const char *str, size_t len, char c) -{ - const char *e = str + len; - do { - if (*str == c) { - return str; - } - } while (++str < e); - return NULL; -} - -int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const int skip, const uint32_t text_size, const uint32_t y_offset) -{ - uint32_t text_length = strlen(text)-skip; - uint32_t width=0, height=0; - const char *split = text; - int32_t s=0; - int len = 0; // length of pre-subtitle - uint32_t img_w, img_h; - - graphics_get_resource_size(img, &img_w, &img_h); - - if (text_length==0) - return 0; - while (split[0]) { - s = graphics_resource_text_dimensions_ext(img, split, text_length-(split-text), &width, &height, text_size); - if (s != 0) return s; - if (width > img_w) { - const char *space = strnchr(split, text_length-(split-text), ' '); - if (!space) { - len = split+1-text; - split = split+1; - } else { - len = space-text; - split = space+1; - } - } else { - break; - } - } - // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line - if (width) { - s = graphics_resource_render_text_ext(img, (img_w - width)>>1, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0xff,0xff,0xff,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0x80), /* bg */ - split, text_length-(split-text), text_size); - if (s!=0) return s; - } - return render_subtitle(img, text, skip+text_length-len, text_size, y_offset - height); -} - -int main(void) -{ - GRAPHICS_RESOURCE_HANDLE img; - uint32_t width, height; - int LAYER=1; - bcm_host_init(); - int s; - - s = gx_graphics_init("."); - assert(s == 0); - - s = graphics_get_display_size(0, &width, &height); - assert(s == 0); - - s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); - assert(s == 0); - - // transparent before display to avoid screen flash - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); - - uint32_t text_size = 10; - while (1) { - const char *text = "Never give up on your dreams"; - uint32_t y_offset = height-60+text_size/2; - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - // blue, at the top (y=40) - graphics_resource_fill(img, 0, 50, width, 100, GRAPHICS_RGBA32(0,0,0xff,0xff)); - - // draw the subtitle text - render_subtitle(img, text, 0, text_size, y_offset); - graphics_update_displayed_resource(img, 0, 0, 0, 0); - } - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); - graphics_delete_resource(img); - - return 0; -} - diff --git a/vc/src/hello_pi/hello_interface/main.c.old b/vc/src/hello_pi/hello_interface/main.c.old @@ -1,138 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Test app for VG font library. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" -#include "vgfont.h" - -static const char *strnchr(const char *str, size_t len, char c) -{ - const char *e = str + len; - do { - if (*str == c) { - return str; - } - } while (++str < e); - return NULL; -} - -int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const int skip, const uint32_t text_size, const uint32_t y_offset) -{ - uint32_t text_length = strlen(text)-skip; - uint32_t width=0, height=0; - const char *split = text; - int32_t s=0; - int len = 0; // length of pre-subtitle - uint32_t img_w, img_h; - - graphics_get_resource_size(img, &img_w, &img_h); - - if (text_length==0) - return 0; - while (split[0]) { - s = graphics_resource_text_dimensions_ext(img, split, text_length-(split-text), &width, &height, text_size); - if (s != 0) return s; - if (width > img_w) { - const char *space = strnchr(split, text_length-(split-text), ' '); - if (!space) { - len = split+1-text; - split = split+1; - } else { - len = space-text; - split = space+1; - } - } else { - break; - } - } - // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line - if (width) { - s = graphics_resource_render_text_ext(img, (img_w - width)>>1, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0xff,0xff,0xff,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0x80), /* bg */ - split, text_length-(split-text), text_size); - if (s!=0) return s; - } - return render_subtitle(img, text, skip+text_length-len, text_size, y_offset - height); -} - -int main(void) -{ - GRAPHICS_RESOURCE_HANDLE img; - uint32_t width, height; - int LAYER=1; - bcm_host_init(); - int s; - - s = gx_graphics_init("."); - assert(s == 0); - - s = graphics_get_display_size(0, &width, &height); - assert(s == 0); - - s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); - assert(s == 0); - - // transparent before display to avoid screen flash - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); - - uint32_t text_size = 10; - while (1) { - const char *text = "Never give up on your dreams"; - uint32_t y_offset = height-60+text_size/2; - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - // blue, at the top (y=40) - graphics_resource_fill(img, 0, 40, width, 10, GRAPHICS_RGBA32(0,0,0xff,0xff)); - - // green, at the bottom (y=height-40) - graphics_resource_fill(img, 0, height-40, width, 1, GRAPHICS_RGBA32(0,0xff,0,0xff)); - - // draw the subtitle text - render_subtitle(img, text, 0, text_size, y_offset); - graphics_update_displayed_resource(img, 0, 0, 0, 0); - text_size += 1; - if (text_size > 50) - text_size = 10; - } - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); - graphics_delete_resource(img); - - return 0; -} - diff --git a/vc/src/hello_pi/hello_interface/mainold.c b/vc/src/hello_pi/hello_interface/mainold.c @@ -1,170 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Test app for VG font library. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" -#include "vgfont.h" - -int32_t render_subtitle(GRAPHICS_RESOURCE_HANDLE img, const char *text, const uint32_t text_size, const uint32_t y_offset, uint32_t fontcolor) -{ - uint32_t height=0; - uint32_t img_w, img_h; - - graphics_get_resource_size(img, &img_w, &img_h); - - // split now points to last line of text. split-text = length of initial text. text_length-(split-text) is length of last line - if (fontcolor == 5) { - graphics_resource_render_text_ext(img, 0, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(100,150,150,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 4) { - graphics_resource_render_text_ext(img, 11, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(100,150,150,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 3) { - graphics_resource_render_text_ext(img, 0, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(100,150,150,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 2) { - graphics_resource_render_text_ext(img, 0, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(100,150,150,0xff), /* fg */ - GRAPHICS_RGBA32(0,0,0,0xff), /* bg */ - text, 74, text_size); - } - if (fontcolor == 1) { - graphics_resource_render_text_ext(img, 0, y_offset-height, - GRAPHICS_RESOURCE_WIDTH, - GRAPHICS_RESOURCE_HEIGHT, - GRAPHICS_RGBA32(0,0,0,0xff), /* fg */ - GRAPHICS_RGBA32(100,150,150,0xff), /* bg */ - text, 74, text_size); - } - return 0; - } - -int main(void) -{ - GRAPHICS_RESOURCE_HANDLE img; - uint32_t width, height; - int LAYER=1; - bcm_host_init(); - int s; - - s = gx_graphics_init("."); - assert(s == 0); - - s = graphics_get_display_size(0, &width, &height); - assert(s == 0); - - s = gx_create_window(0, width, height, GRAPHICS_RESOURCE_RGBA32, &img); - assert(s == 0); - - // transparent before display to avoid screen flash - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 1); - - uint32_t text_size = 20; - char text[74]; - char text2[74]; - char text3[74]; - char text4[74]; - char text5[74]; - char text6[74]; - graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); - while (1) { - // char ch; - FILE *fp; - fp = fopen("/dev/shm/vumeter","r"); - while(fgets(text, 74, fp) != NULL); - fclose(fp); - FILE *fp2; - fp2 = fopen("/dev/shm/interface","r"); - fgets(text2, 73, fp2); - fgets(text3, 73, fp2); - fgets(text4, 73, fp2); - fgets(text5, 73, fp2); - fgets(text6, 73, fp2); - fclose(fp2); - //FILE *fp3; - //fp3 = fopen("interface.txt","r"); - //while(fgets(text3, 57, fp3) != NULL); - //fclose(fp3); - //const char *text = "Never give up on your dreams"; - uint32_t y_offset = 460; - uint32_t y_offset2 = 0; - uint32_t y_offset3 = 20; - uint32_t y_offset4 = 40; - uint32_t y_offset5 = 420; - uint32_t y_offset6 = 440; - // graphics_resource_fill(img, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0x00)); - // blue, at the top (y=40) - - // draw the text if updated - render_subtitle(img, text, text_size, y_offset, 4); - render_subtitle(img, text2, text_size, y_offset2, 3); - render_subtitle(img, text3, text_size, y_offset3, 5); - render_subtitle(img, text4, text_size, y_offset4, 2); - if(text5[1] == ' ' ) { - render_subtitle(img, text5, text_size, y_offset5, 2); - render_subtitle(img, text6, text_size, y_offset6, 2); - } - if(text5[1] != ' ' ) { - render_subtitle(img, text5, text_size, y_offset5, 2); - render_subtitle(img, text6, text_size, y_offset6, 1); - } - graphics_update_displayed_resource(img, 0, 0, 0, 0); - usleep(100000); - } - - graphics_display_resource(img, 0, LAYER, 0, 0, GRAPHICS_RESOURCE_WIDTH, GRAPHICS_RESOURCE_HEIGHT, VC_DISPMAN_ROT0, 0); - graphics_delete_resource(img); - - return 0; -} - diff --git a/vc/src/hello_pi/hello_interface/unifont-8.0.01.ttf b/vc/src/hello_pi/hello_interface/unifont-8.0.01.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/unifont.ttf b/vc/src/hello_pi/hello_interface/unifont.ttf Binary files differ. diff --git a/vc/src/hello_pi/hello_interface/vumeter.txt b/vc/src/hello_pi/hello_interface/vumeter.txt @@ -1 +0,0 @@ -##+ | 03%- \ No newline at end of file diff --git a/vc/src/hello_pi/hello_jpeg/Makefile b/vc/src/hello_pi/hello_jpeg/Makefile @@ -1,6 +0,0 @@ -OBJS=jpeg.o -BIN=hello_jpeg.bin -LDFLAGS+=-lilclient - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_jpeg/hello_jpeg.bin b/vc/src/hello_pi/hello_jpeg/hello_jpeg.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_jpeg/jpeg.c b/vc/src/hello_pi/hello_jpeg/jpeg.c @@ -1,696 +0,0 @@ -/* -Copyright (c) 2012, Matt Ownby - Anthong Sale - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <stdio.h> -#include <assert.h> -#include "jpeg.h" - -#define TIMEOUT_MS 2000 - -typedef struct _COMPONENT_DETAILS { - COMPONENT_T *component; - OMX_HANDLETYPE handle; - int inPort; - int outPort; -} COMPONENT_DETAILS; - -struct _OPENMAX_JPEG_DECODER { - ILCLIENT_T *client; - COMPONENT_DETAILS *imageDecoder; - COMPONENT_DETAILS *imageResizer; - OMX_BUFFERHEADERTYPE **ppInputBufferHeader; - int inputBufferHeaderCount; - OMX_BUFFERHEADERTYPE *pOutputBufferHeader; -}; - -int bufferIndex = 0; // index to buffer array - -int -portSettingsChanged(OPENMAX_JPEG_DECODER * decoder) -{ - OMX_PARAM_PORTDEFINITIONTYPE portdef; - - // need to setup the input for the resizer with the output of the - // decoder - portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = decoder->imageDecoder->outPort; - OMX_GetParameter(decoder->imageDecoder->handle, - OMX_IndexParamPortDefinition, &portdef); - - unsigned int uWidth = - (unsigned int) portdef.format.image.nFrameWidth; - unsigned int uHeight = - (unsigned int) portdef.format.image.nFrameHeight; - - // tell resizer input what the decoder output will be providing - portdef.nPortIndex = decoder->imageResizer->inPort; - OMX_SetParameter(decoder->imageResizer->handle, - OMX_IndexParamPortDefinition, &portdef); - - // establish tunnel between decoder output and resizer input - OMX_SetupTunnel(decoder->imageDecoder->handle, - decoder->imageDecoder->outPort, - decoder->imageResizer->handle, - decoder->imageResizer->inPort); - - // enable ports - OMX_SendCommand(decoder->imageDecoder->handle, - OMX_CommandPortEnable, - decoder->imageDecoder->outPort, NULL); - OMX_SendCommand(decoder->imageResizer->handle, - OMX_CommandPortEnable, - decoder->imageResizer->inPort, NULL); - - // put resizer in idle state (this allows the outport of the decoder - // to become enabled) - OMX_SendCommand(decoder->imageResizer->handle, - OMX_CommandStateSet, OMX_StateIdle, NULL); - - // wait for state change complete - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, - OMX_CommandStateSet, 1, - OMX_StateIdle, 1, 0, TIMEOUT_MS); - - // once the state changes, both ports should become enabled and the - // resizer - // output should generate a settings changed event - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, - OMX_CommandPortEnable, 1, - decoder->imageDecoder->outPort, 1, 0, - TIMEOUT_MS); - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, OMX_CommandPortEnable, 1, - decoder->imageResizer->inPort, 1, 0, - TIMEOUT_MS); - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventPortSettingsChanged, - decoder->imageResizer->outPort, 1, 0, 1, 0, - TIMEOUT_MS); - - ilclient_disable_port(decoder->imageResizer->component, - decoder->imageResizer->outPort); - - // query output buffer requirements for resizer - portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = decoder->imageResizer->outPort; - OMX_GetParameter(decoder->imageResizer->handle, - OMX_IndexParamPortDefinition, &portdef); - - // change output color format and dimensions to match input - portdef.format.image.eCompressionFormat = OMX_IMAGE_CodingUnused; - portdef.format.image.eColorFormat = OMX_COLOR_Format32bitABGR8888; - portdef.format.image.nFrameWidth = uWidth; - portdef.format.image.nFrameHeight = uHeight; - portdef.format.image.nStride = 0; - portdef.format.image.nSliceHeight = 0; - portdef.format.image.bFlagErrorConcealment = OMX_FALSE; - - OMX_SetParameter(decoder->imageResizer->handle, - OMX_IndexParamPortDefinition, &portdef); - - // grab output requirements again to get actual buffer size - // requirement (and buffer count requirement!) - OMX_GetParameter(decoder->imageResizer->handle, - OMX_IndexParamPortDefinition, &portdef); - - // move resizer into executing state - ilclient_change_component_state(decoder->imageResizer->component, - OMX_StateExecuting); - - // show some logging so user knows it's working - printf - ("Width: %u Height: %u Output Color Format: 0x%x Buffer Size: %u\n", - (unsigned int) portdef.format.image.nFrameWidth, - (unsigned int) portdef.format.image.nFrameHeight, - (unsigned int) portdef.format.image.eColorFormat, - (unsigned int) portdef.nBufferSize); - fflush(stdout); - - // enable output port of resizer - OMX_SendCommand(decoder->imageResizer->handle, - OMX_CommandPortEnable, - decoder->imageResizer->outPort, NULL); - - // allocate the buffer - // void* outputBuffer = 0; - // if (posix_memalign(&outputBuffer, portdef.nBufferAlignment, - // portdef.nBufferSize) != 0) - // { - // perror("Allocating output buffer"); - // return OMXJPEG_ERROR_MEMORY; - // } - - // set the buffer - // int ret = OMX_UseBuffer(decoder->imageResizer->handle, - // &decoder->pOutputBufferHeader, - // decoder->imageResizer->outPort, NULL, - // portdef.nBufferSize, - // (OMX_U8 *) outputBuffer); - int ret = OMX_AllocateBuffer(decoder->imageResizer->handle, - &decoder->pOutputBufferHeader, - decoder->imageResizer-> - outPort, - NULL, - portdef.nBufferSize); - if (ret != OMX_ErrorNone) { - perror("Eror allocating buffer"); - fprintf(stderr, "OMX_AllocateBuffer returned 0x%x allocating buffer size 0x%x\n", ret, portdef.nBufferSize); - return OMXJPEG_ERROR_MEMORY; - } - - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, - OMX_CommandPortEnable, 1, - decoder->imageResizer->outPort, 1, 0, - TIMEOUT_MS); - - return OMXJPEG_OK; -} - -int -portSettingsChangedAgain(OPENMAX_JPEG_DECODER * decoder) -{ - ilclient_disable_port(decoder->imageDecoder->component, - decoder->imageDecoder->outPort); - ilclient_disable_port(decoder->imageResizer->component, - decoder->imageResizer->inPort); - - OMX_PARAM_PORTDEFINITIONTYPE portdef; - - // need to setup the input for the resizer with the output of the - // decoder - portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = decoder->imageDecoder->outPort; - OMX_GetParameter(decoder->imageDecoder->handle, - OMX_IndexParamPortDefinition, &portdef); - - // tell resizer input what the decoder output will be providing - portdef.nPortIndex = decoder->imageResizer->inPort; - OMX_SetParameter(decoder->imageResizer->handle, - OMX_IndexParamPortDefinition, &portdef); - - // enable output of decoder and input of resizer (ie enable tunnel) - ilclient_enable_port(decoder->imageDecoder->component, - decoder->imageDecoder->outPort); - ilclient_enable_port(decoder->imageResizer->component, - decoder->imageResizer->inPort); - - // need to wait for this event - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventPortSettingsChanged, - decoder->imageResizer->outPort, 1, - 0, 0, 0, TIMEOUT_MS); - - return OMXJPEG_OK; -} - -int -prepareResizer(OPENMAX_JPEG_DECODER * decoder) -{ - decoder->imageResizer = malloc(sizeof(COMPONENT_DETAILS)); - if (decoder->imageResizer == NULL) { - perror("malloc image resizer"); - return OMXJPEG_ERROR_MEMORY; - } - - int ret = ilclient_create_component(decoder->client, - &decoder-> - imageResizer-> - component, - "resize", - ILCLIENT_DISABLE_ALL_PORTS - | - ILCLIENT_ENABLE_INPUT_BUFFERS - | - ILCLIENT_ENABLE_OUTPUT_BUFFERS); - if (ret != 0) { - perror("image resizer"); - return OMXJPEG_ERROR_CREATING_COMP; - } - // grab the handle for later use - decoder->imageResizer->handle = - ILC_GET_HANDLE(decoder->imageResizer->component); - - // get and store the ports - OMX_PORT_PARAM_TYPE port; - port.nSize = sizeof(OMX_PORT_PARAM_TYPE); - port.nVersion.nVersion = OMX_VERSION; - - OMX_GetParameter(ILC_GET_HANDLE(decoder->imageResizer->component), - OMX_IndexParamImageInit, &port); - if (port.nPorts != 2) { - return OMXJPEG_ERROR_WRONG_NO_PORTS; - } - decoder->imageResizer->inPort = port.nStartPortNumber; - decoder->imageResizer->outPort = port.nStartPortNumber + 1; - - decoder->pOutputBufferHeader = NULL; - - return OMXJPEG_OK; -} - -int -prepareImageDecoder(OPENMAX_JPEG_DECODER * decoder) -{ - decoder->imageDecoder = malloc(sizeof(COMPONENT_DETAILS)); - if (decoder->imageDecoder == NULL) { - perror("malloc image decoder"); - return OMXJPEG_ERROR_MEMORY; - } - - int ret = ilclient_create_component(decoder->client, - &decoder-> - imageDecoder-> - component, - "image_decode", - ILCLIENT_DISABLE_ALL_PORTS - | - ILCLIENT_ENABLE_INPUT_BUFFERS); - - if (ret != 0) { - perror("image decode"); - return OMXJPEG_ERROR_CREATING_COMP; - } - // grab the handle for later use in OMX calls directly - decoder->imageDecoder->handle = - ILC_GET_HANDLE(decoder->imageDecoder->component); - - // get and store the ports - OMX_PORT_PARAM_TYPE port; - port.nSize = sizeof(OMX_PORT_PARAM_TYPE); - port.nVersion.nVersion = OMX_VERSION; - - OMX_GetParameter(decoder->imageDecoder->handle, - OMX_IndexParamImageInit, &port); - if (port.nPorts != 2) { - return OMXJPEG_ERROR_WRONG_NO_PORTS; - } - decoder->imageDecoder->inPort = port.nStartPortNumber; - decoder->imageDecoder->outPort = port.nStartPortNumber + 1; - - return OMXJPEG_OK; -} - -int -startupImageDecoder(OPENMAX_JPEG_DECODER * decoder) -{ - // move to idle - ilclient_change_component_state(decoder->imageDecoder->component, - OMX_StateIdle); - - // set input image format - OMX_IMAGE_PARAM_PORTFORMATTYPE imagePortFormat; - memset(&imagePortFormat, 0, sizeof(OMX_IMAGE_PARAM_PORTFORMATTYPE)); - imagePortFormat.nSize = sizeof(OMX_IMAGE_PARAM_PORTFORMATTYPE); - imagePortFormat.nVersion.nVersion = OMX_VERSION; - imagePortFormat.nPortIndex = decoder->imageDecoder->inPort; - imagePortFormat.eCompressionFormat = OMX_IMAGE_CodingJPEG; - OMX_SetParameter(decoder->imageDecoder->handle, - OMX_IndexParamImagePortFormat, &imagePortFormat); - - // get buffer requirements - OMX_PARAM_PORTDEFINITIONTYPE portdef; - portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = decoder->imageDecoder->inPort; - OMX_GetParameter(decoder->imageDecoder->handle, - OMX_IndexParamPortDefinition, &portdef); - - // enable the port and setup the buffers - OMX_SendCommand(decoder->imageDecoder->handle, - OMX_CommandPortEnable, - decoder->imageDecoder->inPort, NULL); - decoder->inputBufferHeaderCount = portdef.nBufferCountActual; - // allocate pointer array - decoder->ppInputBufferHeader = - (OMX_BUFFERHEADERTYPE **) malloc(sizeof(void) * - decoder->inputBufferHeaderCount); - // allocate each buffer - int i; - for (i = 0; i < decoder->inputBufferHeaderCount; i++) { - if (OMX_AllocateBuffer(decoder->imageDecoder->handle, - &decoder->ppInputBufferHeader[i], - decoder->imageDecoder->inPort, - (void *) i, - portdef.nBufferSize) != OMX_ErrorNone) { - perror("Allocate decode buffer"); - return OMXJPEG_ERROR_MEMORY; - } - } - // wait for port enable to complete - which it should once buffers are - // assigned - int ret = - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, - OMX_CommandPortEnable, 0, - decoder->imageDecoder->inPort, 0, - 0, TIMEOUT_MS); - if (ret != 0) { - fprintf(stderr, "Did not get port enable %d\n", ret); - return OMXJPEG_ERROR_EXECUTING; - } - // start executing the decoder - ret = OMX_SendCommand(decoder->imageDecoder->handle, - OMX_CommandStateSet, OMX_StateExecuting, NULL); - if (ret != 0) { - fprintf(stderr, "Error starting image decoder %x\n", ret); - return OMXJPEG_ERROR_EXECUTING; - } - ret = ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, - OMX_StateExecuting, 0, 0, 1, 0, - TIMEOUT_MS); - if (ret != 0) { - fprintf(stderr, "Did not receive executing stat %d\n", ret); - // return OMXJPEG_ERROR_EXECUTING; - } - - return OMXJPEG_OK; -} - -// this function run the boilerplate to setup the openmax components; -int -setupOpenMaxJpegDecoder(OPENMAX_JPEG_DECODER ** pDecoder) -{ - *pDecoder = malloc(sizeof(OPENMAX_JPEG_DECODER)); - if (pDecoder[0] == NULL) { - perror("malloc decoder"); - return OMXJPEG_ERROR_MEMORY; - } - memset(*pDecoder, 0, sizeof(OPENMAX_JPEG_DECODER)); - - if ((pDecoder[0]->client = ilclient_init()) == NULL) { - perror("ilclient_init"); - return OMXJPEG_ERROR_ILCLIENT_INIT; - } - - if (OMX_Init() != OMX_ErrorNone) { - ilclient_destroy(pDecoder[0]->client); - perror("OMX_Init"); - return OMXJPEG_ERROR_OMX_INIT; - } - // prepare the image decoder - int ret = prepareImageDecoder(pDecoder[0]); - if (ret != OMXJPEG_OK) - return ret; - - ret = prepareResizer(pDecoder[0]); - if (ret != OMXJPEG_OK) - return ret; - - ret = startupImageDecoder(pDecoder[0]); - if (ret != OMXJPEG_OK) - return ret; - - return OMXJPEG_OK; -} - -// this function passed the jpeg image buffer in, and returns the decoded -// image -int -decodeImage(OPENMAX_JPEG_DECODER * decoder, char *sourceImage, - size_t imageSize) -{ - char *sourceOffset = sourceImage; // we store a seperate - // buffer ot image so we - // can offset it - size_t toread = 0; // bytes left to read from buffer - toread += imageSize; - int bFilled = 0; // have we filled our output - // buffer - bufferIndex = 0; - - while (toread > 0) { - // get next buffer from array - OMX_BUFFERHEADERTYPE *pBufHeader = - decoder->ppInputBufferHeader[bufferIndex]; - - // step index and reset to 0 if required - bufferIndex++; - if (bufferIndex >= decoder->inputBufferHeaderCount) - bufferIndex = 0; - - // work out the next chunk to load into the decoder - if (toread > pBufHeader->nAllocLen) - pBufHeader->nFilledLen = pBufHeader->nAllocLen; - else - pBufHeader->nFilledLen = toread; - - toread = toread - pBufHeader->nFilledLen; - - // pass the bytes to the buffer - memcpy(pBufHeader->pBuffer, sourceOffset, pBufHeader->nFilledLen); - - // update the buffer pointer and set the input flags - - sourceOffset = sourceOffset + pBufHeader->nFilledLen; - pBufHeader->nOffset = 0; - pBufHeader->nFlags = 0; - if (toread <= 0) { - pBufHeader->nFlags = OMX_BUFFERFLAG_EOS; - } - // empty the current buffer - int ret = - OMX_EmptyThisBuffer(decoder->imageDecoder->handle, - pBufHeader); - - if (ret != OMX_ErrorNone) { - perror("Empty input buffer"); - fprintf(stderr, "return code %x\n", ret); - return OMXJPEG_ERROR_MEMORY; - } - // wait for buffer to empty or port changed event - int done = 0; - while ((done == 0) && (decoder->pOutputBufferHeader == NULL)) { - if (decoder->pOutputBufferHeader == NULL) { - ret = - ilclient_wait_for_event - (decoder->imageDecoder->component, - OMX_EventPortSettingsChanged, - decoder->imageDecoder->outPort, 0, 0, 1, 0, 5); - - if (ret == 0) { - ret = portSettingsChanged(decoder); - if (ret != OMXJPEG_OK) - return ret; - } - } else { - ret = - ilclient_remove_event(decoder->imageDecoder->component, - OMX_EventPortSettingsChanged, - decoder->imageDecoder->outPort, - 0, 0, 1); - if (ret == 0) - portSettingsChangedAgain(decoder); - - } - - // check to see if buffer is now empty - if (pBufHeader->nFilledLen == 0) - done = 1; - - if ((done == 0) - || (decoder->pOutputBufferHeader == NULL)) - sleep(1); - } - - // fill the buffer if we have created the buffer - if ((bFilled == 0) && (decoder->pOutputBufferHeader != NULL)) { - ret = OMX_FillThisBuffer(decoder->imageResizer->handle, - decoder->pOutputBufferHeader); - if (ret != OMX_ErrorNone) { - perror("Filling output buffer"); - fprintf(stderr, "Error code %x\n", ret); - return OMXJPEG_ERROR_MEMORY; - } - - bFilled = 1; - } - } - - // wait for buffer to fill - /* - * while(pBufHeader->nFilledLen == 0) { sleep(5); } - */ - - // wait for end of stream events - int ret = - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventBufferFlag, - decoder->imageDecoder->outPort, 1, - OMX_BUFFERFLAG_EOS, 1, - 0, 2); - if (ret != 0) { - fprintf(stderr, "No EOS event on image decoder %d\n", ret); - } - ret = ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventBufferFlag, - decoder->imageResizer->outPort, 1, - OMX_BUFFERFLAG_EOS, 1, 0, 2); - if (ret != 0) { - fprintf(stderr, "No EOS event on image resizer %d\n", ret); - } - return OMXJPEG_OK; -} - -// this function cleans up the decoder. -void -cleanup(OPENMAX_JPEG_DECODER * decoder) -{ - // flush everything through - OMX_SendCommand(decoder->imageDecoder->handle, - OMX_CommandFlush, decoder->imageDecoder->outPort, - NULL); - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, OMX_CommandFlush, 0, - decoder->imageDecoder->outPort, 0, 0, - TIMEOUT_MS); - OMX_SendCommand(decoder->imageResizer->handle, OMX_CommandFlush, - decoder->imageResizer->inPort, NULL); - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, OMX_CommandFlush, 0, - decoder->imageResizer->inPort, 1, 0, - TIMEOUT_MS); - - OMX_SendCommand(decoder->imageDecoder->handle, OMX_CommandPortDisable, - decoder->imageDecoder->inPort, NULL); - - int i = 0; - for (i = 0; i < decoder->inputBufferHeaderCount; i++) { - OMX_BUFFERHEADERTYPE *vpBufHeader = - decoder->ppInputBufferHeader[i]; - - OMX_FreeBuffer(decoder->imageDecoder->handle, - decoder->imageDecoder->inPort, vpBufHeader); - } - - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, OMX_CommandPortDisable, - 0, decoder->imageDecoder->inPort, 0, 0, - TIMEOUT_MS); - - OMX_SendCommand(decoder->imageResizer->handle, OMX_CommandPortDisable, - decoder->imageResizer->outPort, NULL); - - OMX_FreeBuffer(decoder->imageResizer->handle, - decoder->imageResizer->outPort, - decoder->pOutputBufferHeader); - - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, OMX_CommandPortDisable, - 0, decoder->imageResizer->outPort, 0, 0, - TIMEOUT_MS); - - OMX_SendCommand(decoder->imageDecoder->handle, OMX_CommandPortDisable, - decoder->imageDecoder->outPort, NULL); - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, OMX_CommandPortDisable, - 0, decoder->imageDecoder->outPort, 0, 0, - TIMEOUT_MS); - - OMX_SendCommand(decoder->imageResizer->handle, OMX_CommandPortDisable, - decoder->imageResizer->inPort, NULL); - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, OMX_CommandPortDisable, - 0, decoder->imageResizer->inPort, 0, 0, - TIMEOUT_MS); - - OMX_SetupTunnel(decoder->imageDecoder->handle, - decoder->imageDecoder->outPort, NULL, 0); - OMX_SetupTunnel(decoder->imageResizer->handle, - decoder->imageResizer->inPort, NULL, 0); - - ilclient_change_component_state(decoder->imageDecoder->component, - OMX_StateIdle); - ilclient_change_component_state(decoder->imageResizer->component, - OMX_StateIdle); - - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, OMX_CommandStateSet, 0, - OMX_StateIdle, 0, 0, TIMEOUT_MS); - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, OMX_CommandStateSet, 0, - OMX_StateIdle, 0, 0, TIMEOUT_MS); - - ilclient_change_component_state(decoder->imageDecoder->component, - OMX_StateLoaded); - ilclient_change_component_state(decoder->imageResizer->component, - OMX_StateLoaded); - - ilclient_wait_for_event(decoder->imageDecoder->component, - OMX_EventCmdComplete, OMX_CommandStateSet, 0, - OMX_StateLoaded, 0, 0, TIMEOUT_MS); - ilclient_wait_for_event(decoder->imageResizer->component, - OMX_EventCmdComplete, OMX_CommandStateSet, 0, - OMX_StateLoaded, 0, 0, TIMEOUT_MS); - - OMX_Deinit(); - - if (decoder->client != NULL) { - ilclient_destroy(decoder->client); - } -} - -int -main(int argc, char *argv[]) -{ - OPENMAX_JPEG_DECODER *pDecoder; - char *sourceImage; - size_t imageSize; - int s; - if (argc < 2) { - printf("Usage: %s <filename>\n", argv[0]); - return -1; - } - FILE *fp = fopen(argv[1], "rb"); - if (!fp) { - printf("File %s not found.\n", argv[1]); - } - fseek(fp, 0L, SEEK_END); - imageSize = ftell(fp); - fseek(fp, 0L, SEEK_SET); - sourceImage = malloc(imageSize); - assert(sourceImage != NULL); - s = fread(sourceImage, 1, imageSize, fp); - assert(s == imageSize); - fclose(fp); - bcm_host_init(); - s = setupOpenMaxJpegDecoder(&pDecoder); - assert(s == 0); - s = decodeImage(pDecoder, sourceImage, imageSize); - assert(s == 0); - cleanup(pDecoder); - free(sourceImage); - return 0; -} diff --git a/vc/src/hello_pi/hello_jpeg/jpeg.h b/vc/src/hello_pi/hello_jpeg/jpeg.h @@ -1,68 +0,0 @@ -/* -Copyright (c) 2012, Matt Ownby - Anthong Sale - -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef _OPTION_H_ -#define _OPTION_H_ - -/* -Defines the methods for interacting with openmax il and ilclient to decode -jpeg images from the camera -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <errno.h> - -#include "bcm_host.h" -#include "ilclient.h" - -#define OMXJPEG_OK 0 -#define OMXJPEG_ERROR_ILCLIENT_INIT -1024 -#define OMXJPEG_ERROR_OMX_INIT -1025 -#define OMXJPEG_ERROR_MEMORY -1026 -#define OMXJPEG_ERROR_CREATING_COMP -1027 -#define OMXJPEG_ERROR_WRONG_NO_PORTS -1028 -#define OMXJPEG_ERROR_EXECUTING -1029 -#define OMXJPEG_ERROR_NOSETTINGS -1030 - -typedef struct _OPENMAX_JPEG_DECODER OPENMAX_JPEG_DECODER; - -//this function run the boilerplate to setup the openmax components; -int setupOpenMaxJpegDecoder(OPENMAX_JPEG_DECODER** decoder); - -//this function passed the jpeg image buffer in, and returns the decoded image -int decodeImage(OPENMAX_JPEG_DECODER* decoder, - char* sourceImage, size_t imageSize); - -//this function cleans up the decoder. -void cleanup(OPENMAX_JPEG_DECODER* decoder); - -#endif - diff --git a/vc/src/hello_pi/hello_teapot/Makefile b/vc/src/hello_pi/hello_teapot/Makefile @@ -1,7 +0,0 @@ -OBJS=triangle.o video.o models.o -BIN=hello_teapot.bin -LDFLAGS+=-lilclient - -include ../Makefile.include - - diff --git a/vc/src/hello_pi/hello_teapot/README.md b/vc/src/hello_pi/hello_teapot/README.md @@ -1,4 +0,0 @@ -hello_videocube -=============== - -Sample for Raspberry Pi that uses egl_render to display video on an animated cube.- \ No newline at end of file diff --git a/vc/src/hello_pi/hello_teapot/cube_texture_and_coords.h b/vc/src/hello_pi/hello_teapot/cube_texture_and_coords.h @@ -1,100 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Spatial coordinates for the cube - -static const GLbyte quadx[6*4*3] = { - /* FRONT */ - -10, -10, 10, - 10, -10, 10, - -10, 10, 10, - 10, 10, 10, - - /* BACK */ - -10, -10, -10, - -10, 10, -10, - 10, -10, -10, - 10, 10, -10, - - /* LEFT */ - -10, -10, 10, - -10, 10, 10, - -10, -10, -10, - -10, 10, -10, - - /* RIGHT */ - 10, -10, -10, - 10, 10, -10, - 10, -10, 10, - 10, 10, 10, - - /* TOP */ - -10, 10, 10, - 10, 10, 10, - -10, 10, -10, - 10, 10, -10, - - /* BOTTOM */ - -10, -10, 10, - -10, -10, -10, - 10, -10, 10, - 10, -10, -10, -}; - -/** Texture coordinates for the quad. */ -static const GLfloat texCoords[6 * 4 * 2] = { - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f -}; - diff --git a/vc/src/hello_pi/hello_teapot/hello_teapot.bin b/vc/src/hello_pi/hello_teapot/hello_teapot.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_teapot/models.c b/vc/src/hello_pi/hello_teapot/models.c @@ -1,515 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <math.h> -#include <stdio.h> -#include <stdint.h> - -#include "GLES/gl.h" -#include "EGL/egl.h" -#include "EGL/eglext.h" -#include "models.h" - -#define VMCS_RESOURCE(a,b) (b) - -/****************************************************************************** -Private typedefs, macros and constants -******************************************************************************/ - -enum {VBO_VERTEX, VBO_NORMAL, VBO_TEXTURE, VBO_MAX}; -#define MAX_MATERIALS 4 -#define MAX_MATERIAL_NAME 32 - -typedef struct wavefront_material_s { - GLuint vbo[VBO_MAX]; - int numverts; - char name[MAX_MATERIAL_NAME]; - GLuint texture; -} WAVEFRONT_MATERIAL_T; - -typedef struct wavefront_model_s { - WAVEFRONT_MATERIAL_T material[MAX_MATERIALS]; - int num_materials; - GLuint texture; -} WAVEFRONT_MODEL_T; - - -/****************************************************************************** -Static Data -******************************************************************************/ - -/****************************************************************************** -Static Function Declarations -******************************************************************************/ - -/****************************************************************************** -Static Function Definitions -******************************************************************************/ - -static void create_vbo(GLenum type, GLuint *vbo, int size, void *data) -{ - glGenBuffers(1, vbo); - vc_assert(*vbo); - glBindBuffer(type, *vbo); - glBufferData(type, size, data, GL_STATIC_DRAW); - glBindBuffer(type, 0); -} - - -static void destroy_vbo(GLuint *vbo) -{ - glDeleteBuffers(1, vbo); - *vbo = 0; -} - -#define MAX_VERTICES 100000 -static void *allocbuffer(int size) -{ - return malloc(size); -} - -static void freebuffer(void *p) -{ - free (p); -} - -static void centre_and_rescale(float *verts, int numvertices) -{ - float cx=0.0f, cy=0.0f, cz=0.0f, scale=0.0f; - float minx=0.0f, miny=0.0f, minz=0.0f; - float maxx=0.0f, maxy=0.0f, maxz=0.0f; - int i; - float *v = verts; - minx = maxx = verts[0]; - miny = maxy = verts[1]; - minz = maxz = verts[2]; - for (i=0; i<numvertices; i++) { - float x = *v++; - float y = *v++; - float z = *v++; - minx = vcos_min(minx, x); - miny = vcos_min(miny, y); - minz = vcos_min(minz, z); - maxx = vcos_max(maxx, x); - maxy = vcos_max(maxy, y); - maxz = vcos_max(maxz, z); - cx += x; - cy += y; - cz += z; - } - cx /= (float)numvertices; - cy /= (float)numvertices; - cz /= (float)numvertices; - scale = 3.0f / (maxx-minx + maxy-miny + maxz-minz); - v = verts; - for (i=0; i<numvertices; i++) { - *v = (*v-cx) * scale; v++; - *v = (*v-cy) * scale; v++; - *v = (*v-cz) * scale; v++; - } -} - -static void renormalise(float *verts, int numvertices) -{ - int i; - float *v = verts; - for (i=0;i<numvertices; i++) { - float x = v[0]; - float y = v[1]; - float z = v[2]; - float scale = 1.0f/sqrtf(x*x + y*y + z*z); - *v++ = x * scale; - *v++ = y * scale; - *v++ = z * scale; - } -} - -static void deindex(float *dst, const float *src, const unsigned short *indexes, GLsizei size, GLsizei count) -{ - int i; - for (i=0; i<count; i++) { - int ind = size * (indexes[0]-1); - *dst++ = src[ind + 0]; - *dst++ = src[ind + 1]; - // todo: optimise - move out of loop - if (size >= 3) *dst++ = src[ind + 2]; - indexes += 3; - } -} - -int draw_wavefront(MODEL_T m, GLuint texture) -{ - int i; - WAVEFRONT_MODEL_T *model = (WAVEFRONT_MODEL_T *)m; - - for (i=0; i<model->num_materials; i++) { - WAVEFRONT_MATERIAL_T *mat = model->material + i; - if (mat->texture == -1) continue; - glBindTexture(GL_TEXTURE_2D, mat->texture ? mat->texture:texture); - if (mat->vbo[VBO_VERTEX]) { - glBindBuffer(GL_ARRAY_BUFFER, mat->vbo[VBO_VERTEX]); - glVertexPointer(3, GL_FLOAT, 0, NULL); - } - if (mat->vbo[VBO_NORMAL]) { - glEnableClientState(GL_NORMAL_ARRAY); - glBindBuffer(GL_ARRAY_BUFFER, mat->vbo[VBO_NORMAL]); - glNormalPointer(GL_FLOAT, 0, NULL); - } else { - glDisableClientState(GL_NORMAL_ARRAY); - } - if (mat->vbo[VBO_TEXTURE]) { - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glBindBuffer(GL_ARRAY_BUFFER, mat->vbo[VBO_TEXTURE]); - glTexCoordPointer(2, GL_FLOAT, 0, NULL); - } else { - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - } - glDrawArrays(GL_TRIANGLES, 0, mat->numverts); - } - glBindBuffer(GL_ARRAY_BUFFER, 0); - return 0; -} - -struct wavefront_model_loading_s { - unsigned short material_index[MAX_MATERIALS]; - int num_materials; - int numv, numt, numn, numf; - unsigned int data[0]; -}; - -static int load_wavefront_obj(const char *modelname, WAVEFRONT_MODEL_T *model, struct wavefront_model_loading_s *m) -{ - char line[256+1]; - unsigned short pp[54+1]; - FILE *fp; - int i, valid; - float *qv = (float *)m->data; - float *qt = (float *)m->data + 3 * MAX_VERTICES; - float *qn = (float *)m->data + (3+2) * MAX_VERTICES; - unsigned short *qf = (unsigned short *)((float *)m->data + (3+2+3) * MAX_VERTICES); - float *pv = qv, *pt = qt, *pn = qn; - unsigned short *pf = qf; - fp = fopen(modelname, "r"); - if (!fp) return -1; - - m->num_materials = 0; - m->material_index[0] = 0; - - valid = fread(line, 1, sizeof(line)-1, fp); - - while (valid > 0) { - char *s, *end = line; - - while((end-line < valid) && *end != '\n' && *end != '\r') - end++; - *end++ = 0; - - if((end-line < valid) && *end != '\n' && *end != '\r') - *end++ = 0; - - s = line; - - if (s[strlen(s)-1] == 10) s[strlen(s)-1]=0; - switch (s[0]) { - case '#': break; // comment - case '\r': case '\n': case '\0': break; // blank line - case 'm': vc_assert(strncmp(s, "mtllib", sizeof "mtllib"-1)==0); break; - case 'o': break; - case 'u': - if (sscanf(s, "usemtl %s", /*MAX_MATERIAL_NAME-1, */model->material[m->num_materials].name) == 1) { - if (m->num_materials < MAX_MATERIALS) { - if (m->num_materials > 0 && ((pf-qf)/3 == m->material_index[m->num_materials-1] || strcmp(model->material[m->num_materials-1].name, model->material[m->num_materials].name)==0)) { - strcpy(model->material[m->num_materials-1].name, model->material[m->num_materials].name); - m->num_materials--; - } else - m->material_index[m->num_materials] = (pf-qf)/3; - m->num_materials++; - } - } else { printf(s); vc_assert(0); } - break; - case 'g': vc_assert(strncmp(s, "g ", sizeof "g "-1)==0); break; - case 's': vc_assert(strncmp(s, "s ", sizeof "s "-1)==0); break; - case 'v': case 'f': - if (sscanf(s, "v %f %f %f", pv+0, pv+1, pv+2) == 3) { - pv += 3; - } else if (sscanf(s, "vt %f %f", pt+0, pt+1) == 2) { - pt += 2; - } else if (sscanf(s, "vn %f %f %f", pn+0, pn+1, pn+2) == 3) { - pn += 3; - } else if (i = sscanf(s, "f"" %hu//%hu %hu//%hu %hu//%hu %hu//%hu %hu//%hu %hu//%hu" - " %hu//%hu %hu//%hu %hu//%hu %hu//%hu %hu//%hu %hu//%hu" - " %hu//%hu %hu//%hu %hu//%hu %hu//%hu %hu//%hu %hu//%hu %hu", - pp+ 0, pp+ 1, pp+ 2, pp+ 3, pp+ 4, pp+ 5, pp+ 6, pp+ 7, pp+ 8, pp+ 9, pp+10, pp+11, - pp+12, pp+13, pp+14, pp+15, pp+16, pp+17, pp+18, pp+19, pp+20, pp+21, pp+22, pp+23, - pp+24, pp+25, pp+26, pp+27, pp+28, pp+29, pp+30, pp+32, pp+32, pp+33, pp+34, pp+35, pp+36), i >= 6) { - int poly = i/2; - //vc_assert(i < countof(pp)); // may need to increment poly count and pp array - for (i=1; i<poly-1; i++) { - *pf++ = pp[0]; *pf++ = 0; *pf++ = pp[1]; - *pf++ = pp[2*i+0]; *pf++ = 0; *pf++ = pp[2*i+1]; - *pf++ = pp[2*(i+1)+0]; *pf++ = 0; *pf++ = pp[2*(i+1)+1]; - } - } else if (i = sscanf(s, "f"" %hu/%hu %hu/%hu %hu/%hu %hu/%hu %hu/%hu %hu/%hu" - " %hu/%hu %hu/%hu %hu/%hu %hu/%hu %hu/%hu %hu/%hu" - " %hu/%hu %hu/%hu %hu/%hu %hu/%hu %hu/%hu %hu/%hu %hu", - pp+ 0, pp+ 1, pp+ 2, pp+ 3, pp+ 4, pp+ 5, pp+ 6, pp+ 7, pp+ 8, pp+ 9, pp+10, pp+11, - pp+12, pp+13, pp+14, pp+15, pp+16, pp+17, pp+18, pp+19, pp+20, pp+21, pp+22, pp+23, - pp+24, pp+25, pp+26, pp+27, pp+28, pp+29, pp+30, pp+32, pp+32, pp+33, pp+34, pp+35, pp+36), i >= 6) { - int poly = i/2; - //vc_assert(i < countof(pp); // may need to increment poly count and pp array - for (i=1; i<poly-1; i++) { - *pf++ = pp[0]; *pf++ = pp[1]; *pf++ = 0; - *pf++ = pp[2*i+0]; *pf++ = pp[2*i+1]; *pf++ = 0; - *pf++ = pp[2*(i+1)+0]; *pf++ = pp[2*(i+1)+1]; *pf++ = 0; - } - } else if (i = sscanf(s, "f"" %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu" - " %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu" - " %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu/%hu/%hu %hu", - pp+ 0, pp+ 1, pp+ 2, pp+ 3, pp+ 4, pp+ 5, pp+ 6, pp+ 7, pp+ 8, pp+ 9, pp+10, pp+11, pp+12, pp+13, pp+14, pp+15, pp+16, pp+17, - pp+18, pp+19, pp+20, pp+21, pp+22, pp+23, pp+24, pp+25, pp+26, pp+27, pp+28, pp+29, pp+30, pp+32, pp+32, pp+33, pp+34, pp+35, - pp+36, pp+37, pp+38, pp+39, pp+40, pp+41, pp+42, pp+43, pp+44, pp+45, pp+46, pp+47, pp+48, pp+49, pp+50, pp+51, pp+52, pp+53, pp+54), i >= 9) { - int poly = i/3; - //vc_assert(i < countof(pp); // may need to increment poly count and pp array - for (i=1; i<poly-1; i++) { - *pf++ = pp[0]; *pf++ = pp[1]; *pf++ = pp[2]; - *pf++ = pp[3*i+0]; *pf++ = pp[3*i+1]; *pf++ = pp[3*i+2]; - *pf++ = pp[3*(i+1)+0]; *pf++ = pp[3*(i+1)+1]; *pf++ = pp[3*(i+1)+2]; - } - } else { printf(s); vc_assert(0); } - break; - default: - printf("%02x %02x %s", s[0], s[1], s); vc_assert(0); break; - } - - // shift down read characters and read some more into the end - // if we didn't find a newline, then end is one off the end of our - // line, so end-line will be valid+1 - i = end-line > valid ? valid : end-line; - memmove(line, end, valid - i); - valid -= i; - valid += fread(line+valid, 1, sizeof(line)-1-valid, fp); - } - fclose(fp); - - if (m->num_materials==0) m->material_index[m->num_materials++] = 0; - - centre_and_rescale(qv, (pv-qv)/3); - renormalise(qn, (pn-qn)/3); - //centre_and_rescale2(qt, (pt-qt)/2); - - m->numv = pv-qv; - m->numt = pt-qt; - m->numn = pn-qn; - m->numf = pf-qf; - - // compress array - //memcpy((float *)m->data, (float *)m->data, m->numv * sizeof *qv); - nop - memcpy((float *)m->data + m->numv, (float *)m->data + 3 * MAX_VERTICES, m->numt * sizeof *qt); - memcpy((float *)m->data + m->numv + m->numt,(float *) m->data + (3 + 2) * MAX_VERTICES, m->numn * sizeof *qn); - memcpy((float *)m->data + m->numv + m->numt + m->numn, (float *)m->data + (3 + 2 + 3) * MAX_VERTICES, m->numf * sizeof *qf); - - return 0; -} - -static int load_wavefront_dat(const char *modelname, WAVEFRONT_MODEL_T *model, struct wavefront_model_loading_s *m) -{ - FILE *fp; - int s; - const int size = sizeof *m + - sizeof(float)*(3+2+3)*MAX_VERTICES + // 3 vertices + 2 textures + 3 normals - sizeof(unsigned short)*3*MAX_VERTICES; //each face has 9 vertices - - fp = fopen(modelname, "r"); - if (!fp) return -1; - s = fread(m, 1, size, fp); - if (s < 0) return -1; - fclose(fp); - return 0; -} - -MODEL_T load_wavefront(const char *modelname, const char *texturename) -{ - WAVEFRONT_MODEL_T *model; - float *temp, *qv, *qt, *qn; - unsigned short *qf; - int i; - int numverts = 0, offset = 0; - struct wavefront_model_loading_s *m; - int s=-1; - char modelname_obj[128]; - model = malloc(sizeof *model); - if (!model || !modelname) return NULL; - memset (model, 0, sizeof *model); - model->texture = 0; //load_texture(texturename); - m = allocbuffer(sizeof *m + - sizeof(float)*(3+2+3)*MAX_VERTICES + // 3 vertices + 2 textures + 3 normals - sizeof(unsigned short)*3*MAX_VERTICES); //each face has 9 vertices - if (!m) return 0; - - if (strlen(modelname) + 5 <= sizeof modelname_obj) { - strcpy(modelname_obj, modelname); - strcat(modelname_obj, ".dat"); - s = load_wavefront_dat(modelname_obj, model, m); - } - if (s==0) {} - else if (strncmp(modelname + strlen(modelname) - 4, ".obj", 4) == 0) { - #ifdef DUMP_OBJ_DAT - int size; - FILE *fp; - #endif - s = load_wavefront_obj(modelname, model, m); - #ifdef DUMP_OBJ_DAT - strcpy(modelname_obj, modelname); - strcat(modelname_obj, ".dat"); - size = sizeof *m + - sizeof(float)*(3*m->numv+2*m->numt+3*m->numn) + // 3 vertices + 2 textures + 3 normals - sizeof(unsigned short)*3*m->numf; //each face has 9 vertices - fp = host_file_open(modelname_obj, "w"); - fwrite(m, 1, size, fp); - fclose(fp); - #endif - } else if (strncmp(modelname + strlen(modelname) - 4, ".dat", 4) == 0) { - s = load_wavefront_dat(modelname, model, m); - } - if (s != 0) return 0; - - qv = (float *)(m->data); - qt = (float *)(m->data + m->numv); - qn = (float *)(m->data + m->numv + m->numt); - qf = (unsigned short *)(m->data + m->numv + m->numt + m->numn); - - numverts = m->numf/3; - vc_assert(numverts <= MAX_VERTICES); - - temp = allocbuffer(3*numverts*sizeof *temp); - for (i=0; i<m->num_materials; i++) { - WAVEFRONT_MATERIAL_T *mat = model->material + i; - mat->numverts = i < m->num_materials-1 ? m->material_index[i+1]-m->material_index[i] : numverts - m->material_index[i]; - // vertex, texture, normal - deindex(temp, qv, qf+3*offset+0, 3, mat->numverts); - create_vbo(GL_ARRAY_BUFFER, mat->vbo+VBO_VERTEX, 3 * mat->numverts * sizeof *qv, temp); // 3 - - deindex(temp, qt, qf+3*offset+1, 2, mat->numverts); - create_vbo(GL_ARRAY_BUFFER, mat->vbo+VBO_TEXTURE, 2 * mat->numverts * sizeof *qt, temp); // 2 - - deindex(temp, qn, qf+3*offset+2, 3, mat->numverts); - create_vbo(GL_ARRAY_BUFFER, mat->vbo+VBO_NORMAL, 3 * mat->numverts * sizeof *qn, temp); // 3 - offset += mat->numverts; - mat->texture = model->texture; - } - model->num_materials = m->num_materials; - vc_assert(offset == numverts); - freebuffer(temp); - freebuffer(m); - return (MODEL_T)model; -} - -void unload_wavefront(MODEL_T m) -{ - WAVEFRONT_MODEL_T *model = (WAVEFRONT_MODEL_T *)m; - int i; - for (i=0; i<model->num_materials; i++) { - WAVEFRONT_MATERIAL_T *mat = model->material + i; - if (mat->vbo[VBO_VERTEX]) - destroy_vbo(mat->vbo+VBO_VERTEX); - if (mat->vbo[VBO_TEXTURE]) - destroy_vbo(mat->vbo+VBO_TEXTURE); - if (mat->vbo[VBO_NORMAL]) - destroy_vbo(mat->vbo+VBO_NORMAL); - } -} - -// create a cube model that looks like a wavefront model, -MODEL_T cube_wavefront(void) -{ - static const float qv[] = { - -0.5f, -0.5f, 0.5f, - -0.5f, -0.5f, -0.5f, - 0.5f, -0.5f, -0.5f, - 0.5f, -0.5f, 0.5f, - -0.5f, 0.5f, 0.5f, - 0.5f, 0.5f, 0.5f, - 0.5f, 0.5f, -0.5f, - -0.5f, 0.5f, -0.5f, - }; - - static const float qn[] = { - 0.0f, -1.0f, -0.0f, - 0.0f, 1.0f, -0.0f, - 0.0f, 0.0f, 1.0f, - 1.0f, 0.0f, -0.0f, - 0.0f, 0.0f, -1.0f, - -1.0f, 0.0f, -0.0f, - }; - - static const float qt[] = { - 1.0f, 0.0f, - 1.0f, 1.0f, - 0.0f, 1.0f, - 0.0f, 0.0f, - }; - - static const unsigned short qf[] = { - 1,1,1, 2,2,1, 3,3,1, - 3,3,1, 4,4,1, 1,1,1, - 5,4,2, 6,1,2, 7,2,2, - 7,2,2, 8,3,2, 5,4,2, - 1,4,3, 4,1,3, 6,2,3, - 6,2,3, 5,3,3, 1,4,3, - 4,4,4, 3,1,4, 7,2,4, - 7,2,4, 6,3,4, 4,4,4, - 3,4,5, 2,1,5, 8,2,5, - 8,2,5, 7,3,5, 3,4,5, - 2,4,6, 1,1,6, 5,2,6, - 5,2,6, 8,3,6, 2,4,6, - }; - WAVEFRONT_MODEL_T *model = malloc(sizeof *model); - if (model) { - WAVEFRONT_MATERIAL_T *mat = model->material; - float *temp; - const int offset = 0; - memset(model, 0, sizeof *model); - - temp = allocbuffer(3*MAX_VERTICES*sizeof *temp); - mat->numverts = countof(qf)/3; - // vertex, texture, normal - deindex(temp, qv, qf+3*offset+0, 3, mat->numverts); - create_vbo(GL_ARRAY_BUFFER, mat->vbo+VBO_VERTEX, 3 * mat->numverts * sizeof *qv, temp); // 3 - - deindex(temp, qt, qf+3*offset+1, 2, mat->numverts); - create_vbo(GL_ARRAY_BUFFER, mat->vbo+VBO_TEXTURE, 2 * mat->numverts * sizeof *qt, temp); // 2 - - deindex(temp, qn, qf+3*offset+2, 3, mat->numverts); - create_vbo(GL_ARRAY_BUFFER, mat->vbo+VBO_NORMAL, 3 * mat->numverts * sizeof *qn, temp); // 3 - - freebuffer(temp); - model->num_materials = 1; - } - return (MODEL_T)model; -} - - diff --git a/vc/src/hello_pi/hello_teapot/models.h b/vc/src/hello_pi/hello_teapot/models.h @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MODELS_T -#define MODELS_T -typedef struct opqaue_model_s * MODEL_T; - -MODEL_T load_wavefront(const char *modelname, const char *texturename); -MODEL_T cube_wavefront(void); -void unload_wavefront(MODEL_T m); -int draw_wavefront(MODEL_T m, GLuint texture); -#endif diff --git a/vc/src/hello_pi/hello_teapot/teapot.obj.dat b/vc/src/hello_pi/hello_teapot/teapot.obj.dat Binary files differ. diff --git a/vc/src/hello_pi/hello_teapot/triangle.c b/vc/src/hello_pi/hello_teapot/triangle.c @@ -1,468 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -Copyright (c) 2012, OtherCrashOverride -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// A rotating cube rendered with OpenGL|ES. Three images used as textures on the cube faces. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" - -#include "GLES/gl.h" -#include "EGL/egl.h" -#include "EGL/eglext.h" - -#include "cube_texture_and_coords.h" -#include "models.h" -#include "triangle.h" -#include <pthread.h> - - -#define PATH "./" - -#define IMAGE_SIZE_WIDTH 1920 -#define IMAGE_SIZE_HEIGHT 1080 - -#ifndef M_PI - #define M_PI 3.141592654 -#endif - - -typedef struct -{ - uint32_t screen_width; - uint32_t screen_height; -// OpenGL|ES objects - EGLDisplay display; - EGLSurface surface; - EGLContext context; - GLuint tex; -// model rotation vector and direction - GLfloat rot_angle_x_inc; - GLfloat rot_angle_y_inc; - GLfloat rot_angle_z_inc; -// current model rotation angles - GLfloat rot_angle_x; - GLfloat rot_angle_y; - GLfloat rot_angle_z; -// current distance from camera - GLfloat distance; - GLfloat distance_inc; - MODEL_T model; -} CUBE_STATE_T; - -static void init_ogl(CUBE_STATE_T *state); -static void init_model_proj(CUBE_STATE_T *state); -static void reset_model(CUBE_STATE_T *state); -static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc); -static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc); -static void redraw_scene(CUBE_STATE_T *state); -static void update_model(CUBE_STATE_T *state); -static void init_textures(CUBE_STATE_T *state); -static void exit_func(void); -static volatile int terminate; -static CUBE_STATE_T _state, *state=&_state; - -static void* eglImage = 0; -static pthread_t thread1; - - -/*********************************************************** - * Name: init_ogl - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Sets the display, OpenGL|ES context and screen stuff - * - * Returns: void - * - ***********************************************************/ -static void init_ogl(CUBE_STATE_T *state) -{ - int32_t success = 0; - EGLBoolean result; - EGLint num_config; - - static EGL_DISPMANX_WINDOW_T nativewindow; - - DISPMANX_ELEMENT_HANDLE_T dispman_element; - DISPMANX_DISPLAY_HANDLE_T dispman_display; - DISPMANX_UPDATE_HANDLE_T dispman_update; - VC_RECT_T dst_rect; - VC_RECT_T src_rect; - - static const EGLint attribute_list[] = - { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_DEPTH_SIZE, 16, - EGL_SAMPLES, 4, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_NONE - }; - - EGLConfig config; - - // get an EGL display connection - state->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); - assert(state->display!=EGL_NO_DISPLAY); - - // initialize the EGL display connection - result = eglInitialize(state->display, NULL, NULL); - assert(EGL_FALSE != result); - - // get an appropriate EGL frame buffer configuration - // this uses a BRCM extension that gets the closest match, rather than standard which returns anything that matches - result = eglSaneChooseConfigBRCM(state->display, attribute_list, &config, 1, &num_config); - assert(EGL_FALSE != result); - - // create an EGL rendering context - state->context = eglCreateContext(state->display, config, EGL_NO_CONTEXT, NULL); - assert(state->context!=EGL_NO_CONTEXT); - - // create an EGL window surface - success = graphics_get_display_size(0 /* LCD */, &state->screen_width, &state->screen_height); - assert( success >= 0 ); - - dst_rect.x = 0; - dst_rect.y = 0; - dst_rect.width = state->screen_width; - dst_rect.height = state->screen_height; - - src_rect.x = 0; - src_rect.y = 0; - src_rect.width = state->screen_width << 16; - src_rect.height = state->screen_height << 16; - - dispman_display = vc_dispmanx_display_open( 0 /* LCD */); - dispman_update = vc_dispmanx_update_start( 0 ); - - dispman_element = vc_dispmanx_element_add ( dispman_update, dispman_display, - 0/*layer*/, &dst_rect, 0/*src*/, - &src_rect, DISPMANX_PROTECTION_NONE, 0 /*alpha*/, 0/*clamp*/, 0/*transform*/); - - nativewindow.element = dispman_element; - nativewindow.width = state->screen_width; - nativewindow.height = state->screen_height; - vc_dispmanx_update_submit_sync( dispman_update ); - - state->surface = eglCreateWindowSurface( state->display, config, &nativewindow, NULL ); - assert(state->surface != EGL_NO_SURFACE); - - // connect the context to the surface - result = eglMakeCurrent(state->display, state->surface, state->surface, state->context); - assert(EGL_FALSE != result); - - // Set background color and clear buffers - glClearColor((0.3922f+7*0.5f)/8, (0.1176f+7*0.5f)/8, (0.5882f+7*0.5f)/8, 1.0f); - - // Enable back face culling. - glEnable(GL_CULL_FACE); - - glEnable(GL_DEPTH_TEST); - glClearDepthf(1.0); - glDepthFunc(GL_LEQUAL); - - float noAmbient[] = {1.0f, 1.0f, 1.0f, 1.0f}; - glLightfv(GL_LIGHT0, GL_AMBIENT, noAmbient); - glEnable(GL_LIGHT0); - glEnable(GL_LIGHTING); -} - -/*********************************************************** - * Name: init_model_proj - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Sets the OpenGL|ES model to default values - * - * Returns: void - * - ***********************************************************/ -static void init_model_proj(CUBE_STATE_T *state) -{ - float nearp = 0.1f; - float farp = 500.0f; - float hht; - float hwd; - - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); - - glViewport(0, 0, (GLsizei)state->screen_width, (GLsizei)state->screen_height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - hht = nearp * (float)tan(45.0 / 2.0 / 180.0 * M_PI); - hwd = hht * (float)state->screen_width / (float)state->screen_height; - - glFrustumf(-hwd, hwd, -hht, hht, nearp, farp); - - glEnableClientState( GL_VERTEX_ARRAY ); - - reset_model(state); -} - -/*********************************************************** - * Name: reset_model - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Resets the Model projection and rotation direction - * - * Returns: void - * - ***********************************************************/ -static void reset_model(CUBE_STATE_T *state) -{ - // reset model position - glMatrixMode(GL_MODELVIEW); - - // reset model rotation - state->rot_angle_x = 45.f; state->rot_angle_y = 30.f; state->rot_angle_z = 0.f; - state->rot_angle_x_inc = 0.5f; state->rot_angle_y_inc = 0.5f; state->rot_angle_z_inc = 0.f; - state->distance = 1.2f*1.5f; -} - -/*********************************************************** - * Name: update_model - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Updates model projection to current position/rotation - * - * Returns: void - * - ***********************************************************/ -static void update_model(CUBE_STATE_T *state) -{ - // update position - state->rot_angle_x = inc_and_wrap_angle(state->rot_angle_x, state->rot_angle_x_inc); - state->rot_angle_y = inc_and_wrap_angle(state->rot_angle_y, state->rot_angle_y_inc); - state->rot_angle_z = inc_and_wrap_angle(state->rot_angle_z, state->rot_angle_z_inc); - state->distance = inc_and_clip_distance(state->distance, state->distance_inc); - - glLoadIdentity(); - // move camera back to see the cube - glTranslatef(0.f, 0.f, -state->distance); - - // Rotate model to new position - glRotatef(state->rot_angle_x, 1.f, 0.f, 0.f); - glRotatef(state->rot_angle_y, 0.f, 1.f, 0.f); - glRotatef(state->rot_angle_z, 0.f, 0.f, 1.f); -} - -/*********************************************************** - * Name: inc_and_wrap_angle - * - * Arguments: - * GLfloat angle current angle - * GLfloat angle_inc angle increment - * - * Description: Increments or decrements angle by angle_inc degrees - * Wraps to 0 at 360 deg. - * - * Returns: new value of angle - * - ***********************************************************/ -static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc) -{ - angle += angle_inc; - - if (angle >= 360.0) - angle -= 360.f; - else if (angle <=0) - angle += 360.f; - - return angle; -} - -/*********************************************************** - * Name: inc_and_clip_distance - * - * Arguments: - * GLfloat distance current distance - * GLfloat distance_inc distance increment - * - * Description: Increments or decrements distance by distance_inc units - * Clips to range - * - * Returns: new value of angle - * - ***********************************************************/ -static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc) -{ - distance += distance_inc; - - if (distance >= 10.0f) - distance = 10.f; - else if (distance <= 1.0f) - distance = 1.0f; - - return distance; -} - -/*********************************************************** - * Name: redraw_scene - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Draws the model and calls eglSwapBuffers - * to render to screen - * - * Returns: void - * - ***********************************************************/ -static void redraw_scene(CUBE_STATE_T *state) -{ - // Start with a clear screen - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - draw_wavefront(state->model, state->tex); - - eglSwapBuffers(state->display, state->surface); -} - -/*********************************************************** - * Name: init_textures - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Initialise OGL|ES texture surfaces to use image - * buffers - * - * Returns: void - * - ***********************************************************/ -static void init_textures(CUBE_STATE_T *state) -{ - // the texture containing the video - glGenTextures(1, &state->tex); - - glBindTexture(GL_TEXTURE_2D, state->tex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, IMAGE_SIZE_WIDTH, IMAGE_SIZE_HEIGHT, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - /* Create EGL Image */ - eglImage = eglCreateImageKHR( - state->display, - state->context, - EGL_GL_TEXTURE_2D_KHR, - (EGLClientBuffer)state->tex, - 0); - - if (eglImage == EGL_NO_IMAGE_KHR) - { - printf("eglCreateImageKHR failed.\n"); - exit(1); - } - - // Start rendering - pthread_create(&thread1, NULL, video_decode_test, eglImage); - - // setup overall texture environment - glTexCoordPointer(2, GL_FLOAT, 0, texCoords); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - glEnable(GL_TEXTURE_2D); - - // Bind texture surface to current vertices - glBindTexture(GL_TEXTURE_2D, state->tex); -} -//------------------------------------------------------------------------------ - -static void exit_func(void) -// Function to be passed to atexit(). -{ - if (eglImage != 0) - { - if (!eglDestroyImageKHR(state->display, (EGLImageKHR) eglImage)) - printf("eglDestroyImageKHR failed."); - } - - // clear screen - glClear( GL_COLOR_BUFFER_BIT ); - eglSwapBuffers(state->display, state->surface); - - // Release OpenGL resources - eglMakeCurrent( state->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); - eglDestroySurface( state->display, state->surface ); - eglDestroyContext( state->display, state->context ); - eglTerminate( state->display ); - - printf("\ncube closed\n"); -} // exit_func() - -//============================================================================== - -int main () -{ - bcm_host_init(); - printf("Note: ensure you have sufficient gpu_mem configured\n"); - - // Clear application state - memset( state, 0, sizeof( *state ) ); - - // Start OGLES - init_ogl(state); - - // Setup the model world - init_model_proj(state); - - // initialise the OGLES texture(s) - init_textures(state); - - //state->model = cube_wavefront(); - state->model = load_wavefront("/opt/vc/src/hello_pi/hello_teapot/teapot.obj.dat", NULL); - - while (!terminate) - { - update_model(state); - redraw_scene(state); - } - exit_func(); - return 0; -} - diff --git a/vc/src/hello_pi/hello_teapot/triangle.h b/vc/src/hello_pi/hello_teapot/triangle.h @@ -1,30 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#pragma once - - -void* video_decode_test(void* arg); diff --git a/vc/src/hello_pi/hello_teapot/video.c b/vc/src/hello_pi/hello_teapot/video.c @@ -1,266 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -Copyright (c) 2012, OtherCrashOverride -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Video decode demo using OpenMAX IL though the ilcient helper library - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "bcm_host.h" -#include "ilclient.h" - -static OMX_BUFFERHEADERTYPE* eglBuffer = NULL; -static COMPONENT_T* egl_render = NULL; - -static void* eglImage = 0; - -void my_fill_buffer_done(void* data, COMPONENT_T* comp) -{ - if (OMX_FillThisBuffer(ilclient_get_handle(egl_render), eglBuffer) != OMX_ErrorNone) - { - printf("OMX_FillThisBuffer failed in callback\n"); - exit(1); - } -} - - -// Modified function prototype to work with pthreads -void *video_decode_test(void* arg) -{ - const char* filename = "/opt/vc/src/hello_pi/hello_video/test.h264"; - eglImage = arg; - - if (eglImage == 0) - { - printf("eglImage is null.\n"); - exit(1); - } - - OMX_VIDEO_PARAM_PORTFORMATTYPE format; - OMX_TIME_CONFIG_CLOCKSTATETYPE cstate; - COMPONENT_T *video_decode = NULL, *video_scheduler = NULL, *clock = NULL; - COMPONENT_T *list[5]; - TUNNEL_T tunnel[4]; - ILCLIENT_T *client; - FILE *in; - int status = 0; - unsigned int data_len = 0; - - memset(list, 0, sizeof(list)); - memset(tunnel, 0, sizeof(tunnel)); - - if((in = fopen(filename, "rb")) == NULL) - return (void *)-2; - - if((client = ilclient_init()) == NULL) - { - fclose(in); - return (void *)-3; - } - - if(OMX_Init() != OMX_ErrorNone) - { - ilclient_destroy(client); - fclose(in); - return (void *)-4; - } - - // callback - ilclient_set_fill_buffer_done_callback(client, my_fill_buffer_done, 0); - - // create video_decode - if(ilclient_create_component(client, &video_decode, "video_decode", ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_ENABLE_INPUT_BUFFERS) != 0) - status = -14; - list[0] = video_decode; - - // create egl_render - if(status == 0 && ilclient_create_component(client, &egl_render, "egl_render", ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_ENABLE_OUTPUT_BUFFERS) != 0) - status = -14; - list[1] = egl_render; - - // create clock - if(status == 0 && ilclient_create_component(client, &clock, "clock", ILCLIENT_DISABLE_ALL_PORTS) != 0) - status = -14; - list[2] = clock; - - memset(&cstate, 0, sizeof(cstate)); - cstate.nSize = sizeof(cstate); - cstate.nVersion.nVersion = OMX_VERSION; - cstate.eState = OMX_TIME_ClockStateWaitingForStartTime; - cstate.nWaitMask = 1; - if(clock != NULL && OMX_SetParameter(ILC_GET_HANDLE(clock), OMX_IndexConfigTimeClockState, &cstate) != OMX_ErrorNone) - status = -13; - - // create video_scheduler - if(status == 0 && ilclient_create_component(client, &video_scheduler, "video_scheduler", ILCLIENT_DISABLE_ALL_PORTS) != 0) - status = -14; - list[3] = video_scheduler; - - set_tunnel(tunnel, video_decode, 131, video_scheduler, 10); - set_tunnel(tunnel+1, video_scheduler, 11, egl_render, 220); - set_tunnel(tunnel+2, clock, 80, video_scheduler, 12); - - // setup clock tunnel first - if(status == 0 && ilclient_setup_tunnel(tunnel+2, 0, 0) != 0) - status = -15; - else - ilclient_change_component_state(clock, OMX_StateExecuting); - - if(status == 0) - ilclient_change_component_state(video_decode, OMX_StateIdle); - - memset(&format, 0, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); - format.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE); - format.nVersion.nVersion = OMX_VERSION; - format.nPortIndex = 130; - format.eCompressionFormat = OMX_VIDEO_CodingAVC; - - if(status == 0 && - OMX_SetParameter(ILC_GET_HANDLE(video_decode), OMX_IndexParamVideoPortFormat, &format) == OMX_ErrorNone && - ilclient_enable_port_buffers(video_decode, 130, NULL, NULL, NULL) == 0) - { - OMX_BUFFERHEADERTYPE *buf; - int port_settings_changed = 0; - int first_packet = 1; - - ilclient_change_component_state(video_decode, OMX_StateExecuting); - - while((buf = ilclient_get_input_buffer(video_decode, 130, 1)) != NULL) - { - // feed data and wait until we get port settings changed - unsigned char *dest = buf->pBuffer; - - // loop if at end - if (feof(in)) - rewind(in); - - data_len += fread(dest, 1, buf->nAllocLen-data_len, in); - - if(port_settings_changed == 0 && - ((data_len > 0 && ilclient_remove_event(video_decode, OMX_EventPortSettingsChanged, 131, 0, 0, 1) == 0) || - (data_len == 0 && ilclient_wait_for_event(video_decode, OMX_EventPortSettingsChanged, 131, 0, 0, 1, - ILCLIENT_EVENT_ERROR | ILCLIENT_PARAMETER_CHANGED, 10000) == 0))) - { - port_settings_changed = 1; - - if(ilclient_setup_tunnel(tunnel, 0, 0) != 0) - { - status = -7; - break; - } - - ilclient_change_component_state(video_scheduler, OMX_StateExecuting); - - // now setup tunnel to egl_render - if(ilclient_setup_tunnel(tunnel+1, 0, 1000) != 0) - { - status = -12; - break; - } - - // Set egl_render to idle - ilclient_change_component_state(egl_render, OMX_StateIdle); - - // Enable the output port and tell egl_render to use the texture as a buffer - //ilclient_enable_port(egl_render, 221); THIS BLOCKS SO CANT BE USED - if (OMX_SendCommand(ILC_GET_HANDLE(egl_render), OMX_CommandPortEnable, 221, NULL) != OMX_ErrorNone) - { - printf("OMX_CommandPortEnable failed.\n"); - exit(1); - } - - if (OMX_UseEGLImage(ILC_GET_HANDLE(egl_render), &eglBuffer, 221, NULL, eglImage) != OMX_ErrorNone) - { - printf("OMX_UseEGLImage failed.\n"); - exit(1); - } - - // Set egl_render to executing - ilclient_change_component_state(egl_render, OMX_StateExecuting); - - - // Request egl_render to write data to the texture buffer - if(OMX_FillThisBuffer(ILC_GET_HANDLE(egl_render), eglBuffer) != OMX_ErrorNone) - { - printf("OMX_FillThisBuffer failed.\n"); - exit(1); - } - } - if(!data_len) - break; - - buf->nFilledLen = data_len; - data_len = 0; - - buf->nOffset = 0; - if(first_packet) - { - buf->nFlags = OMX_BUFFERFLAG_STARTTIME; - first_packet = 0; - } - else - buf->nFlags = OMX_BUFFERFLAG_TIME_UNKNOWN; - - if(OMX_EmptyThisBuffer(ILC_GET_HANDLE(video_decode), buf) != OMX_ErrorNone) - { - status = -6; - break; - } - } - - buf->nFilledLen = 0; - buf->nFlags = OMX_BUFFERFLAG_TIME_UNKNOWN | OMX_BUFFERFLAG_EOS; - - if(OMX_EmptyThisBuffer(ILC_GET_HANDLE(video_decode), buf) != OMX_ErrorNone) - status = -20; - - // need to flush the renderer to allow video_decode to disable its input port - ilclient_flush_tunnels(tunnel, 0); - - ilclient_disable_port_buffers(video_decode, 130, NULL, NULL, NULL); - } - - fclose(in); - - ilclient_disable_tunnel(tunnel); - ilclient_disable_tunnel(tunnel+1); - ilclient_disable_tunnel(tunnel+2); - ilclient_teardown_tunnels(tunnel); - - ilclient_state_transition(list, OMX_StateIdle); - ilclient_state_transition(list, OMX_StateLoaded); - - ilclient_cleanup_components(list); - - OMX_Deinit(); - - ilclient_destroy(client); - return (void *)status; -} - diff --git a/vc/src/hello_pi/hello_tiger/Makefile b/vc/src/hello_pi/hello_tiger/Makefile @@ -1,8 +0,0 @@ -OBJS=main.o tiger.o -BIN=hello_tiger.bin - -#LDFLAGS+= -CFLAGS+=-D__RASPBERRYPI__ - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_tiger/hello_tiger.bin b/vc/src/hello_pi/hello_tiger/hello_tiger.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_tiger/license.txt b/vc/src/hello_pi/hello_tiger/license.txt @@ -1,53 +0,0 @@ -OpenVG 1.1 Reference Implementation ------------------------------------ - -Copyright (c) 2007 The Khronos Group Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and /or associated documentation files -(the "Materials "), to deal in the Materials without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Materials, -and to permit persons to whom the Materials are furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. - -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR -THE USE OR OTHER DEALINGS IN THE MATERIALS. - - -Path data for the Tiger sample program has been extracted from Ghostscript's -tiger.eps example file distributed under GNU General Public License. - -Ghostscript's License document: -" The files in the src, lib, toolbin, examples, doc and man - directories (folders) and any subdirectories (sub-folders) - thereof are part of GPL Ghostscript. - - The files in the Resource directory and any subdirectories thereof - are also part of GPL Ghostscript, with the explicit exception of - the files in the CMap subdirectory. The CMap files are copyright - Adobe Systems Incorporated and covered by a separate license - which permits only verbatim distribution. - - GPL Ghostscript is free software; you can redistribute it and/or - modify it under the terms of version 2 of the GNU General Public - License as published by the Free Software Foundation. - - GPL Ghostscript is distributed in the hope that it will be - useful, but WITHOUT ANY WARRANTY; without even the implied warranty - of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program so you can know your rights and responsibilities. - It should be in a file named doc/COPYING. If not, write to the - Free Software Foundation, Inc., 59 Temple Place Suite 330, Boston, MA - 02111-1307, USA." diff --git a/vc/src/hello_pi/hello_tiger/main.c b/vc/src/hello_pi/hello_tiger/main.c @@ -1,533 +0,0 @@ -/*------------------------------------------------------------------------ - * - * OpenVG 1.0.1 Reference Implementation sample code - * ------------------------------------------------- - * - * Copyright (c) 2007 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief Tiger sample application. Resizing the application window - * rerenders the tiger in the new resolution. Pressing 1,2,3 - * or 4 sets pixel zoom factor, mouse moves inside the zoomed - * image (mouse move works on OpenGL >= 1.2). - * \note - *//*-------------------------------------------------------------------*/ - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <assert.h> -#include <string.h> -#define UNREF(X) ((void)(X)) - -#ifdef HG_FLAT_INCLUDES -# include "openvg.h" -# include "vgu.h" -# include "egl.h" -#else -# include "VG/openvg.h" -# include "VG/vgu.h" -# include "EGL/egl.h" -#endif - -#include "tiger.h" - -/*--------------------------------------------------------------*/ - -#ifdef __RASPBERRYPI__ -static float rotateN = 0.0f; -#endif -const float aspectRatio = 612.0f / 792.0f; -int renderWidth = 0; -int renderHeight = 0; -EGLDisplay egldisplay; -EGLConfig eglconfig; -EGLSurface eglsurface; -EGLContext eglcontext; - -/*--------------------------------------------------------------*/ - -typedef struct -{ - VGFillRule m_fillRule; - VGPaintMode m_paintMode; - VGCapStyle m_capStyle; - VGJoinStyle m_joinStyle; - float m_miterLimit; - float m_strokeWidth; - VGPaint m_fillPaint; - VGPaint m_strokePaint; - VGPath m_path; -} PathData; - -typedef struct -{ - PathData* m_paths; - int m_numPaths; -} PS; - -PS* PS_construct(const char* commands, int commandCount, const float* points, int pointCount) -{ - PS* ps = (PS*)malloc(sizeof(PS)); - int p = 0; - int c = 0; - int i = 0; - int paths = 0; - int maxElements = 0; - unsigned char* cmd; - UNREF(pointCount); - - while(c < commandCount) - { - int elements, e; - c += 4; - p += 8; - elements = (int)points[p++]; - assert(elements > 0); - if(elements > maxElements) - maxElements = elements; - for(e=0;e<elements;e++) - { - switch(commands[c]) - { - case 'M': p += 2; break; - case 'L': p += 2; break; - case 'C': p += 6; break; - case 'E': break; - default: - assert(0); //unknown command - } - c++; - } - paths++; - } - - ps->m_numPaths = paths; - ps->m_paths = (PathData*)malloc(paths * sizeof(PathData)); - cmd = (unsigned char*)malloc(maxElements); - - i = 0; - p = 0; - c = 0; - while(c < commandCount) - { - int elements, startp, e; - float color[4]; - - //fill type - int paintMode = 0; - ps->m_paths[i].m_fillRule = VG_NON_ZERO; - switch( commands[c] ) - { - case 'N': - break; - case 'F': - ps->m_paths[i].m_fillRule = VG_NON_ZERO; - paintMode |= VG_FILL_PATH; - break; - case 'E': - ps->m_paths[i].m_fillRule = VG_EVEN_ODD; - paintMode |= VG_FILL_PATH; - break; - default: - assert(0); //unknown command - } - c++; - - //stroke - switch( commands[c] ) - { - case 'N': - break; - case 'S': - paintMode |= VG_STROKE_PATH; - break; - default: - assert(0); //unknown command - } - ps->m_paths[i].m_paintMode = (VGPaintMode)paintMode; - c++; - - //line cap - switch( commands[c] ) - { - case 'B': - ps->m_paths[i].m_capStyle = VG_CAP_BUTT; - break; - case 'R': - ps->m_paths[i].m_capStyle = VG_CAP_ROUND; - break; - case 'S': - ps->m_paths[i].m_capStyle = VG_CAP_SQUARE; - break; - default: - assert(0); //unknown command - } - c++; - - //line join - switch( commands[c] ) - { - case 'M': - ps->m_paths[i].m_joinStyle = VG_JOIN_MITER; - break; - case 'R': - ps->m_paths[i].m_joinStyle = VG_JOIN_ROUND; - break; - case 'B': - ps->m_paths[i].m_joinStyle = VG_JOIN_BEVEL; - break; - default: - assert(0); //unknown command - } - c++; - - //the rest of stroke attributes - ps->m_paths[i].m_miterLimit = points[p++]; - ps->m_paths[i].m_strokeWidth = points[p++]; - - //paints - color[0] = points[p++]; - color[1] = points[p++]; - color[2] = points[p++]; - color[3] = 1.0f; - ps->m_paths[i].m_strokePaint = vgCreatePaint(); - vgSetParameteri(ps->m_paths[i].m_strokePaint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR); - vgSetParameterfv(ps->m_paths[i].m_strokePaint, VG_PAINT_COLOR, 4, color); - - color[0] = points[p++]; - color[1] = points[p++]; - color[2] = points[p++]; - color[3] = 1.0f; - ps->m_paths[i].m_fillPaint = vgCreatePaint(); - vgSetParameteri(ps->m_paths[i].m_fillPaint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR); - vgSetParameterfv(ps->m_paths[i].m_fillPaint, VG_PAINT_COLOR, 4, color); - - //read number of elements - - elements = (int)points[p++]; - assert(elements > 0); - startp = p; - for(e=0;e<elements;e++) - { - switch( commands[c] ) - { - case 'M': - cmd[e] = VG_MOVE_TO | VG_ABSOLUTE; - p += 2; - break; - case 'L': - cmd[e] = VG_LINE_TO | VG_ABSOLUTE; - p += 2; - break; - case 'C': - cmd[e] = VG_CUBIC_TO | VG_ABSOLUTE; - p += 6; - break; - case 'E': - cmd[e] = VG_CLOSE_PATH; - break; - default: - assert(0); //unknown command - } - c++; - } - - ps->m_paths[i].m_path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1.0f, 0.0f, 0, 0, (unsigned int)VG_PATH_CAPABILITY_ALL); - vgAppendPathData(ps->m_paths[i].m_path, elements, cmd, points + startp); - i++; - } - free(cmd); - return ps; -} - -void PS_destruct(PS* ps) -{ - int i; - assert(ps); - for(i=0;i<ps->m_numPaths;i++) - { - vgDestroyPaint(ps->m_paths[i].m_fillPaint); - vgDestroyPaint(ps->m_paths[i].m_strokePaint); - vgDestroyPath(ps->m_paths[i].m_path); - } - free(ps->m_paths); - free(ps); -} - -void PS_render(PS* ps) -{ - int i; - assert(ps); - vgSeti(VG_BLEND_MODE, VG_BLEND_SRC_OVER); - - for(i=0;i<ps->m_numPaths;i++) - { - vgSeti(VG_FILL_RULE, ps->m_paths[i].m_fillRule); - vgSetPaint(ps->m_paths[i].m_fillPaint, VG_FILL_PATH); - - if(ps->m_paths[i].m_paintMode & VG_STROKE_PATH) - { - vgSetf(VG_STROKE_LINE_WIDTH, ps->m_paths[i].m_strokeWidth); - vgSeti(VG_STROKE_CAP_STYLE, ps->m_paths[i].m_capStyle); - vgSeti(VG_STROKE_JOIN_STYLE, ps->m_paths[i].m_joinStyle); - vgSetf(VG_STROKE_MITER_LIMIT, ps->m_paths[i].m_miterLimit); - vgSetPaint(ps->m_paths[i].m_strokePaint, VG_STROKE_PATH); - } - - vgDrawPath(ps->m_paths[i].m_path, ps->m_paths[i].m_paintMode); - } - assert(vgGetError() == VG_NO_ERROR); -} - -PS* tiger = NULL; - -/*--------------------------------------------------------------*/ - -void render(int w, int h) -{ -#ifndef __RASPBERRYPI__ - if(renderWidth != w || renderHeight != h) -#endif - { - float clearColor[4] = {1,1,1,1}; - float scale = w / (tigerMaxX - tigerMinX); - - eglSwapBuffers(egldisplay, eglsurface); //force EGL to recognize resize - - vgSetfv(VG_CLEAR_COLOR, 4, clearColor); - vgClear(0, 0, w, h); - - vgLoadIdentity(); -#ifdef __RASPBERRYPI__ - vgTranslate(w * 0.5f, h * 0.5f); - vgRotate(rotateN); - vgTranslate(-w * 0.5f, -h * 0.5f); -#endif - vgScale(scale, scale); - vgTranslate(-tigerMinX, -tigerMinY + 0.5f * (h / scale - (tigerMaxY - tigerMinY))); - - PS_render(tiger); - assert(vgGetError() == VG_NO_ERROR); - - renderWidth = w; - renderHeight = h; - } -#ifndef __RASPBERRYPI__ - eglSwapBuffers(egldisplay, eglsurface); - assert(eglGetError() == EGL_SUCCESS); -#endif -} - -/*--------------------------------------------------------------*/ - -void init(NativeWindowType window) -{ - static const EGLint s_configAttribs[] = - { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_LUMINANCE_SIZE, EGL_DONT_CARE, //EGL_DONT_CARE - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_SAMPLES, 1, - EGL_NONE - }; - EGLint numconfigs; - - egldisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); - eglInitialize(egldisplay, NULL, NULL); - assert(eglGetError() == EGL_SUCCESS); - eglBindAPI(EGL_OPENVG_API); - - eglChooseConfig(egldisplay, s_configAttribs, &eglconfig, 1, &numconfigs); - assert(eglGetError() == EGL_SUCCESS); - assert(numconfigs == 1); - - eglsurface = eglCreateWindowSurface(egldisplay, eglconfig, window, NULL); - assert(eglGetError() == EGL_SUCCESS); - eglcontext = eglCreateContext(egldisplay, eglconfig, NULL, NULL); - assert(eglGetError() == EGL_SUCCESS); - eglMakeCurrent(egldisplay, eglsurface, eglsurface, eglcontext); - assert(eglGetError() == EGL_SUCCESS); - - tiger = PS_construct(tigerCommands, tigerCommandCount, tigerPoints, tigerPointCount); -} - -/*--------------------------------------------------------------*/ - -void deinit(void) -{ - PS_destruct(tiger); - eglMakeCurrent(egldisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - assert(eglGetError() == EGL_SUCCESS); - eglTerminate(egldisplay); - assert(eglGetError() == EGL_SUCCESS); - eglReleaseThread(); -} - -/*--------------------------------------------------------------*/ - -#ifdef WIN32 -#pragma warning(disable:4115) /* named type definition in parentheses (this comes from a visual studio include file) */ -#include <windows.h> - -static LONG WINAPI windowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_CLOSE: - case WM_DESTROY: - PostQuitMessage(0); - return 0; - case WM_PAINT: - { - RECT rect; - InvalidateRect(hWnd, NULL, 0); - GetClientRect(hWnd, &rect); - render(rect.right - rect.left, rect.bottom - rect.top); - return 0; - } - default: - break; - } - return DefWindowProc(hWnd, uMsg, wParam, lParam); -} - -/*--------------------------------------------------------------*/ - -int main(void) -{ - HWND window; - { - WNDCLASS wndclass; - wndclass.style = 0; - wndclass.lpfnWndProc = windowProc; - wndclass.cbClsExtra = 0; - wndclass.cbWndExtra = 0; - wndclass.hInstance = (HINSTANCE)GetModuleHandle(NULL); - wndclass.hIcon = LoadIcon(wndclass.hInstance, MAKEINTRESOURCE(101)); - wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); - wndclass.hbrBackground = CreateSolidBrush(RGB(0, 0, 0)); - wndclass.lpszMenuName = NULL; - wndclass.lpszClassName = "MainWndClass"; - if (!wndclass.hIcon) - wndclass.hIcon = LoadIcon(NULL, IDI_EXCLAMATION); - RegisterClass(&wndclass); - } - - window = CreateWindow( - "MainWndClass", - "OpenVG Tiger sample (rendering, please wait)", - WS_OVERLAPPEDWINDOW, - 200, 200, 400, (int)(400.0f / aspectRatio), - NULL, - NULL, - (HINSTANCE)GetModuleHandle(NULL), - NULL); - if (!window) - return -1; - - init((NativeWindowType)window); - - { - MSG msg; - ShowWindow(window, SW_SHOW); - while (GetMessage(&msg, NULL, 0, 0)) - { - DispatchMessage(&msg); - if (msg.message == WM_QUIT) - break; - } - } - - deinit(); - - DestroyWindow(window); - return 0; -} - -/*--------------------------------------------------------------*/ - -#elif defined __APPLE__ - -/*--------------------------------------------------------------*/ - -#include <OpenGL/gl.h> - -//TODO - -#elif defined __RASPBERRYPI__ -#include "bcm_host.h" -int main(void) -{ - uint32_t width, height; - bcm_host_init(); - int s; - - static EGL_DISPMANX_WINDOW_T nativewindow; - - DISPMANX_ELEMENT_HANDLE_T dispman_element; - DISPMANX_DISPLAY_HANDLE_T dispman_display; - DISPMANX_UPDATE_HANDLE_T dispman_update; - VC_RECT_T dst_rect; - VC_RECT_T src_rect; - - s = graphics_get_display_size(0 /* LCD */, &width, &height); - assert( s >= 0 ); - - dst_rect.x = 0; - dst_rect.y = 0; - dst_rect.width = width; - dst_rect.height = height; - - src_rect.x = 0; - src_rect.y = 0; - src_rect.width = width << 16; - src_rect.height = height << 16; - - dispman_display = vc_dispmanx_display_open( 0 /* LCD */); - dispman_update = vc_dispmanx_update_start( 0 ); - - dispman_element = vc_dispmanx_element_add ( dispman_update, dispman_display, - 1/*layer*/, &dst_rect, 0/*src*/, - &src_rect, DISPMANX_PROTECTION_NONE, 0 /*alpha*/, 0/*clamp*/, 0/*transform*/); - - nativewindow.element = dispman_element; - nativewindow.width = width; - nativewindow.height = height; - vc_dispmanx_update_submit_sync( dispman_update ); - - init(&nativewindow); - - while (1) { - render(width, height); - rotateN += 1.0f; - } - deinit(); - - return 0; -} -#endif - diff --git a/vc/src/hello_pi/hello_tiger/readme.txt b/vc/src/hello_pi/hello_tiger/readme.txt @@ -1,263 +0,0 @@ -OpenVG 1.1 Reference Implementation ------------------------------------ - -Copyright (c) 2007 The Khronos Group Inc. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and /or associated documentation files -(the "Materials "), to deal in the Materials without restriction, -including without limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of the Materials, -and to permit persons to whom the Materials are furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Materials. - -THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR -THE USE OR OTHER DEALINGS IN THE MATERIALS. - - -Version -------- -Official RI for OpenVG 1.1 -Released: May 13, 2008 - - -Release Notes -------------- - -This release is based on OpenVG 1.1 and EGL 1.3 specifications. -This release is Windows-only, although the source code -compiles at least on Mac OS X 10.5 and Cygwin. Project files are -provided for MSVC 6. - -This archive contains sources for OpenVG RI, VGU and EGL. There's -also a precompiled libOpenVG.dll that contains OpenVG and EGL implementations. - - -Package Structure ------------------ - -bin - win32 - libOpenVG.dll OpenVG Windows .dll - tiger.exe Windows executable of the Tiger sample -lib - libOpenVG.lib MSVC 6 dll import library -ri - openvg_ri.dsp MSVC 6 project file for libOpenVG.dll - src .cpp and .h -files of the reference implementation - win32 Windows backend for EGL - macosx Mac OS X backend for EGL - null null backend for EGL - include Public OpenVG and EGL headers - EGL - egl.h - VG - openvg.h - vgu.h -samples - samples.dsw MSVC 6 workspace file for tiger sample and libOpenVG.dll - samples.dsp MSVC 6 project file for tiger.exe - tiger - main.c - tiger.c - tiger.h -readme.txt -license.txt - - -Samples -------- - -Tiger - -The release contains a sample application that renders an image of a -tiger. Note that the sample doesn't start immediately, since it takes -a few seconds to render the image. Resizing the window rerenders the -image in the new resolution. - - -Known Issues ------------- - --EGL functionality is incomplete (some functions lack proper error checking, some - attribs may not be processed, etc.) --When opening samples.dsw, MSVC may complain about missing Perforce connection. Just - ignore that. - - -Changes -------- - -Nov 25, 2008 --Clamp color transform scale to [-127, 127] and bias to [-1, 1] - -May 13, 2008 -- Changed 8 sample MSAA configs into 32 sample configs -- Changed max gaussian std deviation to 16 (was 128) -- VG_DRAW_IMAGE_MULTIPLY converts luminance to RGB if either paint or image color is RGB -- Fixes A40102 by storing input floats as is - -February 12, 2008 -- fixed arc transformation. -- fixed point along path corner cases. -- partially fixed A40102 by not filtering invalid float input. - -December 12, 2007 -- fixed an overflow bug in vgFillMaskLayer error handling. -- increased accuracy for Gaussian blur. The new code avoids an infinite loop with a very small std dev. -- fixed a bug in Font::find that caused deleted fonts to be returned. - -November 20, 2007 -- reimplemented 1,2 & 4 bits per pixel images -- fixed vgGetParameter for paint -- fixed https://cvs.khronos.org/bugzilla/show_bug.cgi?id=1095 RI handling of child images with shared storage - -vgGetParent: return closest valid ancestor, or image itself if no ancestor was found. -- EGL refactoring & clean up -- divided OS native parts of EGL into separate files that should be included in that platform's build -- added a generic OS backend for EGL (not thread safe, no window rendering) -- fixed https://cvs.khronos.org/bugzilla/show_bug.cgi?id=1943 RI does not handle channel mask correctly for lL/sL/BW1 -- removed EGL_IMAGE_IN_USE_ERROR from vgDrawGlyph(s) -- added configs without an alpha mask to facilitate CTS reference image creation -- implemented more accurate stroking by rendering each stroke part into a coverage buffer and compositing from there - -fixes https://cvs.khronos.org/bugzilla/show_bug.cgi?id=2221 RI errors at end of curved strokes. -- bugfix: joins used path midpoints, interpolateStroke and caps didn't => seams (visible in some G60101 cases) -- vgCreateMaskLayer returns VG_INVALID_HANDLE if the current surface doesn't have a mask layer -- vgRenderToMask bugfix: temp buffer is now cleared between fill and stroke -- bugfix: vgCreateImage returns an error if allowedQuality is zero -- bugfix: vgSetPaint returns an error if paintModes is zero -- bugfix: vgCreateFont doesn't return an error if capacityHint is zero -- bugfix: writeFilteredPixel writes also into luminance formats - -October 12, 2007 --Upgrade to OpenVG 1.1, including - -Implemented MSAA, added 4 and 8 sample EGLConfigs - -Implemented VG_A_4 and VG_A_1 image formats and EGLConfigs - -Implemented Glyph API - -Implemented new masking functions - -Implemented color transform --Implemented native EGL backends for Windows & Mac OS X => Fix for bugzilla 1376 RI uses non-standard EGL implementation - *RI now works with CTS generation's native_w32.c (native_ri.c can be removed). - *dependency on GLUT has been removed. GLUT code is still included and can be compiled in instead of native by defining RI_USE_GLUT. --16 bit EGLConfigs now expose 4 mask bits, 8 bit configs 8, 4 bit configs 4, and 1 bit configs 1. MSAA configs expose one bit per sample. --EGL now works with any display, not just EGL_DEFAULT_DISPLAY --Simplification: removed code to handle less than 8 bits per pixel. Smaller bit depths always allocate 8 bits per pixel. --Changed rasterizer data types to RScalar and RVector2 so that it's possible to alter RIfloat precision without affecting rasterization. --Accuracy: increased circularLerp precision --Bugfix: matrix inversion now checks if the input matrix is affine and forces the inverted matrix to be affine as well --Bugfix: fixed eglCopyBuffers (copied from dst to dst) --Bugfix: fixed eglCreatePixmapSurface (allowed only VG_sRGBA_8888, didn't give an error if config had more than one sample per pixel) --Bugfix: bugzilla 2465: RI asserts when setting maximum amount of gradient stops - -February 27, 2007 --changed to MIT open source license. --bugfix, bugzilla 820: RGB and luminance are now treated as different color spaces. --bugfix, bugzilla 1094/1095: vgGetParent now returns the input image in case its parent is already destroyed. - -December 1, 2006 --bugfix, bugzilla 649: allowed image quality is now taken into account when deciding resampling filter. --bugfix, bugzilla 650, bad stroking accuracy reported by TK Chan and Mika Tuomi: curve tessellation is now increased from 64 to 256. RI_MAX_EDGES has been increased from 100000 to 262144 to facilitate the increased number of edges. --bugfix, reported by Chris Wynn, affects I30206: degenerate gradients in repeat mode now render the first stop color instead of the last one. --changed float to RIfloat, added an option to compile RIfloat into a class to test reduced precision float ops - -September 6, 2006 --bugfix, bugzilla 591: CLOSE_PATH followed by a MOVE_TO doesn't produce an extra end cap anymore --abs values of arc axis lengths are taken only just before rendering --undefined bits of bitfields are now ignored in the API - -September 1, 2006 --changed colorToInt to use mathematical round-to-nearest as recommended by new language in section 3.4.4. --implemented VG_PAINT_COLOR_RAMP_PREMULTIPLIED --implemented VG_STROKE_DASH_PHASE_RESET --implemented new language for filter channelMasks (section 11.2) --tangents returned by vgPointAlongPath are now normalized --implemented VG_MAX_GAUSSIAN_STD_DEVIATION, rewrote Gaussian blur code --vgGetString: if no context, return NULL. VG_VERSION returns the spec version (1.0). --bugfix, bugzilla 542: vgSeparableConvolve now convolves the edge color with the horizontal kernel and uses that as the edge color for the vertical pass --ellipse rh and rv are replaced by their absolute values whenever read for processing, the absolute values are not written into the path data - -August 18, 2006 --bugfix, M30301: the arguments for vguComputeWarpQuadToQuad were the wrong way around, destination should come before source. --bugfix, M10102: check for degeneracy in vguComputeWarpSquareToQuad is done before the affinity check so that degenerate affine matrices also produce the bad warp error --bugfix, bugzilla 491: Chris Wynn's vgComputeWarpSquareToQuad -case. There was a wrong mapping between vertices, (1,1) was mapped to (dx2,dy2) --bugfix, bugzilla 519: vguPolygon wrong error check. vguPolygon didn't have an error check for the count argument --bugfix, bugzilla 518: vgGetParameterfv/iv wrong errors. vgGetParametrtfv/iv error checking was for count < 0 instead of count <= 0. --bugfix, bugzilla 517: wrong cap flag checked in vgPathTransformedBounds --bugfix, bugzilla 494: egl.h has wrong values for OPENVG_BIT and OPENGL_ES_BIT. Copied the enumerations from the 1.3 egl.h on the Khronos site (OpenKode/egl/egl.h) --bugfix, bugzilla 492: gradient filter window was biased --bugfix: when appending paths, there was a loop over coordinates to replace arc axis lengths by their absolute values. However, if the path wasn't empty, the loop accessed wrong coordinates. Fixes: Qingping Zhang's cases 2&3. --bugfix: image filter write mask was ignored when writing to VG_A_8 images. Fixes: Qingping Zhang's case 13. --bugfix: if image filter processing format is premultiplied, color channels are clamped to alpha before conversion to destination format --bugfix: in eglReleaseThread the EGL instance was freed when its reference count reached zero, but the pointer wasn't made NULL, causing the use of uninitialized instance. --bugfix: vgClearImage didn't clamp the clear color to [0,1] range --bugfix: a zero-length dash at a path vertex produces a join --bugfix: vgSetParameter now checks paramType for all object types --bugfix: convolution filters incorrectly restricted the area read from the source image to the intersection of source and destination image sizes --bugfix: EGL surface creation now defaults correctly to EGL_COLOR_SPACE_sRGB --antialiasing is done in the linear color space as the spec recommends. --image filters clamp the result to [0,1] range. --Color::pack and Color::convert assert that their input is in [0,1] range --in case a projective transform is used, VGImageMode is always VG_DRAW_IMAGE_NORMAL --the default value for VG_FILTER_FORMAT_LINEAR is now VG_FALSE --added Matrix::isAffine for easy affinity check --Color::clamp clamps color channels to alpha for premultiplied colors --VG_BLEND_LIGHTEN: color channels cannot exceed alpha anymore --RI now supports flexible pixel formats. Any bit depth for RGBA is now supported. --eglGetProcAddress is now properly implemented, it returns a function pointer for eglSetConfigPreferenceHG extension --eglQueryString now returns "eglSetConfigPreferenceHG" for EGL_EXTENSIONS --location of egl.h in RI. use EGL/egl.h, VG/openvg.h, VG/vgu.h --OpenVG 1.0.1 spec changes - +use the latest openvg.h - +2.8: AA happens in linear space - +3.4: alpha channel depth of zero results in alpha=1 when read - +4.1: return VG_NO_CONTEXT_ERROR from vgGetError in case no context is current - +5.1: VG_SCREEN_LAYOUT (default = screen layout of the display) - +5.2, 5.3: vgSet, vgGet, vgSetParameter, vgGetParameter: handling of invalid values of count - +5.2.1: new default for VG_FILTER_FORMAT_LINEAR is VG_FALSE - +8.5.3: get rid of VG_PATH_DATATYPE_INVALID and VG_IMAGE_FORMAT_INVALID enums - +10.2: get rid of old extension image formats, add the official ones - +10.5: when reading/writing pixels, clamp color channels to [0, alpha] - +10.8: when a projective transform is used, always use VG_DRAW_IMAGE_NORMAL mode - +10.8: VG_DRAW_IMAGE_MULTIPLY: if color spaces of paint and image don't match, no conversion takes place, result is in image color space - +12.4: clamp the result of additive blend to [0,1] - -October 20, 2005 --Gradients are filtered to avoid aliasing --Subpaths that ended with a close path segment were capped and joined incorrectly. Fixed. --Alpha mask was allocated per context, not per EGL surface. Fixed. - -August 22, 2005 --Updated to spec amendment --Fixed bugs --Implemented eglChooseConfig and eglReleaseThread - -July 22, 2005 --Updated to 18th July 2005 version of the OpenVG 1.0 spec. --Updated to 20th July 2005 version of the EGL 1.2 spec. --Fixed bugs. --openvg.h, vgu.h and egl.h are now contained in include/vg directory. - -May 4, 2005 --Updated to April 26th 2005 version of the OpenVG 1.0 spec. --Can share images, paths, and paint between contexts. --Fixed path tangent computation. --Implemented image filters. --Fixed bugs. --Changed directory structure a bit. - -March 29, 2005 --Updated to March 28th 2005 version of the OpenVG 1.0 spec. --Changed rasterizer to use 32 samples per pixel in the high quality - mode (renders faster at the expense of some aliasing). --EGL allocates sRGB rendering surfaces. --Includes GLUT dll against which tiger.exe was linked. - -March 24, 2005 --Initial release. diff --git a/vc/src/hello_pi/hello_tiger/tiger.c b/vc/src/hello_pi/hello_tiger/tiger.c @@ -1,1952 +0,0 @@ -/*------------------------------------------------------------------------ - * - * OpenVG 1.0.1 Reference Implementation sample code - * ------------------------------------------------- - * - * Copyright (c) 2007 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief Path and paint data for Tiger image. - * \note - *//*-------------------------------------------------------------------*/ - -const int tigerCommandCount = 4151; -const char tigerCommands[4151] = { -'F', 'N', 'B', 'M', 'M', 'L', 'L', 'L', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', -'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', -'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', -'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', -'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', -'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', -'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', -'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', -'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', -'L', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'L', 'C', 'C', 'L', 'C', 'C', 'C', 'C', -'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'N', 'S', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'L', 'C', 'L', 'C', 'C', 'C', 'C', 'C', -'L', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'L', 'L', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', -'L', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'N', 'S', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', -'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', -'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', -'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', -'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'L', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'L', 'C', 'C', -'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', -'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'C', 'L', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', -'L', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'L', 'C', 'C', 'C', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', -'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'N', -'S', 'B', 'M', 'M', 'C', 'C', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', -'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', -'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', -'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', -'C', 'C', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', -'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'N', 'S', -'B', 'M', 'M', 'C', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', -'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', -'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', -'C', 'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', -'E', 'N', 'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', -'S', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'B', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'L', 'C', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', -'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', -'C', 'L', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'C', 'C', -'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'C', 'C', 'C', -'C', 'L', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'C', 'C', 'C', 'C', -'L', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', -'C', 'C', 'L', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', -'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'L', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'R', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'L', 'L', 'C', 'E', 'F', 'N', 'R', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', -'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'L', 'L', 'L', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'L', 'L', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'L', 'L', 'C', 'C', 'C', 'C', 'C', -'C', 'L', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'L', 'L', 'L', 'N', 'S', 'R', 'M', 'M', 'C', 'C', -'N', 'S', 'R', 'M', 'M', 'C', 'C', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'N', 'S', 'R', 'M', 'M', -'C', 'C', 'C', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'E', 'F', 'N', -'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L', -'L', 'C', 'C', 'C', 'C', 'L', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'L', 'C', 'F', 'N', 'B', 'M', 'M', -'C', 'L', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'L', 'C', 'C', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', -'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', -'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', -'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', -'L', 'L', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', -'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', -'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', -'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', -'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', -'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', -'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', -'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', -'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', -'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', -'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', -'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', -'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', -'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', -'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', -'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', -'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', -'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', -'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', -'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', -'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', -'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', -'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', -'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', -'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', -'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', -'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'N', 'S', 'R', 'M', 'M', 'C', 'C', 'C', 'E', -'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', -'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', -'F', 'N', 'B', 'M', 'M', 'C', 'C', 'L', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', -'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', -'R', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'C', 'C', 'C', -'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', -'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', -'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', -'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', -'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', -'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', -'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', 'N', 'R', 'M', 'M', 'C', 'C', 'C', 'E', 'F', -'N', 'R', 'M', 'M', 'L', 'C', 'L', 'N', 'S', 'R', 'M', 'M', 'L', 'N', 'S', 'R', 'M', 'M', 'C', 'N', -'S', 'R', 'M', 'M', 'C', 'N', 'S', 'R', 'M', 'M', 'C'}; - -const float tigerMinX = 0.0f; -const float tigerMaxX = 612.0f; -const float tigerMinY = 0.0f; -const float tigerMaxY = 792.0f; - -const int tigerPointCount = 17005; -const float tigerPoints[17005] = { -10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, 0, -792, 0, 0, 612, 0, 612, 792, 10, 0, 1, -1, 1, 1, 1, 1, 5, 85.25f, 487.75f, 85.25f, 487.75f, -85.5742f, 485.199f, 84.25f, 484.746f, 83.7617f, 485.242f, 65.6641f, 538.125f, 43.2461f, 535.746f, -43.2422f, 535.746f, 62.6445f, 543.746f, 85.25f, 487.75f, 10, 0.1892f, 0, 0, -0, 0, 0, 0, 5, 85.25f, 487.75f, 85.25f, 487.75f, 85.5742f, -485.199f, 84.25f, 484.746f, 83.7617f, 485.242f, 65.6641f, 538.125f, 43.2461f, 535.746f, 43.2422f, -535.746f, 62.6445f, 543.746f, 85.25f, 487.75f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 89.2461f, 490.75f, 89.2461f, 490.75f, 88.7422f, 488.613f, -88.2461f, 488.746f, 87.0508f, 489.27f, 88.0234f, 545.156f, 66.2461f, 550.746f, 66.2461f, 550.742f, -87.0977f, 551.469f, 89.2461f, 490.75f, 10, 0.1892f, 0, 0, 0, 0, -0, 0, 5, 89.2461f, 490.75f, 89.2461f, 490.75f, 88.7422f, 488.613f, 88.2461f, -488.746f, 87.0508f, 489.27f, 88.0234f, 545.156f, 66.2461f, 550.746f, 66.2461f, 550.742f, 87.0977f, -551.469f, 89.2461f, 490.75f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 119.25f, 443.75f, 119.25f, 443.75f, 121.387f, 442.992f, 121.246f, 442.746f, -120.352f, 441.504f, 66.2578f, 455.586f, 56.25f, 435.75f, 56.25f, 435.75f, 59.9062f, 456.168f, -119.25f, 443.75f, 10, 0.1892f, 0, 0, 0, 0, 0, 0, -5, 119.25f, 443.75f, 119.25f, 443.75f, 121.387f, 442.992f, 121.246f, 442.746f, 120.352f, -441.504f, 66.2578f, 455.586f, 56.25f, 435.75f, 56.25f, 435.75f, 59.9062f, 456.168f, 119.25f, -443.75f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -116.246f, 432.75f, 116.246f, 432.75f, 118.539f, 432.383f, 118.25f, 431.746f, 118.023f, 430.641f, -62.25f, 426.965f, 58.25f, 404.75f, 58.25f, 404.75f, 56.0391f, 425.516f, 116.246f, 432.75f, -10, 0.1892f, 0, 0, 0, 0, 0, 0, 5, 116.246f, -432.75f, 116.246f, 432.75f, 118.539f, 432.383f, 118.25f, 431.746f, 118.023f, 430.641f, 62.25f, -426.965f, 58.25f, 404.75f, 58.25f, 404.75f, 56.0391f, 425.516f, 116.246f, 432.75f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 112.25f, 438.746f, -112.25f, 438.742f, 113.82f, 438.164f, 113.25f, 437.75f, 113.059f, 436.52f, 57.3437f, 441.016f, -50.2461f, 419.75f, 50.2461f, 419.75f, 50.9883f, 440.492f, 112.25f, 438.746f, 10, 0.1892f, -0, 0, 0, 0, 0, 0, 5, 112.25f, 438.746f, 112.25f, -438.742f, 113.82f, 438.164f, 113.25f, 437.75f, 113.059f, 436.52f, 57.3437f, 441.016f, 50.2461f, -419.75f, 50.2461f, 419.75f, 50.9883f, 440.492f, 112.25f, 438.746f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 100.246f, 458.746f, 100.246f, 458.746f, -101.527f, 457.406f, 101.25f, 456.746f, 100.121f, 456.262f, 52.0039f, 484.699f, 36.25f, 467.746f, -36.25f, 467.746f, 46.0586f, 487.012f, 100.246f, 458.746f, 10, 0.1892f, 0, 0, -0, 0, 0, 0, 5, 100.246f, 458.746f, 100.246f, 458.746f, 101.527f, -457.406f, 101.25f, 456.746f, 100.121f, 456.262f, 52.0039f, 484.699f, 36.25f, 467.746f, 36.25f, -467.746f, 46.0586f, 487.012f, 100.246f, 458.746f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 92.2461f, 454.75f, 92.2422f, 454.75f, 93.3906f, 452.969f, -93.2461f, 452.75f, 92.125f, 451.672f, 41.0976f, 474.484f, 27.25f, 456.746f, 27.25f, 456.746f, -34.9258f, 476.105f, 92.2461f, 454.75f, 10, 0.1892f, 0, 0, 0, 0, -0, 0, 5, 92.2461f, 454.75f, 92.2422f, 454.75f, 93.3906f, 452.969f, 93.2461f, -452.75f, 92.125f, 451.672f, 41.0976f, 474.484f, 27.25f, 456.746f, 27.25f, 456.746f, 34.9258f, -476.105f, 92.2461f, 454.75f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 89.2461f, 449.746f, 89.2461f, 449.742f, 90.6992f, 448.723f, 90.25f, 447.746f, -89.6211f, 447.262f, 35.9609f, 462.906f, 25.25f, 442.746f, 25.25f, 442.742f, 29.625f, 463.676f, -89.2461f, 449.746f, 10, 0.1892f, 0, 0, 0, 0, 0, 0, -5, 89.2461f, 449.746f, 89.2461f, 449.742f, 90.6992f, 448.723f, 90.25f, 447.746f, 89.6211f, -447.262f, 35.9609f, 462.906f, 25.25f, 442.746f, 25.25f, 442.742f, 29.625f, 463.676f, 89.2461f, -449.746f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -100.246f, 448.75f, 100.246f, 448.75f, 101.969f, 447.469f, 101.25f, 446.75f, 100.43f, 446.512f, -56.3516f, 480.887f, 39.2461f, 466.746f, 39.2461f, 466.742f, 50.75f, 483.941f, 100.246f, 448.75f, -10, 0.1892f, 0, 0, 0, 0, 0, 0, 5, 100.246f, -448.75f, 100.246f, 448.75f, 101.969f, 447.469f, 101.25f, 446.75f, 100.43f, 446.512f, 56.3516f, -480.887f, 39.2461f, 466.746f, 39.2461f, 466.742f, 50.75f, 483.941f, 100.246f, 448.75f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 79.25f, 480.746f, -79.25f, 480.746f, 79.6367f, 479.02f, 79.25f, 478.746f, 77.8789f, 478.578f, 46.418f, 524.777f, -25.25f, 516.75f, 25.25f, 516.75f, 42.0195f, 529.398f, 79.25f, 480.746f, 10, 0.1892f, -0, 0, 0, 0, 0, 0, 5, 79.25f, 480.746f, 79.25f, -480.746f, 79.6367f, 479.02f, 79.25f, 478.746f, 77.8789f, 478.578f, 46.418f, 524.777f, 25.25f, -516.75f, 25.25f, 516.75f, 42.0195f, 529.398f, 79.25f, 480.746f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 79.25f, 473.746f, 79.25f, 473.742f, -80.8164f, 471.527f, 80.25f, 470.75f, 79.1914f, 470.723f, 38.5078f, 509.051f, 19.25f, 496.75f, -19.25f, 496.75f, 33.2148f, 512.609f, 79.25f, 473.746f, 10, 0.1892f, 0, 0, -0, 0, 0, 0, 5, 79.25f, 473.746f, 79.25f, 473.742f, 80.8164f, -471.527f, 80.25f, 470.75f, 79.1914f, 470.723f, 38.5078f, 509.051f, 19.25f, 496.75f, 19.25f, -496.75f, 33.2148f, 512.609f, 79.25f, 473.746f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 79.25f, 468.75f, 79.25f, 468.75f, 80.8516f, 466.828f, -80.25f, 466.746f, 79.3086f, 465.875f, 35.2305f, 500.246f, 17.25f, 485.75f, 17.25f, 485.75f, -29.6289f, 503.301f, 79.25f, 468.75f, 10, 0.1892f, 0, 0, 0, 0, -0, 0, 5, 79.25f, 468.75f, 79.25f, 468.75f, 80.8516f, 466.828f, 80.25f, -466.746f, 79.3086f, 465.875f, 35.2305f, 500.246f, 17.25f, 485.75f, 17.25f, 485.75f, 29.6289f, -503.301f, 79.25f, 468.75f, 10, 0, 1, 1, 1, 1, 1, -1, 88, 77.2461f, 466.746f, 77.7383f, 459.973f, 78.8242f, 452.746f, 80.25f, 449.746f, -80.25f, 449.742f, 76.7773f, 435.676f, 86.25f, 420.746f, 86.25f, 420.742f, 86.0195f, 413.238f, -88.2461f, 409.746f, 88.2461f, 409.742f, 92.1797f, 400.477f, 97.25f, 399.75f, 101.73f, 398.887f, -111.324f, 395.508f, 122.246f, 393.75f, 122.246f, 393.75f, 141.02f, 378.477f, 137.246f, 364.75f, -137.242f, 364.75f, 137.059f, 346.355f, 133.246f, 344.75f, 133.246f, 344.75f, 145.859f, 356.918f, -135.25f, 338.75f, 130.25f, 317.746f, 130.25f, 317.742f, 158.617f, 341.516f, 141.25f, 321.746f, -130.25f, 292.75f, 130.25f, 292.75f, 152.02f, 312.918f, 144.246f, 303.75f, 140.25f, 293.746f, -140.25f, 293.746f, 188.098f, 323.918f, 154.246f, 291.746f, 154.242f, 291.746f, 163.02f, 295.316f, -168.25f, 291.746f, 168.25f, 291.746f, 175.34f, 293.559f, 174.25f, 291.746f, 174.25f, 291.746f, -151.578f, 280.355f, 147.25f, 259.746f, 147.25f, 259.746f, 156.859f, 271.117f, 153.246f, 258.746f, -154.246f, 246.746f, 154.242f, 246.746f, 158.18f, 270.238f, 157.25f, 228.746f, 157.25f, 228.742f, -178.859f, 248.676f, 166.246f, 225.746f, 166.246f, 207.75f, 166.246f, 207.75f, 182.816f, 225.355f, -176.246f, 211.75f, 176.246f, 211.75f, 186.777f, 220.957f, 182.25f, 203.746f, 182.25f, 203.746f, -181.5f, 192.797f, 186.25f, 204.746f, 186.25f, 204.746f, 203.938f, 238.777f, 197.25f, 209.75f, -197.25f, 209.75f, 196.457f, 188.836f, 201.246f, 204.746f, 201.246f, 204.746f, 202.18f, 193.676f, -212.246f, 185.75f, 212.246f, 185.75f, 210.977f, 241.637f, 225.25f, 201.746f, 229.25f, 183.746f, -229.25f, 183.742f, 232.539f, 194.117f, 232.246f, 199.75f, 232.246f, 199.75f, 248.379f, 217.879f, -241.25f, 190.746f, 241.25f, 190.746f, 257.617f, 216.117f, 254.246f, 201.746f, 254.246f, 201.746f, -245.738f, 183.996f, 247.246f, 178.75f, 247.242f, 178.75f, 265.977f, 216.996f, 267.246f, 218.75f, -267.246f, 218.75f, 265.098f, 172.117f, 277.246f, 211.75f, 277.246f, 211.75f, 283.137f, 198.516f, -280.246f, 193.746f, 280.242f, 193.746f, 288.859f, 202.477f, 288.246f, 205.746f, 288.246f, 205.742f, -293.039f, 215.016f, 296.25f, 199.75f, 296.25f, 199.75f, 298.098f, 189.719f, 300.246f, 192.746f, -300.246f, 192.746f, 304.258f, 166.836f, 305.25f, 191.746f, 305.25f, 191.746f, 307.34f, 206.879f, -299.246f, 219.75f, 299.246f, 219.75f, 300.297f, 223.156f, 297.246f, 227.746f, 297.246f, 227.742f, -312.18f, 203.797f, 304.25f, 235.746f, 304.25f, 235.746f, 316.578f, 226.676f, 318.25f, 226.746f, -318.25f, 226.746f, 302.937f, 252.195f, 312.246f, 246.746f, 312.242f, 246.746f, 306.898f, 258.355f, -326.25f, 244.75f, 326.25f, 244.75f, 309.098f, 262.758f, 328.25f, 251.75f, 328.25f, 251.75f, -337.258f, 245.156f, 329.25f, 255.75f, 329.25f, 255.75f, 313.059f, 273.758f, 337.25f, 253.75f, -337.25f, 253.75f, 350.02f, 235.918f, 351.25f, 232.75f, 351.25f, 232.75f, 339.898f, 264.957f, -335.246f, 267.75f, 335.242f, 267.75f, 344.301f, 308.078f, 389.246f, 290.75f, 389.246f, 290.75f, -397.098f, 271.996f, 402.246f, 291.746f, 402.242f, 291.746f, 416.02f, 299.277f, 428.25f, 268.75f, -428.25f, 268.75f, 432.738f, 283.879f, 432.246f, 286.746f, 432.246f, 286.742f, 439.34f, 285.637f, -438.25f, 286.746f, 438.25f, 286.742f, 452.98f, 282.117f, 454.246f, 282.746f, 454.246f, 282.746f, -461.777f, 275.516f, 462.246f, 279.75f, 462.242f, 279.75f, 472.34f, 276.398f, 470.25f, 280.746f, -470.25f, 280.746f, 479.82f, 263.195f, 480.246f, 258.746f, 483.25f, 274.75f, 485.25f, 271.746f, -485.25f, 271.746f, 486.859f, 279.918f, 486.25f, 280.746f, 485.098f, 282.559f, 507.98f, 273.758f, -513.246f, 250.746f, 515.246f, 241.75f, 515.242f, 241.75f, 522.059f, 257.918f, 520.246f, 262.75f, -520.246f, 262.75f, 526.02f, 261.438f, 526.246f, 256.746f, 526.242f, 256.746f, 530.859f, 282.117f, -525.25f, 288.746f, 525.25f, 288.742f, 530.418f, 289.598f, 531.246f, 285.75f, 531.246f, 293.746f, -531.246f, 293.746f, 539.66f, 292.676f, 539.246f, 295.746f, 539.242f, 295.742f, 544.5f, 299.719f, -546.246f, 294.75f, 546.242f, 294.75f, 533.059f, 333.156f, 553.246f, 311.75f, 553.246f, 311.75f, -561.219f, 300.156f, 557.246f, 320.75f, 553.301f, 341.516f, 548.898f, 343.277f, 554.25f, 343.746f, -554.25f, 343.742f, 555.059f, 347.676f, 553.246f, 349.75f, 550.66f, 351.195f, 554.25f, 349.75f, -554.25f, 349.75f, 554.25f, 349.75f, 559.461f, 345.035f, 553.246f, 368.746f, 553.246f, 368.746f, -560.777f, 367.477f, 547.25f, 399.75f, 547.25f, 399.75f, 550.66f, 402.238f, 546.246f, 411.746f, -546.242f, 411.742f, 555.059f, 406.637f, 558.25f, 408.75f, 558.25f, 408.75f, 557.699f, 410.156f, -554.25f, 414.746f, 554.25f, 414.746f, 530.418f, 474.84f, 553.246f, 450.75f, 553.246f, 450.75f, -565.895f, 435.73f, 559.246f, 460.746f, 559.242f, 460.742f, 548.832f, 487.223f, 549.25f, 491.746f, -77.2461f, 466.746f, 10, 1.1f, 0, 0, 0, 0, 0, 0, -88, 77.2461f, 466.746f, 77.7383f, 459.973f, 78.8242f, 452.746f, 80.25f, 449.746f, 80.25f, -449.742f, 76.7773f, 435.676f, 86.25f, 420.746f, 86.25f, 420.742f, 86.0195f, 413.238f, 88.2461f, -409.746f, 88.2461f, 409.742f, 92.1797f, 400.477f, 97.25f, 399.75f, 101.73f, 398.887f, 111.324f, -395.508f, 122.246f, 393.75f, 122.246f, 393.75f, 141.02f, 378.477f, 137.246f, 364.75f, 137.242f, -364.75f, 137.059f, 346.355f, 133.246f, 344.75f, 133.246f, 344.75f, 145.859f, 356.918f, 135.25f, -338.75f, 130.25f, 317.746f, 130.25f, 317.742f, 158.617f, 341.516f, 141.25f, 321.746f, 130.25f, -292.75f, 130.25f, 292.75f, 152.02f, 312.918f, 144.246f, 303.75f, 140.25f, 293.746f, 140.25f, -293.746f, 188.098f, 323.918f, 154.246f, 291.746f, 154.242f, 291.746f, 163.02f, 295.316f, 168.25f, -291.746f, 168.25f, 291.746f, 175.34f, 293.559f, 174.25f, 291.746f, 174.25f, 291.746f, 151.578f, -280.355f, 147.25f, 259.746f, 147.25f, 259.746f, 156.859f, 271.117f, 153.246f, 258.746f, 154.246f, -246.746f, 154.242f, 246.746f, 158.18f, 270.238f, 157.25f, 228.746f, 157.25f, 228.742f, 178.859f, -248.676f, 166.246f, 225.746f, 166.246f, 207.75f, 166.246f, 207.75f, 182.816f, 225.355f, 176.246f, -211.75f, 176.246f, 211.75f, 186.777f, 220.957f, 182.25f, 203.746f, 182.25f, 203.746f, 181.5f, -192.797f, 186.25f, 204.746f, 186.25f, 204.746f, 203.938f, 238.777f, 197.25f, 209.75f, 197.25f, -209.75f, 196.457f, 188.836f, 201.246f, 204.746f, 201.246f, 204.746f, 202.18f, 193.676f, 212.246f, -185.75f, 212.246f, 185.75f, 210.977f, 241.637f, 225.25f, 201.746f, 229.25f, 183.746f, 229.25f, -183.742f, 232.539f, 194.117f, 232.246f, 199.75f, 232.246f, 199.75f, 248.379f, 217.879f, 241.25f, -190.746f, 241.25f, 190.746f, 257.617f, 216.117f, 254.246f, 201.746f, 254.246f, 201.746f, 245.738f, -183.996f, 247.246f, 178.75f, 247.242f, 178.75f, 265.977f, 216.996f, 267.246f, 218.75f, 267.246f, -218.75f, 265.098f, 172.117f, 277.246f, 211.75f, 277.246f, 211.75f, 283.137f, 198.516f, 280.246f, -193.746f, 280.242f, 193.746f, 288.859f, 202.477f, 288.246f, 205.746f, 288.246f, 205.742f, 293.039f, -215.016f, 296.25f, 199.75f, 296.25f, 199.75f, 298.098f, 189.719f, 300.246f, 192.746f, 300.246f, -192.746f, 304.258f, 166.836f, 305.25f, 191.746f, 305.25f, 191.746f, 307.34f, 206.879f, 299.246f, -219.75f, 299.246f, 219.75f, 300.297f, 223.156f, 297.246f, 227.746f, 297.246f, 227.742f, 312.18f, -203.797f, 304.25f, 235.746f, 304.25f, 235.746f, 316.578f, 226.676f, 318.25f, 226.746f, 318.25f, -226.746f, 302.937f, 252.195f, 312.246f, 246.746f, 312.242f, 246.746f, 306.898f, 258.355f, 326.25f, -244.75f, 326.25f, 244.75f, 309.098f, 262.758f, 328.25f, 251.75f, 328.25f, 251.75f, 337.258f, -245.156f, 329.25f, 255.75f, 329.25f, 255.75f, 313.059f, 273.758f, 337.25f, 253.75f, 337.25f, -253.75f, 350.02f, 235.918f, 351.25f, 232.75f, 351.25f, 232.75f, 339.898f, 264.957f, 335.246f, -267.75f, 335.242f, 267.75f, 344.301f, 308.078f, 389.246f, 290.75f, 389.246f, 290.75f, 397.098f, -271.996f, 402.246f, 291.746f, 402.242f, 291.746f, 416.02f, 299.277f, 428.25f, 268.75f, 428.25f, -268.75f, 432.738f, 283.879f, 432.246f, 286.746f, 432.246f, 286.742f, 439.34f, 285.637f, 438.25f, -286.746f, 438.25f, 286.742f, 452.98f, 282.117f, 454.246f, 282.746f, 454.246f, 282.746f, 461.777f, -275.516f, 462.246f, 279.75f, 462.242f, 279.75f, 472.34f, 276.398f, 470.25f, 280.746f, 470.25f, -280.746f, 479.82f, 263.195f, 480.246f, 258.746f, 483.25f, 274.75f, 485.25f, 271.746f, 485.25f, -271.746f, 486.859f, 279.918f, 486.25f, 280.746f, 485.098f, 282.559f, 507.98f, 273.758f, 513.246f, -250.746f, 515.246f, 241.75f, 515.242f, 241.75f, 522.059f, 257.918f, 520.246f, 262.75f, 520.246f, -262.75f, 526.02f, 261.438f, 526.246f, 256.746f, 526.242f, 256.746f, 530.859f, 282.117f, 525.25f, -288.746f, 525.25f, 288.742f, 530.418f, 289.598f, 531.246f, 285.75f, 531.246f, 293.746f, 531.246f, -293.746f, 539.66f, 292.676f, 539.246f, 295.746f, 539.242f, 295.742f, 544.5f, 299.719f, 546.246f, -294.75f, 546.242f, 294.75f, 533.059f, 333.156f, 553.246f, 311.75f, 553.246f, 311.75f, 561.219f, -300.156f, 557.246f, 320.75f, 553.301f, 341.516f, 548.898f, 343.277f, 554.25f, 343.746f, 554.25f, -343.742f, 555.059f, 347.676f, 553.246f, 349.75f, 550.66f, 351.195f, 554.25f, 349.75f, 554.25f, -349.75f, 554.25f, 349.75f, 559.461f, 345.035f, 553.246f, 368.746f, 553.246f, 368.746f, 560.777f, -367.477f, 547.25f, 399.75f, 547.25f, 399.75f, 550.66f, 402.238f, 546.246f, 411.746f, 546.242f, -411.742f, 555.059f, 406.637f, 558.25f, 408.75f, 558.25f, 408.75f, 557.699f, 410.156f, 554.25f, -414.746f, 554.25f, 414.746f, 530.418f, 474.84f, 553.246f, 450.75f, 553.246f, 450.75f, 565.895f, -435.73f, 559.246f, 460.746f, 559.242f, 460.742f, 548.832f, 487.223f, 549.25f, 491.746f, 77.2461f, -466.746f, 10, 0, 0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, 44, -549.25f, 491.746f, 550.379f, 491.531f, 552.805f, 490.293f, 554.25f, 488.746f, 554.25f, 488.742f, -561.66f, 476.598f, 556.25f, 496.75f, 556.25f, 496.75f, 545.82f, 528.52f, 555.246f, 515.746f, -555.246f, 515.742f, 562.098f, 508.277f, 558.25f, 522.746f, 554.328f, 541.309f, 551.25f, 548.746f, -551.25f, 548.746f, 551.25f, 548.746f, 564.301f, 543.039f, 535.246f, 586.75f, 544.246f, 582.75f, -544.246f, 582.75f, 522.938f, 626.199f, 499.25f, 631.746f, 490.25f, 638.746f, 490.25f, 638.742f, -532.621f, 680.316f, 518.25f, 720.75f, 518.25f, 720.75f, 511.059f, 726.52f, 500.246f, 716.75f, -500.246f, 716.75f, 493.461f, 711.117f, 487.246f, 712.75f, 487.246f, 712.75f, 452.98f, 711.559f, -451.25f, 711.746f, 448.578f, 711.559f, 410.301f, 752.477f, 338.25f, 732.746f, 338.25f, 732.742f, -332.418f, 730.918f, 327.25f, 731.75f, 327.25f, 731.75f, 307.34f, 749.84f, 253.246f, 724.746f, -253.246f, 724.746f, 242.656f, 722.559f, 241.25f, 722.746f, 239.137f, 722.559f, 236.059f, 722.559f, -227.25f, 715.746f, 218.457f, 708.477f, 218.02f, 707.598f, 216.25f, 705.75f, 216.25f, 705.75f, -197.777f, 693.52f, 192.25f, 692.75f, 192.25f, 692.75f, 179.738f, 685.598f, 175.25f, 674.75f, -171.246f, 673.746f, 171.246f, 673.742f, 169.18f, 665.359f, 168.25f, 663.75f, 168.25f, 663.75f, -163.457f, 660.078f, 162.25f, 653.746f, 162.25f, 653.742f, 152.898f, 647.316f, 153.246f, 642.746f, -153.242f, 642.742f, 151.578f, 636.758f, 150.246f, 631.746f, 150.246f, 631.742f, 142.777f, 626.199f, -143.246f, 622.75f, 143.242f, 622.75f, 135.297f, 607.719f, 136.25f, 599.75f, 136.25f, 599.75f, -129.578f, 600.68f, 126.246f, 597.75f, 126.242f, 597.75f, 125.617f, 592.758f, 124.25f, 592.746f, -124.25f, 592.746f, 120.777f, 591, 123.25f, 586.75f, 123.25f, 586.75f, 121.656f, 583.52f, -121.246f, 581.746f, 121.246f, 581.746f, 122.098f, 578.68f, 117.25f, 572.746f, 117.25f, 572.742f, -110.219f, 551.84f, 112.25f, 545.75f, 112.25f, 545.75f, 112.859f, 540.84f, 110.246f, 538.75f, -110.246f, 538.75f, 105.816f, 539.52f, 115.246f, 526.746f, 115.242f, 526.742f, 115.938f, 525, -112.25f, 522.746f, 112.25f, 522.746f, 93.5f, 518.398f, 91.25f, 500.746f, 91.25f, 500.746f, -75.8984f, 484.078f, 76.2461f, 478.746f, 75.8984f, 475.824f, 76.1953f, 472.359f, 77.2461f, 467.746f, -77.2461f, 467.746f, 76.3398f, 458.117f, 106.25f, 456.746f, 137.059f, 456.355f, 549.25f, 491.746f, -549.25f, 491.746f, 10, 1.1f, 0, 0, 0, 0, 0, 0, -44, 549.25f, 491.746f, 550.379f, 491.531f, 552.805f, 490.293f, 554.25f, 488.746f, 554.25f, -488.742f, 561.66f, 476.598f, 556.25f, 496.75f, 556.25f, 496.75f, 545.82f, 528.52f, 555.246f, -515.746f, 555.246f, 515.742f, 562.098f, 508.277f, 558.25f, 522.746f, 554.328f, 541.309f, 551.25f, -548.746f, 551.25f, 548.746f, 551.25f, 548.746f, 564.301f, 543.039f, 535.246f, 586.75f, 544.246f, -582.75f, 544.246f, 582.75f, 522.938f, 626.199f, 499.25f, 631.746f, 490.25f, 638.746f, 490.25f, -638.742f, 532.621f, 680.316f, 518.25f, 720.75f, 518.25f, 720.75f, 511.059f, 726.52f, 500.246f, -716.75f, 500.246f, 716.75f, 493.461f, 711.117f, 487.246f, 712.75f, 487.246f, 712.75f, 452.98f, -711.559f, 451.25f, 711.746f, 448.578f, 711.559f, 410.301f, 752.477f, 338.25f, 732.746f, 338.25f, -732.742f, 332.418f, 730.918f, 327.25f, 731.75f, 327.25f, 731.75f, 307.34f, 749.84f, 253.246f, -724.746f, 253.246f, 724.746f, 242.656f, 722.559f, 241.25f, 722.746f, 239.137f, 722.559f, 236.059f, -722.559f, 227.25f, 715.746f, 218.457f, 708.477f, 218.02f, 707.598f, 216.25f, 705.75f, 216.25f, -705.75f, 197.777f, 693.52f, 192.25f, 692.75f, 192.25f, 692.75f, 179.738f, 685.598f, 175.25f, -674.75f, 171.246f, 673.746f, 171.246f, 673.742f, 169.18f, 665.359f, 168.25f, 663.75f, 168.25f, -663.75f, 163.457f, 660.078f, 162.25f, 653.746f, 162.25f, 653.742f, 152.898f, 647.316f, 153.246f, -642.746f, 153.242f, 642.742f, 151.578f, 636.758f, 150.246f, 631.746f, 150.246f, 631.742f, 142.777f, -626.199f, 143.246f, 622.75f, 143.242f, 622.75f, 135.297f, 607.719f, 136.25f, 599.75f, 136.25f, -599.75f, 129.578f, 600.68f, 126.246f, 597.75f, 126.242f, 597.75f, 125.617f, 592.758f, 124.25f, -592.746f, 124.25f, 592.746f, 120.777f, 591, 123.25f, 586.75f, 123.25f, 586.75f, 121.656f, -583.52f, 121.246f, 581.746f, 121.246f, 581.746f, 122.098f, 578.68f, 117.25f, 572.746f, 117.25f, -572.742f, 110.219f, 551.84f, 112.25f, 545.75f, 112.25f, 545.75f, 112.859f, 540.84f, 110.246f, -538.75f, 110.246f, 538.75f, 105.816f, 539.52f, 115.246f, 526.746f, 115.242f, 526.742f, 115.938f, -525, 112.25f, 522.746f, 112.25f, 522.746f, 93.5f, 518.398f, 91.25f, 500.746f, 91.25f, -500.746f, 75.8984f, 484.078f, 76.2461f, 478.746f, 75.8984f, 475.824f, 76.1953f, 472.359f, 77.2461f, -467.746f, 77.2461f, 467.746f, 76.3398f, 458.117f, 106.25f, 456.746f, 137.059f, 456.355f, 549.25f, -491.746f, 549.25f, 491.746f, 10, 0, 0.8f, 0.45f, 0.15f, 0.8f, 0.45f, -0.15f, 18, 93.2461f, 466.746f, 65.3398f, 510.477f, 81.2461f, 448.75f, 81.2461f, 448.75f, -90.8594f, 410.598f, 233.246f, 451.746f, 233.246f, 451.746f, 233.246f, 451.742f, 419.098f, 485.398f, -431.246f, 489.746f, 443.738f, 494.199f, 548.246f, 486.746f, 548.246f, 486.746f, 542.246f, 505.75f, -471.02f, 556.68f, 449.898f, 531.156f, 435.246f, 535.746f, 419.98f, 539.957f, 422.621f, 529.398f, -419.246f, 528.746f, 415.578f, 527.637f, 372.461f, 554.918f, 365.246f, 553.75f, 358.379f, 553.156f, -330.504f, 579.285f, 347.25f, 544.746f, 364.539f, 506.957f, 282.699f, 501.238f, 264.246f, 513.746f, -245.738f, 525.879f, 272.25f, 493.746f, 272.25f, 493.746f, 292.379f, 471.316f, 254.246f, 489.746f, -254.246f, 489.746f, 216.699f, 503.879f, 190.297f, 475.719f, 187.246f, 474.75f, 183.258f, 473.957f, -177.977f, 470.438f, 177.246f, 477.746f, 176.219f, 484.52f, 167.957f, 502.891f, 133.246f, 473.746f, -111.098f, 455.695f, 96.25f, 479.75f, 96.25f, 479.75f, 93.2461f, 466.746f, 10, 0, -0.91f, 0.5f, 0.228f, 0.91f, 0.5f, 0.228f, 19, 367.246f, 551.75f, 359.82f, -551.238f, 331.914f, 577.352f, 348.25f, 542.75f, 366.641f, 503.719f, 284.141f, 499.316f, 265.246f, -511.746f, 247.18f, 523.957f, 273.25f, 491.746f, 273.25f, 491.746f, 293.82f, 469.398f, 256.246f, -487.75f, 256.246f, 487.75f, 218.137f, 501.957f, 191.738f, 473.797f, 188.246f, 472.75f, 184.699f, -472.039f, 179.418f, 468.516f, 178.246f, 475.746f, 177.656f, 482.598f, 169.543f, 500.785f, 134.25f, -471.746f, 111.18f, 452.957f, 96.25f, 476.75f, 96.25f, 476.75f, 93.2461f, 465.75f, 65.3164f, -509.219f, 82.2461f, 444.746f, 82.2461f, 444.746f, 91.5781f, 407.238f, 235.246f, 449.746f, 235.246f, -449.746f, 235.242f, 449.742f, 420.539f, 483.477f, 433.246f, 487.75f, 445.18f, 492.277f, 549.25f, -485.75f, 549.25f, 485.75f, 543.25f, 504.746f, 471.578f, 555.398f, 451.34f, 529.238f, 436.25f, -533.746f, 421.418f, 538.039f, 424.059f, 527.477f, 420.246f, 526.746f, 417.02f, 525.719f, 373.898f, -552.996f, 367.246f, 551.75f, 10, 0, 0.919f, 0.55f, 0.305f, 0.919f, 0.55f, -0.305f, 19, 368.246f, 549.75f, 361.258f, 549.316f, 334.051f, 575.75f, 350.25f, 540.75f, -367.641f, 500.695f, 285.578f, 497.398f, 267.246f, 509.75f, 248.617f, 522.035f, 275.246f, 489.746f, -275.246f, 489.746f, 295.258f, 467.477f, 257.246f, 485.75f, 257.246f, 485.75f, 219.578f, 500.035f, -193.18f, 471.875f, 189.246f, 470.75f, 186.137f, 470.117f, 180.859f, 466.598f, 180.246f, 473.746f, -179.098f, 480.676f, 171.125f, 498.68f, 136.25f, 469.746f, 111.258f, 450.215f, 97.25f, 472.75f, -97.25f, 472.75f, 93.2461f, 463.75f, 66.6172f, 506.637f, 82.2461f, 441.75f, 82.2461f, 441.75f, -92.2969f, 403.879f, 236.25f, 447.746f, 236.25f, 447.746f, 236.25f, 447.746f, 421.98f, 481.559f, -434.246f, 485.75f, 446.617f, 490.355f, 549.25f, 483.75f, 549.25f, 483.75f, 543.25f, 502.746f, -472.141f, 554.117f, 452.777f, 527.316f, 438.25f, 531.75f, 422.859f, 536.117f, 425.5f, 525.559f, -422.246f, 524.746f, 418.457f, 523.797f, 375.34f, 551.078f, 368.246f, 549.75f, 10, 0, -0.928f, 0.6f, 0.382f, 0.928f, 0.6f, 0.382f, 19, 369.25f, 548.746f, 362.699f, -547.398f, 335.496f, 573.832f, 351.25f, 538.75f, 369.738f, 497.285f, 286.43f, 495.867f, 268.246f, -507.75f, 250.059f, 520.117f, 276.246f, 487.75f, 276.246f, 487.75f, 296.699f, 465.559f, 259.25f, -483.75f, 259.25f, 483.75f, 221.02f, 498.117f, 194.617f, 469.957f, 191.246f, 468.75f, 187.578f, -468.199f, 182.301f, 464.676f, 181.25f, 471.746f, 180.539f, 478.758f, 172.711f, 496.574f, 137.246f, -467.746f, 111.336f, 447.477f, 97.25f, 469.746f, 97.25f, 469.746f, 93.2461f, 461.75f, 68.7969f, -502.516f, 83.2461f, 438.746f, 83.2461f, 438.746f, 93.0195f, 400.516f, 237.25f, 445.746f, 237.25f, -445.746f, 237.25f, 445.746f, 423.418f, 479.637f, 435.246f, 483.75f, 448.059f, 488.438f, 550.246f, -481.75f, 550.246f, 481.75f, 544.246f, 501.75f, 472.699f, 552.84f, 454.219f, 525.398f, 439.25f, -529.75f, 424.301f, 534.199f, 426.938f, 523.637f, 423.246f, 522.746f, 419.898f, 521.879f, 376.777f, -549.156f, 369.25f, 548.746f, 10, 0, 0.937f, 0.65f, 0.46f, 0.937f, 0.65f, -0.46f, 19, 371.25f, 546.746f, 364.141f, 545.477f, 337.492f, 572.156f, 352.25f, 536.75f, -371.18f, 493.559f, 288.457f, 493.559f, 270.25f, 505.75f, 251.5f, 518.195f, 278.246f, 485.75f, -278.246f, 485.75f, 298.141f, 463.637f, 260.25f, 481.75f, 260.25f, 481.75f, 222.457f, 496.195f, -196.059f, 468.035f, 192.25f, 466.746f, 189.02f, 466.277f, 183.738f, 462.758f, 183.25f, 469.746f, -181.98f, 476.836f, 174.297f, 494.473f, 139.246f, 466.746f, 111.418f, 444.738f, 97.25f, 466.746f, -97.25f, 466.746f, 93.2461f, 460.746f, 70.9766f, 498.617f, 84.25f, 434.746f, 84.25f, 434.746f, -93.7383f, 397.156f, 239.25f, 444.746f, 239.25f, 444.746f, 239.25f, 444.742f, 424.859f, 477.715f, -437.25f, 481.75f, 449.5f, 486.516f, 550.246f, 479.75f, 550.246f, 479.75f, 544.246f, 500.746f, -473.262f, 551.559f, 455.66f, 523.477f, 440.25f, 527.75f, 425.738f, 532.277f, 428.379f, 521.715f, -425.25f, 520.75f, 421.34f, 519.957f, 378.219f, 547.238f, 371.25f, 546.746f, 10, 0, -0.946f, 0.7f, 0.537f, 0.946f, 0.7f, 0.537f, 19, 372.25f, 544.746f, 365.578f, -543.559f, 337.02f, 569.352f, 354.246f, 534.75f, 375.258f, 492.078f, 289.898f, 491.637f, 271.25f, -503.75f, 252.938f, 516.277f, 279.246f, 483.75f, 279.246f, 483.75f, 299.578f, 461.719f, 261.25f, -479.75f, 261.25f, 479.75f, 223.898f, 494.277f, 197.5f, 466.117f, 194.25f, 464.746f, 190.457f, -464.355f, 185.18f, 460.836f, 184.25f, 467.746f, 183.418f, 474.918f, 175.879f, 492.367f, 140.25f, -464.746f, 111.5f, 441.996f, 98.2461f, 462.746f, 98.2461f, 462.746f, 92.2461f, 458.746f, 72.9375f, -495.156f, 85.25f, 431.746f, 85.25f, 431.746f, 94.457f, 393.797f, 240.25f, 442.746f, 240.25f, -442.746f, 240.25f, 442.742f, 426.301f, 475.797f, 438.25f, 479.75f, 450.941f, 484.598f, 551.25f, -477.746f, 551.25f, 477.746f, 545.25f, 498.75f, 473.82f, 550.277f, 457.102f, 521.559f, 442.246f, -525.75f, 427.18f, 530.355f, 429.82f, 519.797f, 426.25f, 518.75f, 422.781f, 518.039f, 379.66f, -545.316f, 372.25f, 544.746f, 10, 0, 0.955f, 0.75f, 0.614f, 0.955f, 0.75f, -0.614f, 19, 374.25f, 542.75f, 367.02f, 541.637f, 338.043f, 567.223f, 355.246f, 532.746f, -378.02f, 488.836f, 291.34f, 489.715f, 273.25f, 501.75f, 254.379f, 514.355f, 281.25f, 481.75f, -281.25f, 481.75f, 301.02f, 459.797f, 263.25f, 478.746f, 263.25f, 478.746f, 225.34f, 492.355f, -198.938f, 464.195f, 195.25f, 463.75f, 191.898f, 462.438f, 186.617f, 458.918f, 185.25f, 465.75f, -184.859f, 472.996f, 177.465f, 490.262f, 141.25f, 462.746f, 111.578f, 439.258f, 98.2461f, 459.75f, -98.2461f, 459.75f, 92.2461f, 456.746f, 75.1172f, 490.156f, 85.25f, 428.75f, 85.25f, 428.75f, -95.1797f, 390.438f, 242.246f, 440.746f, 242.246f, 440.746f, 242.246f, 440.742f, 427.738f, 473.875f, -440.25f, 478.746f, 452.379f, 482.676f, 551.25f, 475.746f, 551.25f, 475.746f, 545.25f, 497.746f, -474.379f, 548.996f, 458.539f, 519.637f, 443.246f, 523.75f, 428.621f, 528.438f, 431.258f, 517.875f, -427.25f, 516.75f, 424.219f, 516.117f, 381.102f, 543.398f, 374.25f, 542.75f, 10, 0, -0.964f, 0.8f, 0.691f, 0.964f, 0.8f, 0.691f, 19, 375.246f, 540.75f, 368.461f, -539.719f, 338.273f, 564.66f, 357.246f, 530.746f, 381.219f, 487.355f, 292.777f, 487.797f, 274.25f, -499.746f, 255.82f, 512.438f, 282.25f, 479.75f, 282.25f, 479.75f, 302.457f, 457.879f, 264.246f, -476.75f, 264.246f, 476.75f, 226.777f, 490.438f, 200.379f, 462.277f, 197.25f, 461.75f, 193.34f, -460.516f, 188.059f, 456.996f, 187.246f, 463.75f, 186.297f, 471.078f, 179.047f, 488.156f, 143.246f, -460.746f, 111.656f, 436.516f, 99.2461f, 456.746f, 99.2461f, 456.746f, 92.2461f, 454.75f, 76.8555f, -486.477f, 86.25f, 424.75f, 86.25f, 424.75f, 95.8984f, 387.074f, 243.246f, 438.746f, 243.246f, -438.746f, 243.246f, 438.742f, 429.18f, 471.957f, 441.246f, 476.75f, 453.82f, 480.758f, 552.25f, -474.75f, 552.25f, 474.75f, 546.246f, 496.75f, 474.941f, 547.719f, 459.98f, 517.719f, 445.246f, -521.746f, 430.059f, 526.516f, 432.699f, 515.957f, 429.25f, 514.75f, 425.66f, 514.195f, 382.539f, -541.477f, 375.246f, 540.75f, 10, 0, 0.973f, 0.85f, 0.769f, 0.973f, 0.85f, -0.769f, 19, 377.246f, 538.75f, 369.898f, 537.797f, 339.715f, 562.738f, 358.25f, 528.746f, -382.66f, 485.437f, 294.219f, 485.875f, 275.246f, 497.746f, 257.258f, 510.516f, 283.25f, 477.746f, -283.25f, 477.746f, 303.898f, 455.957f, 266.246f, 474.75f, 266.246f, 474.75f, 228.219f, 488.516f, -201.816f, 460.355f, 198.246f, 459.75f, 194.777f, 458.598f, 189.5f, 455.078f, 188.246f, 461.75f, -187.738f, 469.156f, 180.633f, 486.051f, 144.246f, 458.746f, 111.738f, 433.777f, 99.2461f, 452.75f, -99.2461f, 452.75f, 92.2461f, 453.746f, 77.7188f, 482.578f, 87.2461f, 421.75f, 87.2461f, 421.75f, -96.6172f, 383.715f, 245.246f, 436.746f, 245.246f, 436.746f, 245.246f, 436.746f, 430.621f, 470.035f, -443.246f, 474.75f, 455.258f, 478.836f, 552.25f, 472.75f, 552.25f, 472.75f, 547.25f, 495.746f, -475.5f, 546.438f, 461.418f, 515.797f, 446.246f, 519.746f, 431.5f, 524.598f, 434.141f, 514.035f, -430.246f, 512.75f, 427.098f, 512.277f, 383.98f, 539.555f, 377.246f, 538.75f, 10, 0, -0.982f, 0.9f, 0.846f, 0.982f, 0.9f, 0.846f, 19, 378.246f, 536.75f, 371.34f, -535.879f, 341.578f, 561.055f, 360.25f, 526.746f, 384.098f, 482.195f, 295.66f, 483.957f, 277.246f, -496.75f, 258.699f, 508.598f, 285.25f, 475.746f, 285.25f, 475.746f, 305.34f, 454.035f, 267.246f, -472.75f, 267.246f, 472.75f, 229.66f, 486.598f, 203.258f, 458.438f, 199.246f, 457.75f, 196.219f, -456.676f, 190.937f, 453.156f, 190.246f, 459.75f, 189.18f, 467.238f, 182.219f, 483.949f, 146.25f, -456.746f, 111.82f, 431.035f, 99.2461f, 449.746f, 99.2461f, 449.746f, 92.2461f, 451.746f, 78.3594f, -478.238f, 87.2461f, 417.75f, 87.2461f, 417.75f, 97.3399f, 380.355f, 246.246f, 434.746f, 246.246f, -434.746f, 246.242f, 434.746f, 432.059f, 468.117f, 444.246f, 472.75f, 456.699f, 476.918f, 553.246f, -470.75f, 553.246f, 470.75f, 547.25f, 493.746f, 476.059f, 545.156f, 462.859f, 513.879f, 448.25f, -518.75f, 432.938f, 522.676f, 435.578f, 512.117f, 432.246f, 510.746f, 428.539f, 510.355f, 385.418f, -537.637f, 378.246f, 536.75f, 10, 0, 0.991f, 0.95f, 0.923f, 0.991f, 0.95f, -0.923f, 19, 380.25f, 534.75f, 372.777f, 533.957f, 344.207f, 559.746f, 361.25f, 524.746f, -384.66f, 478.078f, 297.098f, 482.035f, 278.246f, 494.75f, 260.141f, 506.676f, 286.246f, 473.746f, -286.246f, 473.746f, 306.777f, 452.117f, 269.246f, 470.75f, 269.246f, 470.75f, 231.098f, 484.676f, -204.699f, 456.516f, 201.246f, 455.746f, 197.66f, 454.758f, 192.379f, 451.238f, 191.246f, 458.746f, -190.621f, 465.316f, 183.801f, 481.844f, 147.25f, 454.75f, 111.898f, 428.297f, 100.246f, 446.75f, -100.246f, 446.75f, 92.2461f, 449.746f, 78.5586f, 475.656f, 88.2461f, 414.746f, 88.2461f, 414.746f, -98.0586f, 376.996f, 248.25f, 432.75f, 248.25f, 432.75f, 248.25f, 432.75f, 433.5f, 466.195f, -446.246f, 470.75f, 458.141f, 474.996f, 553.246f, 468.75f, 553.246f, 468.75f, 548.246f, 492.75f, -476.621f, 543.879f, 464.301f, 511.957f, 449.25f, 516.75f, 434.379f, 520.758f, 437.02f, 510.195f, -433.246f, 509.75f, 429.98f, 508.438f, 386.859f, 535.719f, 380.25f, 534.75f, 10, 0, -1, 1, 1, 1, 1, 1, 18, 92.2461f, 448.75f, 78.5391f, -472.637f, 89.2461f, 411.746f, 89.2461f, 411.746f, 98.7773f, 373.637f, 249.25f, 430.75f, 249.25f, -430.75f, 249.25f, 430.75f, 434.938f, 464.277f, 447.25f, 468.75f, 459.578f, 473.078f, 553.246f, -466.746f, 553.246f, 466.746f, 548.246f, 491.746f, 477.18f, 542.598f, 465.738f, 510.039f, 451.25f, -514.75f, 435.82f, 518.84f, 438.461f, 508.277f, 435.246f, 507.75f, 431.418f, 506.52f, 388.301f, -533.797f, 381.25f, 532.746f, 374.219f, 532.039f, 346.477f, 558.227f, 363.25f, 522.746f, 387.23f, -470.762f, 295.941f, 481.848f, 280.246f, 492.75f, 261.578f, 504.758f, 288.246f, 471.746f, 288.246f, -471.746f, 308.219f, 450.195f, 270.25f, 468.75f, 270.25f, 468.75f, 232.539f, 482.758f, 206.137f, -454.598f, 202.246f, 453.746f, 199.098f, 452.836f, 193.816f, 449.316f, 193.25f, 456.746f, 192.059f, -463.398f, 185.387f, 479.738f, 149.246f, 452.75f, 111.977f, 425.559f, 100.246f, 442.746f, 100.246f, -442.746f, 92.2461f, 448.75f, 10, 0, 0, 0, 0, 0, 0, -0, 7, 138.246f, 415.75f, 138.246f, 415.75f, 130.457f, 402.676f, 153.246f, 387.746f, -153.242f, 387.742f, 154.879f, 386.617f, 135.25f, 390.746f, 135.25f, 390.746f, 128.258f, 393.438f, -126.246f, 404.75f, 126.242f, 404.75f, 121.219f, 409.719f, 116.246f, 415.75f, 110.656f, 422.035f, -138.246f, 415.75f, 138.246f, 415.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 8, 292.25f, 467.746f, 292.25f, 467.746f, 311.848f, 438.297f, 311.246f, -432.75f, 309.758f, 421.598f, 309.539f, 411.035f, 313.246f, 406.75f, 316.578f, 402.238f, 326.25f, -365.746f, 326.25f, 365.746f, 326.25f, 365.742f, 325.82f, 364.398f, 339.25f, 405.746f, 339.25f, -405.742f, 352.219f, 423.797f, 330.25f, 443.75f, 330.25f, 443.75f, 291.5f, 475.719f, 292.25f, -467.746f, 10, 0, 0, 0, 0, 0, 0, 0, 15, -160.246f, 385.746f, 160.246f, 385.742f, 172.699f, 378.035f, 157.25f, 343.746f, 164.246f, 346.746f, -164.242f, 346.746f, 163.02f, 334.035f, 159.246f, 331.75f, 167.25f, 334.75f, 167.25f, 334.75f, -172.699f, 326.117f, 168.25f, 320.75f, 168.25f, 320.75f, 186.777f, 312.035f, 186.25f, 304.746f, -186.25f, 304.746f, 192.938f, 313.797f, 188.246f, 320.75f, 184.137f, 327.879f, 176.219f, 323.477f, -177.246f, 343.746f, 167.25f, 339.746f, 167.25f, 339.742f, 173.578f, 349.879f, 173.25f, 356.75f, -165.246f, 354.746f, 165.242f, 354.742f, 181.793f, 383.512f, 170.246f, 384.75f, 163.457f, 385.957f, -160.246f, 385.746f, 160.246f, 385.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 5, 196.25f, 367.75f, 196.25f, 367.75f, 199.098f, 372.316f, 196.25f, -371.75f, 192.938f, 370.559f, 158.617f, 354.277f, 152.25f, 343.746f, 152.25f, 343.742f, 189.859f, -370.559f, 196.25f, 367.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 5, 207.25f, 358.75f, 207.25f, 358.75f, 210.539f, 363.516f, 207.25f, 362.75f, -204.379f, 361.758f, 170.059f, 345.477f, 163.25f, 334.75f, 163.25f, 334.75f, 201.297f, 361.758f, -207.25f, 358.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, -5, 222.246f, 375.75f, 222.246f, 375.75f, 225.059f, 380.238f, 222.246f, 379.746f, 218.898f, -378.477f, 184.578f, 362.195f, 178.246f, 351.75f, 178.246f, 351.75f, 215.816f, 378.477f, 222.246f, -375.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, -196.25f, 327.75f, 196.25f, 327.75f, 196.457f, 334.035f, 193.25f, 332.746f, 190.297f, 332.277f, -150.699f, 312.918f, 144.246f, 302.746f, 144.246f, 302.746f, 190.297f, 330.516f, 196.25f, 327.75f, -10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, 198.246f, -339.746f, 198.246f, 339.742f, 199.098f, 344.598f, 196.25f, 343.746f, 193.816f, 343.719f, 164.777f, -330.957f, 158.25f, 320.75f, 158.25f, 320.75f, 190.738f, 344.156f, 198.246f, 339.746f, 10, -0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 24, 182.25f, 286.746f, -171.246f, 278.75f, 171.246f, 278.75f, 182.379f, 286.957f, 186.25f, 285.75f, 186.25f, 285.75f, -178.859f, 273.316f, 178.246f, 267.75f, 178.246f, 267.75f, 189.418f, 281.676f, 195.25f, 280.746f, -195.25f, 280.746f, 203.938f, 280.797f, 204.25f, 268.75f, 204.25f, 268.75f, 210.098f, 280.355f, -213.246f, 279.75f, 213.242f, 279.75f, 214.938f, 272.879f, 213.246f, 265.75f, 213.242f, 265.75f, -218.02f, 273.758f, 222.246f, 271.746f, 222.246f, 271.746f, 229.457f, 274.195f, 228.25f, 261.746f, -228.25f, 261.742f, 228.578f, 249.996f, 227.25f, 246.746f, 227.25f, 246.746f, 233.859f, 275.957f, -236.25f, 276.75f, 236.25f, 276.75f, 245.297f, 277.719f, 250.25f, 267.75f, 250.25f, 267.75f, -246.18f, 276.398f, 251.25f, 273.746f, 251.25f, 273.742f, 263.34f, 272.438f, 267.246f, 264.746f, -267.246f, 264.742f, 259.379f, 278.156f, 265.246f, 274.75f, 265.246f, 274.75f, 273.02f, 274.637f, -274.25f, 267.75f, 274.25f, 267.75f, 283.578f, 244.277f, 286.246f, 242.75f, 286.246f, 242.75f, -277.418f, 266.277f, 279.246f, 266.746f, 279.242f, 266.742f, 276.977f, 279.477f, 282.25f, 262.75f, -282.25f, 262.75f, 279.18f, 278.598f, 285.25f, 277.746f, 291.5f, 276.836f, 296.34f, 265.836f, -305.25f, 268.75f, 305.25f, 268.75f, 316.141f, 262.316f, 318.25f, 338.75f, 182.25f, 286.746f, -10, 0, 0, 0, 0, 0, 0, 0, 15, 187.246f, -388.75f, 187.246f, 388.75f, 203.5f, 395.637f, 247.246f, 388.75f, 247.242f, 388.75f, 255.418f, -388.598f, 263.25f, 398.746f, 270.379f, 407.957f, 299.859f, 415.879f, 307.25f, 413.75f, 317.25f, -406.75f, 318.25f, 405.746f, 318.25f, 405.742f, 331.98f, 393.879f, 332.246f, 385.746f, 332.859f, -377.156f, 316.578f, 324.355f, 306.25f, 306.746f, 295.457f, 289.156f, 284.898f, 275.516f, 264.246f, -277.746f, 264.246f, 277.742f, 240.898f, 282.559f, 212.246f, 277.746f, 212.246f, 277.742f, 180.617f, -279.918f, 177.246f, 288.746f, 174.457f, 297.516f, 190.246f, 313.746f, 190.246f, 313.746f, 190.246f, -313.746f, 194.699f, 323.477f, 193.25f, 339.746f, 192.059f, 355.156f, 192.5f, 385.957f, 187.246f, -388.75f, 10, 0, 0.9f, 0.4f, 0.55f, 0.9f, 0.4f, 0.55f, 8, -211.246f, 386.75f, 220.656f, 366.598f, 188.246f, 294.75f, 188.246f, 294.75f, 185.898f, 293.117f, -202.023f, 286.469f, 213.246f, 288.746f, 225.219f, 292.059f, 269.246f, 287.75f, 269.246f, 287.75f, -295.457f, 304.559f, 309.246f, 353.75f, 309.246f, 353.75f, 309.246f, 353.75f, 320.98f, 379.797f, -301.246f, 383.746f, 282.258f, 386.836f, 211.246f, 386.75f, 211.246f, 386.75f, 10, 0, -0.7f, 0.2f, 0.35f, 0.7f, 0.2f, 0.35f, 6, 209.246f, 352.746f, 212.844f, -366.922f, 214.586f, 379.902f, 211.246f, 386.75f, 211.246f, 386.75f, 280.059f, 379.797f, 292.25f, -402.75f, 297.043f, 411.34f, 313.277f, 377.598f, 313.246f, 366.75f, 313.242f, 366.75f, 243.539f, -351.195f, 227.25f, 363.746f, 209.246f, 352.746f, 10, 0, 0.65f, 0.15f, 0.3f, -0.65f, 0.15f, 0.3f, 13, 214.25f, 334.75f, 214.25f, 334.75f, 216.258f, 326.996f, -213.246f, 322.75f, 213.242f, 322.75f, 211.859f, 321.719f, 210.246f, 321.746f, 210.246f, 321.742f, -211.859f, 317.316f, 218.25f, 315.746f, 218.25f, 315.746f, 220.656f, 310.719f, 223.246f, 310.746f, -225.938f, 309.836f, 231.219f, 303.676f, 235.246f, 304.746f, 240.02f, 306.316f, 252.25f, 310.746f, -252.25f, 310.746f, 252.25f, 310.742f, 258.5f, 314.238f, 268.246f, 310.746f, 268.242f, 310.742f, -270.789f, 311.16f, 271.25f, 315.746f, 271.809f, 320.727f, 275.219f, 324.797f, 277.246f, 326.746f, -279.617f, 329.195f, 290.18f, 343.277f, 289.246f, 343.746f, 287.539f, 344.156f, 214.25f, 334.75f, -214.25f, 334.75f, 10, 0, 1, 0.45f, 0.5f, 1, 0.45f, 0.5f, -12, 209.246f, 387.746f, 209.246f, 387.742f, 206.137f, 363.516f, 209.246f, 354.746f, 213.18f, -345.035f, 212.297f, 342.836f, 211.246f, 338.75f, 210.539f, 334.035f, 215.379f, 323.035f, 221.246f, -316.75f, 234.246f, 314.75f, 234.246f, 314.75f, 251.457f, 318.637f, 261.25f, 315.746f, 261.25f, -315.746f, 271.473f, 314.078f, 275.246f, 330.746f, 275.246f, 330.742f, 280.5f, 337.559f, 288.246f, -340.75f, 296.34f, 343.719f, 304.258f, 389.477f, 300.246f, 398.746f, 295.457f, 407.078f, 279.617f, -411.918f, 262.25f, 394.746f, 244.418f, 377.598f, 242.219f, 396.078f, 209.246f, 387.746f, 10, -1.1f, 0, 0, 0, 0, 0, 0, 12, 209.246f, 387.746f, -209.246f, 387.742f, 206.137f, 363.516f, 209.246f, 354.746f, 213.18f, 345.035f, 212.297f, 342.836f, -211.246f, 338.75f, 210.539f, 334.035f, 215.379f, 323.035f, 221.246f, 316.75f, 234.246f, 314.75f, -234.246f, 314.75f, 251.457f, 318.637f, 261.25f, 315.746f, 261.25f, 315.746f, 271.473f, 314.078f, -275.246f, 330.746f, 275.246f, 330.742f, 280.5f, 337.559f, 288.246f, 340.75f, 296.34f, 343.719f, -304.258f, 389.477f, 300.246f, 398.746f, 295.457f, 407.078f, 279.617f, 411.918f, 262.25f, 394.746f, -244.418f, 377.598f, 242.219f, 396.078f, 209.246f, 387.746f, 10, 0, 1, 1, -0.8f, 1, 1, 0.8f, 7, 211.246f, 305.75f, 211.246f, 305.75f, 210.098f, -308.078f, 205.25f, 308.746f, 205.25f, 308.742f, 180.617f, 312.477f, 171.246f, 325.75f, 171.246f, -325.75f, 163.898f, 332.277f, 168.25f, 319.746f, 168.25f, 319.742f, 180.18f, 297.078f, 187.246f, -293.746f, 187.246f, 293.746f, 205.699f, 289.598f, 211.246f, 305.75f, 10, 0.55f, 0, -0, 0, 0, 0, 0, 7, 211.246f, 305.75f, 211.246f, 305.75f, -210.098f, 308.078f, 205.25f, 308.746f, 205.25f, 308.742f, 180.617f, 312.477f, 171.246f, 325.75f, -171.246f, 325.75f, 163.898f, 332.277f, 168.25f, 319.746f, 168.25f, 319.742f, 180.18f, 297.078f, -187.246f, 293.746f, 187.246f, 293.746f, 205.699f, 289.598f, 211.246f, 305.75f, 10, 0, -0.8f, 0.25f, 0.3f, 0.8f, 0.25f, 0.3f, 9, 299.246f, 375.75f, 299.641f, -384.941f, 301.789f, 394.418f, 300.246f, 398.746f, 292.766f, 412.461f, 274.098f, 406.535f, 262.25f, -394.746f, 244.418f, 377.598f, 242.219f, 396.078f, 209.246f, 387.746f, 209.246f, 387.742f, 207.297f, -372.797f, 208.25f, 361.746f, 208.25f, 361.742f, 249.258f, 374.516f, 250.25f, 368.746f, 250.25f, -368.746f, 251.898f, 371.879f, 262.25f, 371.75f, 272.137f, 371.879f, 297.152f, 373.168f, 299.246f, -375.75f, 10, 2.2f, 0.65f, 0.1f, 0.15f, 0.65f, 0.1f, 0.15f, 3, -251.25f, 387.746f, 251.25f, 387.742f, 256.738f, 381.996f, 253.246f, 371.75f, 253.246f, 371.75f, -236.938f, 353.836f, 239.25f, 338.75f, 10, 0, 1, 1, 0.8f, 1, -1, 0.8f, 5, 198.246f, 293.746f, 198.246f, 293.746f, 193.816f, 308.078f, 203.25f, -300.75f, 203.25f, 300.75f, 208.777f, 298.398f, 207.25f, 296.75f, 206.137f, 294.879f, 199.977f, -290.477f, 198.246f, 293.746f, 10, 0.55f, 0, 0, 0, 0, 0, -0, 5, 198.246f, 293.746f, 198.246f, 293.746f, 193.816f, 308.078f, 203.25f, 300.75f, -203.25f, 300.75f, 208.777f, 298.398f, 207.25f, 296.75f, 206.137f, 294.879f, 199.977f, 290.477f, -198.246f, 293.746f, 10, 0, 1, 1, 0.8f, 1, 1, 0.8f, -5, 204.25f, 292.75f, 204.25f, 292.75f, 200.328f, 303.941f, 208.25f, 297.746f, 208.25f, -297.742f, 212.937f, 295.266f, 211.246f, 294.75f, 206.227f, 293.383f, 211.242f, 290.566f, 204.25f, -292.75f, 10, 0.55f, 0, 0, 0, 0, 0, 0, 5, -204.25f, 292.75f, 204.25f, 292.75f, 200.328f, 303.941f, 208.25f, 297.746f, 208.25f, 297.742f, -212.937f, 295.266f, 211.246f, 294.75f, 206.227f, 293.383f, 211.242f, 290.566f, 204.25f, 292.75f, -10, 0, 1, 1, 0.8f, 1, 1, 0.8f, 5, 209.246f, -292.75f, 209.246f, 292.75f, 205.609f, 303.941f, 213.246f, 297.746f, 213.242f, 297.742f, 218.168f, -295.414f, 216.25f, 294.75f, 212.824f, 293.383f, 216.523f, 290.566f, 209.246f, 292.75f, 10, -0.55f, 0, 0, 0, 0, 0, 0, 5, 209.246f, 292.75f, -209.246f, 292.75f, 205.609f, 303.941f, 213.246f, 297.746f, 213.242f, 297.742f, 218.168f, 295.414f, -216.25f, 294.75f, 212.824f, 293.383f, 216.523f, 290.566f, 209.246f, 292.75f, 10, 0, -1, 1, 0.8f, 1, 1, 0.8f, 5, 216.25f, 292.75f, 216.25f, -292.75f, 212.871f, 303.723f, 220.246f, 297.746f, 220.246f, 297.742f, 225.434f, 295.172f, 224.246f, -294.75f, 220.527f, 293.383f, 223.781f, 290.344f, 216.25f, 292.75f, 10, 0.55f, 0, -0, 0, 0, 0, 0, 5, 216.25f, 292.75f, 216.25f, 292.75f, -212.871f, 303.723f, 220.246f, 297.746f, 220.246f, 297.742f, 225.434f, 295.172f, 224.246f, 294.75f, -220.527f, 293.383f, 223.781f, 290.344f, 216.25f, 292.75f, 10, 0, 1, 1, -0.8f, 1, 1, 0.8f, 5, 224.246f, 292.75f, 224.242f, 292.75f, 220, -303.809f, 227.25f, 297.746f, 227.25f, 297.742f, 231.969f, 296.066f, 231.246f, 294.75f, 229.855f, -293.25f, 230.91f, 290.434f, 224.246f, 292.75f, 10, 0.55f, 0, 0, 0, -0, 0, 0, 5, 224.246f, 292.75f, 224.242f, 292.75f, 220, 303.809f, -227.25f, 297.746f, 227.25f, 297.742f, 231.969f, 296.066f, 231.246f, 294.75f, 229.855f, 293.25f, -230.91f, 290.434f, 224.246f, 292.75f, 10, 0, 1, 1, 0.8f, 1, -1, 0.8f, 5, 231.246f, 291.746f, 231.246f, 291.746f, 225.938f, 305.438f, 236.25f, -298.75f, 236.25f, 298.75f, 241.34f, 296.195f, 240.25f, 294.75f, 238.699f, 292.676f, 240.02f, -289.156f, 231.246f, 291.746f, 10, 0.55f, 0, 0, 0, 0, 0, -0, 5, 231.246f, 291.746f, 231.246f, 291.746f, 225.938f, 305.438f, 236.25f, 298.75f, -236.25f, 298.75f, 241.34f, 296.195f, 240.25f, 294.75f, 238.699f, 292.676f, 240.02f, 289.156f, -231.246f, 291.746f, 10, 2.2f, 0.65f, 0.15f, 0.3f, 0.65f, 0.15f, 0.3f, -4, 200.246f, 310.746f, 200.246f, 310.742f, 214.5f, 313.797f, 221.246f, 310.746f, 221.246f, -310.742f, 227.699f, 308.957f, 229.25f, 309.75f, 230.34f, 309.836f, 234.246f, 310.746f, 234.246f, -310.746f, 10, 2.2f, 0.65f, 0.15f, 0.3f, 0.65f, 0.15f, 0.3f, 4, -237.25f, 300.75f, 237.25f, 300.75f, 250.578f, 315.996f, 264.246f, 310.746f, 271.496f, 308.328f, -270.379f, 312.035f, 271.25f, 314.75f, 272.137f, 318.195f, 272.359f, 322.816f, 278.246f, 325.75f, -10, 0, 1, 1, 0.8f, 1, 1, 0.8f, 7, 256.246f, -318.75f, 256.246f, 318.75f, 251.898f, 330.516f, 249.25f, 316.75f, 245.738f, 302.355f, 242.219f, -298.398f, 240.25f, 295.746f, 240.25f, 295.742f, 240.457f, 289.598f, 249.25f, 289.75f, 249.25f, -289.75f, 261.578f, 290.477f, 262.25f, 293.746f, 262.457f, 296.637f, 260.699f, 309.398f, 256.246f, -318.75f, 10, 0.55f, 0, 0, 0, 0, 0, 0, 7, -256.246f, 318.75f, 256.246f, 318.75f, 251.898f, 330.516f, 249.25f, 316.75f, 245.738f, 302.355f, -242.219f, 298.398f, 240.25f, 295.746f, 240.25f, 295.742f, 240.457f, 289.598f, 249.25f, 289.75f, -249.25f, 289.75f, 261.578f, 290.477f, 262.25f, 293.746f, 262.457f, 296.637f, 260.699f, 309.398f, -256.246f, 318.75f, 10, 2.2f, 0.65f, 0.15f, 0.3f, 0.65f, 0.15f, 0.3f, -2, 271.25f, 310.746f, 271.25f, 310.742f, 275.656f, 313.355f, 278.246f, 311.75f, 10, -2.2f, 0.65f, 0.15f, 0.3f, 0.65f, 0.15f, 0.3f, 2, 279.246f, 328.746f, -279.242f, 328.742f, 282.039f, 334.148f, 287.246f, 334.75f, 10, 0, 0.7f, 0.7f, -0.7f, 0.7f, 0.7f, 0.7f, 6, 191.246f, 288.746f, 191.242f, 288.742f, 211.418f, -284.758f, 216.25f, 286.746f, 216.25f, 286.742f, 225.938f, 286.516f, 216.25f, 284.746f, 216.25f, -284.742f, 202.617f, 284.316f, 194.25f, 285.75f, 194.25f, 285.75f, 181.059f, 291.797f, 191.246f, -288.746f, 10, 0, 1, 1, 0.8f, 1, 1, 0.8f, 7, -207.25f, 390.746f, 207.25f, 390.746f, 226.379f, 390.797f, 228.25f, 389.75f, 228.25f, 389.75f, -236.5f, 356.035f, 232.246f, 347.75f, 232.246f, 347.75f, 231.219f, 344.598f, 228.25f, 350.746f, -228.25f, 350.742f, 207.898f, 386.836f, 204.25f, 388.75f, 200.859f, 391.238f, 205.699f, 390.797f, -207.25f, 390.746f, 10, 0.55f, 0, 0, 0, 0, 0, 0, -7, 207.25f, 390.746f, 207.25f, 390.746f, 226.379f, 390.797f, 228.25f, 389.75f, 228.25f, -389.75f, 236.5f, 356.035f, 232.246f, 347.75f, 232.246f, 347.75f, 231.219f, 344.598f, 228.25f, -350.746f, 228.25f, 350.742f, 207.898f, 386.836f, 204.25f, 388.75f, 200.859f, 391.238f, 205.699f, -390.797f, 207.25f, 390.746f, 10, 0, 1, 1, 0.8f, 1, 1, -0.8f, 7, 122.246f, 393.75f, 122.246f, 393.75f, 132, 391.898f, 146.25f, 388.75f, -146.25f, 388.75f, 151.137f, 364.398f, 154.246f, 358.75f, 158.18f, 353.836f, 154.219f, 353.836f, -150.246f, 356.75f, 146.297f, 359.996f, 130.02f, 375.398f, 128.25f, 379.746f, 125.617f, 385.078f, -122.246f, 393.75f, 122.246f, 393.75f, 10, 0.55f, 0, 0, 0, 0, -0, 0, 7, 122.246f, 393.75f, 122.246f, 393.75f, 132, 391.898f, 146.25f, -388.75f, 146.25f, 388.75f, 151.137f, 364.398f, 154.246f, 358.75f, 158.18f, 353.836f, 154.219f, -353.836f, 150.246f, 356.75f, 146.297f, 359.996f, 130.02f, 375.398f, 128.25f, 379.746f, 125.617f, -385.078f, 122.246f, 393.75f, 122.246f, 393.75f, 10, 0, 1, 1, 0.8f, -1, 1, 0.8f, 6, 146.25f, 388.75f, 146.25f, 388.75f, 152.637f, 387.094f, -153.246f, 384.75f, 154.855f, 382.223f, 152.25f, 378.75f, 152.25f, 378.75f, 152.25f, 378.75f, -151.324f, 374.961f, 150.246f, 377.75f, 148.68f, 379.719f, 145.52f, 388.145f, 146.25f, 388.75f, -10, 0.55f, 0, 0, 0, 0, 0, 0, 6, 146.25f, -388.75f, 146.25f, 388.75f, 152.637f, 387.094f, 153.246f, 384.75f, 154.855f, 382.223f, 152.25f, -378.75f, 152.25f, 378.75f, 152.25f, 378.75f, 151.324f, 374.961f, 150.246f, 377.75f, 148.68f, -379.719f, 145.52f, 388.145f, 146.25f, 388.75f, 10, 0, 0, 0, 0, -0, 0, 0, 10, 146.25f, 388.75f, 146.25f, 388.75f, 150.258f, 383.316f, -154.246f, 383.746f, 158.18f, 383.316f, 158.598f, 383.77f, 161.246f, 382.75f, 166.758f, 381.996f, -166.316f, 384.195f, 173.25f, 382.75f, 176.48f, 382.348f, 179.297f, 383.316f, 182.25f, 381.746f, -185.457f, 380.676f, 188.977f, 381.559f, 190.246f, 383.746f, 191.617f, 385.957f, 197.25f, 390.746f, -197.25f, 390.746f, 197.25f, 390.746f, 182.816f, 388.598f, 179.246f, 387.746f, 179.246f, 387.742f, -155.098f, 386.398f, 146.25f, 388.75f, 10, 0, 1, 1, 0.8f, 1, -1, 0.8f, 6, 195.25f, 388.75f, 195.25f, 388.75f, 188.262f, 384.969f, 188.246f, -382.75f, 187.383f, 379.688f, 193.25f, 375.75f, 193.25f, 375.75f, 193.25f, 375.75f, 196.625f, -370.559f, 197.25f, 372.746f, 197.941f, 375.836f, 196.238f, 388.379f, 195.25f, 388.75f, 10, -0.55f, 0, 0, 0, 0, 0, 0, 6, 195.25f, 388.75f, -195.25f, 388.75f, 188.262f, 384.969f, 188.246f, 382.75f, 187.383f, 379.688f, 193.25f, 375.75f, -193.25f, 375.75f, 193.25f, 375.75f, 196.625f, 370.559f, 197.25f, 372.746f, 197.941f, 375.836f, -196.238f, 388.379f, 195.25f, 388.75f, 10, 0, 1, 1, 0.8f, 1, -1, 0.8f, 5, 154.246f, 382.75f, 154.242f, 382.75f, 161.832f, 370.5f, 162.25f, -382.75f, 162.25f, 382.75f, 162.684f, 384.215f, 160.246f, 383.746f, 154.066f, 384.324f, 155.738f, -388.836f, 154.246f, 382.75f, 10, 0.55f, 0, 0, 0, 0, 0, -0, 5, 154.246f, 382.75f, 154.242f, 382.75f, 161.832f, 370.5f, 162.25f, 382.75f, -162.25f, 382.75f, 162.684f, 384.215f, 160.246f, 383.746f, 154.066f, 384.324f, 155.738f, 388.836f, -154.246f, 382.75f, 10, 0, 1, 1, 0.8f, 1, 1, 0.8f, -5, 162.25f, 382.75f, 162.25f, 382.75f, 170.734f, 370.227f, 170.246f, 382.75f, 170.242f, -382.75f, 170.043f, 383, 168.25f, 382.75f, 162.891f, 383.625f, 163.27f, 388.594f, 162.25f, -382.75f, 10, 0.55f, 0, 0, 0, 0, 0, 0, 5, -162.25f, 382.75f, 162.25f, 382.75f, 170.734f, 370.227f, 170.246f, 382.75f, 170.242f, 382.75f, -170.043f, 383, 168.25f, 382.75f, 162.891f, 383.625f, 163.27f, 388.594f, 162.25f, 382.75f, -10, 0, 1, 1, 0.8f, 1, 1, 0.8f, 5, 170.246f, -382.75f, 170.242f, 382.75f, 178.711f, 370.832f, 178.246f, 381.746f, 178.246f, 381.746f, 178.105f, -382.82f, 176.246f, 382.75f, 172.004f, 383.93f, 171.773f, 387.504f, 170.246f, 382.75f, 10, -0.55f, 0, 0, 0, 0, 0, 0, 5, 170.246f, 382.75f, -170.242f, 382.75f, 178.711f, 370.832f, 178.246f, 381.746f, 178.246f, 381.746f, 178.105f, 382.82f, -176.246f, 382.75f, 172.004f, 383.93f, 171.773f, 387.504f, 170.246f, 382.75f, 10, 0, -1, 1, 0.8f, 1, 1, 0.8f, 5, 177.246f, 382.75f, 177.246f, -382.75f, 186.207f, 369.719f, 186.25f, 380.75f, 186.25f, 380.75f, 188.398f, 381.992f, 186.25f, -381.746f, 180.078f, 383.051f, 180.957f, 387.953f, 177.246f, 382.75f, 10, 0.55f, 0, -0, 0, 0, 0, 0, 5, 177.246f, 382.75f, 177.246f, 382.75f, -186.207f, 369.719f, 186.25f, 380.75f, 186.25f, 380.75f, 188.398f, 381.992f, 186.25f, 381.746f, -180.078f, 383.051f, 180.957f, 387.953f, 177.246f, 382.75f, 10, 0, 0.9f, 0.9f, -0.7f, 0.9f, 0.9f, 0.7f, 6, 137.246f, 378.75f, 129.25f, 379.746f, 126.441f, -385.738f, 124.25f, 392.746f, 124.25f, 392.746f, 124.25f, 392.746f, 131.117f, 391.402f, 145.25f, -388.75f, 145.25f, 388.75f, 145.832f, 384.672f, 147.25f, 378.75f, 137.246f, 378.75f, 10, -0, 0.9f, 0.9f, 0.7f, 0.9f, 0.9f, 0.7f, 7, 209.246f, 383.746f, -207.469f, 386.437f, 206.02f, 388.371f, 205.25f, 388.75f, 201.992f, 390.891f, 206.547f, 390.477f, -208.25f, 390.746f, 208.25f, 390.746f, 226.02f, 390.477f, 228.25f, 389.75f, 228.25f, 389.75f, -228.668f, 387.18f, 229.25f, 383.746f, 229.25f, 383.742f, 218.32f, 385.66f, 209.246f, 383.746f, -10, 0, 0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, 10, 268.246f, -535.746f, 298.758f, 531.289f, 326.832f, 570.492f, 329.25f, 580.75f, 330.703f, 591.789f, 319.25f, -604.75f, 319.25f, 604.75f, 321.023f, 608.246f, 315.699f, 623.734f, 310.246f, 633.75f, 304.082f, -644.063f, 286.594f, 642.992f, 267.246f, 643.75f, 249.875f, 645.031f, 229.547f, 619.379f, 228.25f, -617.75f, 226.641f, 615.508f, 233.418f, 573.398f, 235.246f, 566.75f, 236.32f, 560.813f, 233.246f, -531.75f, 233.246f, 531.75f, 271.082f, 541.781f, 237.773f, 540, 268.246f, 535.746f, 10, -0, 0.92f, 0.56f, 0.32f, 0.92f, 0.56f, 0.32f, 10, 229.25f, 616.746f, -227.469f, 614.828f, 234.121f, 573.484f, 235.246f, 567.75f, 236.973f, 561.129f, 234.246f, 532.746f, -234.246f, 532.746f, 270.063f, 542.387f, 238.398f, 540.695f, 268.246f, 536.75f, 298.273f, 532.141f, -325.836f, 570.633f, 327.25f, 580.75f, 329.637f, 591.543f, 318.25f, 604.75f, 318.25f, 604.75f, -320.133f, 607.699f, 314.906f, 622.906f, 309.246f, 632.75f, 303.504f, 642.867f, 286.332f, 641.813f, -267.246f, 642.746f, 250.277f, 643.816f, 230.32f, 618.629f, 229.25f, 616.746f, 10, 0, -0.94f, 0.67f, 0.49f, 0.94f, 0.67f, 0.49f, 10, 229.25f, 615.75f, 228.297f, -614.152f, 234.824f, 573.574f, 236.25f, 567.75f, 237.625f, 561.445f, 235.246f, 533.746f, 235.246f, -533.746f, 269.371f, 543.539f, 239.023f, 541.391f, 268.246f, 536.75f, 297.793f, 532.996f, 324.844f, -570.773f, 326.25f, 580.75f, 328.574f, 591.297f, 318.25f, 603.746f, 318.25f, 603.746f, 319.246f, -607.156f, 314.113f, 622.078f, 308.246f, 631.746f, 302.922f, 641.668f, 286.066f, 640.637f, 267.246f, -641.75f, 250.684f, 642.602f, 231.094f, 617.883f, 229.25f, 615.75f, 10, 0, 0.96f, -0.78f, 0.66f, 0.96f, 0.78f, 0.66f, 10, 230.25f, 615.75f, 229.125f, 613.473f, -235.531f, 573.66f, 237.25f, 567.75f, 238.277f, 561.762f, 235.246f, 534.75f, 235.246f, 534.75f, -267.91f, 544.25f, 239.648f, 542.086f, 268.246f, 537.746f, 297.309f, 533.852f, 323.848f, 570.914f, -325.25f, 580.75f, 327.508f, 591.051f, 317.25f, 603.746f, 317.25f, 603.746f, 318.355f, 606.609f, -313.324f, 621.254f, 308.246f, 630.75f, 302.34f, 640.473f, 285.805f, 639.457f, 267.246f, 640.746f, -251.09f, 641.387f, 231.871f, 617.133f, 230.25f, 615.75f, 10, 0, 0.98f, 0.89f, -0.83f, 0.98f, 0.89f, 0.83f, 10, 231.246f, 614.746f, 229.949f, 612.797f, 236.234f, -573.75f, 237.25f, 567.75f, 238.926f, 562.082f, 236.25f, 534.75f, 236.25f, 534.75f, 266.891f, -544.965f, 240.273f, 542.781f, 268.246f, 538.75f, 296.824f, 534.703f, 322.855f, 571.055f, 324.246f, -580.75f, 326.445f, 590.805f, 316.25f, 602.75f, 316.25f, 602.75f, 317.469f, 606.063f, 312.531f, -620.426f, 307.25f, 629.746f, 301.762f, 639.273f, 285.543f, 638.281f, 267.246f, 639.75f, 251.492f, -640.172f, 232.645f, 616.387f, 231.246f, 614.746f, 10, 0, 1, 1, 1, -1, 1, 1, 10, 268.246f, 539.746f, 296.34f, 535.559f, 321.859f, 571.199f, -323.246f, 580.75f, 325.379f, 590.559f, 315.25f, 602.75f, 315.25f, 602.75f, 316.578f, 605.52f, -311.738f, 619.598f, 306.25f, 628.75f, 301.18f, 638.078f, 285.277f, 637.102f, 267.246f, 637.75f, -251.898f, 638.957f, 233.418f, 615.637f, 232.246f, 613.75f, 230.777f, 612.117f, 236.938f, 573.84f, -238.25f, 567.75f, 239.578f, 562.398f, 237.25f, 535.746f, 237.25f, 535.746f, 264.988f, 545.457f, -240.898f, 543.477f, 268.246f, 539.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 6, 319.25f, 576.746f, 319.25f, 576.742f, 289.078f, 568.559f, 276.246f, -570.746f, 276.246f, 570.746f, 258.937f, 577.578f, 249.25f, 553.75f, 249.25f, 553.75f, 245.297f, -545.68f, 243.246f, 543.746f, 240.898f, 541.277f, 319.25f, 576.746f, 319.25f, 576.746f, 10, -0, 0, 0, 0, 0, 0, 0, 11, 324.246f, 579.746f, -324.242f, 579.746f, 291.937f, 565.918f, 281.25f, 566.75f, 281.25f, 566.75f, 262.898f, 571.418f, -253.246f, 555.75f, 253.246f, 555.75f, 244.418f, 545.238f, 241.25f, 543.746f, 241.25f, 543.742f, -240.457f, 541.719f, 247.246f, 545.75f, 259.25f, 540.75f, 259.25f, 540.75f, 275.219f, 529.84f, -286.246f, 547.75f, 286.246f, 547.75f, 290.18f, 559.758f, 290.246f, 561.746f, 290.18f, 564.156f, -313.5f, 570.316f, 315.25f, 570.746f, 317.02f, 571.199f, 324.277f, 575.816f, 324.246f, 579.746f, -10, 0, 0.6f, 0.8f, 0.2f, 0.6f, 0.8f, 0.2f, 6, 271.25f, -539.746f, 264.141f, 539.832f, 254.93f, 544.086f, 255.246f, 550.746f, 254.93f, 557.832f, 264.141f, -564.723f, 271.25f, 564.75f, 279.258f, 564.723f, 285.387f, 559.152f, 285.25f, 552.746f, 285.387f, -545.402f, 279.258f, 539.832f, 271.25f, 539.746f, 10, 0, 0.4f, 0.6f, 0, -0.4f, 0.6f, 0, 6, 267.246f, 557.746f, 262.383f, 557.391f, 256.785f, 555.738f, -257.246f, 555.75f, 258.559f, 561.055f, 265.555f, 564.723f, 271.25f, 564.75f, 276.422f, 564.723f, -280.59f, 562.547f, 283.25f, 558.75f, 283.25f, 558.75f, 277.203f, 559.598f, 267.246f, 557.746f, -10, 0, 1, 1, 1, 1, 1, 1, 4, 281.25f, -558.75f, 281.25f, 558.75f, 276.098f, 561.957f, 276.246f, 559.746f, 276.246f, 559.746f, 280.059f, -554.699f, 281.25f, 558.75f, 10, 0, 0, 0, 0, 0, 0, -0, 6, 270.25f, 549.75f, 267.187f, 549.5f, 264.961f, 551.727f, 265.246f, 554.746f, -264.961f, 557.227f, 267.187f, 559.457f, 270.25f, 559.746f, 272.687f, 559.457f, 274.918f, 557.227f, -275.246f, 554.746f, 274.918f, 551.727f, 272.687f, 549.5f, 270.25f, 549.75f, 10, 0, -0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, 15, 155.246f, 563.746f, 155.246f, -563.742f, 152.02f, 587.477f, 154.246f, 592.746f, 154.242f, 592.746f, 166.539f, 603.316f, 166.246f, -607.746f, 166.246f, 607.742f, 165.656f, 627.078f, 164.246f, 627.746f, 163.02f, 628.84f, 154.656f, -635.438f, 148.246f, 628.75f, 148.242f, 628.75f, 136.617f, 608.598f, 137.246f, 601.746f, 137.246f, -599.75f, 137.242f, 599.75f, 129.137f, 599.797f, 127.246f, 597.75f, 127.246f, 597.75f, 126.059f, -591.879f, 124.25f, 591.75f, 124.25f, 591.75f, 121.656f, 588.797f, 124.25f, 585.746f, 124.25f, -585.742f, 121.656f, 583.078f, 122.246f, 578.75f, 130.25f, 574.746f, 130.25f, 574.742f, 132.656f, -558.438f, 144.246f, 552.746f, 149.859f, 550.156f, 153.34f, 557.559f, 155.246f, 563.746f, 10, -0, 1, 1, 1, 1, 1, 1, 15, 154.246f, 565.746f, -154.242f, 565.742f, 151.27f, 587.172f, 153.246f, 591.75f, 153.242f, 591.75f, 164.34f, 601.426f, -164.246f, 604.75f, 164.242f, 604.75f, 163.547f, 622.809f, 162.25f, 623.746f, 161.172f, 624.395f, -153.645f, 630.336f, 147.25f, 623.746f, 147.25f, 623.746f, 137.41f, 606.18f, 138.246f, 599.75f, -138.246f, 597.75f, 138.246f, 597.75f, 130.68f, 598.258f, 129.25f, 596.746f, 129.25f, 596.742f, -127.906f, 591.129f, 126.246f, 590.746f, 126.242f, 590.746f, 123.945f, 588.359f, 126.246f, 585.746f, -126.242f, 585.742f, 123.945f, 583.211f, 124.25f, 579.746f, 132.246f, 575.75f, 132.246f, 575.75f, -133.848f, 561.035f, 144.246f, 555.75f, 149.324f, 553.582f, 152.457f, 560.242f, 154.246f, 565.746f, -10, 0, 0.925f, 0.588f, 0.363f, 0.925f, 0.588f, 0.363f, 15, 164.246f, -626.75f, 162.645f, 627.816f, 154.406f, 634.16f, 148.246f, 627.746f, 148.242f, 627.742f, 136.816f, -607.992f, 137.246f, 600.75f, 137.246f, 598.746f, 137.242f, 598.742f, 129.523f, 599.414f, 128.25f, -597.75f, 128.25f, 597.75f, 126.52f, 591.691f, 125.25f, 591.75f, 125.25f, 591.75f, 122.23f, -588.688f, 124.25f, 585.746f, 124.25f, 585.742f, 122.23f, 583.109f, 122.246f, 578.75f, 131.246f, -574.746f, 131.242f, 574.742f, 132.953f, 559.086f, 144.246f, 553.75f, 149.723f, 551.012f, 153.117f, -558.23f, 155.246f, 564.75f, 155.246f, 564.75f, 151.832f, 587.402f, 154.246f, 591.75f, 154.242f, -591.75f, 165.988f, 602.844f, 165.246f, 606.75f, 165.242f, 606.75f, 165.129f, 626.012f, 164.246f, -626.75f, 10, 0, 0.95f, 0.725f, 0.575f, 0.95f, 0.725f, 0.575f, 15, -163.25f, 625.746f, 162.27f, 626.793f, 154.152f, 632.887f, 148.246f, 625.746f, 148.242f, 625.746f, -137.016f, 607.387f, 138.246f, 600.75f, 138.246f, 598.746f, 138.246f, 598.742f, 129.906f, 599.027f, -128.25f, 596.746f, 128.25f, 596.742f, 126.98f, 591.504f, 125.25f, 590.746f, 125.25f, 590.746f, -122.801f, 588.578f, 125.25f, 585.746f, 125.25f, 585.742f, 122.801f, 583.145f, 123.25f, 578.75f, -131.246f, 574.746f, 131.242f, 574.742f, 133.254f, 559.734f, 144.246f, 554.746f, 149.59f, 551.867f, -152.898f, 558.898f, 155.246f, 564.75f, 155.246f, 564.75f, 151.645f, 587.324f, 154.246f, 591.75f, -154.242f, 591.75f, 165.438f, 602.371f, 165.246f, 605.746f, 165.242f, 605.742f, 164.602f, 624.945f, -163.25f, 625.746f, 10, 0, 0.975f, 0.863f, 0.788f, 0.975f, 0.863f, 0.788f, -15, 163.25f, 624.75f, 161.895f, 625.77f, 153.898f, 631.609f, 148.246f, 624.75f, 148.242f, -624.75f, 137.211f, 606.781f, 138.246f, 600.75f, 138.246f, 597.75f, 138.246f, 597.75f, 130.293f, -598.645f, 128.25f, 596.746f, 128.25f, 596.742f, 127.445f, 591.316f, 126.246f, 590.746f, 126.242f, -590.746f, 123.375f, 588.469f, 125.25f, 585.746f, 125.25f, 585.742f, 123.375f, 583.176f, 124.25f, -578.75f, 131.246f, 574.746f, 131.242f, 574.742f, 133.551f, 560.387f, 144.246f, 554.746f, 149.457f, -552.727f, 152.68f, 559.57f, 154.246f, 565.746f, 154.242f, 565.742f, 151.457f, 587.246f, 154.246f, -591.75f, 154.242f, 591.75f, 164.887f, 601.898f, 164.246f, 605.746f, 164.242f, 605.742f, 164.074f, -623.879f, 163.25f, 624.75f, 10, 0, 1, 1, 1, 1, 1, -1, 15, 154.246f, 566.75f, 154.242f, 566.75f, 151.27f, 587.172f, 153.246f, 591.75f, -153.242f, 591.75f, 164.34f, 601.426f, 164.246f, 604.75f, 164.242f, 604.75f, 163.547f, 622.809f, -162.25f, 623.746f, 161.523f, 624.746f, 153.645f, 630.336f, 147.25f, 623.746f, 147.25f, 623.746f, -137.41f, 606.18f, 138.246f, 599.75f, 138.246f, 597.75f, 138.246f, 597.75f, 130.68f, 598.258f, -129.25f, 596.746f, 129.25f, 596.742f, 127.906f, 591.129f, 126.246f, 590.746f, 126.242f, 590.746f, -123.945f, 588.359f, 126.246f, 585.746f, 126.242f, 585.742f, 123.945f, 583.211f, 124.25f, 579.746f, -132.246f, 575.75f, 132.246f, 575.75f, 133.848f, 561.035f, 144.246f, 555.75f, 149.324f, 553.582f, -152.457f, 560.352f, 154.246f, 566.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 5, 151.25f, 572.746f, 151.25f, 572.742f, 127.27f, 584.398f, 126.246f, -585.746f, 126.242f, 585.742f, 136.289f, 576.258f, 137.246f, 576.746f, 138.047f, 576.258f, 151.25f, -572.746f, 151.25f, 572.746f, 10, 0, 0, 0, 0, 0, 0, -0, 5, 132.246f, 579.746f, 132.246f, 579.746f, 152.457f, 576.039f, 152.25f, 570.746f, -152.457f, 567.996f, 152.191f, 553.234f, 146.25f, 554.746f, 137.059f, 557.559f, 141.02f, 573.398f, -132.246f, 579.746f, 10, 0, 0.6f, 0.8f, 0.2f, 0.6f, 0.8f, 0.2f, -5, 141.25f, 575.75f, 141.25f, 575.75f, 151.332f, 574.195f, 152.25f, 570.746f, 153.117f, -569.438f, 153.848f, 560.301f, 148.246f, 558.75f, 142.832f, 558.098f, 140.379f, 569.34f, 141.25f, -575.75f, 10, 0, 0, 0, 0, 0, 0, 0, 44, -236.25f, 528.746f, 235.504f, 530.93f, 236.949f, 530.785f, 239.25f, 531.75f, 241.117f, 532.039f, -254.539f, 536.219f, 255.246f, 538.75f, 256.297f, 541.938f, 271.25f, 536.75f, 271.25f, 536.75f, -272.797f, 536.219f, 277.246f, 533.746f, 277.246f, 533.746f, 282.918f, 532.039f, 290.246f, 531.75f, -290.246f, 531.75f, 292.816f, 530.5f, 296.25f, 527.75f, 296.25f, 527.75f, 312.617f, 516.199f, -326.25f, 523.75f, 326.25f, 523.75f, 348.258f, 531.379f, 341.25f, 550.746f, 341.25f, 550.746f, -338.359f, 560.199f, 342.246f, 563.746f, 342.246f, 563.746f, 342.098f, 568.117f, 350.25f, 560.75f, -350.25f, 560.75f, 352.879f, 556.457f, 354.246f, 550.746f, 354.246f, 550.746f, 362.559f, 538.637f, -359.25f, 557.746f, 359.25f, 557.746f, 359.039f, 559.316f, 355.961f, 563.277f, 356.246f, 564.75f, -355.961f, 565.918f, 354.246f, 569.75f, 354.246f, 569.75f, 350.68f, 573.398f, 353.246f, 580.75f, -353.246f, 580.75f, 355.301f, 596.277f, 353.246f, 594.746f, 353.246f, 594.746f, 351.559f, 596.277f, -341.25f, 585.746f, 341.25f, 585.746f, 339.02f, 581.539f, 332.246f, 579.746f, 332.246f, 579.746f, -329.34f, 577.797f, 325.25f, 579.746f, 325.25f, 579.746f, 322.738f, 579.777f, 316.25f, 571.75f, -316.25f, 571.75f, 319.66f, 572.297f, 322.301f, 567.457f, 325.25f, 566.75f, 327.578f, 567.02f, -329.559f, 569.879f, 331.246f, 570.746f, 333.078f, 571.199f, 336.25f, 564.75f, 336.25f, 564.75f, -336.598f, 561.957f, 330.25f, 556.75f, 330.25f, 556.75f, 330, 551.617f, 328.25f, 553.75f, -328.25f, 553.75f, 324.938f, 554.039f, 323.621f, 549.859f, 322.246f, 544.746f, 321.418f, 539.738f, -317.25f, 539.746f, 317.25f, 539.746f, 315.039f, 531.156f, 313.246f, 534.75f, 313.246f, 534.75f, -313.5f, 540.617f, 307.25f, 533.746f, 307.25f, 533.746f, 305.578f, 532.039f, 300.246f, 534.75f, -300.246f, 534.75f, 293.039f, 536.656f, 295.25f, 538.75f, 295.25f, 538.75f, 297.656f, 541.277f, -310.246f, 538.75f, 310.246f, 538.75f, 312.398f, 540.617f, 303.25f, 544.746f, 303.25f, 544.746f, -302.937f, 547, 304.25f, 551.75f, 304.25f, 551.75f, 305.359f, 555.359f, 313.246f, 561.746f, -313.246f, 561.746f, 323.18f, 562.84f, 320.246f, 564.75f, 320.246f, 564.75f, 313.277f, 570.316f, -307.25f, 561.746f, 307.25f, 561.746f, 304.477f, 555.137f, 285.25f, 538.75f, 285.25f, 538.75f, -280.059f, 534.898f, 282.918f, 542.379f, 278.246f, 538.75f, 274.117f, 534.898f, 251.25f, 544.746f, -251.25f, 544.746f, 238.738f, 546.109f, 235.734f, 528.793f, 232.246f, 531.75f, 232.246f, 531.75f, -237.813f, 522.855f, 236.25f, 528.746f, 10, 0, 0, 0, 0, 0, -0, 0, 12, 450.25f, 711.746f, 450.25f, 711.746f, 422.18f, 703.199f, 419.246f, -682.746f, 419.246f, 682.742f, 416.461f, 657.438f, 439.25f, 637.75f, 439.25f, 637.75f, 439.34f, -631.039f, 441.246f, 627.746f, 441.246f, 627.742f, 439.777f, 622.238f, 460.246f, 630.75f, 490.25f, -639.75f, 490.25f, 639.75f, 497.418f, 642.477f, 503.25f, 651.746f, 508.859f, 661.84f, 525.578f, -682.52f, 521.25f, 709.75f, 521.25f, 709.75f, 522.938f, 722.559f, 516.25f, 722.746f, 516.25f, -722.746f, 507.098f, 724.758f, 499.25f, 716.75f, 499.25f, 716.75f, 491.699f, 712.879f, 489.246f, -713.746f, 450.25f, 711.746f, 10, 0, 0, 0, 0, 0, 0, -0, 8, 510.25f, 712.75f, 510.25f, 712.75f, 512.73f, 722.91f, 507.25f, 717.746f, -507.25f, 717.742f, 499.664f, 711.293f, 491.246f, 711.746f, 491.242f, 711.746f, 475.465f, 708.875f, -470.25f, 694.75f, 470.25f, 694.75f, 466.266f, 664.828f, 475.25f, 658.746f, 475.25f, 658.746f, -480.305f, 650.309f, 488.25f, 657.75f, 495.793f, 664.828f, 512.844f, 698.082f, 510.25f, 712.75f, -10, 0, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 0.2f, 8, 510.25f, -712.75f, 510.25f, 712.75f, 512.309f, 722.313f, 507.25f, 716.75f, 507.25f, 716.75f, 499.48f, -710.906f, 491.246f, 710.746f, 491.242f, 710.742f, 475.719f, 708.531f, 471.246f, 694.75f, 471.242f, -694.75f, 466.691f, 665.289f, 475.25f, 658.746f, 475.25f, 658.746f, 480.469f, 651.031f, 488.25f, -657.75f, 495.68f, 665.289f, 512.387f, 697.961f, 510.25f, 712.75f, 10, 0, 0.4f, -0.4f, 0.4f, 0.4f, 0.4f, 0.4f, 8, 509.246f, 712.75f, 509.246f, 712.75f, -511.887f, 721.715f, 507.25f, 716.75f, 507.25f, 716.75f, 499.293f, 710.52f, 491.246f, 710.746f, -491.242f, 710.742f, 475.973f, 708.188f, 471.246f, 693.746f, 471.242f, 693.742f, 467.113f, 665.746f, -475.25f, 659.75f, 475.25f, 659.75f, 480.637f, 651.754f, 488.25f, 658.746f, 495.563f, 665.746f, -511.93f, 697.84f, 509.246f, 712.75f, 10, 0, 0.6f, 0.6f, 0.6f, 0.6f, -0.6f, 0.6f, 8, 509.246f, 711.746f, 509.246f, 711.746f, 511.465f, 721.113f, 506.246f, -715.746f, 506.242f, 715.742f, 499.109f, 710.133f, 491.246f, 709.75f, 491.242f, 709.75f, 476.23f, -707.844f, 471.246f, 693.746f, 471.242f, 693.742f, 467.535f, 666.203f, 476.246f, 660.746f, 476.246f, -660.742f, 480.805f, 652.477f, 488.25f, 659.75f, 495.449f, 666.203f, 511.477f, 697.719f, 509.246f, -711.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 8, -509.246f, 711.746f, 509.246f, 711.746f, 511.043f, 720.516f, 506.246f, 715.746f, 506.242f, 715.742f, -498.926f, 709.746f, 491.246f, 709.75f, 491.242f, 709.75f, 476.484f, 707.5f, 472.25f, 693.746f, -472.25f, 693.742f, 467.957f, 666.66f, 476.246f, 660.746f, 476.246f, 660.742f, 480.973f, 653.195f, -488.25f, 659.75f, 495.332f, 666.66f, 511.02f, 697.598f, 509.246f, 711.746f, 10, 0, -1, 1, 1, 1, 1, 1, 8, 508.25f, 710.746f, 508.25f, -710.742f, 510.621f, 719.918f, 506.246f, 714.75f, 506.242f, 714.75f, 498.738f, 709.359f, 491.246f, -709.75f, 491.242f, 709.75f, 476.738f, 707.156f, 472.25f, 693.746f, 472.25f, 693.742f, 468.379f, -667.117f, 476.246f, 661.75f, 476.246f, 661.75f, 481.141f, 653.918f, 488.25f, 660.746f, 495.219f, -667.117f, 510.563f, 697.477f, 508.25f, 710.746f, 10, 0, 0.6f, 0.15f, 0, -0.6f, 0.15f, 0, 24, 275.246f, 487.75f, 275.246f, 487.75f, 253.219f, 508.719f, -244.246f, 509.75f, 244.246f, 509.75f, 206.578f, 514, 190.246f, 493.746f, 190.246f, 493.742f, -209.656f, 516.637f, 240.25f, 510.746f, 240.25f, 510.742f, 216.258f, 515.316f, 202.246f, 511.746f, -202.242f, 511.746f, 184.137f, 511.797f, 173.25f, 496.75f, 170.246f, 490.75f, 170.242f, 490.75f, -174.898f, 507.398f, 195.25f, 513.746f, 195.25f, 513.746f, 220.219f, 519.277f, 232.246f, 513.746f, -232.246f, 513.746f, 208.34f, 521.477f, 197.25f, 519.746f, 197.25f, 519.742f, 163.898f, 521.918f, -150.246f, 492.75f, 150.246f, 492.75f, 154.219f, 508.719f, 170.246f, 516.75f, 170.242f, 516.75f, -185.457f, 526.316f, 208.25f, 522.746f, 208.25f, 522.746f, 223.738f, 519.719f, 229.25f, 516.75f, -235.18f, 514.438f, 233.859f, 517.52f, 224.246f, 522.746f, 224.242f, 522.746f, 218.457f, 533.797f, -203.25f, 533.746f, 203.25f, 533.746f, 155.977f, 529.398f, 144.246f, 515.746f, 144.246f, 515.742f, -159.5f, 528.52f, 171.246f, 531.75f, 171.246f, 531.75f, 195.578f, 540.398f, 205.25f, 539.746f, -205.25f, 539.742f, 232.098f, 538.418f, 240.25f, 542.75f, 240.25f, 542.75f, 228.137f, 537.316f, -231.246f, 533.746f, 235.18f, 530.277f, 242.656f, 521.918f, 242.246f, 520.75f, 242.656f, 519.277f, -269.277f, 494.969f, 273.25f, 489.746f, 275.246f, 487.75f, 10, 0, 0.8f, 0.8f, -0.8f, 0.8f, 0.8f, 0.8f, 5, 428.25f, 273.746f, 428.25f, 273.742f, 410.848f, -314.348f, 397.246f, 324.746f, 397.246f, 324.746f, 425.699f, 307.199f, 429.25f, 287.75f, 429.25f, -287.75f, 429.547f, 276.398f, 428.25f, 273.746f, 10, 0, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 0.8f, 7, 479.25f, 265.75f, 479.25f, 265.75f, 450.449f, 326.449f, -430.246f, 352.746f, 430.246f, 352.742f, 477.949f, 311.598f, 483.25f, 282.746f, 484.246f, 276.75f, -480.246f, 278.75f, 480.242f, 278.75f, 480.148f, 269.25f, 479.25f, 265.75f, 10, 0, -0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, 542.246f, 319.746f, 542.246f, -319.742f, 473, 384.75f, 471.246f, 387.746f, 471.242f, 387.742f, 537.898f, 314.898f, 541.25f, -306.746f, 541.25f, 306.742f, 539, 316.547f, 542.246f, 319.746f, 10, 0, 0.8f, -0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 6, 334.246f, 271.746f, 334.246f, 271.746f, -355.848f, 328.648f, 377.246f, 303.75f, 377.246f, 303.75f, 393.25f, 292.898f, 392.25f, 289.75f, -392.25f, 289.75f, 388.297f, 296.75f, 368.246f, 295.746f, 368.242f, 295.742f, 347.598f, 299.5f, -334.246f, 271.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, -5, 544.246f, 411.746f, 544.246f, 411.742f, 494.449f, 443.047f, 486.25f, 444.746f, 473.211f, -447.297f, 540.648f, 412.797f, 546.246f, 400.75f, 546.242f, 400.75f, 548.348f, 404, 544.246f, -411.746f, 10, 0, 0, 0, 0, 0, 0, 0, 63, -378.246f, 294.75f, 378.246f, 294.75f, 400.621f, 296.637f, 408.246f, 303.75f, 413.246f, 299.746f, -432.246f, 342.75f, 436.25f, 336.75f, 436.25f, 336.75f, 452.098f, 352.957f, 451.25f, 361.746f, -450.34f, 370.559f, 465.246f, 354.746f, 465.246f, 354.746f, 465.246f, 354.742f, 464.418f, 367.918f, -472.25f, 360.75f, 472.25f, 360.75f, 469.699f, 377.598f, 479.25f, 368.746f, 479.25f, 368.746f, -467.348f, 401.969f, 492.25f, 373.75f, 498.301f, 366.598f, 493.246f, 373.75f, 493.246f, 373.75f, -493.242f, 373.75f, 464.859f, 426.879f, 488.25f, 410.75f, 488.25f, 410.75f, 490.82f, 436.117f, -489.246f, 440.746f, 488.18f, 445.797f, 485.98f, 470.438f, 480.246f, 475.746f, 475.418f, 481.879f, -481.141f, 483.637f, 487.246f, 477.746f, 487.246f, 477.742f, 474.98f, 504.316f, 489.246f, 490.75f, -489.246f, 490.75f, 485.539f, 507.84f, 480.246f, 510.746f, 480.242f, 510.742f, 474.539f, 529.84f, -491.246f, 517.746f, 491.242f, 517.742f, 486.418f, 531.598f, 483.25f, 534.75f, 483.25f, 534.75f, -470.141f, 565.477f, 478.246f, 559.746f, 483.25f, 555.75f, 483.25f, 555.75f, 475.418f, 571.637f, -482.246f, 566.75f, 489.5f, 561.957f, 489.246f, 562.75f, 489.246f, 562.75f, 489.246f, 562.75f, -466.18f, 598.918f, 488.25f, 579.746f, 488.25f, 579.746f, 479.645f, 594.867f, 476.246f, 602.75f, -476.246f, 602.75f, 455.18f, 624.879f, 471.246f, 617.75f, 476.246f, 615.75f, 476.246f, 615.75f, -466.621f, 627.078f, 458.246f, 628.75f, 449.02f, 630.598f, 460.461f, 637.637f, 467.246f, 635.75f, -474.539f, 633.238f, 491.246f, 624.75f, 491.246f, 624.75f, 491.242f, 624.75f, 505.777f, 604.199f, -510.25f, 603.746f, 510.25f, 603.746f, 488.18f, 612.117f, 495.246f, 603.746f, 495.242f, 603.746f, -510.621f, 587.918f, 502.246f, 588.75f, 502.242f, 588.75f, 496.098f, 580.438f, 501.25f, 570.746f, -501.25f, 570.746f, 481.074f, 590.988f, 497.25f, 562.75f, 505.25f, 544.746f, 505.25f, 544.746f, -478.059f, 572.078f, 490.25f, 547.75f, 490.25f, 547.75f, 509.301f, 521.918f, 511.246f, 521.746f, -513.699f, 521.039f, 518.25f, 511.746f, 518.25f, 511.746f, 513.246f, 513.746f, 519.25f, 503.75f, -519.25f, 503.75f, 507.098f, 517.078f, 513.246f, 502.746f, 520.246f, 486.746f, 520.246f, 486.742f, -497.418f, 510.918f, 512.25f, 478.746f, 512.25f, 478.746f, 494.34f, 484.078f, 504.246f, 464.746f, -504.242f, 464.742f, 502.258f, 447.559f, 502.246f, 441.75f, 503.141f, 436.117f, 504.461f, 404.879f, -499.25f, 395.75f, 494.777f, 387.277f, 506.219f, 366.156f, 508.25f, 361.746f, 510.621f, 357.355f, -514.578f, 345.477f, 505.25f, 355.75f, 495.219f, 365.719f, 500.059f, 359.559f, 502.246f, 349.75f, -504.461f, 340.195f, 511.059f, 323.035f, 510.25f, 316.75f, 510.25f, 316.75f, 508.859f, 315.559f, -505.25f, 319.746f, 505.25f, 319.742f, 489.059f, 344.598f, 491.246f, 328.746f, 491.242f, 328.742f, -489.5f, 319.957f, 486.25f, 310.746f, 486.25f, 310.742f, 482.461f, 298.398f, 482.246f, 307.75f, -482.242f, 307.75f, 478.938f, 326.559f, 476.246f, 317.746f, 472.777f, 309.836f, 468.82f, 303.238f, -465.246f, 300.75f, 462.66f, 297.957f, 456.938f, 323.035f, 455.25f, 311.75f, 455.25f, 311.75f, -442.418f, 325.238f, 437.25f, 306.746f, 424.246f, 288.746f, 424.242f, 288.742f, 423.938f, 302.797f, -422.246f, 295.746f, 422.246f, 295.742f, 389.621f, 289.598f, 378.246f, 294.75f, 10, 0, -0, 0, 0, 0, 0, 0, 34, 340.25f, 686.746f, 340.25f, -686.742f, 327.578f, 695.719f, 323.246f, 695.746f, 318.777f, 694.84f, 353.539f, 704.957f, 399.246f, -674.75f, 399.246f, 674.75f, 404.141f, 671.52f, 408.246f, 671.746f, 408.246f, 671.742f, 411.621f, -669.316f, 408.246f, 665.75f, 408.246f, 665.75f, 398.859f, 654.797f, 411.246f, 642.746f, 411.246f, -642.742f, 431.418f, 635, 425.25f, 644.75f, 425.25f, 644.75f, 437.141f, 640.277f, 440.25f, -635.75f, 442.418f, 631.477f, 441.246f, 635.75f, 441.246f, 635.75f, 441.246f, 635.75f, 434.059f, -643.797f, 427.25f, 649.746f, 427.25f, 649.742f, 421.738f, 651.719f, 418.25f, 660.746f, 415.578f, -670.199f, 412.938f, 681.199f, 418.25f, 684.746f, 418.25f, 684.742f, 413.379f, 679.879f, 414.25f, -684.746f, 415.141f, 688.68f, 419.098f, 692.637f, 421.246f, 692.75f, 422.621f, 693.52f, 440.66f, -710.898f, 448.25f, 711.746f, 448.25f, 711.746f, 438.02f, 709.797f, 434.246f, 710.746f, 431.418f, -712, 402.16f, 724.539f, 395.25f, 725.75f, 395.25f, 725.75f, 377.078f, 733.117f, 390.246f, -730.746f, 390.242f, 730.742f, 429.66f, 726.738f, 449.25f, 711.746f, 449.25f, 711.746f, 441.758f, -721.457f, 421.246f, 728.746f, 421.246f, 728.742f, 397.098f, 743.02f, 358.25f, 737.746f, 358.25f, -737.742f, 338.801f, 734, 330.25f, 731.75f, 330.25f, 731.75f, 327.359f, 732.68f, 326.25f, -732.746f, 326.039f, 733.559f, 313.059f, 743.457f, 282.25f, 735.746f, 282.25f, 735.746f, 264, -730.699f, 254.246f, 725.75f, 254.246f, 725.75f, 237.816f, 724.098f, 234.246f, 720.75f, 234.246f, -720.75f, 213.398f, 704.52f, 211.246f, 703.75f, 209, 702.758f, 196.457f, 694.398f, 195.25f, -693.746f, 195.25f, 693.742f, 222.637f, 701.219f, 225.25f, 703.75f, 227.918f, 706.5f, 247.059f, -709.359f, 249.25f, 707.75f, 252.34f, 706.277f, 261.578f, 706.938f, 251.25f, 706.746f, 251.25f, -706.742f, 334.18f, 690, 335.246f, 687.75f, 335.938f, 685.598f, 340.25f, 686.746f, 340.25f, -686.746f, 10, 0, 0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, 13, -419.246f, 696.75f, 419.246f, 696.75f, 407.66f, 705.18f, 405.25f, 704.746f, 403.258f, 705.18f, -389.621f, 716.398f, 385.25f, 715.746f, 380.379f, 715.52f, 366.961f, 726.52f, 337.25f, 717.746f, -337.25f, 717.742f, 336.16f, 719.699f, 340.25f, 720.75f, 340.25f, 720.75f, 347.16f, 723, -347.25f, 723.75f, 347.25f, 723.75f, 369.82f, 728.277f, 377.246f, 724.746f, 377.246f, 724.746f, -387.859f, 721.457f, 394.25f, 714.75f, 394.25f, 714.75f, 407, 711.117f, 410.246f, 711.746f, -410.246f, 711.746f, 420.199f, 709.797f, 420.246f, 707.75f, 420.246f, 707.75f, 427.02f, 704.52f, -425.25f, 701.75f, 425.25f, 701.75f, 425.48f, 699.898f, 419.246f, 696.75f, 10, 0, -0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, 38, 405.25f, 699.746f, 406.047f, -698.664f, 407.168f, 698.555f, 408.246f, 697.746f, 408.094f, 697.32f, 407.773f, 696.961f, 407.25f, -696.75f, 406.281f, 696.504f, 405.121f, 697.133f, 404.25f, 696.75f, 403.422f, 696.258f, 402.715f, -696.457f, 402.246f, 696.75f, 400.313f, 697.105f, 398.301f, 697.137f, 396.25f, 696.75f, 394.254f, -697.621f, 391.66f, 696.977f, 389.246f, 697.746f, 389.309f, 698.109f, 389.063f, 697.727f, 389.246f, -697.746f, 385.629f, 699.016f, 381.512f, 698.707f, 379.246f, 700.746f, 376.168f, 701.672f, 373.574f, -702.18f, 371.25f, 702.746f, 368.906f, 703.488f, 367.355f, 704.574f, 365.246f, 705.75f, 364.059f, -706.27f, 362.457f, 706.844f, 361.25f, 707.75f, 358.719f, 707.75f, 356.703f, 707.625f, 354.246f, -707.75f, 354.52f, 708.227f, 354.309f, 707.848f, 354.246f, 707.75f, 353.863f, 707.996f, 353.543f, -708.637f, 353.246f, 708.746f, 351.508f, 708.004f, 349.871f, 709.074f, 348.25f, 708.746f, 346.742f, -710.043f, 344.844f, 709.773f, 343.246f, 710.746f, 339.883f, 711.195f, 336.414f, 709.797f, 333.246f, -710.746f, 337.602f, 712.926f, 342.758f, 711.57f, 347.25f, 713.746f, 349.789f, 715.148f, 352.715f, -713.938f, 355.246f, 714.75f, 356.078f, 714.934f, 356.84f, 715.152f, 357.246f, 714.75f, 357.426f, -714.566f, 357.625f, 714.828f, 357.246f, 714.75f, 360.387f, 713.527f, 362.934f, 712.125f, 365.246f, -710.746f, 366.039f, 710.793f, 366.621f, 711.047f, 367.246f, 710.746f, 368.57f, 709.488f, 370.711f, -709.602f, 372.25f, 708.746f, 374.105f, 708.809f, 376.078f, 708.391f, 378.246f, 708.746f, 378.066f, -709.109f, 378.324f, 708.734f, 378.246f, 708.746f, 379.602f, 709.582f, 380.875f, 709.281f, 382.25f, -708.746f, 382.227f, 708.82f, 382.957f, 708.551f, 383.25f, 708.746f, 384.531f, 708.164f, 385.473f, -707.637f, 387.246f, 707.75f, 386.895f, 707.414f, 387.098f, 707.789f, 387.246f, 707.75f, 388.41f, -707.277f, 389.559f, 707.34f, 390.246f, 705.75f, 390.426f, 706.207f, 390.609f, 706.469f, 390.246f, -706.746f, 391.828f, 706.066f, 392.543f, 705.238f, 394.25f, 704.746f, 394.289f, 704.855f, 394.961f, -704.168f, 395.25f, 703.75f, 398.227f, 703.168f, 400.254f, 701.488f, 402.246f, 700.746f, 403.5f, -700.16f, 404.465f, 699.902f, 405.25f, 699.746f, 10, 0, 0.8f, 0.45f, 0.15f, -0.8f, 0.45f, 0.15f, 23, 321.246f, 714.75f, 318.094f, 716.91f, 315.488f, 718.125f, -313.246f, 719.746f, 312.605f, 720.234f, 312.207f, 720.051f, 312.246f, 719.746f, 310.879f, 720.852f, -309.902f, 721.492f, 309.246f, 722.746f, 308.227f, 722.68f, 307.324f, 722.664f, 307.25f, 722.746f, -303.969f, 724.371f, 301.074f, 724.984f, 298.246f, 726.746f, 299.066f, 727, 300.301f, 726.73f, -301.246f, 727.75f, 301.172f, 727.309f, 301.434f, 726.996f, 302.246f, 726.746f, 303.668f, 728.203f, -305.703f, 728.371f, 307.25f, 728.746f, 309.422f, 728.172f, 311.313f, 727.836f, 313.246f, 727.75f, -313.605f, 727.484f, 313.824f, 726.91f, 314.25f, 726.746f, 316.629f, 726.074f, 319.258f, 726.648f, -321.246f, 725.75f, 323.336f, 725.035f, 325.066f, 724.133f, 326.25f, 722.746f, 326.703f, 722.441f, -326.348f, 722.113f, 326.25f, 721.746f, 326.465f, 722.02f, 326.766f, 721.793f, 327.25f, 721.746f, -326.98f, 721.184f, 326.98f, 720.852f, 327.25f, 720.75f, 326.766f, 720.246f, 326.457f, 720.133f, -326.25f, 719.746f, 324.5f, 719.871f, 326.449f, 721.387f, 325.25f, 720.75f, 324.277f, 720, -325.098f, 718.453f, 324.246f, 716.75f, 323.973f, 717.27f, 323.719f, 717.512f, 324.246f, 717.746f, -324.098f, 717.363f, 323.434f, 717.043f, 323.246f, 716.75f, 322.824f, 715.898f, 321.836f, 714.344f, -321.246f, 714.75f, 10, 0, 0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, -25, 285.25f, 706.746f, 281.645f, 707.801f, 278.293f, 707.676f, 275.246f, 708.746f, 274.898f, -709.109f, 274.656f, 708.727f, 274.25f, 708.746f, 273.082f, 709.41f, 272.07f, 710.473f, 271.25f, -711.746f, 269.883f, 712.602f, 268.059f, 712.176f, 266.246f, 712.75f, 266.301f, 712.848f, 266.078f, -713.41f, 266.246f, 713.746f, 264.406f, 713.625f, 263.387f, 714.672f, 262.25f, 715.746f, 264.809f, -716.172f, 267.461f, 716.137f, 270.25f, 716.75f, 270.293f, 716.582f, 270.453f, 716.227f, 270.25f, -715.746f, 270.746f, 716.227f, 270.891f, 716.469f, 271.25f, 716.75f, 271.254f, 716.309f, 271.586f, -715.953f, 272.25f, 715.746f, 272.469f, 716.824f, 273.082f, 716.617f, 273.25f, 716.75f, 273.836f, -716.563f, 273.973f, 716.227f, 274.25f, 715.746f, 274.27f, 716.227f, 274.41f, 716.57f, 274.25f, -716.75f, 274.707f, 716.57f, 274.852f, 716.227f, 275.246f, 715.746f, 275.148f, 716.227f, 275.289f, -716.469f, 275.246f, 716.75f, 276.199f, 715.758f, 277.172f, 716.367f, 278.246f, 715.746f, 279.219f, -715.922f, 279.512f, 714.656f, 280.246f, 714.75f, 285.879f, 712.895f, 290.43f, 710.535f, 295.25f, -707.75f, 295.566f, 708.078f, 295.801f, 707.805f, 295.25f, 707.75f, 295.973f, 707.379f, 296.316f, -707.477f, 296.25f, 707.75f, 297.688f, 706.523f, 298.832f, 705.922f, 299.246f, 704.746f, 299.84f, -704.34f, 299.477f, 703.895f, 299.246f, 703.75f, 294.348f, 705.047f, 289.941f, 705.715f, 285.25f, -706.746f, 10, 0, 0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, 10, -270.25f, 658.746f, 268.117f, 659.637f, 267.477f, 661.871f, 266.246f, 663.75f, 266, 664.215f, -266.301f, 664.563f, 266.246f, 664.746f, 267.266f, 664.832f, 267.863f, 664.309f, 268.246f, 663.75f, -270.234f, 663.137f, 271.922f, 661.77f, 274.25f, 661.75f, 276.309f, 659.16f, 280.992f, 658.738f, -281.25f, 654.75f, 281, 654.074f, 279.43f, 655.082f, 279.246f, 653.746f, 276.262f, 655.242f, -273.633f, 655.129f, 271.25f, 656.746f, 270.336f, 657.16f, 270.699f, 657.66f, 270.25f, 658.746f, -10, 0, 0.8f, 0.45f, 0.15f, 0.8f, 0.45f, 0.15f, 6, 239.25f, -715.746f, 239.727f, 716.129f, 247.461f, 715.871f, 247.246f, 715.746f, 247.391f, 715.406f, 238.891f, -714.254f, 238.25f, 714.75f, 238.309f, 714.523f, 230.047f, 711.852f, 230.25f, 711.746f, 230.191f, -712.148f, 239.285f, 716.129f, 239.25f, 715.746f, 10, 0, 0, 0, 0, -0, 0, 0, 80, 256.246f, 705.75f, 256.246f, 705.75f, 240.238f, 703.418f, -235.246f, 701.75f, 230.559f, 700.777f, 210.098f, 692.418f, 207.25f, 689.746f, 207.25f, 689.746f, -192.059f, 684.277f, 173.25f, 662.746f, 173.25f, 662.742f, 181.719f, 666.02f, 184.25f, 668.75f, -184.25f, 668.75f, 199.098f, 682.957f, 199.246f, 679.75f, 199.246f, 679.75f, 212.297f, 689.559f, -211.246f, 686.746f, 211.246f, 686.742f, 238.477f, 699.457f, 236.25f, 695.746f, 236.25f, 695.742f, -260.039f, 701, 259.25f, 698.75f, 259.25f, 698.75f, 279.617f, 693.957f, 276.246f, 693.746f, -276.246f, 693.742f, 270.156f, 692.418f, 277.246f, 688.746f, 277.246f, 688.742f, 273.457f, 683.617f, -267.246f, 687.75f, 261.578f, 692.418f, 264.879f, 690, 259.25f, 688.746f, 259.25f, 688.742f, -256.52f, 688.02f, 251.25f, 692.75f, 251.25f, 692.75f, 245.297f, 697.477f, 235.246f, 693.746f, -235.242f, 693.742f, 201.957f, 679.656f, 200.246f, 678.746f, 200.246f, 678.746f, 195.797f, 675.918f, -193.25f, 671.746f, 193.25f, 671.742f, 186.777f, 667.117f, 183.25f, 665.75f, 183.25f, 665.75f, -169.398f, 652.816f, 168.25f, 651.746f, 168.25f, 651.742f, 164.34f, 645.559f, 163.25f, 644.75f, -163.25f, 644.75f, 170.5f, 649.297f, 172.25f, 651.746f, 172.25f, 651.742f, 188.098f, 662.5f, -194.25f, 663.75f, 194.25f, 663.75f, 198.879f, 666.68f, 200.246f, 667.746f, 200.246f, 667.746f, -215.598f, 678.34f, 220.246f, 678.746f, 220.246f, 678.746f, 230.34f, 672.617f, 233.246f, 680.746f, -233.246f, 680.746f, 239.359f, 682.297f, 245.246f, 680.746f, 245.246f, 680.746f, 249.039f, 683.84f, -248.25f, 686.746f, 248.25f, 686.742f, 249.918f, 688.238f, 251.25f, 683.75f, 251.25f, 683.75f, -254.758f, 680.098f, 260.25f, 682.746f, 260.25f, 682.742f, 264.437f, 682.52f, 262.25f, 679.75f, -262.25f, 679.75f, 257.398f, 675.699f, 244.246f, 675.746f, 244.246f, 675.742f, 230.777f, 674.816f, -212.246f, 666.75f, 212.246f, 666.75f, 179.957f, 655.02f, 170.246f, 643.75f, 170.242f, 643.75f, -162.797f, 633.898f, 157.25f, 632.75f, 157.25f, 632.75f, 150.477f, 631.699f, 144.246f, 623.746f, -144.246f, 623.746f, 154.656f, 629.938f, 164.246f, 629.746f, 164.242f, 629.742f, 168.957f, 632.578f, -165.246f, 628.75f, 165.242f, 628.75f, 160.816f, 620.258f, 162.25f, 614.746f, 162.25f, 614.746f, -161.918f, 608.598f, 161.246f, 606.75f, 161.246f, 606.75f, 152.457f, 592.758f, 152.25f, 589.75f, -152.457f, 587.477f, 153.777f, 576.699f, 154.246f, 575.75f, 154.656f, 575.379f, 153.117f, 577.797f, -157.25f, 574.746f, 161.477f, 572.52f, 164.559f, 570.758f, 165.246f, 567.75f, 166.316f, 564.598f, -163.238f, 573.617f, 163.25f, 575.75f, 162.797f, 577.578f, 158.18f, 585.5f, 159.246f, 587.746f, -159.242f, 587.742f, 160.156f, 587.039f, 161.246f, 585.746f, 161.246f, 585.742f, 160.379f, 586.156f, -161.246f, 589.75f, 161.246f, 589.75f, 161.918f, 595.84f, 163.25f, 599.75f, 165, 602.879f, -167.199f, 607.059f, 167.25f, 607.746f, 168.078f, 608.816f, 168.078f, 615.199f, 169.25f, 612.746f, -173.25f, 609.746f, 173.25f, 609.742f, 170.277f, 612.34f, 172.25f, 614.746f, 172.25f, 614.746f, -171.598f, 620.918f, 173.25f, 623.746f, 173.25f, 623.746f, 181.277f, 633.02f, 183.25f, 633.75f, -184.797f, 635.219f, 183.25f, 634.746f, 183.25f, 634.746f, 183.25f, 634.746f, 189.859f, 639.398f, -183.25f, 637.75f, 183.25f, 637.75f, 179.078f, 635.879f, 176.246f, 635.75f, 176.246f, 635.75f, -167.418f, 633.68f, 172.25f, 638.746f, 176.219f, 642.918f, 187.219f, 648.859f, 191.246f, 648.75f, -192.25f, 646.75f, 204.25f, 649.746f, 203.25f, 648.75f, 203.25f, 648.75f, 203.059f, 648.859f, -207.25f, 649.746f, 212.297f, 649.738f, 218.68f, 648.199f, 220.246f, 649.746f, 221.758f, 652.156f, -225.5f, 653.258f, 225.25f, 651.746f, 224.617f, 650.18f, 224.246f, 647.746f, 224.246f, 647.746f, -224.242f, 647.746f, 229.898f, 654.359f, 229.25f, 651.746f, 228.578f, 649.52f, 219.559f, 643.797f, -218.25f, 636.746f, 229.25f, 645.746f, 233.246f, 649.746f, 233.246f, 649.742f, 237.379f, 646.879f, -237.25f, 648.75f, 237.816f, 650.398f, 242.879f, 656.777f, 244.246f, 656.746f, 245.52f, 656.34f, -247.719f, 659.418f, 247.246f, 656.746f, 247.277f, 653.699f, 255.246f, 647.746f, 255.246f, 647.746f, -255.246f, 647.746f, 259.156f, 649.738f, 260.25f, 647.746f, 262.238f, 646.656f, 267.246f, 669.746f, -267.246f, 669.746f, 294.25f, 681.75f, 342.246f, 685.75f, 323.246f, 692.75f, 256.246f, 705.75f, -10, 2.2f, 0.3f, 0, 0, 0.3f, 0, 0, 3, 276.246f, -486.746f, 276.246f, 486.742f, 260.039f, 504.977f, 251.25f, 507.75f, 251.25f, 507.75f, 236.059f, -515.316f, 209.246f, 506.746f, 10, 2.2f, 0.3f, 0, 0, 0.3f, 0, -0, 3, 247.246f, 509.75f, 247.242f, 509.75f, 219.559f, 518.18f, 202.246f, 513.746f, -202.242f, 513.746f, 182.379f, 511.359f, 173.25f, 495.746f, 10, 2.2f, 0.3f, 0, -0, 0.3f, 0, 0, 4, 243.246f, 510.746f, 243.246f, 510.742f, 224.617f, -518.617f, 208.25f, 520.75f, 208.25f, 520.75f, 190.078f, 523.898f, 172.25f, 515.746f, 172.25f, -515.742f, 158.398f, 509.379f, 152.25f, 497.746f, 10, 2.2f, 0.3f, 0, 0, -0.3f, 0, 0, 4, 244.246f, 510.746f, 244.246f, 510.742f, 227.477f, 522.359f, -226.25f, 523.75f, 226.25f, 523.75f, 218.68f, 536, 204.25f, 536.75f, 204.25f, 536.75f, -180.84f, 535.559f, 162.25f, 526.746f, 10, 0, 0, 0, 0, 0, -0, 0, 169, 243.246f, 519.746f, 244.68f, 518.543f, 274.25f, 486.746f, 274.25f, -486.746f, 313.059f, 446.457f, 282.25f, 483.75f, 282.25f, 483.75f, 273.898f, 489.359f, 264.246f, -509.75f, 264.246f, 509.75f, 262.457f, 513.117f, 279.246f, 501.75f, 279.246f, 501.75f, 283.578f, -501.238f, 298.246f, 479.75f, 298.246f, 479.75f, 291.059f, 482.758f, 296.25f, 474.75f, 296.25f, -474.75f, 299.418f, 472.637f, 322.246f, 455.746f, 322.246f, 455.746f, 325.82f, 451.078f, 330.25f, -449.746f, 330.25f, 449.746f, 345.621f, 455.035f, 338.25f, 440.746f, 338.25f, 440.746f, 341.219f, -433.035f, 347.25f, 445.746f, 347.25f, 445.746f, 359.699f, 464.277f, 341.25f, 461.75f, 341.25f, -461.75f, 308.656f, 458.559f, 301.246f, 475.746f, 301.246f, 475.746f, 298.539f, 478.797f, 308.246f, -475.746f, 308.246f, 475.746f, 317.461f, 473.957f, 300.246f, 489.746f, 300.246f, 489.746f, 302.937f, -489.797f, 313.246f, 482.746f, 313.246f, 482.746f, 324.5f, 472.199f, 326.25f, 474.75f, 326.25f, -474.75f, 346.5f, 484.078f, 358.25f, 475.746f, 358.25f, 475.746f, 360.141f, 473.957f, 353.98f, -466.477f, 355.246f, 460.746f, 357.5f, 455.035f, 363.25f, 441.75f, 363.25f, 441.75f, 360.141f, -439.637f, 360.25f, 427.746f, 360.25f, 427.746f, 379.059f, 402.238f, 368.246f, 404.75f, 368.246f, -404.75f, 351.34f, 404.879f, 367.246f, 396.746f, 367.246f, 396.746f, 371.141f, 394.316f, 381.25f, -386.75f, 381.25f, 386.75f, 377.738f, 387.719f, 376.246f, 381.746f, 376.246f, 381.746f, 381.258f, -377.598f, 378.246f, 372.746f, 378.246f, 372.746f, 371.578f, 370.996f, 370.25f, 366.75f, 370.25f, -366.75f, 377.738f, 357.797f, 366.246f, 357.746f, 366.246f, 357.746f, 370.699f, 352.516f, 365.246f, -339.746f, 365.246f, 339.746f, 360.141f, 339.316f, 353.246f, 332.746f, 353.246f, 332.746f, 355.738f, -327.879f, 344.246f, 321.746f, 344.246f, 321.746f, 335.059f, 319.957f, 338.25f, 312.75f, 338.25f, -312.75f, 329.34f, 305.879f, 326.25f, 288.746f, 326.25f, 288.746f, 325.82f, 276.836f, 323.18f, -273.316f, 329.25f, 275.746f, 334.621f, 277.719f, 333.246f, 291.746f, 333.246f, 291.746f, 328.461f, -308.516f, 375.246f, 325.75f, 375.246f, 325.75f, 379.938f, 327.879f, 381.25f, 333.75f, 381.25f, -333.75f, 383.02f, 333.156f, 392.25f, 324.746f, 392.25f, 324.746f, 401.059f, 312.477f, 401.246f, -322.75f, 401.246f, 322.75f, 402.82f, 326.559f, 401.246f, 332.746f, 401.246f, 332.746f, 407.66f, -356.918f, 392.25f, 363.746f, 392.25f, 363.746f, 381.258f, 400.918f, 396.25f, 391.75f, 396.25f, -391.75f, 399.738f, 385.516f, 411.246f, 379.746f, 411.246f, 379.746f, 415.25f, 382.75f, 413.82f, -387.719f, 423.246f, 394.746f, 423.246f, 394.746f, 426.141f, 387.277f, 432.246f, 395.75f, 432.246f, -395.75f, 436.699f, 422.918f, 450.25f, 406.75f, 450.25f, 406.75f, 454.738f, 405.758f, 456.246f, -412.746f, 456.246f, 412.746f, 460.02f, 424.676f, 456.246f, 439.75f, 456.246f, 439.75f, 460.02f, -440.078f, 470.25f, 433.746f, 470.25f, 433.746f, 473.66f, 437.438f, 463.539f, 455.918f, 468.25f, -453.746f, 472.34f, 450.637f, 477.25f, 448.75f, 477.25f, 448.75f, 478.059f, 451.078f, 467.246f, -464.746f, 467.246f, 464.746f, 462.219f, 467.797f, 456.246f, 489.746f, 456.246f, 489.746f, 464.418f, -486.277f, 453.25f, 502.746f, 453.25f, 502.746f, 453.418f, 506.52f, 460.246f, 518.75f, 460.246f, -518.75f, 459.141f, 526.316f, 460.246f, 525.75f, 460.246f, 525.75f, 463.098f, 524.559f, 471.898f, -522.797f, 464.25f, 529.75f, 456.938f, 536.879f, 465.246f, 541.746f, 465.246f, 541.746f, 470.141f, -545.238f, 455.25f, 544.746f, 455.25f, 544.746f, 449.461f, 549.637f, 450.25f, 553.75f, 450.25f, -553.75f, 458.699f, 551.84f, 442.859f, 567.68f, 440.25f, 571.75f, 437.578f, 575.598f, 448.25f, -581.746f, 448.25f, 581.746f, 462.66f, 585.277f, 450.25f, 588.75f, 450.25f, 588.75f, 428.34f, -588.359f, 440.25f, 599.75f, 440.25f, 599.75f, 446.82f, 599.797f, 445.246f, 602.75f, 445.246f, -602.75f, 439.34f, 603.758f, 429.25f, 610.75f, 429.25f, 610.75f, 424.379f, 614.758f, 428.25f, -613.75f, 428.25f, 613.75f, 446.82f, 612.559f, 415.25f, 624.75f, 415.25f, 624.75f, 423.938f, -624.879f, 404.25f, 636.746f, 404.25f, 636.746f, 401.938f, 638.078f, 398.246f, 646.75f, 398.246f, -646.75f, 391.82f, 652.156f, 386.246f, 659.75f, 386.246f, 659.75f, 386.098f, 664.477f, 381.25f, -669.746f, 381.25f, 669.746f, 368.059f, 684.719f, 362.25f, 684.746f, 362.25f, 684.746f, 345.621f, -688.238f, 340.25f, 687.75f, 340.25f, 687.75f, 282.25f, 682.746f, 252.777f, 668.438f, 261.25f, -645.746f, 261.25f, 645.746f, 268.398f, 636.098f, 278.246f, 640.746f, 278.246f, 640.746f, 283.578f, -647.098f, 296.25f, 644.75f, 296.25f, 644.75f, 318.777f, 641.156f, 316.25f, 644.75f, 316.25f, -644.75f, 313.277f, 650.18f, 295.457f, 657, 295.25f, 657.75f, 295.02f, 658.316f, 285.25f, -661.75f, 285.25f, 661.75f, 282.039f, 663.379f, 277.246f, 673.746f, 277.246f, 673.746f, 273.68f, -677.238f, 291.246f, 670.75f, 291.246f, 670.75f, 289.738f, 669.758f, 298.246f, 665.75f, 298.246f, -665.75f, 317.02f, 666.457f, 328.25f, 654.75f, 328.25f, 654.75f, 340.559f, 636.316f, 341.25f, -645.746f, 341.25f, 645.746f, 343.859f, 655.68f, 331.246f, 678.746f, 331.246f, 678.746f, 331.32f, -681.199f, 340.25f, 673.746f, 340.25f, 673.746f, 341.879f, 676.137f, 343.246f, 669.746f, 343.246f, -669.746f, 342.98f, 667.117f, 347.25f, 658.746f, 347.25f, 658.746f, 350.238f, 644.02f, 354.246f, -651.746f, 354.246f, 651.746f, 359.25f, 641.75f, 360.801f, 638.957f, 354.246f, 630.75f, 354.246f, -630.75f, 353.98f, 627.52f, 354.859f, 627.738f, 348.25f, 619.75f, 342.539f, 611.02f, 346.246f, -605.746f, 346.246f, 605.746f, 344.738f, 598.918f, 354.246f, 599.75f, 354.246f, 599.75f, 357.277f, -596.938f, 361.25f, 596.746f, 361.25f, 596.746f, 363, 594.738f, 365.246f, 595.75f, 365.246f, -595.75f, 367.398f, 599.578f, 374.25f, 597.75f, 374.25f, 597.75f, 375.758f, 600.02f, 385.25f, -600.75f, 385.25f, 600.75f, 385.879f, 603.316f, 386.32f, 605.078f, 390.246f, 605.746f, 393.801f, -606.398f, 366.246f, 653.746f, 366.246f, 653.746f, 373.777f, 654.578f, 365.246f, 667.746f, 365.246f, -667.746f, 362.34f, 675.477f, 374.879f, 659.418f, 377.246f, 657.75f, 379.719f, 656.34f, 380.82f, -653.918f, 379.246f, 653.746f, 377.301f, 654.359f, 375.32f, 651.938f, 377.246f, 651.746f, 378.398f, -651.5f, 392.699f, 635, 396.25f, 623.746f, 400.18f, 612.559f, 406.777f, 608.156f, 413.246f, -601.746f, 420.418f, 594.957f, 419.246f, 568.746f, 419.246f, 568.746f, 419.098f, 558.656f, 425.25f, -546.746f, 425.25f, 546.746f, 427.898f, 542.816f, 423.246f, 522.746f, 423.246f, 522.746f, 421.078f, -520.379f, 422.246f, 519.746f, 422.246f, 519.746f, 423.719f, 518.18f, 431.246f, 503.75f, 431.246f, -503.75f, 429.219f, 503.879f, 433.246f, 499.746f, 433.246f, 499.746f, 438.898f, 493.316f, 432.246f, -496.75f, 432.246f, 496.75f, 425.258f, 498.379f, 433.246f, 487.75f, 433.246f, 487.75f, 434.277f, -485.617f, 424.246f, 490.75f, 424.246f, 490.75f, 414.258f, 491.34f, 427.25f, 483.75f, 427.25f, -483.75f, 436.48f, 475.5f, 424.246f, 480.746f, 424.246f, 480.746f, 418.879f, 482.316f, 422.246f, -474.75f, 422.246f, 474.75f, 425.918f, 473.078f, 445.246f, 465.75f, 445.246f, 465.75f, 445.277f, -461.195f, 442.246f, 455.746f, 442.246f, 455.746f, 442.418f, 451.297f, 440.25f, 447.746f, 440.25f, -447.746f, 438.68f, 438.535f, 438.25f, 437.75f, 438.25f, 437.75f, 433.398f, 437.438f, 425.25f, -422.746f, 425.25f, 422.746f, 423.277f, 419.398f, 412.246f, 405.746f, 412.246f, 405.746f, 409.859f, -398.496f, 390.246f, 406.75f, 390.246f, 406.75f, 382.801f, 402.676f, 385.25f, 406.75f, 385.25f, -406.75f, 384.559f, 408.836f, 390.246f, 415.75f, 390.246f, 415.75f, 397.539f, 418.297f, 394.25f, -429.746f, 394.25f, 429.746f, 399.078f, 431.719f, 386.758f, 434.797f, 387.246f, 435.75f, 387.199f, -437.438f, 393.25f, 438.746f, 393.25f, 438.746f, 402.379f, 441.176f, 397.246f, 443.75f, 397.246f, -443.75f, 396.879f, 448.219f, 400.246f, 454.75f, 400.246f, 454.75f, 412.938f, 455.258f, 400.246f, -472.75f, 400.246f, 472.75f, 388.301f, 481.438f, 387.246f, 487.75f, 387.246f, 487.75f, 401.059f, -496.84f, 392.039f, 510.477f, 392.25f, 514.75f, 392.48f, 518.398f, 394.25f, 541.746f, 394.25f, -541.746f, 391.598f, 548.977f, 388.246f, 563.746f, 388.246f, 563.746f, 390.719f, 569.656f, 399.246f, -583.746f, 399.246f, 583.746f, 401.938f, 588.137f, 411.621f, 593.418f, 409.246f, 596.746f, 406.777f, -600.02f, 398.246f, 597.75f, 398.246f, 597.75f, 389.621f, 599.578f, 390.246f, 593.75f, 390.246f, -593.75f, 388.52f, 592.758f, 387.246f, 587.746f, 387.246f, 587.746f, 386.848f, 578.531f, 377.246f, -571.75f, 377.246f, 571.75f, 364.758f, 564.816f, 375.246f, 560.75f, 375.246f, 560.75f, 381.48f, -553.156f, 370.25f, 552.746f, 370.25f, 552.746f, 358.598f, 554.918f, 367.246f, 543.746f, 367.246f, -543.746f, 379.5f, 529.617f, 376.246f, 526.746f, 376.246f, 526.746f, 364.98f, 525.438f, 379.246f, -515.746f, 379.246f, 515.746f, 379.242f, 515.742f, 377.961f, 517.52f, 378.246f, 515.746f, 378.398f, -513.559f, 381.699f, 508.938f, 382.25f, 506.746f, 383.461f, 504.539f, 379.246f, 504.746f, 379.246f, -504.746f, 379.719f, 493.758f, 363.25f, 498.75f, 363.25f, 498.75f, 363.25f, 498.75f, 362.777f, -498.379f, 361.25f, 497.746f, 359.258f, 497.938f, 346.938f, 498.816f, 340.25f, 500.746f, 334.18f, -503.656f, 326.25f, 503.75f, 326.25f, 503.75f, 326.25f, 503.75f, 322.301f, 501.68f, 314.25f, -501.75f, 305.578f, 502.117f, 297.246f, 498.75f, 297.246f, 498.75f, 291.937f, 499.477f, 301.398f, -504.316f, 301.246f, 503.75f, 301.84f, 503.879f, 308, 510.039f, 299.246f, 509.75f, 275.223f, -507.578f, 263.25f, 518.75f, 263.25f, 518.75f, 261.137f, 520.379f, 258.246f, 523.75f, 258.246f, -523.75f, 247.277f, 525.656f, 260.25f, 509.75f, 260.25f, 509.75f, 261.137f, 508.277f, 259.25f, -506.746f, 259.25f, 506.746f, 258.719f, 508.938f, 250.25f, 514.75f, 250.25f, 514.75f, 247.047f, -515.949f, 245.547f, 517.414f, 243.246f, 519.746f, 10, 0, 0.3f, 0, 0, -0.3f, 0, 0, 7, 216.25f, 532.746f, 216.25f, 532.742f, 229.457f, 526.758f, -232.246f, 523.75f, 235.18f, 520.598f, 250.25f, 507.75f, 250.25f, 507.75f, 250.25f, 507.75f, -244.637f, 510.258f, 242.246f, 511.746f, 238.918f, 514.219f, 227.25f, 522.746f, 227.25f, 522.746f, -227.25f, 522.746f, 222.859f, 529.84f, 216.25f, 532.746f, 10, 0, 0.6f, 0.8f, -0.2f, 0.6f, 0.8f, 0.2f, 6, 153.246f, 566.75f, 153.258f, 567.398f, 152.684f, -570.379f, 152.25f, 570.746f, 151.332f, 573.977f, 141.25f, 575.75f, 141.25f, 575.75f, 141.207f, -574.098f, 141.148f, 572.34f, 141.25f, 570.746f, 141.25f, 570.746f, 146.621f, 564.469f, 153.246f, -566.75f, 10, 0, 0.4f, 0.6f, 0, 0.4f, 0.6f, 0, 6, -153.246f, 567.75f, 152.395f, 567.281f, 152.871f, 570.461f, 152.25f, 570.746f, 151.555f, 573.977f, -141.25f, 575.75f, 141.25f, 575.75f, 141.207f, 574.207f, 141.148f, 572.449f, 141.25f, 570.746f, -141.25f, 570.746f, 145.961f, 565.02f, 153.246f, 567.75f, 10, 0, 0, 0, -0, 0, 0, 0, 6, 148.246f, 567.75f, 147.371f, 567.297f, 146.812f, -568.551f, 147.25f, 569.75f, 146.812f, 571.645f, 147.371f, 572.898f, 148.246f, 572.746f, 148.746f, -572.898f, 149.305f, 571.645f, 149.246f, 569.75f, 149.305f, 568.551f, 148.746f, 567.297f, 148.246f, -567.75f, 10, 0, 0, 0, 0, 0, 0, 0, 17, -98.2461f, 459.75f, 98.2422f, 459.75f, 91.7383f, 448.438f, 119.25f, 454.75f, 119.25f, 454.75f, -134.418f, 456.355f, 137.246f, 458.746f, 138.379f, 458.117f, 147.582f, 454.891f, 150.246f, 453.746f, -158.18f, 452.398f, 167.25f, 463.75f, 167.25f, 463.75f, 167.25f, 463.75f, 172.477f, 474.949f, -175.25f, 474.75f, 178.637f, 474.949f, 175.25f, 472.75f, 175.25f, 472.75f, 175.25f, 472.75f, -167.859f, 462.078f, 168.25f, 460.746f, 168.25f, 460.742f, 162.578f, 438.316f, 145.25f, 437.75f, -145.25f, 437.75f, 127.215f, 436.391f, 128.25f, 429.746f, 128.25f, 429.742f, 138.379f, 432.598f, -141.25f, 429.746f, 141.25f, 429.742f, 152.898f, 430.398f, 144.246f, 423.746f, 136.25f, 410.75f, -136.25f, 410.75f, 136.773f, 406.289f, 125.25f, 409.746f, 114.84f, 413.898f, 103.25f, 427.746f, -103.25f, 427.746f, 103.25f, 427.742f, 85.9648f, 444.094f, 98.2461f, 459.75f, 10, 0, -0.9f, 0.6f, 0.6f, 0.9f, 0.6f, 0.6f, 14, 96.25f, 454.75f, 96.25f, -454.75f, 94.3789f, 444.477f, 135.25f, 455.746f, 135.25f, 455.742f, 139.699f, 455.918f, 142.246f, -454.75f, 144.977f, 454.156f, 158.18f, 451.078f, 160.246f, 452.75f, 160.246f, 452.75f, 152.457f, -437.438f, 139.246f, 438.746f, 139.246f, 438.742f, 125.18f, 437.438f, 125.25f, 431.746f, 125.25f, -431.742f, 130.02f, 424.238f, 135.25f, 421.75f, 135.25f, 421.75f, 138.379f, 418.957f, 138.246f, -415.75f, 137.5f, 411.918f, 134.418f, 410.156f, 132.246f, 409.746f, 130.02f, 408.398f, 126.5f, -411.918f, 124.25f, 411.746f, 122.977f, 411.918f, 113.738f, 418.957f, 109.246f, 423.746f, 104.059f, -429.516f, 94.8164f, 442.719f, 95.25f, 445.746f, 95.6992f, 448.879f, 96.25f, 454.75f, 96.25f, -454.75f, 10, 0, 0.7f, 0.4f, 0.4f, 0.7f, 0.4f, 0.4f, 13, -100.246f, 435.75f, 102.957f, 431.496f, 106.477f, 426.879f, 109.246f, 423.746f, 113.738f, 418.957f, -122.977f, 411.918f, 124.25f, 411.746f, 126.5f, 411.918f, 130.02f, 408.398f, 132.246f, 409.746f, -134.418f, 410.156f, 137.5f, 411.918f, 138.246f, 415.75f, 138.379f, 418.957f, 135.25f, 421.75f, -135.25f, 421.75f, 131.926f, 423.285f, 128.91f, 427.125f, 127.246f, 429.746f, 127.246f, 429.742f, -127.379f, 426.879f, 121.246f, 427.746f, 115.938f, 428.637f, 110.219f, 431.719f, 108.25f, 434.746f, -106.699f, 438.758f, 104.059f, 441.398f, 106.25f, 437.75f, 107.578f, 433.477f, 110.219f, 429.516f, -112.25f, 428.75f, 113.738f, 428.637f, 113.297f, 427.316f, 110.246f, 427.746f, 108.02f, 428.195f, -104.938f, 428.637f, 100.246f, 434.746f, 10, 0, 0.6f, 0.15f, 0, 0.6f, -0.15f, 0, 20, 97.25f, 458.746f, 97.25f, 458.746f, 99.2187f, 473.957f, 100.246f, -478.746f, 100.246f, 478.746f, 99.6563f, 485.84f, 102.25f, 490.75f, 104.938f, 495.078f, 107.137f, -501.898f, 110.246f, 507.75f, 113.738f, 513.777f, 113.957f, 518.18f, 118.25f, 519.746f, 122.758f, -521.699f, 129.359f, 531.156f, 132.246f, 532.746f, 135.52f, 533.359f, 135.25f, 532.746f, 135.25f, -532.746f, 135.25f, 532.742f, 142.777f, 548.758f, 157.25f, 544.746f, 157.25f, 544.746f, 139.918f, -547.438f, 157.25f, 557.746f, 157.25f, 557.746f, 152.02f, 556.566f, 155.246f, 564.75f, 158.07f, -569.402f, 157.52f, 561.957f, 145.25f, 548.746f, 145.25f, 548.746f, 139.918f, 539.52f, 134.25f, -535.746f, 128.477f, 532.918f, 115.277f, 525.219f, 114.25f, 520.75f, 112.637f, 516.859f, 109.117f, -510.477f, 107.25f, 508.746f, 104.719f, 506.957f, 101.637f, 502.34f, 101.25f, 498.75f, 101.25f, -498.75f, 99.8789f, 494.199f, 98.2461f, 492.75f, 96.7969f, 491.559f, 96.5781f, 488.039f, 96.25f, -485.75f, 96.5781f, 483.637f, 94.3789f, 480.559f, 94.2461f, 477.746f, 94.2461f, 477.742f, 95.4766f, -457.016f, 95.25f, 454.75f, 97.25f, 458.746f, 10, 0, 1, 1, 1, -1, 1, 1, 6, 88.2461f, 453.746f, 88.2461f, 453.742f, 85.5781f, 455.477f, -80.25f, 448.75f, 80.25f, 448.75f, 88.7695f, 412.578f, 89.2461f, 410.75f, 89.2461f, 410.75f, -89.9766f, 413.348f, 88.2461f, 421.75f, 87.1172f, 429.188f, 86.25f, 442.746f, 86.25f, 442.746f, -88.2461f, 453.746f, 10, 0, 0.6f, 0.15f, 0, 0.6f, 0.15f, 0, -13, 111.246f, 520.75f, 111.246f, 520.75f, 92.1797f, 517.078f, 92.2461f, 484.746f, 91.25f, -457.75f, 91.25f, 457.75f, 90.418f, 485.84f, 89.2461f, 487.75f, 87.7773f, 489.359f, 92.1797f, -501.68f, 88.2461f, 494.75f, 88.2461f, 494.75f, 73.2578f, 479.68f, 82.2461f, 456.746f, 82.2422f, -456.746f, 83.707f, 452.727f, 80.25f, 457.75f, 80.25f, 457.75f, 75.3477f, 471.648f, 76.2461f, -478.746f, 76.2422f, 478.746f, 76.7773f, 481.109f, 79.25f, 483.75f, 79.25f, 483.75f, 88.3281f, -497.059f, 91.25f, 499.746f, 91.25f, 499.742f, 93.2773f, 515.43f, 110.246f, 520.75f, 110.246f, -520.75f, 116.488f, 523.68f, 111.246f, 520.75f, 10, 0, 0, 0, 0, -0, 0, 0, 28, 265.246f, 593.75f, 265.605f, 593.809f, 265.594f, 594.875f, -266.246f, 594.746f, 267.496f, 595.441f, 267.676f, 596.617f, 268.246f, 597.75f, 269.207f, 598.93f, -269.418f, 600.617f, 270.25f, 602.75f, 270.359f, 603.027f, 270.387f, 604.078f, 270.25f, 604.75f, -268.754f, 607.531f, 267.98f, 610.227f, 266.246f, 612.746f, 266.098f, 613.391f, 265.812f, 614.262f, -265.246f, 614.746f, 265.082f, 616.441f, 263.699f, 617.535f, 263.25f, 618.746f, 262.434f, 619.469f, -263.012f, 620.488f, 262.25f, 620.746f, 261.238f, 620.695f, 259.645f, 621.332f, 259.25f, 619.75f, -258.742f, 617.359f, 259.852f, 614.586f, 261.25f, 611.75f, 260.059f, 611.137f, 260.426f, 610.125f, -260.25f, 609.746f, 261.375f, 605.313f, 260.055f, 601.625f, 259.25f, 597.75f, 259.191f, 597.691f, -259.57f, 597.473f, 259.25f, 597.75f, 258.195f, 594.449f, 256.598f, 591.762f, 254.246f, 588.75f, -253.762f, 588.051f, 252.805f, 587.043f, 252.25f, 585.746f, 251.852f, 585.008f, 251.402f, 583.945f, -251.25f, 582.75f, 247.898f, 579.801f, 245.426f, 575.57f, 242.246f, 571.75f, 242.043f, 570.594f, -242.363f, 569.262f, 243.246f, 568.746f, 243.863f, 568.527f, 244.918f, 569.656f, 245.246f, 570.746f, -245.859f, 571.352f, 246.25f, 572.066f, 247.246f, 572.746f, 246.937f, 572.969f, 246.738f, 573.43f, -247.246f, 573.75f, 249.785f, 576.145f, 251.621f, 579.375f, 254.246f, 581.746f, 256.465f, 582.34f, -258.152f, 583.438f, 260.25f, 584.75f, 260.414f, 584.75f, 260.992f, 584.477f, 261.25f, 584.75f, -263.238f, 585.984f, 263.238f, 588.223f, 263.25f, 590.746f, 263.41f, 591.297f, 263.625f, 592.746f, -265.246f, 593.75f, 10, 0, 0, 0, 0, 0, 0, 0, -19, 255.246f, 598.746f, 255.289f, 598.414f, 255.117f, 598.879f, 255.246f, 598.746f, 255.418f, -599.477f, 255.859f, 599.68f, 256.246f, 599.75f, 256.16f, 600.277f, 255.98f, 600.695f, 256.246f, -600.75f, 258.695f, 603.543f, 258.977f, 606.867f, 258.246f, 609.746f, 258.965f, 610.82f, 259.031f, -612.207f, 258.246f, 612.746f, 257.625f, 615.012f, 257.414f, 617.129f, 256.246f, 618.746f, 255.457f, -620.223f, 253.723f, 621.59f, 252.25f, 619.75f, 251.75f, 619.719f, 251.398f, 618.852f, 251.25f, -617.75f, 251.773f, 617.887f, 252.09f, 617.727f, 252.25f, 617.75f, 251.941f, 617.281f, 251.34f, -617.035f, 251.25f, 616.746f, 251.301f, 615.09f, 250.25f, 613.43f, 251.25f, 611.75f, 251.793f, -610.176f, 252.695f, 608.133f, 253.246f, 605.746f, 252.082f, 603.852f, 253.219f, 601.156f, 251.25f, -598.746f, 251.141f, 598.93f, 251.148f, 598.508f, 251.25f, 598.746f, 251.605f, 597.75f, 252.051f, -597.305f, 252.25f, 596.746f, 252.809f, 596.848f, 253.191f, 596.848f, 253.246f, 596.746f, 254.047f, -597.383f, 254.484f, 597.918f, 255.246f, 598.746f, 10, 0, 0, 0, 0, -0, 0, 0, 21, 324.246f, 609.746f, 325.773f, 607.703f, 326.094f, 604.629f, -324.246f, 602.75f, 324.445f, 599.457f, 328.129f, 601.637f, 330.25f, 601.746f, 330.32f, 602.645f, -330.57f, 603.023f, 331.246f, 602.75f, 332.043f, 603.047f, 332.789f, 604.18f, 334.246f, 603.746f, -334.438f, 605.691f, 336.238f, 606.465f, 337.25f, 607.746f, 338.844f, 612.047f, 338.195f, 616.746f, -335.246f, 620.746f, 335.129f, 620.598f, 335.371f, 621.164f, 335.246f, 621.75f, 334.402f, 623.996f, -332.125f, 624.34f, 330.25f, 624.75f, 328.703f, 629.359f, 327.977f, 633.793f, 326.25f, 637.75f, -324.266f, 638.133f, 323.496f, 640.047f, 322.246f, 640.746f, 320.559f, 641.629f, 319.934f, 639.891f, -320.246f, 638.746f, 319.988f, 638.516f, 320.484f, 638.27f, 320.246f, 637.75f, 320.215f, 637.688f, -319.926f, 637.566f, 320.246f, 637.75f, 319.93f, 637.27f, 320.172f, 637.125f, 320.246f, 636.746f, -319.309f, 636.074f, 317.742f, 635.551f, 317.25f, 634.746f, 316.371f, 630.211f, 319.199f, 626.773f, -321.246f, 623.746f, 321.684f, 622.004f, 320.875f, 620.605f, 320.246f, 619.75f, 319.559f, 618.512f, -319.676f, 617.273f, 320.246f, 616.746f, 320.809f, 613.766f, 322.559f, 611.855f, 324.246f, 609.746f, -10, 0, 0, 0, 0, 0, 0, 0, 73, 283.25f, -589.75f, 281.734f, 587.41f, 277.98f, 584.586f, 281.25f, 582.75f, 281.402f, 582.324f, 281.809f, -582.32f, 282.25f, 582.75f, 284.223f, 584.188f, 286.426f, 585.18f, 289.246f, 585.746f, 289.242f, -585.852f, 289.543f, 585.34f, 290.246f, 585.746f, 291.727f, 586.289f, 293.938f, 586.227f, 295.25f, -587.746f, 299.383f, 587.453f, 303.305f, 588.68f, 307.25f, 589.75f, 308.309f, 590.609f, 309.707f, -591.227f, 311.246f, 591.75f, 312.543f, 592.41f, 313.867f, 593.434f, 315.25f, 594.746f, 315.234f, -594.836f, 315.625f, 594.738f, 316.25f, 594.746f, 315.875f, 595.688f, 316.934f, 595.828f, 317.25f, -596.746f, 317.305f, 596.766f, 317.141f, 597.203f, 317.25f, 597.75f, 319.641f, 599.105f, 320.652f, -601.328f, 319.25f, 603.746f, 319.051f, 604.578f, 318.777f, 605.258f, 318.25f, 605.746f, 316.961f, -606.781f, 315.75f, 605.844f, 314.25f, 605.746f, 314.422f, 605.488f, 313.621f, 605.676f, 313.246f, -605.746f, 312.25f, 604.977f, 310.785f, 605.621f, 310.246f, 604.75f, 308.344f, 604.371f, 306.977f, -604.188f, 305.25f, 603.746f, 305.07f, 603.684f, 304.215f, 603.789f, 304.25f, 602.75f, 303.891f, -603.246f, 303.727f, 603.504f, 303.25f, 603.746f, 301.512f, 603.043f, 300.125f, 602.809f, 298.246f, -600.75f, 298.582f, 600.801f, 298.098f, 600.996f, 298.246f, 600.75f, 296.867f, 599.961f, 296.422f, -598.602f, 295.25f, 597.75f, 294.992f, 597.727f, 294.602f, 597.914f, 294.25f, 597.75f, 293.68f, -597.297f, 293.277f, 596.59f, 292.25f, 595.75f, 292.207f, 595.848f, 291.766f, 596.207f, 292.25f, -596.746f, 292.07f, 598.629f, 292.789f, 600.594f, 292.25f, 602.75f, 294.441f, 605.43f, 297.211f, -607.574f, 299.246f, 610.75f, 299.215f, 612.961f, 299.977f, 615.32f, 300.246f, 617.75f, 299.84f, -617.816f, 299.523f, 618.625f, 299.246f, 618.746f, 299.043f, 619.945f, 300.039f, 621.117f, 299.246f, -621.75f, 297.566f, 623.238f, 296.145f, 622.273f, 295.25f, 620.746f, 293.215f, 620.27f, 290.945f, -619.508f, 289.246f, 620.746f, 288.102f, 621.73f, 287.465f, 622.727f, 286.246f, 623.746f, 285.504f, -625.32f, 285.871f, 626.898f, 286.246f, 628.75f, 285.953f, 628.762f, 285.609f, 628.91f, 285.25f, -628.75f, 285.609f, 629.207f, 285.852f, 629.352f, 286.246f, 629.746f, 285.223f, 630.188f, 284.918f, -631.352f, 284.25f, 631.746f, 284.133f, 632.898f, 283.391f, 633.871f, 282.25f, 633.75f, 280.238f, -634.965f, 278.395f, 632.859f, 276.246f, 632.75f, 275.746f, 632.758f, 275.23f, 633.902f, 274.25f, -634.746f, 274.043f, 634.496f, 273.27f, 634.531f, 273.25f, 633.75f, 272.113f, 633.688f, 271.465f, -633.559f, 270.25f, 633.75f, 268.852f, 632.855f, 267.449f, 631.652f, 266.246f, 630.75f, 264.188f, -629.77f, 263.137f, 628.188f, 262.25f, 626.75f, 260.914f, 625.469f, 260.762f, 622.813f, 262.25f, -622.75f, 264.352f, 621.547f, 265.785f, 624.523f, 268.246f, 623.746f, 268.293f, 624.105f, 268.52f, -623.766f, 268.246f, 623.746f, 268.824f, 623.219f, 269.066f, 623.469f, 269.246f, 623.746f, 270.223f, -622.656f, 271.504f, 622.285f, 272.25f, 621.75f, 273.602f, 620.332f, 275.523f, 620.793f, 276.246f, -619.75f, 278.32f, 618.043f, 277.707f, 615.094f, 280.246f, 613.75f, 279.195f, 612.215f, 278.527f, -610.809f, 278.246f, 608.75f, 277.848f, 607.914f, 278.941f, 606.598f, 280.246f, 606.75f, 281.656f, -606.801f, 281.945f, 607.633f, 282.25f, 608.75f, 282.773f, 608.523f, 283.289f, 608.199f, 283.25f, -607.746f, 282.738f, 605.336f, 281.609f, 603.141f, 281.25f, 600.75f, 281.043f, 600.121f, 280.707f, -599.898f, 280.246f, 599.75f, 279.762f, 595.453f, 275.305f, 592.82f, 272.25f, 589.75f, 272.063f, -588.785f, 272.059f, 587.414f, 272.25f, 586.75f, 274.051f, 585.445f, 276.207f, 587.145f, 278.246f, -587.746f, 278.313f, 589.023f, 279.258f, 590.063f, 280.246f, 589.75f, 281.004f, 589.988f, 281.262f, -590.586f, 281.25f, 590.746f, 282, 590.879f, 282.555f, 590.633f, 283.25f, 590.746f, 284.77f, -592.164f, 286.32f, 593.383f, 288.246f, 594.746f, 288.441f, 594.832f, 288.82f, 594.66f, 289.246f, -594.746f, 289.414f, 594.957f, 289.621f, 595.383f, 290.246f, 595.75f, 290.359f, 595.805f, 290.625f, -595.484f, 291.246f, 594.746f, 290.129f, 594.793f, 290.125f, 593.742f, 289.246f, 593.75f, 288.629f, -593.223f, 288.012f, 592.66f, 287.246f, 591.75f, 286.949f, 591.957f, 286.227f, 592.23f, 286.246f, -591.75f, 285.453f, 590.902f, 284.152f, 590.418f, 283.25f, 589.75f, 10, 0, 0, -0, 0, 0, 0, 0, 30, 222.246f, 643.75f, 222.246f, 643.75f, -212.258f, 646.957f, 200.246f, 618.746f, 200.246f, 618.742f, 197.34f, 613, 194.25f, 610.75f, -192.059f, 608.598f, 179.738f, 604.637f, 177.246f, 599.75f, 166.246f, 582.75f, 166.246f, 582.75f, -182.379f, 600.238f, 186.25f, 602.75f, 186.25f, 602.75f, 194.699f, 612.117f, 191.246f, 604.75f, -191.242f, 604.75f, 175.777f, 592.758f, 177.246f, 582.75f, 177.246f, 582.75f, 170.938f, 566.797f, -170.246f, 564.75f, 170.242f, 564.75f, 187.656f, 599.797f, 190.246f, 600.75f, 192.938f, 602.438f, -194.258f, 602.438f, 193.25f, 598.746f, 191.617f, 594.52f, 191.18f, 576.477f, 188.246f, 574.746f, -188.246f, 574.742f, 196.898f, 596.719f, 196.25f, 599.75f, 196.25f, 599.75f, 199.539f, 604.199f, -202.246f, 598.746f, 201.246f, 580.75f, 205.25f, 567.75f, 205.25f, 567.75f, 203.059f, 580, -205.25f, 596.746f, 205.25f, 596.742f, 202.617f, 608.598f, 207.25f, 602.75f, 211.418f, 596.277f, -221.977f, 589.68f, 222.246f, 584.75f, 222.246f, 584.75f, 216.258f, 603.758f, 206.25f, 608.75f, -201.246f, 602.75f, 200.246f, 604.75f, 200.246f, 604.75f, 196.457f, 605.52f, 201.246f, 612.746f, -206.137f, 620.477f, 205.25f, 621.75f, 205.25f, 621.75f, 205.25f, 621.75f, 212.738f, 613.438f, -214.25f, 613.75f, 214.25f, 613.75f, 229.02f, 621.797f, 230.25f, 594.746f, 230.25f, 594.742f, -237.816f, 610.797f, 227.25f, 618.746f, 227.25f, 618.742f, 211.418f, 620.477f, 212.246f, 625.746f, -220.246f, 639.75f, 224.617f, 645.559f, 223.246f, 642.746f, 223.246f, 642.746f, 10, 0, -0, 0, 0, 0, 0, 0, 6, 200.246f, 625.746f, 200.246f, -625.746f, 186.34f, 625.758f, 183.25f, 619.75f, 175.25f, 609.746f, 175.25f, 609.742f, 193.816f, -620.477f, 198.246f, 621.75f, 202.617f, 623.117f, 200.246f, 625.746f, 200.246f, 625.746f, 10, -0, 0, 0, 0, 0, 0, 0, 7, 156.25f, 618.746f, -156.25f, 618.742f, 154.219f, 617.398f, 154.246f, 614.746f, 153.34f, 611.238f, 150.699f, 610.797f, -151.25f, 607.746f, 152.457f, 604.637f, 154.656f, 602, 154.246f, 606.75f, 154.656f, 610.797f, -156.418f, 613, 157.25f, 614.746f, 158.18f, 615.637f, 159.938f, 620.477f, 156.25f, 618.746f, -10, 0, 0, 0, 0, 0, 0, 0, 10, 146.25f, -551.75f, 146.25f, 551.75f, 137.5f, 555.797f, 134.25f, 559.746f, 130.457f, 563.719f, 130.957f, -558.035f, 125.25f, 558.75f, 119.187f, 558.922f, 120.246f, 576.746f, 120.246f, 576.746f, 116.246f, -567.75f, 116.246f, 567.75f, 114.617f, 552.277f, 123.25f, 554.746f, 127.715f, 556.207f, 129.137f, -554.477f, 127.246f, 553.75f, 125.617f, 552.719f, 133.539f, 552.277f, 130.25f, 550.746f, 127.379f, -548.758f, 143.219f, 554.477f, 140.25f, 542.75f, 146.25f, 551.75f, 10, 0, 0, -0, 0, 0, 0, 0, 8, 133.246f, 535.746f, 133.246f, 535.746f, -115.938f, 530.719f, 112.25f, 541.746f, 112.25f, 541.742f, 106.699f, 538.637f, 109.246f, 535.746f, -111.539f, 532.039f, 113.25f, 531.75f, 113.25f, 531.75f, 113.25f, 531.75f, 118.797f, 530.277f, -118.25f, 529.75f, 117.477f, 528.52f, 115.246f, 524.746f, 115.246f, 524.746f, 115.242f, 524.746f, -126.059f, 531.379f, 133.246f, 535.746f, 10, 0, 1, 1, 1, 1, -1, 1, 24, 384.25f, 449.746f, 383.648f, 447.191f, 381.813f, 446.309f, 379.246f, -445.746f, 377.609f, 446.629f, 374.754f, 450.047f, 372.25f, 447.746f, 372.156f, 448.305f, 371.301f, -448.371f, 371.25f, 448.75f, 370.41f, 450.086f, 370.711f, 451.238f, 370.25f, 451.746f, 369.734f, -453.516f, 368.953f, 455.016f, 369.25f, 456.746f, 371.145f, 457.359f, 371.801f, 459.457f, 371.25f, -461.75f, 371.203f, 461.68f, 370.73f, 461.895f, 371.25f, 462.746f, 371.156f, 462.633f, 371.504f, -462.883f, 372.25f, 462.746f, 371.652f, 463.031f, 371.492f, 462.773f, 371.25f, 462.746f, 370.699f, -462.91f, 370.836f, 463.613f, 371.25f, 463.75f, 371.621f, 465.957f, 373.836f, 466.25f, 375.246f, -464.746f, 375.602f, 465.559f, 376.16f, 465.348f, 376.246f, 465.75f, 376.586f, 466.016f, 377.031f, -466.594f, 377.246f, 466.746f, 377.82f, 468.266f, 379.613f, 467.047f, 380.25f, 467.746f, 381.672f, -468.629f, 382.844f, 469.398f, 384.25f, 468.75f, 386.02f, 467.621f, 387.898f, 466.285f, 389.246f, -464.746f, 389.848f, 463.453f, 390.113f, 462.047f, 390.246f, 460.746f, 390.008f, 460.281f, 388.488f, -460.668f, 388.246f, 459.75f, 387.402f, 457.723f, 389.414f, 457.152f, 390.246f, 455.746f, 390.465f, -455.297f, 390.176f, 454.961f, 390.246f, 454.75f, 389.375f, 454.711f, 388.516f, 454.922f, 388.246f, -454.75f, 389.734f, 450.91f, 386.703f, 450.164f, 384.25f, 449.746f, 10, 0, 1, -1, 1, 1, 1, 1, 11, 373.25f, 427.746f, 373.551f, 429.891f, -371.789f, 431.82f, 373.25f, 433.746f, 373.27f, 433.551f, 373.41f, 433.305f, 373.25f, 433.746f, -373.707f, 433.305f, 373.852f, 433.551f, 374.25f, 433.746f, 375.645f, 431.258f, 379.66f, 430.238f, -379.246f, 426.75f, 379.48f, 426.617f, 378.285f, 425.605f, 379.246f, 424.75f, 377.285f, 423.414f, -377.223f, 420.809f, 376.246f, 418.746f, 374.836f, 419.051f, 373.504f, 419.449f, 372.25f, 419.75f, -372.625f, 421.691f, 372.496f, 423.543f, 373.25f, 424.75f, 373.879f, 425.766f, 373.563f, 426.949f, -373.25f, 427.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, -15, 190.246f, 437.75f, 190.246f, 437.75f, 172.195f, 426.727f, 187.246f, 443.75f, 197.34f, -454.156f, 208.25f, 460.746f, 208.25f, 460.746f, 208.25f, 460.742f, 219.777f, 465.156f, 223.246f, -466.746f, 227.699f, 467.797f, 244.418f, 473.52f, 248.25f, 473.746f, 251.457f, 474.398f, 262.02f, -478.797f, 269.246f, 474.75f, 276.977f, 470, 286.246f, 464.746f, 286.246f, 464.746f, 286.246f, -464.742f, 267.738f, 474.398f, 264.246f, 471.746f, 259.816f, 469.117f, 251.898f, 469.559f, 245.246f, -465.75f, 245.246f, 465.75f, 229.02f, 461.195f, 225.25f, 458.746f, 221.977f, 456.797f, 210.539f, -444.035f, 209.246f, 444.746f, 207.02f, 445.797f, 209.219f, 446.238f, 210.246f, 449.746f, 211.859f, -452.398f, 209.656f, 454.156f, 201.246f, 446.75f, 192.059f, 440.078f, 190.246f, 437.75f, 190.246f, -437.75f, 10, 0, 0, 0, 0, 0, 0, 0, 11, -199.246f, 444.746f, 199.246f, 444.742f, 200.434f, 458.785f, 210.246f, 456.746f, 210.246f, 456.746f, -218.809f, 461.539f, 222.246f, 463.75f, 222.246f, 463.75f, 230.758f, 465.578f, 232.246f, 466.746f, -252.523f, 475.824f, 268.715f, 470.855f, 269.246f, 471.746f, 269.918f, 473.316f, 291.504f, 465.488f, -295.25f, 460.746f, 295.906f, 460.508f, 284.219f, 467.152f, 273.25f, 468.75f, 264.453f, 471.008f, -240.691f, 468.961f, 228.25f, 462.746f, 225.422f, 461.211f, 215.582f, 454.848f, 213.246f, 454.75f, -210.016f, 455.094f, 199.246f, 444.746f, 199.246f, 444.746f, 10, 0, 0.8f, 0.8f, -0.8f, 0.8f, 0.8f, 0.8f, 11, 194.25f, 416.746f, 194.25f, 416.742f, 177.977f, -418.957f, 196.25f, 420.746f, 196.25f, 420.742f, 216.258f, 422.918f, 220.246f, 428.75f, 220.246f, -428.75f, 235.617f, 438.758f, 238.25f, 438.746f, 241.777f, 439.637f, 274.777f, 447.559f, 275.246f, -449.746f, 275.656f, 452.836f, 281.816f, 452.836f, 283.25f, 451.746f, 285.34f, 451.078f, 284.457f, -449.758f, 281.25f, 448.75f, 278.297f, 447.996f, 243.977f, 429.957f, 237.25f, 428.75f, 229.898f, -427.316f, 217.137f, 418.957f, 212.246f, 417.75f, 206.578f, 416.316f, 194.25f, 416.746f, 194.25f, -416.746f, 10, 0, 0, 0, 0, 0, 0, 0, 11, -216.25f, 424.75f, 216.25f, 424.75f, 206.73f, 425.367f, 216.25f, 426.75f, 216.25f, 426.75f, -225.887f, 430.035f, 228.25f, 432.75f, 228.25f, 432.75f, 235.801f, 438.145f, 237.25f, 438.746f, -238.957f, 438.594f, 254.313f, 442.652f, 254.246f, 443.75f, 254.762f, 445.355f, 292.234f, 459.191f, -297.246f, 455.746f, 300.301f, 453.371f, 289.406f, 455.219f, 279.246f, 450.75f, 277.32f, 449.684f, -240.082f, 433.637f, 236.25f, 432.75f, 232.871f, 432.285f, 226.34f, 428.008f, 223.246f, 427.746f, -220.934f, 426.656f, 216.25f, 424.75f, 216.25f, 424.75f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 207.25f, 421.75f, 207.25f, 421.75f, 213.18f, -422.477f, 212.246f, 420.746f, 210.539f, 418.957f, 208.25f, 419.75f, 208.25f, 419.75f, 207.25f, -421.75f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -199.246f, 420.746f, 199.246f, 420.742f, 205.258f, 420.719f, 204.25f, 418.746f, 202.617f, 417.195f, -200.246f, 417.75f, 200.246f, 417.75f, 199.246f, 420.746f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 188.246f, 418.746f, 188.246f, 418.742f, 193.816f, -418.957f, 192.25f, 416.746f, 191.18f, 415.438f, 188.246f, 416.746f, 188.246f, 416.746f, 188.246f, -418.746f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -179.246f, 417.75f, 179.246f, 417.75f, 185.457f, 418.078f, 184.25f, 416.746f, 182.816f, 414.559f, -180.246f, 415.75f, 180.246f, 415.75f, 179.246f, 417.75f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 222.246f, 460.746f, 222.246f, 460.742f, 226.816f, -461.195f, 225.25f, 459.75f, 224.18f, 457.676f, 220.246f, 457.75f, 220.246f, 457.75f, 222.246f, -460.746f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -211.246f, 454.75f, 211.246f, 454.75f, 218.133f, 457.391f, 215.25f, 453.746f, 214.059f, 451.957f, -211.246f, 452.75f, 211.246f, 452.75f, 211.246f, 454.75f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 198.246f, 449.746f, 198.246f, 449.742f, 204.379f, -450.195f, 203.25f, 448.75f, 201.738f, 446.676f, 199.246f, 447.746f, 199.246f, 447.746f, 198.246f, -449.746f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -190.246f, 442.746f, 190.246f, 442.742f, 196.02f, 443.598f, 194.25f, 441.75f, 193.379f, 440.078f, -190.246f, 440.746f, 190.246f, 440.746f, 190.246f, 442.746f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 183.25f, 437.75f, 183.25f, 437.75f, 188.539f, -438.316f, 187.246f, 436.746f, 185.898f, 434.797f, 183.25f, 435.75f, 183.25f, 435.75f, 183.25f, -437.75f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -226.25f, 430.75f, 226.25f, 430.75f, 233.422f, 431.426f, 231.246f, 428.75f, 229.906f, 426.742f, -226.25f, 427.746f, 226.25f, 427.746f, 226.25f, 430.75f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 237.25f, 435.75f, 237.25f, 435.75f, 244.863f, -436.707f, 243.246f, 434.746f, 241.348f, 432.02f, 238.25f, 432.75f, 238.25f, 432.75f, 237.25f, -435.75f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -249.25f, 440.746f, 249.25f, 440.742f, 256.742f, 441.547f, 255.246f, 438.746f, 253.227f, 436.859f, -249.25f, 437.75f, 249.25f, 437.75f, 249.25f, 440.746f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 260.25f, 445.746f, 260.25f, 445.746f, 268.18f, -446.824f, 266.246f, 444.746f, 264.668f, 442.141f, 261.25f, 443.75f, 261.25f, 443.75f, 260.25f, -445.746f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -230.25f, 465.75f, 230.25f, 465.75f, 237.82f, 466.625f, 236.25f, 464.746f, 234.309f, 461.941f, -230.25f, 461.75f, 230.25f, 461.75f, 230.25f, 465.75f, 10, 0, 0, 0, -0, 0, 0, 0, 4, 241.25f, 469.746f, 241.25f, 469.746f, 248.82f, -470.145f, 247.246f, 467.746f, 245.309f, 465.461f, 240.25f, 465.75f, 240.25f, 465.75f, 241.25f, -469.746f, 10, 0, 0, 0, 0, 0, 0, 0, 4, -216.25f, 425.746f, 216.25f, 425.746f, 221.977f, 425.996f, 220.246f, 423.746f, 219.34f, 422.477f, -216.25f, 423.746f, 216.25f, 423.746f, 216.25f, 425.746f, 10, 0, 0.6f, 0.15f, -0, 0.6f, 0.15f, 0, 5, 135.25f, 534.75f, 135.25f, 534.75f, 130.898f, -525, 130.25f, 521.746f, 130.25f, 521.742f, 131.34f, 531.156f, 132.246f, 533.746f, 133.977f, -535.559f, 135.25f, 534.75f, 135.25f, 534.75f, 10, 0, 0.6f, 0.15f, 0, -0.6f, 0.15f, 0, 5, 115.246f, 519.746f, 115.242f, 519.742f, 111.977f, 503.438f, -112.25f, 500.746f, 112.25f, 500.746f, 111.098f, 513.117f, 111.246f, 514.75f, 111.977f, 515.758f, -115.246f, 519.746f, 115.246f, 519.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 6, 138.246f, 601.746f, 138.246f, 597.75f, 135.25f, 597.75f, 135.25f, -597.75f, 151.359f, 583.738f, 152.25f, 575.75f, 152.25f, 575.75f, 152.898f, 584.398f, 138.246f, -601.746f, 10, 0, 0, 0, 0, 0, 0, 0, 28, -143.246f, 599.75f, 142.285f, 600.402f, 142.527f, 601.223f, 142.246f, 601.746f, 141.188f, 602.078f, -143.508f, 602.141f, 143.246f, 602.75f, 142.836f, 604.254f, 143.039f, 604.277f, 143.246f, 605.746f, -142.844f, 606.34f, 143.488f, 608.031f, 144.246f, 608.75f, 145.504f, 610.332f, 144.047f, 613.559f, -146.25f, 615.75f, 146.188f, 615.582f, 146.598f, 616.191f, 147.25f, 616.746f, 147.637f, 617.711f, -148.941f, 618.246f, 150.246f, 618.746f, 150.336f, 619.461f, 150.113f, 620.371f, 150.246f, 620.746f, -151.523f, 620.141f, 152.891f, 620.285f, 153.246f, 619.75f, 152.715f, 617.027f, 151.254f, 615.137f, -150.246f, 613.75f, 150.344f, 612.527f, 149.84f, 611.828f, 149.246f, 610.75f, 148.059f, 608.336f, -148.266f, 605.207f, 148.246f, 601.746f, 148.07f, 601.992f, 147.73f, 601.906f, 147.25f, 601.746f, -148.129f, 599.277f, 148.77f, 596.859f, 149.246f, 594.746f, 150.141f, 593.387f, 150.66f, 592.402f, -151.25f, 591.75f, 150.945f, 590.625f, 151.059f, 589.711f, 150.246f, 588.75f, 152.848f, 585.754f, -151.41f, 582.84f, 152.25f, 578.75f, 152.922f, 578.27f, 154.785f, 576.164f, 154.246f, 576.746f, -151.512f, 577.297f, 151.387f, 577.734f, 151.25f, 578.75f, 151.031f, 579.25f, 150.668f, 580.762f, -150.246f, 581.746f, 150.336f, 581.605f, 150.148f, 583.68f, 150.246f, 583.746f, 148.398f, 586.434f, -149.895f, 586.238f, 148.246f, 588.75f, 146.816f, 589.582f, 145.754f, 590.797f, 144.246f, 591.75f, -144.301f, 592.297f, 145.559f, 593.094f, 145.25f, 593.75f, 144.156f, 594.746f, 142.887f, 595.59f, -143.246f, 596.746f, 143.43f, 597.992f, 143.578f, 599.156f, 143.246f, 599.75f, 10, 0, -0, 0, 0, 0, 0, 0, 11, 139.246f, 597.75f, 139.246f, -597.75f, 139.258f, 590.559f, 142.246f, 588.75f, 144.539f, 587.039f, 143.219f, 587.918f, 139.246f, -588.75f, 136.18f, 590.559f, 137.246f, 591.75f, 137.246f, 591.75f, 137.242f, 591.75f, 134.418f, -591, 137.246f, 588.75f, 139.699f, 586.598f, 143.656f, 583.957f, 142.246f, 583.746f, 140.137f, -583.957f, 131.777f, 588.359f, 132.246f, 591.75f, 131.777f, 594.52f, 130.25f, 598.746f, 130.25f, -598.746f, 130.25f, 598.742f, 131.887f, 599.906f, 137.246f, 599.75f, 137.242f, 599.75f, 138.707f, -599.027f, 139.246f, 597.75f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 138.246f, 577.75f, 138.246f, 577.75f, 128.566f, 580.648f, 108.25f, 576.746f, -108.25f, 576.742f, 118.172f, 579.203f, 139.246f, 576.746f, 150.148f, 575.324f, 138.246f, 577.75f, -138.246f, 577.75f, 10, 0.11f, 0, 0, 0, 0, 0, 0, -5, 138.246f, 577.75f, 138.246f, 577.75f, 128.566f, 580.648f, 108.25f, 576.746f, 108.25f, -576.742f, 118.172f, 579.203f, 139.246f, 576.746f, 150.148f, 575.324f, 138.246f, 577.75f, 138.246f, -577.75f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -140.25f, 577.75f, 140.25f, 577.75f, 131.176f, 581.527f, 110.246f, 579.746f, 110.246f, 579.746f, -120.695f, 580.984f, 141.25f, 576.746f, 152.215f, 574.355f, 140.25f, 577.75f, 140.25f, 577.75f, -10, 0.11f, 0, 0, 0, 0, 0, 0, 5, 140.25f, -577.75f, 140.25f, 577.75f, 131.176f, 581.527f, 110.246f, 579.746f, 110.246f, 579.746f, 120.695f, -580.984f, 141.25f, 576.746f, 152.215f, 574.355f, 140.25f, 577.75f, 140.25f, 577.75f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 142.246f, 577.75f, -142.242f, 577.75f, 133.453f, 582.086f, 113.25f, 581.746f, 113.25f, 581.746f, 122.965f, 582.328f, -143.246f, 576.746f, 153.902f, 573.371f, 142.246f, 577.75f, 142.246f, 577.75f, 10, 0.11f, -0, 0, 0, 0, 0, 0, 5, 142.246f, 577.75f, 142.242f, -577.75f, 133.453f, 582.086f, 113.25f, 581.746f, 113.25f, 581.746f, 122.965f, 582.328f, 143.246f, -576.746f, 153.902f, 573.371f, 142.246f, 577.75f, 142.246f, 577.75f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 143.246f, 577.75f, 143.242f, 577.75f, -136.102f, 582.047f, 117.25f, 583.746f, 117.25f, 583.742f, 126.715f, 583.066f, 144.246f, 576.746f, -153.77f, 572.66f, 143.246f, 577.75f, 143.246f, 577.75f, 10, 0.11f, 0, 0, -0, 0, 0, 0, 5, 143.246f, 577.75f, 143.242f, 577.75f, 136.102f, -582.047f, 117.25f, 583.746f, 117.25f, 583.742f, 126.715f, 583.066f, 144.246f, 576.746f, 153.77f, -572.66f, 143.246f, 577.75f, 143.246f, 577.75f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 270.25f, 565.746f, 270.25f, 565.742f, 269.398f, 565.031f, -269.246f, 566.75f, 269.871f, 567.629f, 300.898f, 582.117f, 305.25f, 581.746f, 305.25f, 581.746f, -271.602f, 567.316f, 270.25f, 565.746f, 10, 0.11f, 0, 0, 0, 0, -0, 0, 5, 270.25f, 565.746f, 270.25f, 565.742f, 269.398f, 565.031f, 269.246f, -566.75f, 269.871f, 567.629f, 300.898f, 582.117f, 305.25f, 581.746f, 305.25f, 581.746f, 271.602f, -567.316f, 270.25f, 565.746f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 266.246f, 564.75f, 266.246f, 564.75f, 265.727f, 564.25f, 266.246f, 565.746f, -265.992f, 566.879f, 295.785f, 583.758f, 300.246f, 583.746f, 300.246f, 583.742f, 267.742f, 566.699f, -266.246f, 564.75f, 10, 0.11f, 0, 0, 0, 0, 0, 0, -5, 266.246f, 564.75f, 266.246f, 564.75f, 265.727f, 564.25f, 266.246f, 565.746f, 265.992f, -566.879f, 295.785f, 583.758f, 300.246f, 583.746f, 300.246f, 583.742f, 267.742f, 566.699f, 266.246f, -564.75f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -263.25f, 563.746f, 263.25f, 563.742f, 262.164f, 562.676f, 262.25f, 563.746f, 262.254f, 565.316f, -284.055f, 582.363f, 295.25f, 584.75f, 295.25f, 584.75f, 275.016f, 575.484f, 263.25f, 563.746f, -10, 0.11f, 0, 0, 0, 0, 0, 0, 5, 263.25f, -563.746f, 263.25f, 563.742f, 262.164f, 562.676f, 262.25f, 563.746f, 262.254f, 565.316f, 284.055f, -582.363f, 295.25f, 584.75f, 295.25f, 584.75f, 275.016f, 575.484f, 263.25f, 563.746f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 260.25f, 561.746f, -260.25f, 561.742f, 259.09f, 560.711f, 259.25f, 561.746f, 259.176f, 563.086f, 278.793f, 578.43f, -288.246f, 580.75f, 288.246f, 580.75f, 270.656f, 572.238f, 260.25f, 561.746f, 10, 0.11f, -0, 0, 0, 0, 0, 0, 5, 260.25f, 561.746f, 260.25f, -561.742f, 259.09f, 560.711f, 259.25f, 561.746f, 259.176f, 563.086f, 278.793f, 578.43f, 288.246f, -580.75f, 288.246f, 580.75f, 270.656f, 572.238f, 260.25f, 561.746f, 10, 0, 0.8f, -0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 11, 225.25f, 398.746f, 225.25f, 398.742f, -208.34f, 401.355f, 227.25f, 402.75f, 227.25f, 402.75f, 246.617f, 405.316f, 251.25f, 410.75f, -251.25f, 410.75f, 265.977f, 421.156f, 269.246f, 421.75f, 272.137f, 422.035f, 290.18f, 425.996f, -290.246f, 428.75f, 291.059f, 431.277f, 297.656f, 433.918f, 299.246f, 432.75f, 301.18f, 432.156f, -301.18f, 422.035f, 298.246f, 420.746f, 295.02f, 420.277f, 274.34f, 412.355f, 267.246f, 410.75f, -260.258f, 409.719f, 247.5f, 401.355f, 242.246f, 399.75f, 236.938f, 398.719f, 225.25f, 398.746f, -225.25f, 398.746f, 10, 0, 0, 0, 0, 0, 0, 0, -11, 305.25f, 439.75f, 305.25f, 439.75f, 302.059f, 438.098f, 300.246f, 434.746f, 300.246f, -434.746f, 293.699f, 423.578f, 278.246f, 419.75f, 278.246f, 419.75f, 252.777f, 410.156f, 244.246f, -407.746f, 244.246f, 407.742f, 229.457f, 402.457f, 221.246f, 403.746f, 221.246f, 403.746f, 213.617f, -403.117f, 220.246f, 401.746f, 220.246f, 401.746f, 242.656f, 403.559f, 246.246f, 405.746f, 246.242f, -405.742f, 263.559f, 411.258f, 267.246f, 413.75f, 270.156f, 416.977f, 290.18f, 422.477f, 292.25f, -424.75f, 295.02f, 426.879f, 305.797f, 436.117f, 305.25f, 439.75f, 10, 0, 0, -0, 0, 0, 0, 0, 4, 241.25f, 404.75f, 241.25f, 404.75f, -246.52f, 405.445f, 245.246f, 403.746f, 243.984f, 402.035f, 241.25f, 402.75f, 241.25f, 402.75f, -241.25f, 404.75f, 10, 0, 0, 0, 0, 0, 0, 0, -4, 233.246f, 403.746f, 233.246f, 403.746f, 238.598f, 403.957f, 237.25f, 402.75f, 236.063f, -400.547f, 233.246f, 401.746f, 233.246f, 401.746f, 233.246f, 403.746f, 10, 0, 0, -0, 0, 0, 0, 0, 4, 221.246f, 402.75f, 221.246f, 402.75f, -227.125f, 402.586f, 226.25f, 400.75f, 224.59f, 399.176f, 222.246f, 399.75f, 222.246f, 399.75f, -221.246f, 402.75f, 10, 0, 0, 0, 0, 0, 0, 0, -4, 213.246f, 401.746f, 213.242f, 401.746f, 218.73f, 401.984f, 217.25f, 400.75f, 216.191f, -398.578f, 213.246f, 399.75f, 213.246f, 399.75f, 213.246f, 401.746f, 10, 0, 0, -0, 0, 0, 0, 0, 4, 259.25f, 413.75f, 259.25f, 413.75f, -266.609f, 413.664f, 265.246f, 411.746f, 263.234f, 409.129f, 259.25f, 410.75f, 259.25f, 410.75f, -259.25f, 413.75f, 10, 0, 0, 0, 0, 0, 0, 0, -4, 270.25f, 417.75f, 270.25f, 417.75f, 276.855f, 421.832f, 276.246f, 416.746f, 275.973f, -413.453f, 271.25f, 415.75f, 271.25f, 415.75f, 270.25f, 417.75f, 10, 0, 0, -0, 0, 0, 0, 0, 4, 280.246f, 421.75f, 280.242f, 421.75f, -288.223f, 425.367f, 286.246f, 419.75f, 285.457f, 416.664f, 281.25f, 418.746f, 281.25f, 418.746f, -280.246f, 421.75f, 10, 0, 0, 0, 0, 0, 0, 0, -4, 291.246f, 426.75f, 291.242f, 426.75f, 295.605f, 431.996f, 297.246f, 424.75f, 297.227f, -421.875f, 291.246f, 423.746f, 291.246f, 423.746f, 291.246f, 426.75f, 10, 0, 0, -0, 0, 0, 0, 0, 4, 249.25f, 408.75f, 249.25f, 408.75f, -255.266f, 408.652f, 254.246f, 406.75f, 252.73f, 405.242f, 250.25f, 405.746f, 250.25f, 405.746f, -249.25f, 408.75f, 10, 0, 1, 1, 1, 1, 1, 1, -5, 288.246f, 541.746f, 288.246f, 541.742f, 287.875f, 541.203f, 288.246f, 542.75f, 287.875f, -543.559f, 307.109f, 558.148f, 317.25f, 559.746f, 317.25f, 559.746f, 299.125f, 552.27f, 288.246f, -541.746f, 10, 0.11f, 0, 0, 0, 0, 0, 0, 5, -288.246f, 541.746f, 288.246f, 541.742f, 287.875f, 541.203f, 288.246f, 542.75f, 287.875f, 543.559f, -307.109f, 558.148f, 317.25f, 559.746f, 317.25f, 559.746f, 299.125f, 552.27f, 288.246f, 541.746f, -10, 0, 0, 0, 0, 0, 0, 0, 10, 292.25f, -471.746f, 292.25f, 471.742f, 316.141f, 447.117f, 326.25f, 442.746f, 326.25f, 442.742f, 336.379f, -430.836f, 332.246f, 401.746f, 332.246f, 401.746f, 328.461f, 393.879f, 325.25f, 416.746f, 325.25f, -416.742f, 328.461f, 444.477f, 316.25f, 426.75f, 316.25f, 426.75f, 306.898f, 437.766f, 314.25f, -437.75f, 314.25f, 437.75f, 317.461f, 435.238f, 318.25f, 436.746f, 318.34f, 438.758f, 309.539f, -453.719f, 290.246f, 469.746f, 271.699f, 485.398f, 292.25f, 471.746f, 292.25f, 471.746f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 227.25f, 428.75f, -227.25f, 428.75f, 227.477f, 431.059f, 229.25f, 429.746f, 231.438f, 429.297f, 335.059f, 422.477f, -370.25f, 395.75f, 370.25f, 395.75f, 320.098f, 421.598f, 227.25f, 428.75f, 10, 0.11f, -0, 0, 0, 0, 0, 0, 5, 227.25f, 428.75f, 227.25f, -428.75f, 227.477f, 431.059f, 229.25f, 429.746f, 231.438f, 429.297f, 335.059f, 422.477f, 370.25f, -395.75f, 370.25f, 395.75f, 320.098f, 421.598f, 227.25f, 428.75f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 239.25f, 433.746f, 239.25f, 433.742f, -238.918f, 435.898f, 241.25f, 434.746f, 242.879f, 434.137f, 393.141f, 435.238f, 419.246f, 399.75f, -419.246f, 399.75f, 394.898f, 427.316f, 239.25f, 433.746f, 10, 0.11f, 0, 0, -0, 0, 0, 0, 5, 239.25f, 433.746f, 239.25f, 433.742f, 238.918f, -435.898f, 241.25f, 434.746f, 242.879f, 434.137f, 393.141f, 435.238f, 419.246f, 399.75f, 419.246f, -399.75f, 394.898f, 427.316f, 239.25f, 433.746f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 252.25f, 438.746f, 252.25f, 438.742f, 251.68f, 440.297f, -253.246f, 439.75f, 255.637f, 438.535f, 446.379f, 452.836f, 472.25f, 416.746f, 472.25f, 416.742f, -461.777f, 445.355f, 252.25f, 438.746f, 10, 0.11f, 0, 0, 0, 0, -0, 0, 5, 252.25f, 438.746f, 252.25f, 438.742f, 251.68f, 440.297f, 253.246f, -439.75f, 255.637f, 438.535f, 446.379f, 452.836f, 472.25f, 416.746f, 472.25f, 416.742f, 461.777f, -445.355f, 252.25f, 438.746f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 263.25f, 443.75f, 263.25f, 443.75f, 262.68f, 445.578f, 264.246f, 444.746f, -266.637f, 443.816f, 401.059f, 486.277f, 427.25f, 450.75f, 427.25f, 450.75f, 412.277f, 477.699f, -263.25f, 443.75f, 10, 0.11f, 0, 0, 0, 0, 0, 0, -5, 263.25f, 443.75f, 263.25f, 443.75f, 262.68f, 445.578f, 264.246f, 444.746f, 266.637f, -443.816f, 401.059f, 486.277f, 427.25f, 450.75f, 427.25f, 450.75f, 412.277f, 477.699f, 263.25f, -443.75f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -199.246f, 418.746f, 199.246f, 418.742f, 198.879f, 420.496f, 201.246f, 419.75f, 202.84f, 418.738f, -222.418f, 416.316f, 224.246f, 373.75f, 224.242f, 373.75f, 216.699f, 419.836f, 199.246f, 418.746f, -10, 0.11f, 0, 0, 0, 0, 0, 0, 5, 199.246f, -418.746f, 199.246f, 418.742f, 198.879f, 420.496f, 201.246f, 419.75f, 202.84f, 418.738f, 222.418f, -416.316f, 224.246f, 373.75f, 224.242f, 373.75f, 216.699f, 419.836f, 199.246f, 418.746f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 189.246f, 416.746f, -189.246f, 416.742f, 189.199f, 418.738f, 191.246f, 417.75f, 193.156f, 416.977f, 208.777f, 422.035f, -205.25f, 379.746f, 205.25f, 379.746f, 207.02f, 418.078f, 189.246f, 416.746f, 10, 0.11f, -0, 0, 0, 0, 0, 0, 5, 189.246f, 416.746f, 189.246f, -416.742f, 189.199f, 418.738f, 191.246f, 417.75f, 193.156f, 416.977f, 208.777f, 422.035f, 205.25f, -379.746f, 205.25f, 379.746f, 207.02f, 418.078f, 189.246f, 416.746f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 180.246f, 416.746f, 180.242f, 416.742f, -180.398f, 418.297f, 182.25f, 417.75f, 184.359f, 416.535f, 201.297f, 415.879f, 187.246f, 390.746f, -187.246f, 390.746f, 198.219f, 417.637f, 180.246f, 416.746f, 10, 0.11f, 0, 0, -0, 0, 0, 0, 5, 180.246f, 416.746f, 180.242f, 416.742f, 180.398f, -418.297f, 182.25f, 417.75f, 184.359f, 416.535f, 201.297f, 415.879f, 187.246f, 390.746f, 187.246f, -390.746f, 198.219f, 417.637f, 180.246f, 416.746f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 232.246f, 464.746f, 232.246f, 464.742f, 232.187f, 462.887f, -234.246f, 463.75f, 251.566f, 478.113f, 287.254f, 542.906f, 348.25f, 548.746f, 348.25f, 548.746f, -306.367f, 562.426f, 232.246f, 464.746f, 10, 0.11f, 0, 0, 0, 0, -0, 0, 5, 232.246f, 464.746f, 232.246f, 464.742f, 232.187f, 462.887f, 234.246f, -463.75f, 251.566f, 478.113f, 287.254f, 542.906f, 348.25f, 548.746f, 348.25f, 548.746f, 306.367f, -562.426f, 232.246f, 464.746f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 245.246f, 466.746f, 245.246f, 466.742f, 243.496f, 468.379f, 245.246f, 468.75f, -247.605f, 469.754f, 371.293f, 549.508f, 414.25f, 540.75f, 414.25f, 540.75f, 384.688f, 549.004f, -245.246f, 466.746f, 10, 0.11f, 0, 0, 0, 0, 0, 0, -5, 245.246f, 466.746f, 245.246f, 466.742f, 243.496f, 468.379f, 245.246f, 468.75f, 247.605f, -469.754f, 371.293f, 549.508f, 414.25f, 540.75f, 414.25f, 540.75f, 384.688f, 549.004f, 245.246f, -466.746f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -222.246f, 460.746f, 222.246f, 460.742f, 221.512f, 458.594f, 223.246f, 459.75f, 233.266f, 465.301f, -237.242f, 528.234f, 285.25f, 529.75f, 285.25f, 529.75f, 249.523f, 545.801f, 222.246f, 460.746f, -10, 0.11f, 0, 0, 0, 0, 0, 0, 5, 222.246f, -460.746f, 222.246f, 460.742f, 221.512f, 458.594f, 223.246f, 459.75f, 233.266f, 465.301f, 237.242f, -528.234f, 285.25f, 529.75f, 285.25f, 529.75f, 249.523f, 545.801f, 222.246f, 460.746f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 200.246f, 447.746f, -200.246f, 447.746f, 198.973f, 446.812f, 201.246f, 446.75f, 212.391f, 448.555f, 235.937f, 493.953f, -285.25f, 488.746f, 285.25f, 488.742f, 249.656f, 504.148f, 200.246f, 447.746f, 10, 0.11f, -0, 0, 0, 0, 0, 0, 5, 200.246f, 447.746f, 200.246f, -447.746f, 198.973f, 446.812f, 201.246f, 446.75f, 212.391f, 448.555f, 235.937f, 493.953f, 285.25f, -488.746f, 285.25f, 488.742f, 249.656f, 504.148f, 200.246f, 447.746f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 212.246f, 454.75f, 212.246f, 454.75f, -211.625f, 453.348f, 213.246f, 453.746f, 224.461f, 457.637f, 238.852f, 506.711f, 288.246f, 510.746f, -288.246f, 510.742f, 250.363f, 519.348f, 212.246f, 454.75f, 10, 0.11f, 0, 0, -0, 0, 0, 0, 5, 212.246f, 454.75f, 212.246f, 454.75f, 211.625f, -453.348f, 213.246f, 453.746f, 224.461f, 457.637f, 238.852f, 506.711f, 288.246f, 510.746f, 288.246f, -510.742f, 250.363f, 519.348f, 212.246f, 454.75f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 192.25f, 442.746f, 192.25f, 442.742f, 191.453f, 441.449f, -193.25f, 441.75f, 202.32f, 442.863f, 221.395f, 479.633f, 261.25f, 474.75f, 261.25f, 474.75f, -232.508f, 487.891f, 192.25f, 442.746f, 10, 0.11f, 0, 0, 0, 0, -0, 0, 5, 192.25f, 442.746f, 192.25f, 442.742f, 191.453f, 441.449f, 193.25f, -441.75f, 202.32f, 442.863f, 221.395f, 479.633f, 261.25f, 474.75f, 261.25f, 474.75f, 232.508f, -487.891f, 192.25f, 442.746f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 184.25f, 435.75f, 184.25f, 435.75f, 182.949f, 434.945f, 184.25f, 434.746f, -189.281f, 435.414f, 222.984f, 471.801f, 243.246f, 454.75f, 243.246f, 454.75f, 230.082f, 475.344f, -184.25f, 435.75f, 10, 0.11f, 0, 0, 0, 0, 0, 0, -5, 184.25f, 435.75f, 184.25f, 435.75f, 182.949f, 434.945f, 184.25f, 434.746f, 189.281f, -435.414f, 222.984f, 471.801f, 243.246f, 454.75f, 243.246f, 454.75f, 230.082f, 475.344f, 184.25f, -435.75f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -260.25f, 470.75f, 260.25f, 470.75f, 259.219f, 472.699f, 261.25f, 472.75f, 263.469f, 473.547f, -396.242f, 537.031f, 438.25f, 522.746f, 438.25f, 522.746f, 409.465f, 534.84f, 260.25f, 470.75f, -10, 0.11f, 0, 0, 0, 0, 0, 0, 5, 260.25f, -470.75f, 260.25f, 470.75f, 259.219f, 472.699f, 261.25f, 472.75f, 263.469f, 473.547f, 396.242f, -537.031f, 438.25f, 522.746f, 438.25f, 522.746f, 409.465f, 534.84f, 260.25f, 470.75f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 223.246f, 400.75f, -223.246f, 400.75f, 223.52f, 402.457f, 225.25f, 401.746f, 227.477f, 400.695f, 244.418f, 400.035f, -231.246f, 375.75f, 231.246f, 375.75f, 241.34f, 401.797f, 223.246f, 400.75f, 10, 0.11f, -0, 0, 0, 0, 0, 0, 5, 223.246f, 400.75f, 223.246f, -400.75f, 223.52f, 402.457f, 225.25f, 401.746f, 227.477f, 400.695f, 244.418f, 400.035f, 231.246f, -375.75f, 231.246f, 375.75f, 241.34f, 401.797f, 223.246f, 400.75f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 235.246f, 401.746f, 235.242f, 401.746f, -234.957f, 404.219f, 237.25f, 403.746f, 238.918f, 402.457f, 258.5f, 400.035f, 260.25f, 357.746f, -260.25f, 357.746f, 252.777f, 403.559f, 235.246f, 401.746f, 10, 0.11f, 0, 0, -0, 0, 0, 0, 5, 235.246f, 401.746f, 235.242f, 401.746f, 234.957f, -404.219f, 237.25f, 403.746f, 238.918f, 402.457f, 258.5f, 400.035f, 260.25f, 357.746f, 260.25f, -357.746f, 252.777f, 403.559f, 235.246f, 401.746f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 242.246f, 403.746f, 242.246f, 403.746f, 242.437f, 405.977f, -244.246f, 404.75f, 246.398f, 404.219f, 273.457f, 400.477f, 299.246f, 364.75f, 299.246f, 364.75f, -260.258f, 405.316f, 242.246f, 403.746f, 10, 0.11f, 0, 0, 0, 0, -0, 0, 5, 242.246f, 403.746f, 242.246f, 403.746f, 242.437f, 405.977f, 244.246f, -404.75f, 246.398f, 404.219f, 273.457f, 400.477f, 299.246f, 364.75f, 299.246f, 364.75f, 260.258f, -405.316f, 242.246f, 403.746f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 251.25f, 405.746f, 251.25f, 405.742f, 250.566f, 408.164f, 252.25f, 407.746f, -254.723f, 406.945f, 277.199f, 409.031f, 319.25f, 371.75f, 319.25f, 371.75f, 268.316f, 409.875f, -251.25f, 405.746f, 10, 0.11f, 0, 0, 0, 0, 0, 0, -5, 251.25f, 405.746f, 251.25f, 405.742f, 250.566f, 408.164f, 252.25f, 407.746f, 254.723f, -406.945f, 277.199f, 409.031f, 319.25f, 371.75f, 319.25f, 371.75f, 268.316f, 409.875f, 251.25f, -405.746f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -262.25f, 410.75f, 262.25f, 410.75f, 262.004f, 413.004f, 264.246f, 412.746f, 266.164f, 411.785f, -304.48f, 406.832f, 361.25f, 368.746f, 361.25f, 368.746f, 279.754f, 414.715f, 262.25f, 410.75f, -10, 0.11f, 0, 0, 0, 0, 0, 0, 5, 262.25f, -410.75f, 262.25f, 410.75f, 262.004f, 413.004f, 264.246f, 412.746f, 266.164f, 411.785f, 304.48f, -406.832f, 361.25f, 368.746f, 361.25f, 368.746f, 279.754f, 414.715f, 262.25f, 410.75f, 10, -0, 1, 1, 1, 1, 1, 1, 5, 218.25f, 423.746f, -218.25f, 423.746f, 217.797f, 425.777f, 220.246f, 424.75f, 221.758f, 424.016f, 280.5f, 421.156f, -314.25f, 391.75f, 314.25f, 391.75f, 275.547f, 418.93f, 218.25f, 423.746f, 10, 0.11f, -0, 0, 0, 0, 0, 0, 5, 218.25f, 423.746f, 218.25f, -423.746f, 217.797f, 425.777f, 220.246f, 424.75f, 221.758f, 424.016f, 280.5f, 421.156f, 314.25f, -391.75f, 314.25f, 391.75f, 275.547f, 418.93f, 218.25f, 423.746f, 10, 0, 1, -1, 1, 1, 1, 1, 5, 207.25f, 419.75f, 207.25f, 419.75f, -206.797f, 421.379f, 209.246f, 420.746f, 210.758f, 419.617f, 237.816f, 415.879f, 264.246f, 379.746f, -264.246f, 379.746f, 224.617f, 420.719f, 207.25f, 419.75f, 10, 0.11f, 0, 0, -0, 0, 0, 0, 5, 207.25f, 419.75f, 207.25f, 419.75f, 206.797f, -421.379f, 209.246f, 420.746f, 210.758f, 419.617f, 237.816f, 415.879f, 264.246f, 379.746f, 264.246f, -379.746f, 224.617f, 420.719f, 207.25f, 419.75f, 10, 0, 1, 1, 1, -1, 1, 1, 5, 274.25f, 415.75f, 274.25f, 415.75f, 273.828f, 418.031f, -276.246f, 417.75f, 278.066f, 417.125f, 316.645f, 414.992f, 376.246f, 380.75f, 376.246f, 380.75f, -290.746f, 418.625f, 274.25f, 415.75f, 10, 0.11f, 0, 0, 0, 0, -0, 0, 5, 274.25f, 415.75f, 274.25f, 415.75f, 273.828f, 418.031f, 276.246f, -417.75f, 278.066f, 417.125f, 316.645f, 414.992f, 376.246f, 380.75f, 376.246f, 380.75f, 290.746f, -418.625f, 274.25f, 415.75f, 10, 0, 1, 1, 1, 1, 1, -1, 5, 283.25f, 418.746f, 283.25f, 418.742f, 283.07f, 420.672f, 285.25f, 419.75f, -287.309f, 419.762f, 325.883f, 417.633f, 385.25f, 383.746f, 385.25f, 383.742f, 300.648f, 421.703f, -283.25f, 418.746f, 10, 0.11f, 0, 0, 0, 0, 0, 0, -5, 283.25f, 418.746f, 283.25f, 418.742f, 283.07f, 420.672f, 285.25f, 419.75f, 287.309f, -419.762f, 325.883f, 417.633f, 385.25f, 383.746f, 385.25f, 383.742f, 300.648f, 421.703f, 283.25f, -418.746f, 10, 0, 1, 1, 1, 1, 1, 1, 5, -294.25f, 424.75f, 294.25f, 424.75f, 293.629f, 426.172f, 296.25f, 425.746f, 297.867f, 425.262f, -345.242f, 420.492f, 444.246f, 382.75f, 444.246f, 382.75f, 311.207f, 427.203f, 294.25f, 424.75f, -10, 0.11f, 0, 0, 0, 0, 0, 0, 5, 294.25f, -424.75f, 294.25f, 424.75f, 293.629f, 426.172f, 296.25f, 425.746f, 297.867f, 425.262f, 345.242f, -420.492f, 444.246f, 382.75f, 444.246f, 382.75f, 311.207f, 427.203f, 294.25f, 424.75f, 10, -0, 0, 0, 0, 0, 0, 0, 4, 172.25f, 416.746f, -172.25f, 416.742f, 177.539f, 417.195f, 176.246f, 415.75f, 174.898f, 413.676f, 172.25f, 414.746f, -172.25f, 414.746f, 172.25f, 416.746f, 10, 0, 0, 0, 0, 0, -0, 0, 4, 205.25f, 401.746f, 205.25f, 401.746f, 211.418f, 401.797f, 210.246f, -399.75f, 208.777f, 398.277f, 206.25f, 398.746f, 206.25f, 398.746f, 205.25f, 401.746f, 10, -0, 0, 0, 0, 0, 0, 0, 4, 196.25f, 401.746f, -196.25f, 401.746f, 201.738f, 402.238f, 200.246f, 400.75f, 199.098f, 398.719f, 196.25f, 399.75f, -196.25f, 399.75f, 196.25f, 401.746f, 10, 0, 0, 0, 0, 0, -0, 0, 4, 91.25f, 414.746f, 91.25f, 414.746f, 96.6602f, 413.344f, 95.25f, -411.746f, 93.0156f, 410.879f, 91.25f, 412.746f, 91.25f, 412.746f, 91.25f, 414.746f, 10, -0, 0, 0, 0, 0, 0, 0, 4, 93.2461f, 425.746f, -93.2422f, 425.746f, 98.8633f, 423.902f, 97.25f, 422.746f, 95.2148f, 421.441f, 93.2461f, 422.746f, -93.2461f, 422.746f, 93.2461f, 425.746f, 10, 0, 0, 0, 0, 0, -0, 0, 4, 85.25f, 429.746f, 85.25f, 429.742f, 90.9414f, 428.742f, 89.2461f, -427.746f, 87.2969f, 426.281f, 85.25f, 427.746f, 85.25f, 427.746f, 85.25f, 429.746f, 10, -0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, 173.25f, 347.75f, -173.25f, 347.75f, 171.379f, 347.676f, 167.25f, 345.75f, 164.777f, 345.477f, 152.457f, 341.516f, -146.25f, 330.746f, 146.25f, 330.742f, 159.938f, 341.078f, 173.25f, 347.75f, 10, 0, -0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 9, 269.246f, 245.746f, 269.781f, -245.484f, 269.84f, 245.02f, 270.25f, 244.75f, 270.887f, 244.957f, 272.242f, 244.625f, 272.25f, -245.746f, 271.172f, 250.063f, 270.211f, 255.492f, 265.246f, 257.746f, 264.961f, 257.789f, 263.375f, -257.332f, 263.25f, 256.746f, 263.156f, 254.684f, 263.027f, 253.203f, 263.25f, 251.75f, 263.695f, -250.027f, 266.07f, 250.016f, 267.246f, 251.75f, 268.109f, 249.699f, 268.582f, 247.672f, 269.246f, -245.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 9, -257.246f, 240.75f, 258.262f, 239.004f, 258.121f, 236.961f, 259.25f, 236.746f, 260.492f, 236.016f, -262.527f, 237.09f, 262.25f, 238.746f, 261.188f, 240.539f, 260.758f, 243, 259.25f, 244.75f, -259.012f, 245.281f, 259.277f, 245.867f, 259.25f, 245.746f, 258.445f, 247.57f, 257.188f, 248.379f, -255.246f, 247.746f, 254.41f, 245.594f, 255.676f, 243.25f, 257.246f, 241.75f, 257.5f, 241.203f, -257.316f, 240.793f, 257.246f, 240.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 11, 214.25f, 246.746f, 213.758f, 246.684f, 213.719f, 247.191f, 214.25f, -247.746f, 214.484f, 248.68f, 215.355f, 249.914f, 215.25f, 250.746f, 214.602f, 252.203f, 213.375f, -252, 212.246f, 251.75f, 211.41f, 250.281f, 211.355f, 248.273f, 210.246f, 246.746f, 210.379f, -246.355f, 210.438f, 245.723f, 210.246f, 245.746f, 209.43f, 244.832f, 208.945f, 243.152f, 209.246f, -242.75f, 209.109f, 242.18f, 208.91f, 231.281f, 209.246f, 231.75f, 209.836f, 232.379f, 213.188f, -243.086f, 213.246f, 243.75f, 213.328f, 244.871f, 214.133f, 245.383f, 214.25f, 246.746f, 10, -0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 7, 185.25f, 253.75f, -188.574f, 256.488f, 191.641f, 259.746f, 191.246f, 263.75f, 191.027f, 264.902f, 189.074f, 264.32f, -189.246f, 263.75f, 187.988f, 259.402f, 185.746f, 256.477f, 183.25f, 253.75f, 180.504f, 251.594f, -178.457f, 244.617f, 178.246f, 243.75f, 182.266f, 249.84f, 184.746f, 252.859f, 185.25f, 253.75f, -10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 10, 170.246f, -260.746f, 171.32f, 260.707f, 170.988f, 261.246f, 171.246f, 261.746f, 172.273f, 263.215f, 173.707f, -264.586f, 173.25f, 266.746f, 173.73f, 266.805f, 173.313f, 267.145f, 173.25f, 266.746f, 172.641f, -266.695f, 172.262f, 266.551f, 172.25f, 266.746f, 169.91f, 263.715f, 168.371f, 260.777f, 167.25f, -257.746f, 166.582f, 257.289f, 165.324f, 252.352f, 165.246f, 251.75f, 165.934f, 252.133f, 167.824f, -256.734f, 168.25f, 256.746f, 169.445f, 257.613f, 169.457f, 259.391f, 170.246f, 260.746f, 10, -0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 6, 189.246f, 238.746f, -189.641f, 239.758f, 191.371f, 241.078f, 191.246f, 241.75f, 191.117f, 243.078f, 191.633f, 244.664f, -190.246f, 243.75f, 189.246f, 242.867f, 185.453f, 241.383f, 185.25f, 234.746f, 185.129f, 234.363f, -188.398f, 237.328f, 189.246f, 238.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 19, 205.25f, 257.746f, 205.477f, 258.434f, 206.258f, 257.91f, 207.25f, -257.746f, 207.473f, 258.609f, 208.148f, 259.223f, 208.25f, 259.746f, 209.535f, 262.301f, 211.48f, -264.305f, 211.246f, 266.746f, 209.996f, 268.484f, 209.25f, 266.238f, 208.25f, 264.746f, 207.102f, -266.988f, 206.004f, 264.926f, 204.25f, 264.746f, 204.496f, 264.324f, 204.262f, 264.707f, 204.25f, -264.746f, 202.887f, 264.195f, 202.137f, 263.004f, 201.246f, 261.746f, 200.852f, 261.996f, 200.406f, -262.195f, 200.246f, 261.746f, 199.527f, 261.383f, 198.457f, 261.027f, 198.246f, 260.746f, 196.93f, -257.297f, 193.473f, 254.992f, 191.246f, 246.746f, 191.816f, 245.695f, 196.359f, 254.004f, 197.25f, -254.75f, 197.816f, 256.086f, 197.945f, 252.945f, 199.246f, 253.75f, 199.406f, 253.707f, 199.609f, -253.445f, 200.246f, 253.75f, 199.973f, 253.605f, 200.211f, 253.855f, 200.246f, 253.75f, 200.637f, -254.176f, 200.492f, 254.789f, 200.246f, 254.75f, 202.074f, 256.039f, 201.98f, 257.215f, 203.25f, -258.746f, 203.344f, 257.711f, 204.508f, 258.5f, 205.25f, 257.746f, 10, 0, 0.8f, -0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 6, 271.25f, 197.75f, 271.25f, 197.75f, -278.957f, 220.297f, 274.25f, 232.75f, 274.25f, 232.75f, 286.656f, 208.855f, 281.25f, 196.75f, -281.25f, 196.75f, 281.156f, 207.977f, 277.246f, 213.746f, 277.246f, 213.746f, 272.359f, 199.398f, -271.25f, 197.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, -5, 254.246f, 200.75f, 254.246f, 200.75f, 260.477f, 210.398f, 251.25f, 230.75f, 251.25f, -230.75f, 250.797f, 208.195f, 243.246f, 195.746f, 243.246f, 195.742f, 258.937f, 218.316f, 254.246f, -200.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, -243.246f, 202.746f, 243.246f, 202.746f, 243.316f, 224.918f, 244.246f, 227.746f, 244.246f, 227.742f, -239.578f, 209.957f, 228.25f, 199.75f, 228.25f, 199.75f, 244.199f, 212.598f, 243.246f, 202.746f, -10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, 233.246f, -237.746f, 233.246f, 237.746f, 239.578f, 223.156f, 228.25f, 202.746f, 228.25f, 202.746f, 235.617f, -216.336f, 230.25f, 223.746f, 230.25f, 223.746f, 233.199f, 227.777f, 233.246f, 237.746f, 10, -0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 8, 212.246f, 203.746f, -212.246f, 203.746f, 210.758f, 220.516f, 212.246f, 222.75f, 212.246f, 222.75f, 212.957f, 229.977f, -212.246f, 230.75f, 212.246f, 230.75f, 216.918f, 237.898f, 217.25f, 229.75f, 217.25f, 229.75f, -218.68f, 221.176f, 222.246f, 215.746f, 222.246f, 215.746f, 225.719f, 210.176f, 225.25f, 202.746f, -225.25f, 202.746f, 214.5f, 236.355f, 212.246f, 203.746f, 10, 0, 0.8f, 0.8f, -0.8f, 0.8f, 0.8f, 0.8f, 5, 208.25f, 233.75f, 208.25f, 233.75f, 200.637f, -221.836f, 198.246f, 200.75f, 198.246f, 200.75f, 197.117f, 207.758f, 201.246f, 223.746f, 201.246f, -223.746f, 205.918f, 240.535f, 208.25f, 233.75f, 10, 0, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 0.8f, 6, 184.25f, 211.75f, 184.25f, 211.75f, 189.418f, 217.879f, -191.246f, 223.746f, 191.242f, 223.746f, 194.918f, 240.758f, 188.246f, 231.75f, 188.246f, 231.75f, -188.098f, 222.496f, 179.246f, 214.746f, 179.246f, 214.746f, 184.359f, 216.996f, 184.25f, 211.75f, -10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 6, 177.246f, -217.746f, 177.246f, 217.742f, 181.277f, 236.578f, 182.25f, 237.746f, 182.25f, 237.746f, 184.137f, -241.195f, 181.25f, 237.746f, 181.25f, 237.746f, 171.379f, 216.559f, 167.25f, 209.75f, 167.25f, -209.75f, 175.777f, 219.418f, 177.246f, 217.746f, 10, 0, 0.8f, 0.8f, 0.8f, -0.8f, 0.8f, 0.8f, 4, 171.246f, 235.746f, 171.246f, 235.746f, 183.918f, 260.336f, -160.246f, 231.75f, 160.246f, 231.75f, 172.039f, 242.738f, 171.246f, 235.746f, 10, 0, -0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 6, 154.246f, 251.75f, 154.242f, -251.75f, 159.5f, 272.438f, 162.25f, 271.746f, 162.25f, 271.746f, 171.379f, 282.117f, 164.246f, -270.75f, 164.242f, 270.75f, 157.52f, 259.898f, 158.25f, 248.746f, 158.25f, 248.746f, 157.52f, -259.676f, 154.246f, 251.75f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, -0.8f, 5, 517.246f, 264.746f, 517.242f, 264.742f, 504.348f, 275.297f, 501.25f, 278.75f, -501.25f, 278.75f, 516.449f, 258.797f, 516.25f, 250.746f, 516.25f, 250.742f, 519.199f, 259.348f, -517.246f, 264.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, -5, 523.25f, 288.746f, 523.25f, 288.742f, 500.5f, 305, 496.25f, 312.75f, 496.25f, -312.75f, 525.797f, 280.797f, 526.246f, 275.746f, 526.242f, 275.742f, 526.348f, 285.75f, 523.25f, -288.746f, 10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 5, -542.246f, 457.75f, 542.246f, 457.75f, 529.098f, 466.699f, 527.25f, 464.746f, 527.25f, 464.742f, -539, 457.348f, 542.246f, 447.746f, 542.246f, 447.746f, 540.098f, 457.898f, 542.246f, 457.75f, -10, 0, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 0.8f, 4, 551.25f, -369.75f, 532.25f, 382.75f, 532.25f, 382.75f, 553.297f, 363.848f, 554.25f, 359.746f, 551.25f, -369.75f, 10, 1.1f, 0, 0, 0, 0, 0, 0, 2, -122.246f, 393.75f, 146.25f, 388.75f, 10, 1.1f, 0, 0, 0, 0, -0, 0, 2, 177.246f, 215.746f, 177.246f, 215.746f, 176.547f, 219.75f, 166.246f, -207.75f, 10, 1.1f, 0, 0, 0, 0, 0, 0, 2, -183.25f, 210.75f, 183.25f, 210.75f, 185.348f, 217.547f, 178.246f, 212.746f, 10, 1.1f, -0, 0, 0, 0, 0, 0, 2, 242.246f, 200.75f, 242.246f, -200.75f, 244.199f, 213.148f, 231.246f, 198.75f}; - diff --git a/vc/src/hello_pi/hello_tiger/tiger.h b/vc/src/hello_pi/hello_tiger/tiger.h @@ -1,45 +0,0 @@ -#ifndef __TIGER_H -#define __TIGER_H - -/*------------------------------------------------------------------------ - * - * OpenVG 1.0.1 Reference Implementation sample code - * ------------------------------------------------- - * - * Copyright (c) 2007 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief Header for including the Tiger image data. - * \note - *//*-------------------------------------------------------------------*/ - -extern const int tigerCommandCount; -extern const char tigerCommands[]; -extern const float tigerMinX; -extern const float tigerMaxX; -extern const float tigerMinY; -extern const float tigerMaxY; -extern const int tigerPointCount; -extern const float tigerPoints[]; - -#endif /* __TIGER_H */ diff --git a/vc/src/hello_pi/hello_triangle/Djenne_128_128.raw b/vc/src/hello_pi/hello_triangle/Djenne_128_128.raw @@ -1,3 +0,0 @@ -öÖ¿÷×À÷×ÀøØÁúÚÃúÚÃúÚÃúÚÃùÙÂùÙÂùÙÂùÙÂùÙÂùÙÂùÙÂùÙÂûÙÂûÙÂûÙÂûÙÂúØÁúØÁúØÁúØÁøÖ¿ù×Àù×ÀúØÁúØÁúØÁúØÁúØÁù×Àù×Àù×Àù×À÷Õ¾øÖ¿ù×Àù×À÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾öÔ½öÔ½÷Õ¾÷Õ¾÷Õ¾÷Õ¾õÓ¼öÔ½öÔ½õÓ¼ôÒ»ôÒ»ôÒ»ôÒ»õкõкõкõкõкõкõкõкôиõѹôиôиòζóÏ·óÏ·õѹñ͵óÏ·óÏ·ñ͵òζñ͵ñ͵ñ͵ñ͵ñ͵ðÌ´ðÌ´ðÌ´ï˳ï˳ï˳î˱î˱î˱î˱î˱î˱î˱íÊ°ïÊ°ïÊ°îɯîɯíÈ®ìÇ­ìÇ­ìÇ­ëƬëƬëƬêÅ«êÅ«êÅ«ëƬëƬèééĪéĪèéèéèéèéç¨ùÙÂúÚÃúÚÃûÛÄüÜÅüÜÅüÜÅüÜÅûÛÄûÛÄûÛÄûÛÄûÛÄûÛÄûÛÄûÛÄýÛÄýÛÄýÛÄýÛÄýÛÄýÛÄýÛÄýÛÄüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃûÙÂûÙÂûÙÂûÙÂúØÁúØÁúØÁúØÁù×Àù×Àù×Àù×ÀúØÁù×Àù×Àù×ÀøÖ¿øÖ¿øÖ¿øÖ¿øÖ¿øÖ¿øÖ¿÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾øÓ½øÓ½øÓ½øÓ½÷Ò¼÷Ò¼÷Ò¼÷Ò¼öÓº÷Ó»÷Ó»÷Ó»õѹöÒºöÒºöÒºôиõѹõѹôиôиôиôиóÏ·ôиóÏ·óÏ·óÏ·óÏ·òζòζòζñδñδñδñδñδñδðͳðͳòͳñ̲ñ̲ñ̲ð˱ïÊ°ïÊ°ïÊ°îɯîɯîɯíÈ®îɯíÈ®íÈ®ìÇ­ìÇ­íÈ®íÈ®ìÇ­ëƬëƬêÅ«êÅ«ûÛÄûÛÄûÛÄûÛÄüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅûÛÄûÛÄûÛÄûÛÄýÛÄýÛÄüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃûÙÂúØÁûÙÂûÙÂûÙÂûÙÂúØÁúØÁúØÁúØÁúØÁúØÁù×Àù×ÀøÖ¿øÖ¿øÖ¿øÖ¿øÖ¿ù×ÀøÖ¿÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾øÓ½øÓ½øÓ½øÓ½÷Ò¼÷Ò¼÷Ò¼÷Ò¼öÓº÷Ó»÷Ó»öÒºöÒºöÒºöÒºöÒºõѹõѹõѹõѹõѹõѹôиôиôиôиôиóÏ·óÏ·óÏ·òζòζñδñδñδñδñδñδðͳðͳòͳñ̲ñ̲ñ̲ð˱ð˱ïÊ°ïÊ°ïÊ°îɯîɯîɯïÊ°îɯíÈ®ìÇ­ìÇ­ìÇ­ìÇ­ëƬìÇ­ëƬëƬëƬüÜÅüÜÅüÜÅüÜÅýÝÆýÝÆýÝÆýÝÆüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅûÛÄûÛÄûÛÄûÛÄüÚÃýÛÄýÛÄýÛÄüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃüÚÃûÙÂûÙÂûÙÂûÙÂûÙÂûÙÂûÙÂûÙÂúØÁúØÁúØÁúØÁúØÁúØÁù×Àù×Àù×Àù×Àù×Àù×ÀøÖ¿ù×ÀøÖ¿÷Õ¾÷Õ¾÷Õ¾÷Õ¾÷Õ¾øÓ½øÓ½øÓ½øÓ½÷Ò¼÷Ò¼÷Ò¼÷Ò¼öÓº÷Ó»÷Ó»öÒº÷Ó»÷Ó»öÒºöÒºõѹôиõѹöÒºõѹõѹôиôиõѹôиôиôиóÏ·óÏ·óÏ·òζòϵòϵòϵòϵñδñδðͳðͳòͳñ̲ñ̲ñ̲ð˱ð˱ð˱ïÊ°ïÊ°ïÊ°îɯîɯîɯîɯîɯîɯíÈ®îɯîɯíÈ®ìÇ­ìÇ­ëƬëƬûÜÅüÝÆýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÛÄûÛÄûÛÄûÛÄüÜÅüÜÅüÜÅüÜÅûÛÄûÛÄûÛÄûÛÄúÚÃûÛÄûÛÄûÛÄýÛÃýÛÃýÛÃýÛÃüÚÂüÚÂüÚÂüÚÂüÚÃüÚÃüÚÃüÚÃûÙÂûÙÂûÙÂûÙÂúØÀúØÀúØÀù׿÷Õ½úØÀúØÀù׿øÖ¿øÖ¿øÖ¿÷Õ¾÷Õ¾ù×Àù×ÀöÔ¾øÔ¼øÔ¼ùÕ½úÖ¾õѹøÔ¼ùÕ½ùÕ½÷Ó»÷Ó»÷Ó»÷Ó»öÒºöÒºöÒºöÒºõѹõѹõѹõѹõѹõѹõѹõѹõѹõѹõѹõѹôиôиóÏ·óÏ·óжòϵòϵòϵñδñδðͳðͳñ̲ñ̲ñ̲ñ̲ñ̲ñ̲ð˱ð˱ð˱ð˱ð˱ïÊ°ïÊ°îɯîɯîɯïÊ°îɯîɯîɯìÇ­ìÇ­ìÇ­ëƬûÜÅüÝÆýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅûÛÄûÛÄüÜÅûÛÄýÛÃýÛÃýÛÃýÛÃýÛÃýÛÃýÛÃýÛÃýÛÄýÛÄýÛÄýÛÄüÚÃüÚÃüÚÃüÚÃüÚÂüÚÂüÚÂûÙÁúØÀúØÀúØÀù׿ù×Àù×Àù×ÀøÖ¿ù×Àù×Àù×À÷Õ¿úÖ¾úÖ¾û׿û׿øÔ¼ùÕ½ùÕ½øÔ¼ùÕ½ùÕ½ùÕ½ùÕ½øÔ¼øÔ¼øÔ¼øÔ¼÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»õѹõѹõѹõѹõѹôиôиôиóжóжóжòϵóжóжòϵòϵóδóδóδóδòͳñ̲ñ̲ñ̲ñ̲ñ̲ð˱ð˱ð˱ïÊ°ïÊ°ïÊ°ïÊ°ïÊ°îɯîɯîɯîɯîɯíÈ®üÝÆýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅýÝÆýÝÆýÝÆýÝÆûÛÄüÜÅüÜÅüÜÅþÜÄþÜÄþÜÄþÜÄýÛÃýÛÃýÛÃýÛÃýÛÄýÛÄýÛÄýÛÄýÛÄýÛÄýÛÄýÛÄüÚÂüÚÂüÚÂûÙÁüÚÂûÙÁûÙÁúØÀûÙÂûÙÂúØÁúØÁúØÁúØÁù×Àù×Àû׿û׿û׿û׿û׿úÖ¾ùÕ½ùÕ½ùÕ½ùÕ½ùÕ½ùÕ½øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»÷Ó»öÒºöÒºõѹõѹõÒ¸ôÑ·ôÑ·ôÑ·óжóжòϵòϵõжôϵôϵôϵóδóδòͳòͳòͳòͳòͳñ̲ñ̲ñ̲ð˱ð˱ð˱ð˱ð˱ïÊ°ïÊ°ïÊ°îɯíÈ®üÝÆýÞÇþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆýÝÆýÝÆýÝÆýÝÆüÜÅýÝÆýÝÆüÜÅÿÝÅÿÝÅÿÝÅÿÝÅþÜÄþÜÄþÜÄþÜÄþÜÅþÜÅþÜÅþÜÅýÛÄýÛÄýÛÄýÛÄþÜÄýÛÃýÛÃýÛÃüÚÂûÙÁûÙÁýÛÃüÚÃüÚÃüÚÃûÙÂüÚÃûÙÂúØÁûÙÂýÙÀüØÀüØÀû׿üØÀúÖ¾úÖ¾û׿úÖ¾úÖ¾úÖ¾úÖ¾ùÕ½ùÕ½ùÕ½ùÕ½ùÕ½ùÕ½ùÕ½ùÕ½øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼øÔ¼÷Ó»÷Ó»öÒºöÒºöÓ¹õÒ¸õÒ¸õÒ¸ôÑ·ôÑ·ôÑ·óжõжõжôϵóδôϵôϵóδóδóδóδóδòͳòͳòͳòͳñ̲ñ̲ñ̲ñ̲ð˱ð˱ñ̲ð˱ïÊ°ýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆýÞÇýÞÇýÞÇýÞÇüÝÆýÞÇýÞÇýÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆýÝÆýÝÆýÝÆýÝÆüÜÅüÜÅüÜÅüÜÅûÜÂüÝÄüÝÄûÜÃûÜÃûÜÃûÜÃûÜÃýÜÂýÜÂýÜÂýÜÂýÜÂýÜÂýÜÂýÜÂüÚÂüÚÂüÚÂüÚÂüÚÂüÚÂüÚÂüÚÂúÙ¿úÙ¿úÙ¿úÙ¿úÙ¿úÙ¿úÙ¿ùؾúØÁúØÁúØÁúØÁøÖ¿øÖ¿øÖ¿øÖ¿øÖ¾÷Õ½÷Õ½÷Õ½÷Õ½÷Õ½÷Õ½÷Õ½öÔ¼÷Õ½öÔ¼õÓ»õÓ»õÓ»õÓ»ôÒºóѹôÒºóѹòиóѹòиòиòиôиóÏ·óÏ·óÏ·ôиôиôиôиñÏ·ñÏ·ñÏ·ðζðζðζï͵ï͵ðͳðͳðͳï̲ï̲ï̲î˱î˱þßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇýÞÇþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÝÆýÝÆýÝÆýÝÆüÜÅüÜÅüÜÅüÜÅûÜÃüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄþÝÃþÝÃþÝÃþÝÃýÜÂýÜÂýÜÂýÜÂýÛÃýÛÃýÛÃýÛÃýÛÃýÛÃýÛÃýÛÃüÛÁüÛÁüÛÁüÛÁýÜÂýÜÂüÛÁüÜÁúØÁúØÁúØÁúØÁúØÁúØÁúØÁúØÁúØÀúØÀù׿ù׿øÖ¾øÖ¾øÖ¾øÖ¾÷Õ½øÖ¾÷Õ½öÔ¼øÖ¾÷Õ½÷Õ½öÔ¼öÔ¼öÔ¼õÓ»ôÒºõÓ»õÓ»ôÒºôÒºöÒºõѹõѹõѹóÏ·óÏ·óÏ·óÏ·ñÏ·ñÏ·ðζðζñÏ·ðζðζðζòϵòϵòϵñδñδñδðͳðͳþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈÿàÉþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆþÞÇþÞÇþÞÇþÞÇýÝÆýÝÆýÝÆýÝÆüÝÄýÞÅýÞÅüÝÄýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅüÝÄüÝÄüÝÄüÝÄûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃûÜÃúÚÃúÚÃúÚÃúÚÃùÙÂùÙÂùÙÂùÙÂøÚÀøÙÀøÙÀøÙÀ÷Ø¿÷Ø¿÷Ø¿÷Ø¿ù׿ù׿øÖ¾øÖ¾øÖ¾øÖ¾÷Õ½÷Õ½÷Õ½÷Õ½öÔ¼õÓ»õÓ»õÓ»õÓ»õÓ»öÒºöÒºõѹõѹôиôиôиôиòиòиñÏ·ñÏ·òиòиñÏ·ñÏ·òϵòϵòϵñδñδñδðͳðͳüàÈüàÈüàÈüàÈýáÉýáÉýáÉýáÉüàÈüàÈüàÈüàÈüàÈýáÉýáÉýáÉþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇÿßÈÿßÈÿßÈÿßÈþÞÇþÞÇþÞÇþÞÇýÞÅýÞÅþßÆýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄûÜÃûÜÃüÝÄüÝÄûÛÄûÛÄûÛÄûÛÄúÚÃúÚÃúÚÃúÚÃúÛÂúÛÂúÛÂùÚÁùÚÁùÚÁùÚÁùÚÁúØÀúØÀúØÀù׿úØÀù׿ù׿ù׿ù׿ù׿øÖ¾÷Õ½÷Õ½÷Õ½öÔ¼öÔ¼öÔ¼õÓ»õÓ»õÓ»ôÒºôÒºôÒºôÒºôÒºôÒºóѹóѹóѹóѹòиòиòÑ·ñжñжñжðϵðϵðϵïδüàÈüàÈýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇþßÈþßÈýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄüÝÄýÞÅýÞÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅýÜÆùÚÁùÚÁùÚÁùÚÁùÚÁùÚÁùÚÁùÚÁùÙÂùÙÂùÙÂùÙÂùÙÂùÙÂùÙÂùÙÂ÷Ø¿÷Ø¿÷Ø¿÷Ø¿ö×¾ö×¾ö×¾õÖ½øÖ¾÷Õ½÷Õ½÷Õ½öÔ¼öÔ¼öÔ¼÷Ô¼òÓºòÓºòÓºòÓºòÓºòÓºñÒ¹ñÒ¹òиòиñÏ·ñÏ·ñÏ·ñÏ·ñÏ·ðζüàÈýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇþßÈþßÈýÞÇþßÈþßÈþßÈþßÈÿàÉÿàÉÿàÉÿàÉýÞÇýÞÇýÞÇýÞÇýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅýÞÅüÝÄýÞÅýÞÅýÞÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÝÄüÝÄüÝÄüÝÄûÜÃûÜÃûÜÃûÜÃûÛÄûÛÄûÛÄûÛÄúÚÃúÚÃúÚÃúÚÃùÚÁùÚÁøÙÀøÙÀùÚÁøÙÀøÙÀøÙÀù׿øÖ¾øÖ¾øÖ¾÷Õ½÷Õ½÷Õ½öÔ¼ôÕ¼ôÕ¼ôÕ¼ôÕ¼óÔ»óÔ»óÔ»òÓºôÒºóѹóѹóѹòиòиñÏ·ñÏ·ûáÉûáÉûáÉüâÊûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉýÞÇþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýßÆýßÆýßÆýßÆüÞÅüÞÅüÞÅüÞÅüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÝÄûÝÄûÝÄûÝÄûÝÄûÝÄûÝÄûÝÄüÜÅüÜÅüÜÅüÜÅûÛÄûÛÄûÛÄûÛÄûÜÃúÛÂúÛÂúÛÂùÚÁùÚÁøÙÀøÙÀúØÀúØÀù׿ù׿ù׿ù׿øÖ¾øÖ¾ö×¾ö×¾ö×¾õÖ½õÖ½õÖ½ôÕ¼ôÕ¼õÓ»õÓ»ôÒºôÒºóѹóѹóѹòиûáÉûáÉüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉþßÈÿàÉÿàÉþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýßÆýßÆýßÆýßÆüÞÅüÞÅüÞÅüÞÅüÝÆüÝÆüÝÆüÝÆýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆûÝÄûÝÄûÝÄûÝÄûÝÄûÝÄûÝÄûÝÄüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅüÜÅûÜÃúÛÂúÛÂúÛÂûÜÃúÛÂúÛÂúÛÂúÛÂùÚÁùÚÁùÚÁøÙÀøÙÀøÙÀ÷Ø¿÷Ø¿÷Ø¿ö×¾õÖ½õÖ½õÖ½ôÕ¼ôÕ¼óÔ»óÔ»óÔ»òÓºòÓºòÓºòÓºñÒ¹ùâÈùâÈùáÉùáÉüáÌüáÌüáÍüáÍûáÉûáÉûáÉûáÉüâÊüâÊüâÊüâÊüâÊüâÊüâÊþâÊýáÉýáÉýáÉÿàÉýãÈýâÈýâÈýâÈýâÈýâÈýâÈýâÈÿáÈÿáÈÿáÈÿáÈÿáÈÿáÈÿáÈÿáÈþáÀúàÆøÞÊþÞÇÿãÄÿâÃûÝÃöÚÆúÞÅÿãÈúÝÂ÷äÊùÝÎÿÛÎÿÞÈñåÃÿÞÉÿßÈÿßÈÿßÈþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇþÞÇýÝÆýÝÆýÝÆýÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÅøÙÂ÷ØÁ÷ØÁ÷ØÁ÷Ø¿÷Ø¿÷Ø¿ö×¾õÖ½ö×¾õÖ½ôÕ¼ôÕ¼ôÕ¼ôÕ¼óÔ»óÔ»óÔ»òÓºòÓºùãÊúâÊúâÊúâÌüáÌüáÌüáÍüáÍüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿâÄýâÈûàÌÿàÉÿÞÅÿæÈúÜÃöàÍþéÖÿãÉûÝÁùæÊúßËÿÛÎÿÞÈõäÃÿÞÉþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄøÙÂøÙÂ÷ØÁ÷ØÁøÙÀøÙÀ÷Ø¿÷Ø¿ö×¾ö×¾õÖ½õÖ½õÖ½ôÕ¼ôÕ¼ôÕ¼óÔ»óÔ»óÔ»óÔ»úäËúäËûãÍûãÍûãÍýâÍýâÎýâÎýãËýãËýãËýãËüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉþâÃùàÈúßÊþßÈþàÆÿãÇ÷ßÌìÜÑóãÒÿãÏÿáÅøâÈûàÍÿÞÌÿàÉöäÇÿàÉÿàÉÿàÉÿàÉþßÈþßÈþßÈþßÈÿàÉÿàÉÿàÉÿàÉýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÄúÛÄùÚÃùÚÃøÙÂøÙÂùÚÁøÙÀøÙÀøÙÀ÷Ø¿ö×¾ö×¾ö×¾ö×¾õÖ½õÖ½õÖ½ôÕ¼ôÕ¼ôÕ¼óÔ»úãÍúãÍúãÍûãÍüäÎüäÎþãÏþãÏûãÍûãÍûãÍûãÍûãÍûãÍûãÍûãÍûãÍûãÍýâÍýâÍüáÌþáÌþáÌþáÌþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊýâÇûáÉûàÌÿàÉÿåÉøÝÅúíÞnhcòëÞøÜËÿäÊøàÅúßËÿÞÌÿßËøäÆÿàÉÿàÉÿàÉÿàÉþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅúÛÄùÚÃùÚÃùÚÃùÚÁùÚÁùÚÁøÙÀøÙÀö×¾ö×¾÷Ø¿ö×¾ö×¾õÖ½õÖ½õÖ½õÖ½ôÕ¼ôÕ¼úâÎúâÎúâÎúâÎúáÍüãÏüäÎûãÍüäÎüäÎüäÎüäÎûãÍûãÍûãÍûãÍûãÍûãÍûãÍýâÍýâÍýâÍýâÍÿâÍüâÊüâÊüâÊüâÊûáÉüâÊýãËûâÊýáÉýáÉþâÊÿãËþâÊþâÊþâÊþâÊþâÊüáÍüáÌÿãÉýàÄñÝÇÚÖÌ]eg•˜ŽòÛÌÿÜÄÿæÊøáÉÿàËÿßËúâÈÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉÿàÉþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇþßÈþßÈýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄùÚÃùÚÃùÚÁùÚÁøÙÀøÙÀøÙÀøÙÀ÷Ø¿÷Ø¿ö×¾ö×¾õÖ½õÖ½ôÕ¼ôÕ¼ôÕ¼ôÕ¼üæÔûåÓüäÐúâÎûãÏüãÏýåÏüäÎüäÎüäÎüäÎüäÎûãÍûãÍûãÍûãÍûãÍûãÍûãÍûãÍýâÍýâÍýâÍýâÍýâÍýâÍýâÍýâÍýâÍþãÎþãÎýâÍþáÌþáÌþáÌþáÌþáÌþáÌþáÌþáÌûáÌüáÌüáÌÿâÉùàÅôæÓ¬­«UdlYheÿìáÿäÐþáÅùäÉþáÍÿàÌþâÊýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉþâÊþâÊþâÊþâÊýáÉýáÉýáÉýáÉüàÈüàÈüàÈüàÈüàÈüàÈüàÈûàÈþßÈþßÈþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄúÛÄùÚÃúÛÂúÛÂúÛÂùÚÁøÙÀøÙÀøÙÀøÙÀ÷Ø¿ö×¾ö×¾ö×¾ö×¾õÖ½õÖ½ôÕ¼ùãÑùãÑùãÑûãÏûãÏûãÏûãÍûãÍüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÏûãÏûãÏüãÏüãÏüãÏþãÏþãÏþãÏýâÍýâÍýâÍýâÍýâÍýâÍýâÍýâÍýâÍýâÍüáÌüáÌüáÌüáÌüáÌüáÌüáÌüáÌüâÊþãÉÿèÍîâЊŠ@Vg:PMÿõîÿÞÉÿäÆùåÈüáÍÿáÌÿáÍýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉüàÈüàÈüàÈüàÈýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉÿàÉÿàÉÿàÉÿàÉÿàÉþßÈýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÄûÜÃûÜÃúÛÂúÛÂùÚÁùÚÁùÚÁøÙÀ÷Ø¿÷Ø¿÷Ø¿ö×¾øÙÀ÷Ø¿ö×¾õÖ½þç×þç×þèÖÿçÖÿçÓýåÑûäÎýåÏüäÐüäÐüäÐüäÐûãÏûãÏûãÏûãÏûãÏûãÏüãÏüãÏüãÏþãÏþãÏþãÏýâÍýâÍýâÍýâÍþãÎýâÍýâÍþãÎüáÌýâÍýâÍýâÍýâÍýâÍýâÍýâÍýâÎýâÎýãËÿäÉøàÆäÚÉlyzB[n>VWIJ¬ÿÞÉÿåÆøäÈùâÊÿßÎÿáÌþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉýáÉþáÉýáÉýáÉýáÉþßÈþßÈþßÈþßÈþßÈþßÈÿàÉÿàÉþßÈþßÈþßÈþßÈýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÂúÛÂúÛÂúÛÂúÛÂúÛÂùÚÁùÚÁøÙÀøÙÀ÷Ø¿÷Ø¿ö×¾ö×¾ö×¾ö×¾úêÒýëÚþëÜùçÖõåÎøçÏûåÓüá×øãÎùäÏùåÐùåÏüäÐüäÐüäÐüäÐüäÎüäÎýåÏýåÏüäÎüäÎüäÎüäÎüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÏüåÎüäÎüäÎüäÎûãÍûãÍûãÍúãÍÿáÈõâÎöâÍÿåÃÿèÏA;=?LWI]`AU[Ž’“ôãÛúÝÍÿãÈüãÉûâÉþßÎýãÇýâÈýâÈýâÈýãÈþãÉÿäÊÿäÊþãÉþãÉþãÉþãÉýâÈýâÈýâÈýâÇøßËïæÉÿàÂÿäËÙáÈøãÒÿØÉðèÈýàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈûßÇûßÇûßÇûßÇûßÇûßÇûßÇúßÇýÞÇýÞÇýÞÇýÞÇûÜÅüÝÆýÞÇýÞÇüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄùÚÃùÚÃùÚÃùÚÃùÚÃøÙÂùÙÂøØÁøØÁøØÁ÷×À÷×À÷×ÀöÖ¿ùéÙ÷ç×öåØøè×øêÔûêÕýéØýçÛÿñÛÿîÙÿëÖýèÓûãÏûãÏûãÏûãÏüäÎüäÎüäÎüäÎüäÎüäÎüäÎüäÎýäÐýäÐýäÐýäÐüãÏüãÏüãÏüãÏüäÎüäÎüäÎüäÎûãÍûãÍûãÍûãÍÿäÈ÷ãÏ÷ãÍÿæÆüåÏÉÇÅGV`=QV@TY.23D2+óØÆÿãËüãÉüâÊþßÎÿãËÿãËÿãËÿãËÿãËÿãËþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊþßÈõçËþÛÄüâÑÝç×îÚÏÿßÌõåÄüßÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈûßÇûßÇûßÇûßÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÄùÚÃúÛÄùÚÃùÚÃùÚÃøÙÂøÙÂ÷ØÁ÷ØÁ÷ØÁ÷ØÁö×Àö×Àúîâùîâùíß÷ëÙøêØúêÙùéÚøèÛúåÏùäÏùäÏúåÐüäÐüäÐüäÐüäÐýåÏýåÏüäÎüäÎüäÎüäÎüäÎüäÎüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÏüäÎüäÎüäÎüäÎüäÎüäÎüäÎüäÎÿäÈúâÑúâÎÿäÈ𚶸»_pzGV]@T\MRS¡“Š÷ÞËýâÊüäÉüáÍüáÎüâÉüâÊüâÊûâÊýãËýãËüâÊûáÉþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâÊÿáÅùáÈýâÒêÝÙhwvñäàÿÝÌùãÁýáÊýáÉýáÉýáÉýáÉýáÉýáÉýáÉüàÈüàÈüàÈüàÈûßÇûßÇûßÇûßÇýÞÇýÞÇýÞÇýÞÇýÞÇýÞÇüÝÆüÝÆýÞÇüÝÆüÝÆüÝÆûÜÅûÜÅûÜÅûÜÅûÜÅúÛÄúÛÄúÛÄúÛÄúÛÄùÚÃùÚÃùÚÃùÚÃøÙÂøÙÂøÙÂ÷ØÁ÷ØÁ÷ØÁõíéùðæúòáýñßÿðàþîáûëßùêÚüçÒúåÐùäÏûæÑÿèÔÿèÔÿèÔÿèÔÿçÑÿçÑþæÐýåÏýåÏýåÏýåÏýåÏüãÏüãÏüãÏüãÏýäÐýäÐýäÐýäÐüäÎüäÎüäÎüäÎüäÎüäÎüäÎüäÎÿåÈùâÑûáÑÿåÉìßÍ›\m|M[d:T\LSVÿñëöÝÍüäÊûãËûãÍýâÎýãËýãËýãËýãËüâÊüâÊýãËýãËþâÊþâÊþâÊþâÊþâÊþâÊþâÊþâËÿãÅÿàÊöâÚ¦¯³Viu¯©¯ýÞÐþå¿ýáÊýáÉýáÉýáÉýáÉýáÉýáÉýáÉüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈüàÈúßÇûßÇûßÇûßÇûßÇûßÇúÞÆúÞÆúÞÆúÞÆúÞÆúÞÆùÝÅùÝÅøÜÄøÜÄøÜÄøÜÄøÜÄ÷ÛÃúÛÄùÚÃùÚÃùÚÃøÙÂøÙÂøÙÂ÷ØÁõìïôìåøñÞùîÚøéÙúèÞùêÝøê×þèÓÿëÖÿì×þéÔýäÐýåÑýåÑýåÑûãÐüäÐüäÐüäÐüäÐüäÐüäÐüäÐýäÐýäÐýäÐýäÐüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÏüãÐõâÄûäÓþãÕþáË¢šŒ /5G\nJS_<ZgFOWËÁ½º¤”ÿîØûæÌüäÎúâÎýãËýãËýãËýãËýãËýãËýãËýãËüâÊüâÊüâÊüâÊüâÊüâÊüâÊüâËýãÂûÙÅóæ↛¥K`tSS_üêàÿåÅúáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉúáÉüâÊûáÉùßÇúàÈúàÈúàÈúàÈûßÇûßÇûßÇûßÇûßÇûßÇûßÇûßÇúÞÆúÞÆúÞÆúÞÆùÝÅùÝÅùÝÅùÝÅùÝÅùÝÅùÝÅùÝÅøÜÄøÜÄøÜÄøÜÄúÛÄúÛÄúÛÄúÛÄùÚÃùÚÃøÙÂøÙÂÑÆÑöìåøí×ùëÔüæ×úãÜ÷äÕõèÐúåÐûæÑûæÑúåÐýåÑýåÑýåÑýåÑüäÐüäÐüäÐüäÐüäÐüäÐüäÐüäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐüãÏüãÏüãÏüãÐùåÇøàÏÿáÕõçÑÓÎÁv–1EYPVd;ZiGQYogcÿîáùàÌûåËûäÎüãÏûãÍûãÍûãÍûãÍûãÍûãÍûãÍûãÎýâÍýâÍýâÍýâÍüáÌüáÌüáÌýáÎõãÅÿÚÍßÖÓ|ž¥?RePUbâáØúàÇûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉûáÉúàÈúàÈúàÈúàÈúàÈüàÈüàÈüàÈüàÈûßÇûßÇûßÇûßÇúÞÆúÞÆúÞÆúÞÆúÞÆúÞÆúÞÆúÞÆùÝÅùÝÅùÝÅùÝÅøÜÄøÜÄøÜÄøÜÄøÜÄøÜÄøÜÄøÜÄ÷ÛÃ÷ÛÃ÷ÛÃöÚÂŒ|‹éÝ×óèÌýìÐþãÖýàÚúãÒùéËûæÑûæÑüçÒûæÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑþåÑþåÑþåÑþåÑýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐüãÏüãÏüãÏýãÐøéÇþåÕ÷ÕÉÿíÞÌÍÃ|˜Ÿ@ZnKM\=_nJU`C<;ÿÿòùäÎøäÎüäÎüãÏüäÎüäÎüäÎüäÎüäÎüäÎüäÎüäÎýâÍýâÍýâÍýâÍüáÌüáÌüáÌþáÌéàÊÿßÓ³­§9=APbTYf–£œêÔÃýâÊüâÊüâÊüâÊûáÉûáÉûáÉûáÉüâÊûáÉûáÉûáÉûáÉûáÉûáÉûáÉúàÈúàÈúàÈúàÈùßÇùßÇùßÇùßÇùßÇùßÇùßÇùßÇøÞÆøÞÆøÞÆøÞÆ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅøÜÄøÜÄøÜÄøÜÄøÜÄøÜÄ÷ÛÃ÷ÛÃjWiïàÚøêÍÿîÑÿäÕÿâÜÿæ×üêÊûæÒûæÑûæÑûæÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑþåÑþåÑþåÑþåÑýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐýäÐþäÐ÷êÆþãÕþØÐÿçÕÏÑÆw˜¡]v‰`bsChx[irŽ†„úæÚûåÍúäÎúåÏýäÑüäÎüäÎüäÎüäÎüäÎüäÎüäÎüäÎýâÍýâÍýâÍýâÍýâÍýâÍýâÍÿâÍêèÒ纲¾¹³bŒŽ;JXZbn°Á»îßÏýâÉüâÊüâÊüâÊüâÊüâÊüâÊüâÊýâÊûáÉûáÉüâÊûáÉûáÉûáÉûáÉúàÈúàÈúàÈúàÈúàÈúàÈúàÈúàÈùßÇùßÇùßÇùßÇøÞÆøÞÆøÞÆøÞÆøÞÆøÞÆøÞÆøÞÆ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅùÝÅùÝÅùÝÅùÝÅùÝÅøÜÄøÜÄøÜÄCHVèÚÔÿæÔ÷ãÓöåÔýçÎýçÍôä×öæÑöæÑöæÑùæÑ÷åÐøæÑûæÑüçÒýåÑýåÑýåÑýåÑýåÑýåÑýåÑýåÑýæÐýæÐýæÐýæÐüåÏýæÐýæÐÿçÑòêÌþêÈûçÎóäÚøáÒÿäÆüàËóèãÐãÚÌßÚ¼ÕÕ®ËÔŒª¼˜±Ä‡žµ–³k…†;W^Nir/GQ¤¶»ÒÙÖîíßçßÍùåÊûåÌûåËûäÎûãÏüãÏüãÏüáÓüéÅüåËúæËûãÐùâÎûâÎûãÍþãÊóáÊïçࡹÃjˆ™UT_MZ[x†ôÜÜúãÌúâÌùáÎüáÍüáÍüáÎúâÌúâÍøãÊùãÊúâÊúâÊûáÉûáÉþáÉþáÉùáÌùáËùáËùáÌøàÊøàÊøàÊøàË÷àÆ÷àÆ÷àÆ÷àÆõßÅ÷àÆ÷àÆøáÇößÅößÅößÅößÅößÅößÅößÅößÅ÷ÞÄ÷ÞÄ÷ÞÄ÷ÞÄõÜÂ÷ÞÄöÝÃõÜÂJM[÷éãýåÑ÷ãÒ÷åÔýæÐýçÎõåÕúæÑúæÑùæÑùæÑýçÒüçÒûæÑûæÑûæÑûæÑûæÑûæÑûæÑûæÑûæÑûæÑûæÐûæÐûæÐûæÐüçÑüçÑúæÐûæÐöæÔÿæÍÿåÒöäØúæÕúãÉäÛ˘¥¦”¤±‘£°¢´}˜©‰¥¶y˜©z˜©x™§\mx<R^8M]K\iJVaV[^onjîéåþèÌúæÍýåÐüåÏüäÐýäÐýäÐýãÓüåÊüäÌûäÎüãÏýäÐýäÑÿåÌÿäÍÿèËüçÞmƒˆ"?PSXiN^`F]YåÎÌúäÉûãÎþâÍþãÍüáÌüáÌúâÌúâÌùãÊùãÊúâÊúâÊûáÉûáÉûáÉþáÉùáËùáËùáËùáËøàÊøàÊøàÊøàÊøàÈøàÈøàÈøàÈ÷ßÈ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ßÇöÞÆöÞÆöÞÆöÞÆ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÆ÷ÝÅ÷ÝÅNQ_öéãþéÕüè×øæÕþçÑþèÏöæÖúçÒúçÒüçÒüçÒýèÓþæÒþæÒýåÑüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒýèÓüçÒüçÒûæÑöáÝÿäÓÿäÑûäÖôãÒöêÔ´¾´v—¥‰¿‚˜·{•°{›µs’¨¡°~¡­]„ŠR_q>M_BSg=L`KXhFO]OU]»ÁÉþåÌúåÏùåÏüåÏüäÐüäÐýäÐýäÐûäÎûäÎýãÏüãÏþãÏþãÎÿäÌÿåËþéÄΰŸª½Ãs‘§KRhL]h#>:ÿôôûçÌûåÌüäËÿãÏüáÌýáÌúâÌùáÎùãÊùãÊúâÊúâÊùâÊüâÊüâÊüâÊùáËùáËùáËùáËùáËùáËùáËùáÌøàÈøàÈøàÈøàÈøàÈøàÈ÷ßÇöÞÆöÞÆöÞÆöÞÆöÞÆ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅ÷ÝÅöÜÄöÜÄ÷ÜÄJM[çÙÓÿñÝøäÓøæÕþçÑþèÏöæÖýæÔýæÔüæÔüæÔþæÔþæÔþæÔÿçÖüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒþèÓôäÝÿæÑÿèÎÿæÒþêÕøêÓ ¨¥v–«}™µy•¯x“®|˜°s¥ƒ¡²…£­^‡^gv@Q]>N^<L^<M]TaoMZdƒ’þäËúåÐúåÐùåÐüäÐüäÐüäÐüäÐúäÓùäÒüäÒýäÐÿäÐÿäÏÿäÐÿäÍÿóÌýÛÌ­¼ÄmŠ¤gnˆ`w„.OJðæåôâÌõäÌúãÎýãÊýãÊýâÍûãÍúâÎûãÍûãÍûãÍûãÍúâÌúâÌúâÌúâÌúâÌúâÌúâÌúâÌùáËùáËùáËùáËøàÈøàÈøàÈøàÈ÷ßÇøàÈøàÈùáÉ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ßÇ÷ßÇöÞÆöÞÆöÞÆöÞÆöÞÆôÝÅõÞÆ÷ßÇ,/=ˆztnZþíÜøæÕþçÑþèÏöæÖöâÐôàÎÿìÚýèÖüæÔþæÔþæÔþæÔüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒüçÒýçÒéåÔÿìÑÿèËÿçÒúãÌþèÒª§¤q‡œ†¦®§µ^w†m„–^s…CXkCZj|“£Obf<MVBV\BU\@TZGXaCW]r†ÿçÒ÷äÒ÷ãÍýèÓúæÑþåÑýåÑþåÑ÷äÒüæÔþæÔýäÐýâÎùàÌûåÑüèÔÿåÇóßÕm‚:Zt‰©Mfs.QRQINÓ̺ßÔÃòãÍ÷àÊþãËþâÍúãÍ÷ãÎûãÍûãÍûãÍûãÍúãÍúãÍùâÌùâÌùâÌùâÌùâÌùâÌøáËøáËøáËøáËøâÉøâÉøâÉøãÉöàÇöàÇöàÇöàÇ÷áÈ÷áÈ÷áÈ÷áÈöàÇöàÇ÷áÈ÷âÈ÷ßÇ÷ßÇöÞÆöÞÆõÝÅõÝÅöÞÆöÞÆ?BPùëåûàÌïÚÉøæÕþçÑþèÏöæÖöåÒÿðÝñÝËþé×úæÔüæÔüæÔüæÔúçÒúçÒúçÒúçÒúçÒúçÒúçÒúçÒúæÕúæÔúæÔúæÔúæÔúæÔúæÔúæÔïéÔúéÍÿëÏøç×ôßÑùéؘ––…—°Yxy%*=Q\-?M<N_yŠ›Yj{CTfTglATZAT[AT[@RY!59@PUu‰ÿèÓýíÚôßÍýêÙüçÑúæÑýåÑþåÑøåÓûåÓýåÐþåÑüäÏùåÓ÷è×íàÑðéÜ®¦¨ªÈÖPp…£§ÀK`k*PS|}ƒ¢¤›MJ@ýðáúèÒûãÎûãÊüãÍúâÏûãÍûãÍûãÍúäÍùâÌûãÍøãÍòÞÈùâÌùâÌùâÌùâÌøáËøáËøáËøáËøáËøáËøáËøáË÷àË÷àË÷àË÷àË÷àÊ÷àÊ÷àÊ÷àÊößÊößÊ÷àÊ÷àÊ÷ßÊ÷ßÉ÷ßÉöÞÉöÞÈöÞÈöÞÈöÞÈDGUóåßüãÏþêÙøæÕþçÑþèÏöæÖùë×ôåÒ÷èÕìÛÈ÷æÓ÷çÔúæÔúæÔúçÒúçÒúçÒúçÒúçÒúçÒúçÒúçÒúæÔúæÔúæÔúæÔúæÔúæÔúæÔúæÔûêÔÿéÏôâÓëáàïìëäáÝœ u˜²…Ÿ¬¦¾Ïœ²Ä©½Ï¶ÅÙj~Jape€‹o‰“VlxF\cGW`2@J6CK-6A $ì—ôßÏÿîÝ÷ãÑûåÔûæÑúæÑþåÑùçÑûæÑýæÐýåÑýçÕðàÐòêÞåÝаÅʯ¸È³Çx™¬wy‹RhlCkm˜œ¨O\]Z`\ÈĺñâÑüäÎüäÌüäÎûäÎüãÏüãÏüãÏûãÐûâÏûæÒöàÌñÜÇúãÍùâÌùâÌùâÌùâÌùâÌùâÌùâÌøáËøáËøáËøáËøáËøáËøáËøáËøáËøáËøáËøáË÷àÊ÷àÊ÷àÊ÷àÊøàÊ÷ßÉ÷ßÉ÷ßÉ÷ßÉöÞÈöÞÈõÝÇGIWóãÝþåÐÿìÛùçÖÿèÒÿéÐ÷ç×÷é×÷èÕÑ¿­ÿóà÷çÖøæÕ÷æÖ÷æÕúçÓûçÑüèÑúçÒúçÓúçÒúçÒúçÒûæÕûæÔûæÔúæÔúæÕúæÔúæÔúæÕÿäÕÿâÒûèãÒÐÙŸ¥°žž‚¡«m¢¼z’°„›º€•±~‘¬‚—­7R_3T[6]]<RiAYjBTe>N\<GS">BPEJ]ÿÿÿóßÍýéØùåÒüæÔüçÒüçÒüçÒûçÒûæÏýæÐÿèÑôåÑöéÚðëঠ“‰¨¼Œ¤¹y¢ºSu…qm|]pt:dfNU`^mvZcdÅûæÙÉúåÎþåËýäÌúäÎüãÏüãÏüãÏûâÏûçÒñÜÇüèÒéÕ¿ýäÍûãÍúãÍúãÍùâÌùâÌùâÌùâÌùâÌùâÌùâÌúâÌøáËøáËøáËøàËøáËøáËøáËøáËøáËøàÊ÷àÊ÷àÊ÷àÊ÷àÊößÉößÉößÉößÉõÞÈôÝÇ?TXÃÎÍçåÝùë×ÿèÑüèÓõç×ñè×çÞ˽ÇÄZp~XdrîßÞþàÑÿßËÿíÝúë¼êãâäâí÷èÔÿæÇüàÒúäÚýìËîêÍêè×ïêÖÿíÏýçÈùèÓùêÑûéÁûæÉÿéØèçänŽ•{¢µˆœ¶œ¶—ªuŒ¡sŠŸxŒ¡n„•e|Œ7N]>R^=Q_8MR@U\@V]@S[9MU/6;MV<NWw–ØãåïæåûãÙÿæÑÿçÎÿæÒÿã×èäÝôåÖ÷äÖöä×þçÐÿëÊïèÞ{”¬…¨Á¬Á˜®Â]j~CTdYhwSak<NXSkd^fuµº´áåÐÒÎÚåÚÚòçÅÿäÒöãÑöãÒøäÏýäÌþåÉõæÑàÞÚU`kÙÞØäàÏûæÐýäËûáÍ÷áÐ÷âÎ÷åÈõãÌõãÌõãÌõäÌóâËõãÌõãÌöåÎõàÊöáË÷âÌ÷âÌöáËöáËöáËöáË÷àÊ÷àÊ÷àÊ÷àÊößÉøàÊ÷àÊöÞÈBTZJSWöóëôãÓÿçÓÿèÒùèÓöèÖóê܇Œ‹PdlEU^ïêéÿîÝüéÔöêÓóéƼº¸\\cöìÞýèÎüâÓ÷åØýîÒÚÙÍÛØÖìãÚüãÏþëÕîâÕêâÖüðÞÿòÕíÚÊåãàŒ¦°…¨¹‹žµ„”©š¬wŒ¡k€•|’£f}Thw>U`@Vc:P\AT[@SZ@RZEX`?OYGXaBS\DT^9WRHX[”‘’ÿñéýçÑÿèÎùçÒõæ×òæÖûçÑýçÑøæÖùãÍÿéËâàÔ“§¸…©½oŒ¢—°Åh|DTdfv‚DU^9ITIa[HQb¢¨£ÚàÑF>HôéèöêÊÿäÔøäÒøäÒ÷åÐüæÍüèËõåÐƼfpz¼À·ïéÛìÚÅþäËûâÎøâÐõãÎøäËöäÍöäÍöäÍöäÍõãÌõãÌõãÌõãÌ÷âÌ÷âÌöáËöáËöáËöáËöáËöáËõàÊõàÊõàÊõàÊõàÊõáËöáËõàÊ9JX<FMuppíßÓýçÕÿèÒþèÒùéÑåãÜpz~>T\@S[ƒˆ†åßÒïêÖèæÍæéÔ}ƒ‡U\i‰‰‚òçÑøäÓöåÙíçÓƒŒZ]höïñüåÕüæ×îé鲶¹ÓÕÖñäÍöêßÍÎІ¤«ˆ¦¹}‘¦o”uŽŸx£uŒ| au„e|‡8KV@S_F[bFV_>OXIZcFW`GU^GV_ET]ES\7Y^G[c@FJÿüõõçÕõêÎõèÒïèÖøæÐÿçÌþçÍôäÔöéÖõåÑÐÎÇ•¨¸~ž´{š­ž¸ÉLdt=P]_q|?RY;NWCZYWarœšÒÝÏ_^lÏËÍõêÐýäÕ÷äÒøäÒ÷åÐüæÌþéÏîáͧ¨¦Ubl•š–ûöêýíØüèÒúáÍöâÐöãÎøäÊöãÎöãÎöãÎöãÎöãÎöãÎõâÍõâÍøãÍ÷âÌ÷áËöáËöáËöáËöáËöáËöáËöáËöáËöáËõàÊôßÉôßÉõàÊ4DTGQ[IHMòçä÷æÙûçÕûèÓúéÒÂÌÎ`ruBZbAT\]adîåÝðâÑöëÔÀÔËdpxKXeZcgöñæùåÓñå×ÑÒÄlz‹O[k§¥©ùèÙóâѧ¬®XjvAS\ìèÛêãߟ¥©Š§µž¯^o… 1C!<K[n€-=;O`6KZ*<I@T_>SZ1FN-:)5=JW!.;1?LJUaFR^NXd:XbBUaBDMðèæôçÖöëÒöêÑóè×õçÕÿêÍûèÐêæÜëèåÙÚÓÅÎЕ¯Æ¼ÌŒ¨¹™©Lcr9P[OdoI\c<OX.-'2IQ`]²Â¹LReÅÅÊêåËÿâÖûæÏøäÓøåÐúäÏñÞÆéÞ˼½¼QapRYZœ™ÞнúäÎùäÎôãÐôãÑöåÍ÷ãÎöãÎ÷ãÎ÷ãÎ÷ãÎöãÎõâÍõâÍõãÌõãÌõãÌöåÍõãÌõãÌõãÌõäÌöáËöáËöáËöáËöáÊôßÉôßÉõàÊ.?%347?æáãèÝÚøìàòè×íäφ¤Sls:RX<LVFFNüìîüãÛÿêÙ°³Tdl>KZCU^çëåöäÒóéÛ˜Tjx>R__egÿøæãßÏ~ŽD`lA^eglfäåç—¡“¯¾ ²’¥·kz‹x”¡Tj|y‘ ‚•¦BWfG^i?R]@U\9NV0?L7GS0>J#1=6DP#/%1"-9"6F2<K74?ÿúûøè×öæÎýì×øåÔñåÙûèÐòåÒÜã䣱¾¦²½‰š§~šµw‘ † °c}‹H`l?UaAW^BR[>PWDWX;F\)8;¨½·GRgŒ—íèÒüäÖùäÏ÷ãÒôäÏøæÏöåÌÿöè©­°Ug{T]]ÛÚÔíßËþèÒ÷äÏõäÑõäÑøäÏóãÎôäÏôãÎôãÎóâÍóâÍóâÍóâÍõâÍõâÍõâÍõâÍôáÌõâÍõâÍóàËöáÌöáÌöáÌöáÌõàËõàËõàËõàË,9G!,:7=H #,/.3›šš¹»²ÀÁ¸a|ˆJbh?UZ>MTEDS¬ ªýæäüáÒj™HV^;IU:P`mtsúçÔïâ×r‡ŒUnt4OYGVXááÕÓØÌgz~>[e9TZ7EIÝäîxƒ’8I8IŽ¢}Œv“¡ˆ µz’¤cz‰qˆ—Qit<R]@Va6NU<KW<LX3CO1AM/<H:HT;IU(6B(:G*2A'%0F85áÑ¿ÿóÛúäÏþèØìæÛüèÓòê×¾ËÐu‘¨…Ÿ²—©†¡¼xŽœcy‰Uny=VbCVbG[b?NWDPYHZZEPe@QSPhbP_tZbjóî×üàÔûæÏùæÐöåÑöæÎ÷éÑðèÜ{ƒ†Uk€\hnÛÜ×èßÎôäÌõäÏóäÑòãÒõäÑôãÐõäÑõäÒôãÐôãÐôãÐôãÐôãÑõâÍõâÍõâÍõâÍôáÌõâÍõâÍôáÌôáÌôáÌôáÌôáÌôáÌôáÌôáÌôáÌ?KT.:F0:H1;JCMW?JQ>LPCRP8KY:NR>RR=PW?M\BIVôôöøóèe™IRULU_/J]WaeÿîÚìàÓx“£I_c@[h8LXqxw¦®®q„‘LdtIZ`2LTHQ`’¡²‘¯ÀNj{.?Pet„^|†rŠ n‡œx¢oˆ˜`{‰8P\=Ua<V`AQ^?P^9JW6GT7GT6FS8HV8HU7LW8DQ;=EéáÞôæÖòåÌýíÚüèÙòæÚÿîÑõèѹÅÊRp‡/@*<K2@;KWdw„&9D9OZ@V]-7%2:AKTL\[CLaGXZF`[FVmIPXÿüáÿäÖûæÐùæÑ÷æÑ÷æÑëÛÇÀ½²¢®³=TlWclvxu»° ðãÌöäÏóãÒóãÒõäÑõäÑõäÑõäÑôãÐôãÐôãÐôãÐôãÐóâÍóâÍóâÍóâÍóâÍóâÍóâÍóãÎôáÌôáÌôáÌôáÌõâÍõâÍõâÍõâÍ@JR?IS/:I%3C(8J&9G-BI7OU;FU@MR;IJ5HO1JZ2L[-CEL`O/TdMRSKPY4OeGRVÿ÷áéÛÐOm‚gz}:TfCWjPXb‹“l}“G[nCQV1N[CPaŒ›­s‘¢s¡ lz‰]{„t¦n…œ€™®o‰šQk|4O]:U`9T`<O\;O\1ER*:G=N[<MZ?O\BQ_5SW-@G9CGáâÛùòßëàÉûîÚøèß÷çÔÿèÅþïеÂÀo‹žz’¢w„ŠNW\FVd5GQVkuAU`GZa8GP5?G?FQ*75ILeK\^Hc\@PgAIQÿûàþâÔýæÏùåÐ÷æÐùæÏúèÑäÞЕ¤E_xWbj¨«ªïæÔôåÍóæÎòäÒóãÒõâÓõäÑöåÒõäÑõäÑõãÐõäÑõãÐõãÑôãÎôãÎôãÎôãÎôãÎòáÌóâÍôãÎõâÍõâÍõâÍõâÍôáÌôáÌôáÌôáÌ9JP4BH1<C/8A-5>'%,;1;J6FN2DN3FR2ES1DP8IS7HR1?L?P];P_5KX@P\>P^J`rq…•ft€BX`9MW=P]7K[Ž¢²Zr|Kbk4MT7PZ.KV…¡²w¤n‰Ÿkˆžh…™f‚”ua}ŠB]jXs€d{Š@Tc?P`=P_8CQ*7+<I@Sa8LY2BO(6"+:ALS6=G7:>’“îçäøîà÷èÐÿëÌêëÙõäÕòäÜ£«©yŒ›v†¢s†¥s”¯i}^s…asƒ;N\I[f@QZ;NU6JP;M\@RV>HQ,3@-7@CEJ¶±¬ùéÔÞáÖüêØöß×ÎÑÝ¥ÄÕ¡ÄÏ’®½“«Í†¢´lŒ·¿ÄçâÛòâÔóåÎóåÎñåÎóäÑóäÑóäÑóäÑñâÏñâÏòãÐòãÐñâÐñâÐñâÐñâÐðâÏñâÏñâÏïáÎóâÍóâÍóâÍóâÍòáÌòáÌòáÌòáÌ4DK)9BEOY2;D4=G"0)2?1=I6EN:IQ5EQ7GT8IV9IU5CL(.?L5ER6GT<MZ7GT3CP@P];KX4JQ3GS=P]>Qa:M\H[h6JU6KR2IQ2JV`wˆd}d|z“§a|ŒqŒhŽ<SbAYh;O^AVe/DS=P_=P`<IU5EQ2DO9NY8JU-<I+9EEP\:KW)8D(2y}‡¸»ÀÛÙÕåäÚëèÙÍÑÅøìâüòꢰ¯t‹›Ž¦ˆ—®m‰˜k‚–§h{ŠBUbEWbCT]BT[<NUI]dK\cLY^9DLLU_/38ëåÜúêÖïæÕúæÎÿòæ‚„w£‚Ÿ©g~ŒuŒ¨a}‹Seo]bd¾¸²ñäÔôåÓôæÐóæÐóäÑóäÑóäÑóäÑôåÒóäÑóäÑóäÑòãÐòãÐòãÐòãÐòãÐñâÏñâÏñâÏóâÍóâÍóâÍóâÍòáÌòáÌòáÌòáÌ-=J+9E#/)2?-6@2=F0:D2=G3?I<GT6DP/@M5ER1?K9DQ#/9'7E4DQ;KX9IV@L[9FT)+8F4JQ4HS8KX8K[3FU8KX1EP8MU<QY6IU!4A)<K^rƒgz‹{Ž vŽ9IUK\iAQ^FZf?R_?Q^;N[<S_BS[5FO:MU;NU9MT:KT7FO=HQ4IW8IV1CQŠœ©et^luëøÿ ¬²N^[ÈÄÄõö󑤦–¯¿n~’|Œœx™h|s‡˜_rDWdEWbK\eM_fGY`HYc@NTfqt^gn=GQEKOøôìøéØúëÏýæÎóæÛˆ‘£t’¬~™©~”žh|’Wn~HZdfoputkðèÚôæÔõåÓôçÐòäÓòäÓòäÓòäÓòäÒñäÒñãÑðâÐñãÐñãÐñãÐñãÐñãÐñãÐðâÏðâÏóâÍóâÍóâÍóâÍòáÌòáÌòáÌòáÌ)9F)72=K*3@%/9=GQ0>E6CK8BL6BN4AP5AO5BP:GUDP\8BK1BO5ER8ES8ES2?M8BP)7.8F0EP6HR;KYCS`%6C$5B2BM5EQ7JR=MV&6C+;F/<]lyM^k9IV-8C<GS@NZ (3EP8LW8LW<S^CS\:KT?OY@QZFXaFU^?NW<GQ;LX8HU7IVN_lSgw?Sc¦¼Ìe{F_d\dlñõúVns$2-?P3>Mn‚”Thy0?9LYEWb$4=)0&8?*9B2=C*.sƒJW^CKPòñéõçÙþëÎúæÌçàÙ|¦Kh‰j‚•\mw`t†[n{@R\OY^_^[îèÞïæÔóåÑôåÒóåÓóåÓóåÓóåÓòäÒóåÓóåÓóåÓñãÐñãÐñãÐòäÐñãÐñãÐñãÐðâÏñâÏñâÏñâÏñâÏñâÏñâÏñâÏñâÏ3BS3@P5?M.7D/8F7AJ6BL(9?-6D)5A3@N1=N2>O#0>'/7E7HU8HU6BQ7DRAN\5?M9DR>HV.?L2BP3FP:LW0?L)9E-:H/<J5GO8GP".8&0&/,%1,:"+.7AFQ[:IQ5FNAT[?U\6OV&6?(1,>G #$-(1(1-=F9AGO\`?KSAPY7ITBUbXp€Tk|1N^@MZ²ºÄq‹•g†•j{7DP\qsK_q,@R`r9LYEWb:KT8JPCV\BP]?JR4?C +.1@G2<?®¯ªÚÑÅüéÒúì×ÒÖÒ‘«Á†¤ÆuŠœž©|•£o€ŽWfoLX]DGFÙØÎêáÔóçÕöçÔóåÓóåÓóåÓóåÓñãÑòäÒòäÒòäÒñãÑñãÑñãÑñãÑñãÑñãÑñãÑñãÑðâÏðâÏðâÏðâÏðâÏðâÏðâÏðâÏ3DQ6GS2@N1<J2;H5BN-9E%2+7(63@N/>O7FV)6C0:H?LW;KX:JW3DQ1AN0<J&4 &.;I3CT4ER1CNCS\>MU1?L1;I,6H4GS;IU5?H'0:#'3 )3#0<,:&31>J:ERDQ^DS`@R^?S^9MY1DK6GP+9B +5&2<&1;0@H)207=$(.$17'-:MT?R_J_n,L[CS_z„~™¨g‡˜{£‰—¨by|[n“§¸M`o7KX?Q\>OX<NU:MS@M\BNYEPSARX:MU:GNàãâóîåëâÙÒÊÀˆ““ƒŸ¸w°‰–©‰˜¤|˜ªO_kSblVcgAHGããÞãÞÔóæÖóãÒóåÓóåÓóåÓóåÓóåÓòäÒñãÑñãÑòãÑòãÑòãÑòãÑòãÑòãÑòãÑòãÒñãÐñãÐñãÐñãÐðâÏðâÏðâÏðâÏ3EP6FS2@L.:F.:H6AO0>L%2@%3?.:I1AQ/?O1AQ/>N0<J8GS7HU5FS5FS4ER2CO,9?P\=MZ5EU0BN4CO3DM%.%108F29J8IZ8HU&.;%*5(.9'1:,4B"/= /:3AM:HT?O[:MX@R]=OZ<Q[6GS0@L9GT%)1>0=I8FS$0&.=.6C;GQ:KQ;MT3FM<MXAS`-IZBM\~‰”š§Yz‘uŠ Xey[r|ThzOcu{ŽDWdI[fEV_ASY@SX;I]?MYBSYDW[=S[<PXª³³íéãÙÙⶼºYlpv“§z‘­ˆ‘¢„ h‹¢UbnSclP\cOZZEJFêæÛíãÖõåÓñäÔñäÔñäÔñäÔòåÕñäÔðãÓïâÒðäÒðäÒðäÒðäÒðäÒðäÒðäÒðäÒïäÐïäÐïäÐïäÐîäÏîäÏîäÏîäÏ4HO1BK7FR*7C-8G09K-:J-8K.=H+<I/?O';J*>M.>N,<I4BN5IV3FS4HU4ER/@M(9F)9E5FR.>O2DP3CO2@H)4=8DO5=K4;M(<M)7H -',6-0:).9/8F1>O&7C->K8HU8IV>O\GWe;LY6FT3CQ8HU+4C#18@O?FUCQ_%3'0G6DX6GS1AN<PW;MX7KX>Qa3P^@JUEKX6Qb'J_‰ž¼dt‰ &2Pcu/A1@AUbEWb>OX'9@L^c?NdGXf@PWDX^8P]H]fS\`ÕÔΖš­^fm…œž]{fw“}€šªeŽ©U^jNYdAPVWehU]XöõìîäÖúéØñãÕñäÓòåÓóäÓòãÓòäÓñäÔñäÕðäÒðäÒðäÒðäÒðäÒðäÒðäÒñäÒðãÒðãÒðãÒðãÒïãÑïãÑïãÑïãÑ0=I0>J(13<F.8A2>J0=K1>M*8D,=I'8E+>M.BN2DN3EM3CI1@M/?K1AN4DQ6EV,;K+9L/<O/@J0AO,@P0CU+>P/?Q)9I*7E-<M);G!3@#1?#.="2>*8D+<G*;H-?L2CP5IV2ER9Q\:Q]8Q],CM 7B"7B:MX9JV6GS&2,8.EN5HR=MY>KW4?K4?KCP\<IU;JW8ETAMY:CO2<IDTbuˆždy’9IT0AM1CM2DOCVa*;D<LV$.")'4<E*4<DPWKW_YfoGY`€–¥@Uew‰šPaoQbrt‡˜K^o<K\LdiEX_HX^@EK=<>Š‚ìä×íæ×ïëÆòèÝìçìÝãÛàçØæäÚîä×öæÍìåÔíåÔíåÔíåÔëãÒëãÒëãÒëãÒìãÒìãÒìãÒíãÒìâÑìâÑìâÑìâÑ,<I+7-9E-9C*6.9G*7G-;M3AM0=K-=J.>N0AN5EQ3BK1BH3CP4DP->I7GT6FS2AR1@P0@P0@L0@L1BO7FW6EV+:K+8F*6B,>K/?L'4B#.<)1>#/;'3?)7C/;J0@M1AN4ER6JW;N[.EQ/EQ/EP-@K+@K8JU<LX5EQ1?K9GS8NY2EO%1)58DP3?K/=I-:F,<I5APBNZ'4=)5 #%5F(9M0@L5ER3BO:JVFVc!2;6GP=OX"*3DLU9EL>HP)15BJ,4<MRjzˆDXeat€zViwCUfi{Œx‰œH[bNahFU[V_cLQRØ×ÓæáØêâÖæéÐÏÌÈŠ†ŠäæÝææÓêä×ìä×òæÒíåÔíåÔíåÔíåÔìäÓìäÓìäÓìäÓîäÓîäÓîäÓîäÓîãÒîãÒîãÒîãÒ2BR3CP1=L)7C-;I-:J-;N/>Q4@K7BP0<M-<L3BS7DR9EN8CN8GP1@I2@L9GS1?K1?J.;I,9G5DL/>G->J3CP:JW2?K-8B09C0AN2>L)4B(0?)1>%-;)1?*6B/9H0=K2?M3CP:JW=N[8HV7JX7KV5JU7HS7IT:JV1AM6DP;IU5GR4DQ3AM=IU8DP.:FFT`6GR3BS3@N@LX"+5.8B'09*6B0;F2?M0=L2AL8EQES`7FOCR[APY<FNFQY<GOGQY&4<:GOGT\EQYWiq6GOI[fSdpzœl€‘l’i}’I]aIYa4@EALT>BFŠçèçÞÜ×âò妪°XW]êéÛêçÒìåÖìãÚìåÖíåÔíåÔíåÔíåÔíåÔíåÔíåÔíåÔìäÓìäÓìäÓìäÓëäÓëäÓëäÓëäÓ5GX-=M9IV)6E*7E*9I)9J(;-"0.;K2?N3@P-:H!.$-7".8%0:$09*6@=IR.9F%1=5AM8EL0<F1?L7DPDR^2=G3=E,6=.;J4?M,5C%-:)/<'0=-6?/9C1:H4?M9DR;HV?KY<LY<MZ7HU;MW9JU5HS<KX8HT3DP9FR:HT3DM1CL9HQ?JT'0/:D2BJ%7?'7H7DR@KW:DM7?H*5;8?F3;@4=L@HV3;H9EQFR^NYcJV`DOZHV]DQYES[AOWCPXFS[IV^@MUDTZBQXEV_br~x‰–t‡–fx‰H]pIV\R`fLX^JS[U_b†Œowz¥¨¬Œ¤¦•ž­[]iÜØÊîéÎîæÔêâÙäãÛìåÖìåÖìåÖìå×ëäÕëäÕëäÕëäÕëãÒëãÒëãÒëãÒëãÒëãÒëãÒëãÒ(:K.>N/?L&3A,9G2BR-=N!3F08F0:K9GV5@S.;J/<J'3?7AJ*6(4%1=*6?-8B+4$.)3%()55DP&2;)0)0"*-$/>7?L)1>',9#)6 &0)2<+3=-6E.7E'2@*4B<IW8HU:JW@P]<LX5EQ9IU9IU9IU7DP6DP@NZ<KS>MV>IT@IS1>H7BL6EN2CL=IX8ES&5@&1>2=D$+2"'4;<(/?$409F7@M?LX7CM&1<&6?1BI8IOMYaGT\VckN[cMZb;IQFQW;JOHU]CS[DR^4DRgx„6GYJT\R^dCOU>JPEOWIS[bltˆ‘˜<Y_}¡OQ^ÚÚÌïêÐîæÔìãÝæåÜëäÕëäÕëäÕëäÕëäÕëäÕëäÕêäÕëãÒëãÒëãÒêâÑêâÑêâÑêâÑêâÑ.>N;KX<IW+:F1>L7DT+9K)8K,7E.7I/:M0?Q/=P6CS/;F/;G+8F&3A,:F)7C/=I,:F+;C$3< ,6(4@&5A-:F*6$+$$(+8)5A)'5*#"-)3%+9)7"08DR;LY:KX6GT!1=&2/;(4)7C*9E.<H$1>&6>/;E.8B5?I+4>9EO.=F3DM:HT3@N0=L.<H-9C"*4(*/67&-=")8)2?;CPCO[AQY7GO;IR*9@/>E,2/5(5=,9A2?G9FNIS\?JRGRZ;FM0:D7AK%/9\foEPWQ\dGSZ>IMYdh+6:ISZhoyOin…“¤\`nÐÒÉçäÎêâÒêãÚçãÙëäÕëäÕëäÕëäÕêãÔêãÔêãÔêãÔêãÒêãÒéâÑéâÑéâÑéâÑéâÑéâÑ"2?!.:'3*6@*6B9DR4AQ-;M.;K2?O1?Q1AR4DU4DS/<J0>J.=N)9I+:J%6B*;H0@L&6C*:G.8G&3A*6D'8E/=I'2=(-"-0&4A+7C/7D(1%.#-".5$.6"-<%0>$2@,8F1BN9JW:KX:KX*7C1>J0=I,9E1?K-;G9JV%6B/:E(2<+5@(2<(1;9EO.@I6HQ5AJ0<H5AP.?L(4C'3=&/9(06,2C)3@)1>4@LAO\AR[<LV;OW1CJ=OV8JQ<KR?PWJW_<IQ'4<6@J09CCLU3:C:@F29@;=EHJR@KUV^hNY\GTU1=?HUVMY\SYbCVSR[hgj{¹½¹áäÐçãÙèßÖîçØëãÖëãÖëãÖëãÖêâÕêâÕêâÕêâÕêãÒéâÑéâÑéâÑéâÑéâÑéâÑéâÑ0<H*7B7BK'1(2.:F4AO1>N,9J)8H*:K*=N-?P2BR,=J0?K-;O+8K(7G)8I5EQ2CP%5A*:F&3A.;K&6F0?O1AN(7?!.6%16+<H-;G0<H )3'1(2&19%3:"/?%2A)5D,<J.?M;LY7KX2ER7CO1>K6DP4BN3AM3@L2BN3CP7BI7@H;EMELU6AH3@G+?E3GM19C1>J5AP,<M(8I%2B(3<,5=,6E.6E,8D/=IANZ>OX7KS<OW=PW@SZ<OVEV\DU\>KS<JRBPW@HW?HRDIU@EN9;D*(/<=@HDF>JTV^h?IM9EGQZY6>APY]KSYR`VJR]EJ[^fdÖÝÍÞÝÔòèàñåÑéãÖéãÖéãÖéãÖçáÔçâÔçâÔçâÔéâÑéâÑéâÑèáÐéâÑéâÑéâÑéâÑ$@Q$<M+?N&7D)6E2>J7?L/;D,=H/@M3CT0=T-<O5DT3>J7AI+:B/=H,8F,9I1>O3?M.<H+:B-:I+<I)8I0AQ,;K.:I*7$-7(9K6FS+9E#.5+2*2%08$0;$4<&5=':B,=E*=H6HS8MW<O\7LV8MX0EP5GR2DO0CN3CO4DP3MT/HP8NV?T\"1: *&0!(2'4)50=I%.7)2<%.8-2>29B'-63;E2>J-;G@P\<LY7EO0AH9@IGNX5@G(2;KV\JT[MT[DHO>IQ>KP>IO:EL3<C5<@:@F=DIAIOMW^NZ`HTXNZ_HTYBOPIPT3GGL\YFPKQUOéçÞäâ×ãäÓâåÕæâ×æâ×æâ×éâ×èâ×ëá×ëá×ìáØëãÏëãÐêãÏêãÑéáÒçâÓæàÓåßÒ+BR*@O4DT)6D+6D.9G+7C,7C5EQ'9E.>O-:Q0?R5DT3AM/<D1AJ3AN5AP.;K6CS4AO0>J-<D/:G(5D(9F/>N3DP(6B(1;!-4*:L.?K'5A!,3)1!,4%08'3=%0;,8B%4=1>K5ER6HS5ES8KX3EP8JU+=H0CM9IU.>J7GS3CO2IP5HP6IQAR\0@H,8B*4>6?I.=I'3?2>J(2<%/9 )"..6>#,!++7C3@L<MYEVb(7@"39(1;",61=G8EM&.#+"(*28ALTCPV?IPDLS5=D>DI.49?BG<DKISZHTZAMQJVZT`dIVXFNRN][HUUNVSab^ïìååãØæå×êêÙàãÖãã×ãã×âã×ãá×ãâ×æâ×æâ×äáÓäáÓááÓâàÕâàÕâàÕâàÕáßÕ0BM1AL7ER)4B.9G-7H(5E.-8-=,<M,;N*9M,;K*6$.'0 ,-%2B5BR)6D!/;.6+3=!.:&5@5BP7EQ+7A$,5'18*;L6FS-;G!,3)1!,4(3;$0:-6@'0: ,9#/+8D7HU1AN9JW2AM(8D/?K(9E1>J>LX1?K@NZ5CL;JS=MUEPZ?KU/;E1:D9BL/>J,7C6BO+5>%/9"+5(-9+2;*1:(1;(4@0>J:JV:KW>MV5EL:FR8DP8FS<KT5DM@LWAMT,4>,8@&07)3:,4;"*2-380386:?DLSHRYAMT6BF.:>+7;5BC=FIANNX``LQQPQMÏÑÇààÖèåÛáßÑÝâÖÝâÖÝâÖÝâÖàâÖàâÖßâÖàâÖÜà×ÞàØßàØßà×ÝßÕÝßÕàßÕáà×5DM6AM=FS,5C/7E-7I/:L"0C&2@,<L*;L*:K+;L3AQ-9/>F(7@-9-9H'3D.;K&2@"/;%.&-!+5&2>3?J ,!+"+$*(9J*;G%1 *2$, '/$0;"'5&/<'3%2A:FT7GT'7C!-%5A#/-9#1=$0*6B!- +5 * *#-+5.:D,9C5AK4CO)5A6BN4=G&0:$-7(.9*1:.4=*3=(4@0>J5EQ@P\@OX=NT:GV@NZ;KW9IU9IV>NWFR\8CM:CL;EL4?F8@G-2:3:?8<A<?D<DKISZMZ`HTXEQUEQU>KMBKN@GJ?DEHMLTXWããÝáÞÖæäÛääØàâÖàâÖàâÖàâÖàâÖßâÖàâÖßâÕÜßÚßàØÞà×ßà×ááÕÞßÓáàÒâáÓ2>H'2>&/<+4B2;I6@Q.<O*:K,:J.;K-;M-=N,<L4DT-=J-:F,=F-=I*;H(7G5DT6FS'7C&8A*5<&/9#/;/;G.:F)3<$-")/&7I*;G!/;&-!)&.(3;,6"*8(1>'0<)3B%3@7DR<LX4CT.>J0@L2?K-;G0?K2>J1=I6BN4@J.:D7BM8DN6BL($.1=G&5A)4@6BN7@J%/9#,6-3>+2;-4=/7A(4@/=I7HT?O\IXaCTZ?KZAR^<KWAT_8GTFU^COZ>HS;CM<GN>EL=FM06><?D7;@CEJ9AHKU\MY_NZ^LX\MY]KWYHQTUZ]PUVKPOOTRÏÓÎàâÜååÜáâØéçÛäâ×ßÜÑãáÖààÔääØááÕÝÜÐàÞÔàÞÒçäÙáàÑàßÑÝÚÊáÞËæäÑ"0< .9.9F*5C!,:+9I/>O.>N3<N1>N.>M-=M+;K2CO+;H.>K4EM.>K3CP,;L2AQ9IV*:F,=F4=G*7C&4@4AO7EQ-8B#+4",3+<M)9F(6B *2!,4)1(3;$0:,4A)1>%0?+8F,8F5FR<K\8HX7GS7GS4DP5FR7EQ6DP7DP<IV8GO:IR9HQ?IT9EO*4",6+4>!-$0+7C"+ *4&0)/:+2;.5>.7@(4@-;G:KWDTa(7@"28)5+77GTEV_+=F+:C:GO)4<'0:)18.6=.4;#*126:,/41389AHCMT:FL0<@-9=.:>3@B*46;>B:?@=ACIRQØßÜØÞÙÛßÙÜßÖæâÚßÜÔàÝÕãàØÖÒÊåæÝÝÞÕãäÛäâÖßÜÑâßÔáÞÓÛÚËææק¥—¹¼¬3CS+;K/?O&3A/<J2?M1AL/AL3=O3?Q1@P-=M/@L4ER,=J2BN0AJ-=I1AN*9I4CS:KW.>J->F/:G.;J'8E0?P8IU+9E%.8)1+<M/?L5CO*1 +3)1$/7#/:'3?)4C'4B)5C&7C2BS9IY1ET7IS;MX8JU4FQ8HT8HT6FR>NZ1GN;MU8LS=NX;JS0;F&/9;EN)7D&2>:GS0:C%/(!&2(/8(.71:D/;G*8D>NZBR_?MV<MTBLW;KSAPYGZa8IO5AJ>JP7BH8?H:BI:BI8>E(+326;/271386>EHRYKW]JVZ@LPAMRJVX>HKIKOHLM?IINYW»ÆþÈÂÐ×ÒÕÝÖ×ÛÕâæàÓÚÓÞåÞ×Þ׻¼×ßØÕÝÖÛÜÓßßÙÝßÙÕÙÓäëäÚáܬ¶°€Šƒ2EW4EW8GX&6C)5D.=H0AM,>F37M4=P1@P/AM0AM8IV,=J.=N,>F.>K.>K(7H6FV5FS-=J&8@+8G):G$3D/@Q6EV+8F'4@'2*<M1AN3AN)0'/)1%08'4>#1A$1@$6C'8E):K1AR3GV5GW9NY:OZ6KV:MX5HS5HS1AM:JW5OV3LT4JR7KS;JT1=G%0:4=G6ER*5B6BN2<F)3(2(-9$+4%$-7+7C*8D:JVBR_HV_DT[GS[FRZ?PW@PW>NTBPVKV\?IO;AK;CJ7<C@FM.1:15:58=79>4<CBLSERXHTXHTXFRVJVXFOSNSULSV=GGANLw‡‚z‰…ž§¡¼À»´¾¹ÇÑÌ“——¥Ÿy†€o€xt…~¯Ä½ÈÉȾÂÀÅÊÉÑÚÚv‚‚v…‡‡š›dx|*KS2QY0GR-?J.<H.:F7?L3;H1AI6FN7GT3BS/?Q3BR4@Q1>L-<D/>F4BN)6D0<J;IT1@H,:C4?I/;E+9E4BM8FR2>G+6=&06,9F7DQ:DK$.4#*1%,3*3<)2<06>/8@-7@*6?.<H2BM8IV8LY<JRAOX>LU=GR<GQ@KU@LVCLVEOWDMU:DK:DL2=D.4=04=?>H5BL%2;5AK5?I&/8"+4&-5%,5$-6,5?,4A-9E@MYBR^EV_9MTBRYGW^=MTAQX>NU>OVEV]:LS5?F=GN3<CGLT,3758=26;:=A6;BHOWJUXHTXJVZFTUDPR/=>=@E9@B;CGFQRizwaupn‡~b{rl^ui‡d}|[rp[ljcqk}Š}m|cvw^uv”«°t‹‘Š¡§wŽ’|•.JT1JT2FQ/?K1@K4@L -8*"+,9/?L,<L4DT7FV&3C)7.7!09#1=,:9FT4BN'6>-6"-&0%4@5CN'5A)"*!(#4B0>J#,6'0%+$.%.7#,6'2(0:*3&3$2>6FR3DQ)=K,4!* /8$-!,6*5)3'1%/",&0$/+7B%/#03> )&02>H*3>'/$-6%+4&,5"+4(1;*3@/;G3AM@Q]CT]6JQ&6=-4,<CHX_2BI-=D3CJ1BI'1)3:%-419A!&*.3$(-,059?FGOV2;C+7;/;?/;@;GI9FHJPT?DI>IMIVXCQSbwt\sp_tsUthpŠ`|rczucvt[libpn}Š‡y…Ž‹›¡˜«¶„—¤Šªzš{˜n€‹4JV8KX<LY1>L+6D5?M(4C!-<,<D*:F2CP/>N-<M1AQ"3?"/=,4$1'5@$1?1>L,;F(5$3<(3=-;H"0<.?L1>J*5?(/ &&7E-;G%/"+ $(1&0)*4=&.<"-,9E:JV2CP(8F$5==NW$5>3AJ/>G.>G2=G'2<3CL-<E2CL3DM9HP/;E#,6;?J$4A#,/<E(2$.$(1"(1$!*4(1>'3?1?K=MZ8HQ(;B7FM?OVGW^BRYBRY=MT/?F0AH4=F@IR5=D@HO(-5.59,/41498=DFNUFPX?KN>NPAMQBNR<IJBJQ<FM<GM;IOy‰Ž~‘˜|–xŽ•]tpvˆ^wlUja\nfdvr_jnt‡`m{s€‘x†˜w†šfwŠ[j~m}^l.>K.>K5BP/9G/:H0=K.?L(9E.;H1AM3DP,@O+>M7GW/?L+9D1@H)7C+7F"/=1=K7DR2@L-<D,8A+9E"3@2BO9IV1?K(1;(/,=K9FR7CM)1 *$-(1;!,5(1?*2@(5@)8C,=H3CO:KX9JW2EL5EN6GP5FP5CLN\eKZcN]f?PY7JR7IQ7JR7HR0?H&2<5?I4BO"/+7C;GQ!+#.!*3&/#,5'0:*3@&2>2@LAQ^EV_BU\BRY@PW?OVAQX@PWAQXCSZCT[2>EAJS+5>DLS05<+1947<48<1:@@JQEQWESZFVXBRUAMQ<GK?IPAMR1>F>MVv†’w‡•l€r…–cvz^qnXkbRdV\nay‡„cqxw“cp~z†—v„—{‰}‹Ÿfwˆhwˆdq‚(7D*71>K1<J"/=3@N4DQ,=J2BN3BP1@Q+>M(;J7GT8HT)9F.>J-=I.>K&5E4CS7GT3DO,<I0>K/=I(8E4DP8HU8FR(4>(0(:G3DQ7CL&18"+ )1%0:'0>'2@+6D*8F0<J,=J<KY:LW>P[8KS8KS9LT9LT6GP5FO:KT>LU5IQ9LT8NU9NV7KR5FO+53<E5CO!/;+:F8DQ",!+6"+5$-7'08&/9'0=(4@-;G?O[CT]>RYJY`GW^=MTAQX?OVHX_AQXGW^/:BDOW6>H@IR-6<16=/6=45>/6??HQIU[GU[DRXBRTEQU=IM=JP=IN6BJ<KT`p}eu†N]nQdw:JPWfiVf^M^Q`ndhts„Ž˜ir…Wfobt|Xht\mzOancrJYbJW_-@O1@P5DT-<L.;K1@Q1AR-AP0@M3EQ*=L)<K)<K4GT9KV,=F3CP4DQ4DQ)8H7EV8HT2BO.>J3@L->K$4A-=M<MY7EQ*6@!,3,=N4DQ6DP%/9'.",6)3<*2?)7H+8I,9F->K0@M9IV<NY;MX;QX6LT:MU=OW:NU;LU=NW<MV;MY<MY;OZ<Q\:LW4EQ*6/7E/@M!.:+9E7CO(5",6!,6"+5)2;&/9&/<'3?*8DAQ^BS\-AH$4;(/ 07AQX<LS&6=(8?$5<+4?BLV2;CBLT28B-5<06=4:A39B>GPLV_ESXCTZCQWCQX?JN=JP9EK6CK;FP;IVUfs[kxSbtcv}kz}bnn†ŽŒ‹“‘{‚…qwƒ‹–_otv‰arzp„‹bs|ex~lz€brt2IX0ET6IX-<M,;K1AQ3CS+>M.>K8HX2ET+>M)<K2ER9KV+<E3CO6FS6EU)8H3BR8GW3CP2BN6DP1BO)8I2BR6EU6BP-9B"+5/@Q4DQ9GS)2<$.#-7'0>'4?)9I+:J,;K/?K,<I4DQ7JU:LW5JR9NV<QY9OW<NVAT\EX`?RZ;JW9KV9KV;MX9LW8FR!.94<I1BO$5B/<H7EQ(5!+4#-7",6)1:&/8%.;%1<.<HCS_AQZ&9@5EL:JQ?OVBRYEU\<LS@PWCTZ3<FEOY1;EDNW07@18A39?27>1:C=FOHU]BSZFV\CSYESY@LR>GOBKS3?ELW_ERZ>ITM]fZirŒ ¥aqw¥°·†‰‘xz‚{~ƒ‚‰Œ{„‡^mv€‘™FVbƒ• n~Šx‡{ŠDPV0M[0LZ7M]1EU0AQ2BR4DT.AO0?L4CT2ET*>P+AP4HT;OU,=E3CO3CP5CT+:J2AQ:IY2CO/?K8FR3CP(8I1AQ9IY7HT2>J)3/@Q1AN:HT(4>$.%.8(0>(5@(5J+9L-<L0?O6FR9IV5DP;LX5MU9MU:PX:OW@V^AS[AT\?RYBQ^=LY:LX<NY9HU6DQ"*82:G3DQ&7D.:I2AM"/;"+9#-7 *5(19*3<*3A%2>(7C?O\HYb:NUBRYEU\CRY;KRFV]IX_:JQGW^1=H>HR.8CAIS09C.5>04>49@/8A>IQER[FW^DTZBRXDRX?JQ@KN=HK<FM7CI:FLAOVSagVbir‰K^epy„ccstp~lhrvyx„Š‚cn~w†—z‰šsƒ”q€‚Žgoz~ˆ?O\?NZ7FR1?K1>K2AQ/?P.?S/CO.AN3FU.>O*:K5EU9JX0@M2BO4DQ4DQ-=J2BO8IU5ER0@N4BN0@M"2?1AR8HT6DP.:C",6+<I:JV4EM(7@%/%2<'/=.6E*:A+9E,<I/>N.=N:JW8KV9MT7JR;NV<OWCU]>QYBU]<OWAT\=QXBU];NU;NV=QX3BJ(2/8A.<I+9E0<H8DN&0:$/8&/9&.7$0;)2<+5?.8A+4>=LUDU^>RZ>PWDV]CV]@RYEX_FX_ASZEY`9EK<HN2<C?IP.6=6;B06=4:A7;D;BILX^KX^EU[?SVARU6HJ?HS:EN7AIGPTCLOGSTT`dQac7JRJ[bS_e[gjo{~›¢£°¼|‰™Xqvt†Žr}ŠŒœl€m„Zovo|„/>O8IV<LY0>J8ES4CS/?P.?R3FR2ER6IX0@Q,<M4DT8IV-=J2BO3CP4DQ-=J0@M5ER0@M.>K/=I2BO 0=1AR?O\7DP0<E"+5+<J9IU3EM+:C%/#/9&.<,5C,<D,:F*:G,:K/>N9IU;MX>RY:MU9LT8KS7JR@S[@S[>QYCV^=PX>QY=PX:MU:MU2AJ ,61;D;JV*8D6BN8DN*4>",6%.8&/8%1;)2<+5?,6@7@JAPYGXa-@H7GM2AH+;B1AHCSZ#3:$4;%5<)/4AG09@@KQ08?.7>27>39@9>G:BIIU[ESYCSZCSVBSV9JM<IQ;GM:EI?HL:ED?HKNZ\OZ^5HO8FM[gk_kmZeikv}t‚x‡—_u{n~†‹”¢r}‹t„‘u‡•ct}x†':H%5E$1!2=$1,;K1AR0AU1DQ3FS4GV.>O.>O7GW9KW.>K4DQ6FS7GT0@M/?L9IV6FS-=J1?K-=J#3@/?P7GT8FR0;E!+50AN9IU5FO0?H&0!.7&/<,5C+;C,:F):G-;L,;K3CP7IT:MU8KS9LT=PX?RZ9LT=PX@S[CV^AT\?RZ=PX8KS<PX4CL$0:09C4CO-;G/;G:FP,6@!+5%.8$-6%1<)3=*4>,6@3<F>NW>OX!5=)9@%5<-=DAQXAQX4DK>NU?OV9DJBNT2?DBLS29@/8?27>5;B3:D6=DHTZESY@QW@QTCQT6EHETZ<HL6CEAIIbjj^gfV\_NVY?MTT`d\ijJVXFRUix€ƒ’¢i|Š¥šU\i}ˆ–o~‹u‰”_o|PZd,?Q*=K5FS,<I-=J.>J3CS3EV3FS6IV3FU.>O,<M5EU9JW.=J1AN4DQ6FS.>K4DQ8HU4DQ/?L2@L3CQ%5B1ARIYf/=I3>H!*42CP6FR0AJ-<E)3#/9&/<.6E'7?*8D*:G0?O2AQ5ER:LW:MT<OW;NV@S[=PX9LT@S[EX`?RZ>QYBU]=PX?RZ:NU4CL&2<1;D4BO/=I2=J7DM/8B$.8)2<$-6*6@+5?-7A-7A5>H<LUCT];OWAQX<LSAQX:JQGW^AQXEU\DT[6DJ<JP2>DBKR+5<19@*3:4:A29B0:AFRX@NTFSZDTVBRT8CGFVXBMR2?A=FEMQRBGG:AD9>CCOSP\^forIUWKV\‡–£§»Ì³Ìá®ÀËy…fm|t|Štƒ{šlz…\er4K[1FT:NZ.?L.>K3CO1AQ4CU/BO3FS6IX/?P*:K4DT6HT1AN1AN3CP7GT0@M0@M8HU7GT/?L2@L4ER3CP+;L3CP4BN3?I)3=->K<LX7HP,;D ,6+5)2?.6E-=E-:G+<H,;K0?O8HT9KV<OV9LT<OW<OWBU]<OW?RZ;NVBU];NVAT\<OW;NV>QY4CL*6@09C6EQ3BN+7C<HR3=G#-7)1<&/8#/:-7A.8B-7A09D<LTGXaAU]DU[DT[@QX<MSBRYFW^P`gFW^;IO1@F3>DFRX-8?,3:.6=-6<3:C.8?EQV@OU>MSCNRFRV6@E@PSIVX0<>>FECLKGMP',1/7>?JNEQRNWZ?KM>KR\mx]t„[t‰_tƒ@O_LVgw„”x‹šr‡–‚’¢Ž—¨2J]4L\>P`/@M5EQ5ER2BS5EU2ER3FS1DS-=N)9J5EU7IU2AN3CP2BO4DQ.>K3CP9IV7GT.>K=KW.?L"2?3CS1AN1?K3?H,5?,=K9IU6GP-<E'1!-73;I(1?"2:9FS*:G,;K.=M5ER:LW<OV8KS<OW>QY?RZ=PX=PX<OWDW_?RZ>QY:MU?RZ:MU6EN-9C,6?4CO2@L*6B?KU7AK!+5*3=)1:)5@.8B-7A.8B3<F7FOEV_=QYKW_ANV4AI#081>F>KS(0 )&4:0>D7EK:FL/9@&18+3:/7>18A.8?COU>JP>MS@LP>JN4<@AMQIUY1>?:BF<EH>ILhtzx‚Š>IPDPTN[\?KM8GJ4GNp‡–n‰šh€”ƒ“¦Ž ”£´“ªºŽ§¶“§¹‰–¬0HZ4JZ<Q`2CP4DP4DQ1BO5DU5HU5HU3FU/?P'7H5EU:KX5DQ4DQ3CP6FS/?L4DQ9IV;KX/?L3@L/?MYiv6FV8HT5CN5AJ,6@+<J6FR6GP-<E%1;'4='/=19HP`h(6B0AN1@P.=N6FS=P[<OW8KS:MU<OW=PX8KS=PX>QY>QY:MU<OW=PX>QY>RY6DM0<F09C6DQ5CO)4A<HR8AK!+5&/9&/8(4>-7A,6@-7A/8B4CL;LUBV^$19$19.;C1>F8EM@MU5BJ;HP8IO:HN.<B<HN4AG-7>*5<+3:07@,6=BNT?KQDPVALP:BF5>A;HMGQY1<@=HL;GKCOWGXa2DP9IPCQXIUY=JLFUX;LS|’}˜¥rŽ¦_vŒhzj‘^zŠ]{Ž]uŠ\p‰2M_+FV8M]/AN/AL4DO4ER:JW3ES3FS4GW0?Q*:L8HX:KX3BO/@M2BO7GT.?K0@L6GS;KX-=J8EP9IV¯¾ËDSd7ES6CO5AJ/9B.?M6FR8IR/>G#/8&3<3:GmsSbkAN[*:H0?O-<M3CP:MX5HP>QY9LT>QY?RZ=PX<OW>QY=PXARZ;NV:NU:NV:NU:GP5?J-5?4BO7ER)5B:FO>GQ*4>&/9)1:%1</9C-9B+7@/8B.<E<MV=RZCNX<HQDQYAMU:GN8EM&3<=ISCRX>NU7EK;FL;GM;EL:DK6>D6<F+4<?KQ=IPCPW?KO4>A9?C>GQ?IPHRYMV]KY_<PV@S_(AN4FP<MTHSZS^bFUWBU[OcoPitBcKe‚Tl„Pj€Gj~Lp…Li…Tj‰4EP6EQ4DP/<J/<0AM8KW.DP2JV)?K9LX1BN(9F6GT7JW.AN/;J6CQ4DQ*9J1@P3AS0@Q1AR0CTMbq¨B^g2LU/AL:AO03C.=H9KV7JR0?H)/='-="2C«ÄÕMejH]e/AL.<M1>N7DR>LX?PY9MU>QY?RZ>QY:MU?RZ?RZ>PX3SW>RZBN[BNZ7IWsŠ•*AH"1:6BJ;HP.;C7GP5FN2>H1;E.7B$5>,5>43B12A0<H$6A/ALHSa=TT>RW>PWAS\*:C(6<>HMJWT>RW9MR6FL5FL8GM:GL?IP=GN9HK7FI;GK>IM@HLINS:@E=?D4AG?KQANTFPXCMT=GNBIP@FM7BH?JPGV\FTZJV_HX_JZ`P`fN]hO^jM\hO^jM\hL[gM\hN^j*<I 3@%6C.>K.>J3CS6JX=Ra*BNG]i5HU<LY):G6GT5IV.AN0<J4AO2BO+:K0?O1>Q8IZ2AS/CUtŒœ€›¦;V`9R\4EP6BN07F0?K8JV7JR2@I.4B2;IBRc‰¤´OfkEYaEWb1AN5AO;GV<MY=NW;NV=PX?RZ>QY:MU>QY>QY>PX3SW9NVAMYAP^‰Ÿ«TnwEYd!3;5AH;HP4AI7GP7CM4AK8BL8AK-AH1<D58C38B(6B‹ž«j~Š?N\>RW:OSASZ?PY?MW@PV:LOERT@TY<OT9IO9JP<JP=IO>HO=FN<KN8HK:FK:EI9DH9CF39>;@E@LP=IMDOS>IMBMQ>JM<GK7BF:FJ;GKCQWGU\JX^GW\EU\GW^EU^FV_EU^HW`HXaHW`HXaIYb4LX,BN8KZ/?O-=M4DT5GX5IZ~—¢Lbn?Q^6GT*;H6GT7JW1DQ1=K4AO1BO-=J,:K4CS/@O/?O*>P§¾Í{–¤8S]?U`7IT4?K27G5CO6JQ7JR4BK09F5=KScsqŒœLglH_fCT_+;I1=L8FQ;LU:KT<PW9LT9LT>QY;NV>QY=PX=PX7RX<QY>MZ*:G¨ÁÌl‡“I`j>MZ1?H:IR8GP5@J8DN7CM;GRAIT0FJ:HN>GP<EO *µÍÜu‰šASeAUY?PXBU[@PZDV]=PU@SVCVX=QVAUZ?OU=KQ>MS@LR=JPBJR=LN8HJ8CG4AD0;>+7:6?B=FJ6<ABGL/9<ENR=HL3=A?KO;FJ>JNAMQGVYFUWIW]JZ`HX^HX^P[cR]eS^fVahU`hWbjYdkYdl:T`5K[4JY1CT5GX<M`8H[;Pa…©H^j>Q^/@M%6D3DQ6IV2ER1=K3@N1AN-=J.>K9IV7GW/?P,AW¦¾Ðˆ¢°Tlx<R\:LW5CO8@M4FN5IP4IR1BK;BO7AOŠŸ°}š¬WpyI_jEYd>MY(8D4CP;LU;LU;NV<OW=PX;NV=PX=PX;NV<OW9U[>PX2AMFXh±ÌÚy•¢CXgL[h6JP5FO9HQ;GQ8EO=GO>KS?KT6ML:LNBLTAOWJcn°ÊÚi–DWnDU[ASZ?QW>QX@SZ@TY?TY@UZHX^EU[?PUGU[APU@LQ7CI7CI?MS=KQ?NS@KQ:FL.:@8AI#.58<@>BF9>CAJMDOS;GJ@OR@OQFRVEPUJY[JY\HV\BRXIY^Ufl_hq`ir^gp`hqajsbjt`hr^gp0KWKdp1GV-AO1CT0AT1DZGZosŒ•Rgr7KV6HS+=H1CN5IT/CN.:I5BP4DQ2BO1AO8HU3DQ3DQ1I`›³Ç†Ÿ¯Nfq=S^:LW.;H9DP,=F6HQ2IN7HQ?JV,8I¯ÇÖUt…F]hG]hDXc9KW*;C3DM=NW6IQ8KS<OW;NV<OW;NV=PX<OW>QY8QW>PX>N\Ym|˜¶Ät‘ H_oETdH\g1CO:HQ:EP>IQ>IQ<IR>KQ9PP;MOBMU=NYi‚‘°Áq‰@UnCV]BU]BS\FX^BT[CV]>PWI]cEV]HY`IV^IV^ANVCPXGT]KX`NZcVckUbjTbjWdlCPXLW_S_g\]fX^dPX_XbiS_eP^dP]cL\cQ]aUadTchYgmWejXhoXio\mt_jq`ksbmtcnualtbmt`ks^iqŸµÁ3GS4ER1AQ4DU7H[3I[|‘¦ƒœ¥Lbm>R]<NY4FQ3EP5IT4HS)5C1>L1AN2BO6FR>NZ6HS3EPOh‚˜°Æq‰›Net?S]BT_7GS8FR5HN4KQ2HN4GO7DQO^n’«½o‘¤IaqAXgEXcDW_(9B5EN:MU;NV<OW=PX<OWAT\;NV<OW;NV?RZ7NS<OV>N[ˆŸ¯¯ÀmŸOgyt€•_z‚:NY:JW@KUALT?IR=LQ?OU?SUAQW<LR7JU‡¥³±Áe€•BVn>OY@R^EV_BT\FW]CPY-4IV`=JRCPXERZFS[KX`MZbR_gUbjScjRbiPagT`hUbjZgnZgoWdl\enYaj]enWaiZgoZfnWgnVfm\go\goXemYgn\gq\ks\ks]mubmw`lv]irZeo]isalv]hrVak_qx0?HDR_8IV0@P.BS6L^³Ë݆Ÿ©Ndo=P[8JU5GR6HS7KV2FQ0<M5BP0AN3CP3CO=LY8KS8KS·Óì‹¢¸w BYhK]jI[eCR_.>J:LR2IN.GM5GO)9Feu…‘­¾eˆ›]u…D[jGZeGZb/BH:MT6IQ9LT;NV=PX<OW=PX;NV<OW;NV>QY;PX=NZ(;G¾×ç~ ¯mŽ¡Hav¯¾Ñp‹—>T_5ER>GQDMVBNSCQWFV\ARWERZCMW6JU£ÀΑ³Ár¢BWm:MZ?Q\8IRARXHUZXaj -bepSaiYfnYfn[hpWdlZgo\iq]iqYhrWfoYhq[ktUdm[jsZir[js[jr]ktZjrZirZir[js[js]lu\fo^hr]ir_kw^jv\kv\iwYftWgsQamO_kRbnM]iM]iM]iN^jgsy=IQDOY:HT6FS4IX/HX¡ºÌ…ž¨BWc6JU8JU:LW7IT6KV4IS0<M8DR0@M7FS8HT(9ANah §t¬Ws‰OhzNdsL`lrƒŒ†– “£¬Œœ¡z”{“—“¦­ª·Â·ÅÕŠ¥µk‘¦[q„AXhF\fO`gI[a@RX%7>&;B(9A)<C-@G5HO7JP?QX@RYBRZ<QX1@Ks„“Ÿ¸Ç³ÆkŽ Tl€ÆÓê‘®·5NZ<LX@ITAISALR>KR9LM@MVAITHQ^1CO²ÐÝ‘´Â`}ŽBWj@QaNbmYjsYhm]gmbjr€‹41@gu|gt|cpxanvcpxamvZkqSdkZhpWfn[irZhq]ktXiqWhq[ltZlxYlvaq}`p|^o{ao{_ny^lxem{fm{amxbl{_hv\huZeuR]nL_lL_lL_lL_lJ^kI\iG[hFYgOjp2IN;LU8FR6FS3HW/JZŒ¬»v’>V\8MU3HP7IT4ER1AN1AN18;MX]ozey„k€Šj}‹h~ŠPfsE]iG\gJ[eO_l^n~ƒš¬‚ž³¤¹Œª»¯…¤µŸ½Ñ–µÉ“®Ãƒž³rŒ¢wŒ–OfvI`pG^n{’¢˜©Ž¨¶”®º•²»¨µ†›ª ²ˆœ®Ž¥µ€š«ƒ¦²‡¡°¦ÄÒ°ÎßšºÐ€Ÿ´ž³Ur‡¸Óçv›¨Gam>LT?HPESXAQWHV[HSY[ggO^cZp{d~¬ËÞ˜²Çd@Yi7R^FakXkr`pyvŠ,1>kp~3YhpWgo\gr_ls]jqanu_ltbntWkyWkx[o{Xmx[ny^p{]oz\nz[nx^nz`p|aq}dqdqer€er€crz^nz[jvVgsPcrL`rKcsNfvOeqNepRerWguVfrUeqZgtWfoPjp;PV5HO;KW@P]2ET˜±ÁœºÉYqw:PU6KS4IQ:LW5FSN^kbr~t‡’\nyRdoL`kM`mK^k>T`>T`4LX=S_\lyZkx>Raaxˆ‚ž³t“©ƒ¡±Ž¬Àˆ¦¹®Áˆ§º…Ÿ´w’¦w’§h~Œ\s‚Yqƒ~–§ƒ›­‚­’«»«¹\t€€˜¤Œ¢²¨º™°Á“­½“¬½•³Âš¸Æ¦ÁÒ–´Æ®Â†¥¼t”«y–ª§Áצ²<VbCR^ET\K[d>SZFXcQ]jK\aN`jXq€¼×뜺ό¨¼i“CZi=Vb9P[Ymt`kuYclX`mt{Š06Ebs€_o|_o{_o{`nz^lxao{_lx[kxUfsTenTenSdmTfoTfoZirZjv]mxYiuScpScpYiuZhxVduTfpXhtUhuSfuSftRgxThyThzRhtPcpPdqSepXhuZjv\ktXgp\v|=T[3EP5DQ8HUL`l—®¾p‹™G]b7LT5JR6GS9KV8IV8HU:IY7JT9KV>P[<P[ATb5HU9P[8OZ7M]9OZ¾ÑÞRboBVe9QaRl}€Ÿ²sŽ£y”§„Ÿ³‡¢¶‚±ˆ¤µ›¬y”¥n†–n†˜Wp„t¡y’¦š®‰¥¶†¤²9JWl„“‹¥¶‚ ³”´É’®Äƒž²´ÈšµÉ•²Ç®Åˆ¦¿‰§Às‘ªŒ§Àœ·Ë…¨¶<Vd>MZ\myyš›¨‹¤³ž°Â¸ÅªÅÖ¥ÃÖ°Ð虵΃œ°^t†DYh=T`9MXWhqbnxCLWHS\DMZ%,;as€^o|]n{Zkx_p}YjwQboYjx]jq]jr^ksbowiv~dqybowhu|ev‚jz‡jz‡fwƒ`o€[m|TixPetPfuOfuQetNbsOctRduPbsM_qOcnPdoUfr_q}XiqRclRakQ`i^wCYd/DN6HR8IV6GTlH^j>QY9LT5IP6IT5FS8IU8HY:JZ7JT;MW8JU9LY6IV7JV7L[7L[4N]:Q`®ÂÒ@S`BUb=Ra7Qasžx¦|˜­oŠŸ… ´x“§‚ž®}œ­k‰šy’£d}‘h„™[v‹|–«t’§Š¨»Œ«¼DP`AUf‚Ÿ°„¦º¤»|³†Ÿ·”ªÀ˜¶Ê”´Ë­Æ†¤À{™µz˜±Š§¾‹¤½u–£B\l?Q`Pdu–°Á’±Ã–²Ë—¬Ç‰¬¿ž¾Ö«Ìã¦ÆÝš¸Ít¡]q‚GVg<P]GYdTcl\iq`ksLU`8DNco|_itdoygr|hs}lt‚eq~huivƒlu|nx~jt{ku}r}…v‰r|„oyap€[jzSbrM`oK_pKbrIbrHaqGbrF_oGaqKcsMasPctTduTdvPbmYkvfz\mvPajL_fIZ`EU\VnzDZf=P]<MZ:LW4FQ>P[9KV7HQ6GP7GS2BN7HU7GW9IX5EU8JT:KX8IV3FS6IV;M]5JY4IX3K]E^n•«ºRhs7MY6K[<Sc<Scay‘x‘¥{”©ƒ›¯œ°{–ªpŸf„•~›«a}‘f–j„y–®t‘¦—µÈmŒUaq2FXs‘¢z±¤¼w—°€›µ¡·Ï„¤»•²Ë‚ »{™´y—² ¹©Á—±Ë|š¨AXh:K])=N”°Á} ´’±Ê—®Ë‡§Àž¿Ö‡¦¾v”©l†šUl~M`oK\iCVcDUc?NWeszgrzZem1=Gkxƒ‚‡{„x~ƒu{x€‡z‚ˆw~‡oxt~†s~…s}„o{…lwit}anz[hsTctN`qM^oI\mI_pI`rGbrF`pD_oIasJ`rOcuQds]m~aq~dt‚\mvZjtVgqN`gL_fIY`FV]BRX]tƒ@Wf8NY7JW9KV5ER7FO7FO<KS7EQ5FR7GU5EQ,<L2BR5EW5FS5FS3DQ3GS3FV5GV2HV5JY+DX=Ug•®¾Pfv@Va6LX:LY7JZ8PcMex„œ®€˜­y•©z•©k‰žq¤o‰™i–]yŽh„˜z•ªpŽ£©ÈÛ ±O_lAVf3I\^wŽš³šµÐ‚ ¹ƒ¡¸¯ÆŠ¨Á€¡¼w˜²¸nŒ¥©ÃÜ ·Îk…”AVgGVe8K]t¡v—ªªÂ‹Ÿ»y”­pŒ¡GauB[n>VfCYhBTbFWaBWg>Q^>OXiv~v‚‡}‰$/7S_h…‰‹„‡Šz€‚{€„v}ƒw‡x€‰xˆn}…mz†iy„]lxWgsN`oObpM^oNasJ_rI_qG_pG_sHbuJcwFbvPfxNdwShy[o~`q~euYiu]luK\eJ]dHZaEX_FV\AQWAPWBRXI`pNeu9N^=P]<NY?NW=JR<FN2@M1?K2@L0AN#2B#3C-=N4DU7HU6GT4ER6IX7JY3FU/DU/CT3KbŸ¸Ì‡ ¯D_l=Ua5LX2ER;LY7N^7M]Ibr{•¦w’¦n‰žq¥n‰¤x’¡q‹œh€•f}”y”©oŠŸ¶Òㆣ²Zr|>T`?QbQ^u‚”«…µ~Ÿ¶‡­Â„£º¡¹}Ÿ·x›³x—°}´®Èݦ»c{‹IXgETd8KZUp~ƒ¡¯e}’L^tCXjEYl=OaG[h@R]DUa=RZAV]8O`8N[=QY[gox„Šjt|":CMclsgsxis{lw€iw‚`o{[kwZjvUhwQcrQftLcrG^pG_sG`sG^uF`pFaqHauIbvIcvKcyMe|Nf}Xi}[n~aq‚ZkxXhu[luN`gK[bL\cFV]M\dGV\CSYDTZ=PS;NQLctAXh=Ra9KXCT^DQYEQXIRZDO[6CO-:F,9G$+;-<M1@R5ER6FS3DQ2FU4GV1DS1DU*=N.E\²Ëß›¬Zuƒ<T`FYd9JU@O\0JV;S_=VgB]nw¦s¦p‹¥u¬y‘ lƒ–d~h•~—«©¹«Çמ­UtyLbm@N^NTiz…—©Ã†§¾¬Á|³†¨¾} ·y›³ ¶’±Æ–°Ä~˜¨Shw@OaBM[?P]*FQ2O]9Qa<K\AP`>M^BM\ANZ<MU?RY=RZ<QW6Ra9R^@RYCRXq{tyqv|gkoVdoTdpTdoK]kM`qJ`rI]sD\qI`oF`oE]nF^rE`tD`y=]tFeDcuHcwJexKg{TlƒUm„Un…Vo‡lw‹]i}_nWguM^hEW^GW]DUWDS[HX_>NTCTYCSYASU;OR@SVf‹D_h6P\6P\5O[>YgB]kHcqTjtATaq‚‘¡o~ŽyŒš•¤t‹šr‡‘—¢Š›¦œ‘žx†¡®‘¬º£ÅÚ¥ÃÖ™©Vm|BXdATa?Rb8KZ>TXBZcF\i?ZjF`tk‡œp¦m‰£w’žsŸj†–g‚–}—­­Â—µÈ‰¨¼ƒ—¡7MY=P_.BSx£¬Á„¤»¤»ƒ£Â‚£½y—³{š³‚ž·”±Çƒž²d€–FX^>QY@R]=OZ7HU=NZ9IY;K[;J[<MZ9JW:KX=N[<NY;MX<MX4IY3K[5M`/J[Gcx>ZoA]rB^q9Xr>Yt>XqBZsF^tBZqC[qF`sM_tK_tG_rB_tFcwFbzMgSiƒNk„Yt‰Lg}^yŠWqWo~WlxLanHfkQjoEX_IY`IU]GW^ASZBT[=VV?TV>NTDOWEPXDOUCQT>OR_x„Piu7Q]4N\5O]:TbE^nOhx˜¦¤²…˜©Šž®€“¥“©º„œ®œ¶Æ€š§‡ ®‡¬“¡‹ž¯”«º ¹É™³ÃŸÁÕ•²Å…ž®Vm|F\gI[h@Rb;N]DXXCV[K^fNaoVi|F`pvŽ¡}—¨|™§z—¥o‰žqŒ¡v“¨´Ñæ»Î•³ÇXpxC[g@Ud9M^tŠ›’ªÁx•®„¤»‹©Ã…¥¼€¶{–¬d€•Up€F]q?YjBT[BU]>P\:LW;LZ8JV:JZ9IZ4EQ6GT8IV<LZ8JU;MX=OZ:LW;LV<MU9LZ3HWJaqD[nC]mD]qA\qC^sD_tH_uBYpIbuJbuA]pKbzLe}Kf~MlƒHg~Kk‚Vpˆ]t[wŒ`xŽIcwpˆ›¤´jŽKamNbnG`fI`eFX_GW^CPXAQW@SY=PW=STAUY>NUBMUFPXAMS?NQ=OPl†”Sm{6P^2K[5O^:ScC[mLdul…˜š®™­vŽ¢ƒš°~–«~™®m‹Ÿq¥lŠ}—«{“§‡ ´‹¥µŒ¨¹©¹˜¹Î–¶Év‘¢k…’?Sb@Ud@Ud=PbKZ^N]dTemZlvK^kYo{Umyw˜~œ«z–¦{–ªš¯¡¿ÓŸ¼Ñ™·É„¢¶_{…?Ye>Tc.EUwŸ…š°‡Ÿµ™°`yŽk†–;Sf@Wg>Vf0EU<S^5HV<NY;MX<NY=OZ8HV:KX3DQ5FS:KX8IV9JW8IV9KV6HS;LX:LY@KN@NT>NT9KUThwLcuGbuKfzMgzLezHeyEauLh{Kf~Hg}Gf|IfKl†NoˆSuKk‚Po‡Sp…Ok€jƒ—Œ ¶y¡}‘£p†–atI]hN_kCV^CT^BQZ@OX?NW?NW>OX:MU9MS@QZ>NV@LVAMW=KQ?MP=OPz’£Xq5N^6N`1I[;SeAYmH`ti†žz–®„µXsˆuŽ§g‚œWuŽqª‚¡º{š³|›²r‘¨}˜±Œ©¾‹¨½‘®Â¥ÆÚ›»Î‘¬½n‡—<RaE[j=Tc@WhL_hSeqXm{`s„¦µ† ­‡ «Š¦¯‰¦·ª¿‘«À”²Æ°Ì塽җ·Ê€¡±c€>Xf5Q^9Rb>Uem€’?TfBUl:P^>Td?R_BVc9KU>P[5GR:IV<NY7IT4FQ+=H$28IV1BO8IV7IV5FS9JW6HS9KV9KW>QY8LT?MN@OU;MS7JUE^mJg{Mj„JhˆPm…PrˆXz“Vz“Tx”JoŠVz˜l«zž¼£Â‡©ÇŽ±ÉŽ¯Æ–¶Ì•°Äˆ¥¹{Ž¡]q‚UgyPdsL]jHYf=OZBU`AR[DU^>LV?MVAPY?PZ;KU<MV>MVAQY;IU>IVBNXAOUBSV@RSr‹›_wŠ5M_/GY1I[7OcC[oNfzr«v”­w“«b”Ie~=\u6Tp=^{Xwc‚›l‹¥kŠ£}ž´ˆ§¾žµ‰¤¼ž¿Öš¹Î|˜¨pŠšC]k;Uc:Sc<Ud>WkE]qC^r‡¡¹„ ¸}š® ²†¨¶€š¯€Ÿ±‹¨½§ÃÛ¨ÄÜ”³È‘±Ä}ž®VsB`o<Vf6O_4L\AUg<K\6FX9LV<NY9KV;KW=MY8IQ6GO6HP@P^3CP4DQ(5,89IU7GS4DP6FS9IT8HT9IU8HU:KT;LU:KT7IQ=OW6JT5LZ]xŒƒ ½{ Â{¢Éƒ¨Ê§É}¦Æ~©É{¨Ê‚¬Ðƒ«Î’¸ÜŽ´Ð“¶Ôš¼×jŠ¢`}“h…–c~ŽJduRetI\lHYfDTbCT`CUa?RZ>OX>OV>PX4GNASZ7JQ:LSASZ>QXCQY;GQ7FOBQZ@NX@PV?PS=OPšªd}>Wg0HZ2J\7OaBZoNfzn‰¤uªmˆXs‡9Ti5Qj$A]"@]">RJh}s’¨q‘©u–­w—®„¡»‡¥¾ŸÀÖ‰¨½‚ ³VpIcs<Vf6O`4Pa9Yo@`wIg€mŠ¦r‘¬ ¹{œ²x›²y•ª‘®Â’®Ç›¶Î©Èß‘°Å’±Äu—¦[t„@Zj6P`4N^3IX9KZ4DT:IZ9IT;KW:JV8HT7FR7GS7GS7GS5ER5EQp€+!1=7GS1AM1@M2BN9IU9IU:JW9JR;LU<MV<LU2IU7NY5KV2IX9TiŸ½t™½r™Åt™¿y Çz¤Êy§É¯Ò¶Û•»Ý•ºßˆ¨ÀZz’Tp†LdzQiyF[kAWc=TaCTaCT`BT_?Q]?RY<OW>PY>PX:RW5MR5MQ6OS4JO;OT9LR;LR<HMBQT>MT9KS=OV<OTASU>OS|–¤k„”D]m3L\4M]7OaBZlOgynˆ¢x”©s\u…Ict-H\,Gb4S4GX,CS™³Ä‹©½z˜®€ ·}›´…£¼ž¾Õˆ¦»ƒ ³c~Jdt;Ue6Sb3O`7Ug@_rIf|Lh‡¢¼ƒ¢»ƒ¢ºv–«‚Ÿ´…¡º“¯Ç­Ç¼Ó‰¨½‰ª½q”£Wn€>Vh<Wf2L\2M[6LX8HU8HU7HU7IU:JW9JV4ER5FS6GT6GS7FV8GWJZgRbo1AM:JW=NV3EM;KW9IU;KW6GP=NW;KU8JQ7IP6IQ7KR9LS;NV-BQHdxIe†DhŠDd‰GkCjŒBi‹Fo‹Fh‚Hd€Ka~E`pLdtNetPanJZhHXeDW_BU]?RZ>RY<OW>PX:OW8MU=SY9NTEdcDdc8WV+JI1MM2KK=OP:ILCQMDRP9KL@SV=QV>RV>NT=LO{•¢sš=We7O_6O_7P`B[kPhzqˆ z‘¥i‚‘Xn}=Wd0IZ,G_8T7EO/AN{–£Œ¨¸Š«¾z˜±„¡»…£¼Ÿ¿×¯Ä‰§ºu‘¡[y‡9Vd7Tc2Pa;V`A[iLeuTm‚š¯‹£¸z“¦uŽ pŒ¥€›³|–°‘¯È®Å‡¦»‹¬¿y¬h|<Qc=Wf4O_0KY1GS9KU<KW<MZ4CT3GV2ET4GW2FU3EW4GY2AR8GX0@M5ER5EQ8HU6GP3DM6ER4CP9HU<MV:JT8IS7JQ6IQ>PP:IK=KHBNO=MR6J[2Kd3Qq8Sx8Vw4Uu2Vo9\uMj[pƒ]l~QhtJ\gQ_kJV_T\fO\cDSZ=OU=PX:MU2IP;QX7NT7MT9MT#5>UuuCgfMqpRrsPmnF[].15>CMXPLYUburF[\DY^ATZ?NUN[bs‘¤eƒ–7Sd0JZ3L\6Pa@YmMh|x˜¯}š¯}–ª\wŒ7Wj3Sf.F\'5O;R[7M_r‹¦†¤¾„¥¹€¢±ƒ¢·Œ¦Á™¼ËŒ­½~œ¯k…š^y<Wl5Sh3Rg3Wd<^mFbsQj~kƒœuŒ¦|˜³{—¶{›®~žµœ¶›¹Ò«Äx—®s’¦x˜¬e€=Wg<Ue6M]1EV3DV5EV7EZ3HR5JT5JT4GU5FS6GT/@M5FT6GO6GP6GP4EN:IR>MV6EN8GP7KS5HO9LS5IM6JO9JL<MP<JM:KN<MO=MS;LS4CKES_M[gKVd<P]CVcOcnWht_pxUfoYioRbhK]iGYdGYdGYdDWb>P[?Q\9KV4HO-;G7CO4@L2BIAWZ40SyqDyk?uf:oaH|jF{iPpPqN€mL…sU{p.A>{‚ƒENQ0BA9SO4OKu“¦b€“?Yj1JZ4M];SeB[pKg{}žµtŽ£n‡›h„•4Ue3Sf+CY%3N5LU,BTr‹¦€ž·†¨»†¨¸‚¡¶¨ÃŸÂщªºqŽ¢hƒ—Jcw?[o>Yn3Pe5Wf@]nHcwTk‚d|”i‚u«v“¯w–ªs’©¶’°É‡¥¿Œ«Âv•ªr“¦k„”Ics:Sc5L\8L]1CT6EV5DV3HR3GR3GR2ES2CP0AN2CP4DR3DM4EN8IR9KT>MV;JS:IR:HR6IP6HO9LS9IP<LR=MTAPS@OR:KM;JQ9HN9IP5DM?MYM[gFR`M_lZkyVhsSfpCR_UfnIYcXhqGYdDVa?Q[?Q\>PZ<NY9KV;MX1EL,:F5BN;CQUaj[mqXsq[{tI|oDvj;pcG|oCxiCxjEzlLƒrcˆ|h…”ƾ‰Å½ƒÆ¿„½¹Š°«ˆ›—pŽ¡e€”>Xi5N^8Qa;SeB[oLeys•¨l‡œv£Uq‚<^m0Qd.DZ 0G/FP2H[Œ¥À ¹†¨»}Ÿ¯|›°†¡¼§ÈÚ­À{™¬rŠž_xŒD]r:Sh7Sd7Vi@^qGbwOf}Wo…t¦t¨t”«y˜­w–­†¤½‰§À‰§ÁŸµŠ©¾w—ªr‹›Rl|:Sc6M]7K\2CT3EV5DV4HR2FQ1FQ4FQ3EP5HS9IU8GT;MT4FM3FM<LS<LS9IP9IP:FN7GN8IO:JQ<IQ;IO>MR>MSCNT;OS;NS7IP9KRL]fJZfO_k`p|]mzTdq[kwUdpOalHYeGZb>RXBS`=N[AR_;LY7HU9JW:KX4FS1AM6EP6>L!+2;EBNRFXWf|xTwJunN|rM}tExnG|rHqKƒv?€pG†wC€ui®¥qÀµuºr¹®†Ä»~œ¯f•B\m?Xh7P`?WiHauIbvt“¨r¢o‡›[u†8Zj5Sf)?V!.EE\f?Ugš´Î…£¼‚£·~ ¯q¥Š¥Àš¿Ð‰ª½v”§w‘¡¥·Zq€>Wh4M]:UkC^sHcxNh}Xsˆw”©}š¯v“¨†¥º~´‰§À‰§ÀŠ¨Á†¥¼ž³~ž±ržUn~<Vf5N^/FV2EW3EV4GV6IV3FT4FQ5GR6HS3CO2BN:KS;NT;MT=MT<LS=NTANV>KS<IQ:GO>KS>KSANV:GPALT<GO>HP2EK9KR:MSFW`N`hRbnP`lO_kP]kKWfJ[fGWcBT^?S^DYc<Q[<MZ;LY7HU6GT6HU:LY2CP8IW1BM2@L<FP"(1;CJHQV(21&&*CA )&?]Z`‚}V~wS~wQ~wU„|J‘€DƒxEvM‹rº°o¿¶}ÍÄ5‚zu¤m‰BZl?XhCYi@VhMeyc|v–«sŽ¢~•§\v‡<Zk2Pa&>R$1IAXb8Na£½×‰§Àt•©£²Ÿµ‘«ÆÁÔˆ¨»}›®§¸Wn~L`o<R^=S_8PhBYpIdyPm‚^zw”¨w”¨z—«y˜­t”«ƒ¡»Š¨ÁŒªÄ¡·ž³~ž±v‘¢\x‰;Uf6O^1HX3HW4GV2FU6FS6GT6HS6HT5FO5FO3EN4EO;KQAQX:JQ<LSBNV?LT9FN:HP<GO<GOAKS?LT<IP5AI/<D>KR;LUEV_^ow[ltO_kTdpQamO`lKXdIWbBR_@P]?O\>Q^:NZ;N[;KX7GT3DP1AN7GS9IV3CP5FR0=K.:F1;E")35;@JOR"'*"''46-/ $"!=:Xurs‚~rŒ†ZŠ‚:€u^¯¤o¸±M~zg„…y”¨oˆœNfx?VfAXhF\nf~’€˜¬t”©~—«q‰›f€=\k/M^(=R!.E1HRAWi©Â݉§À}ž²£³ž³”®ÉœÀÓ„¥¸­ÀŠ£²^s‚3FS7IT3FM9RhE^rIdyPm‚ZyŽkŠ¡{–®{—¯¡µ‡¦¾ƒ¡º®Ç‡¥¾Š©À{š¯~ž±|–«fƒ“?Yj2K[6M]3HW1FU4GS4ER6GT7IT6FR8IR1DK6FM;KR;KR=MT7HN?LT>KS<IQ=JS@KS?JR9FN9FN<IQ5AKCR[=LTCRZdt€]myu…‘Wfs^nzK[gAP]HXdGWcBQ]JZgAQ^:KX:KW8HX9IY:IY7FV8GW6EU2AQ5DT0?O0@P,7H%.='0;%,8>CEJM&)- #(-/527:48;7>A!!"1-&FAc‡r™—sŽ‡•šsŽ¢uŽ¢^vˆRiyj‘p†˜y’¦ƒš®{™¬ˆ¡µŒ¢´x’¢:Zi0N_(=R!-C4>1GYœ¶Ðy˜±w™¬{¬†¥º©Ä›ÁÔˆ©½«ÉÜn‡–ZlyJ\g:KT/AG5K_C[mFavKjSr‰j‡¡r‘©u«v–ªƒ¢¹ƒ¡º”²Ë«Ä…¤»‰¨½ ²w•¨l†›<Xi4N]4M^1GV/EP.EQ9IV7HU<LW8GT5FO>NU9IN=MS<LR<LR9JP@NT=KQ>MS>JP:FL6CL8DM7HO<LSGU_7HQVfr[jwGZdj|‡CU`PbmDVaAS^GYdAS^7IT7IT9JW4ER6FR6EV9HX8GW5DT7FV3BR8GW5DT5DT2AQ0@P-5F$+:"+5%-+2527:69= #$(-25-25!$) "###$ )>;;<DG"47%9?qŒ oˆœj‚”uŒœwŠ›ezŒv‹ |”§k‰|–§–¨m†–:Zi6Rc&<N ,C3<EZm¨Ã¬Åw™¬€¢±Œ«Á·ÒŸÆÙŽ¯Ã‘¯Àc{‹Wiv?PX+=D*9?8M`6P`Nk|Gh{UuŒq©y–±{”´s“¦z™°‡¥¾˜¶ÏŸ¸‡¦½‡¦»€¡³…£µs¡=Yj1K[8Qa5L[4JU0GS8HU2BO9HU5FO&7A<LSBRX4DJ:IO;KQ=KQ>LR9GM9EJ/;A5AG7EJ=MT?OUAR[WgpZlwM_jXjuQaoM]kJ\gFXcAS^>P[:LW<MX;PZ6JU<P]2CO6EU8GW<GY4?Q5DT3BR6EU4CS2AQ2AQ1@P,=L+0D!'7(2$';EH!$$ #+-(*  %&/12!%53,;=..7WLY† °l†—q‹›d}‘rŠžq‰Ÿu¥w’§|š«z–§g‘jƒ“G^m;P^1CP-@M0HX¥¾Î·È®ˆ¦¹­ÀŠ«¿”·Ë›¼ÏŸ²„ž³s‹PetAR^:KS:JQ3DR4GVRg|Nfgšz–®n‹ v•§{š´ŸµŒ¬Ã¦ÆÝ‘°Ç|›¯†¥ºv•ªq¥e…˜>\o=Wf7Q_;Q]6JU7HS1FQ4HT6KS9KS7IP6FM;IO>IO:PR7LM:MU3EM1AN%7@=KU;KQ?QX:LSWip[msQbkRclVgpPajCV^J]e@S[<OV=OZ@R]7IS:KW4DT;K[:JZ7GW5EU9IY8HX3CS4DT2BR1AQ9HX1@P.=M.>N.;K$/='4#,!&!%/45#"#(' .,,&!"+"O93D($gRQqgj~„r£j…™rŒ¡nˆw’§mˆ~˜°v¨|›«€›¬i…–^xˆOhx@WgCWfMap‡¡²›µÆ‰¥¶›¯™¸Ê’²Ç•´É›½Ð•¶É‚¢µ~š«azŠEZi6FSARZ8GP/BM/CRJ_u\ty•¯s§u”©w•§~·‚£¹°Ç¦Æ݈§¾~²~²r‘¦†¥º{œ¯:Xk5N^9Tb:O[9MW3GR4FQ7IT9LT9MU6IO9IP<JO;GM9IK<JP1>F:FP1>J@LX?KULWbSfm\nuQcjQcjL]fHYbK\eFW`GZb>QY:MT>P[7IT:LW6GT7HT6FV9IY8HX6FV7GW8HX7GW7GW3CS3CS1AQ3BR/>N,<L3@P,9I$/=%3!*#!"022###  $3';.(60-#'&|›´ž·z™²‡¥¾~œ´€š´{–°z•¯‰§ºu“¦[vŠrŒNhy@Xj™²Áƒ›«‡¥¸®Á’¯ÄŠ©¾”³È’±È—¶Í˜¸ÎŒ­À‰©¼«¼z“£6JY9KU4EM5DL6GS,<L8Oa‡Ÿ¸›µˆ§¾‚¡¶¡´{š´°Ç¢ÂÙ©Éà‹ªÁx—¬‰¨½x—¬€Ÿ´a”:Xk=Wg:Sc;Qa4JU6HV3EP6IP7HQ8GP9HQ:GN;IQ<GO<FM6?H5>G19FAJWZbp\fpfnyNahFX_GY_@QZHYbEV_;LTFUbDW_:MT;MX5GR:LV3CQ3DQ4FR3CT5EU4DT3CS6FV6FV5EU4DT1BR/?O/>N.=M-<L0=M0=M*7H&1?$1%!&) &((!##% "LFHQMI]]T$) #.'CSL)%‹°Ì†§Ä‰«Ç„¥¿…£¾}šµ’°É®Ç”±Å–³Ç­Âv”§g•–±ÅrŒ «¾”¶Íœ¾Õ‹ªÁ“³É•´Ê•´Ë•¯É¨ÂŠ«Â ¿Ô¬¼tŽœVlwVhs7GS<JV2CL5FS3Eœ´Ë‰¥¿‰§Àˆ§½‹ª¾‡¦Àœ¼Ó¦ÆÝŸÀ×®Å{š¯|›°w–«~ž±a‚•YwŠ6RcA[k9P_:Q`5KW5HO7HQ8GP7CM@LV:EO:FP:EP2<C:FP6BNlv…¥±À„‘ˆ™¡WgqJ\cBT[HYb6GP?QY;KW;KW<KX9MT3EP>P[2DO6GT2CP6GT3EQ3CS3CS4DT7GW4DT5EU3CS->N2AQ.=M0?O.=M.;K+8H2?O#1A"0*& &6<=%%% ebdLNLAIB&!)"&¦È‹±Ñ€£Äv˜¶„¤ÁŒªÅ…£¼{–°m‰¡s§Ws‹s’©–µÌ¬Â¯Æ‚¡¸¤¿„§Á…©Âž¿Ù“°Ëž»Ö¬Äœ¶‹«Â ¿Ó©¹l†”OdoDVa;KW8ER7FO/@N*>QuŽ¤‰¤¿‰§À†¦½“´È‡¦À›»ÒŸ¿Ö¡Áخņ¥ºŽ­Â†¥º„¥·mŠRq„@[l=Vh9Rb:Qa6M]:MS9JS5DM:FP:DM4@L3AM:JV?U\-AL·Êו§´Ÿ¶ÂmƒRhsLdkCT]HYb?PY>PX:JW<LX=MY9IU3EP9KV2DN.>L3DQ4ER4ER3CS3CS2BR3CS1AQ4DT6FV4DT/?O1@P2AQ.=M1>N0=M-;K2<M#,>(6"/#-$$)*  %!&XWY@ECCJE87.\RKgXRz¢Åj“´j°xœº€ ½t’­l‡¡t¨{—¯f…œo¦Œ«Ä‚¡º‹¬Æv—±yœ¶£Áa…£†§Ä}Ÿ¼‰©ÆŽ®ËªÅŒªÅ‘°É•´ÉŒ©·[t€Kak;MX9HT8ES4DJ2BO.CTBZq…¡»Œ«Ã’°ÊŒ®ÅŒ«Ä¤ÅÛ ÀׯƎ¬ÄŒ«Àt“¨n¢|¯v”§`~‘B]n=Wh:Te9Qa1K[4HO6IQ6DM2=J,8D0>JDVa9KX‘®¹”®¹›©LguwNfr=Va<W^9IR@QZ7HP?O[7GS8HT8HT3CP3EP1CN5FS1BO.?L3DP3CS1AQ5EU3CS3CS1AQ3CS4DT3CS/?O2AQ1AQ0=M/<L0=M/9J+5F$.@!,:&4$. %!!&'     475GHF>3/ub]B)%bŒ±h³q—¹vš¸q‘®v”­‚œ´v‘¦m‹¤pŽ§ ¹ƒ¥¿ˆ«Å}Ÿ¼~£¿{ ¼¤Åƒ¦Çv—¸†¨Æ„¦Ä}Ÿ¼Ž°Í€¢¿®ÇŽ­Â|˜§j…ŽE\d@RZ:JW6BS9FL/?L/AS0H^“®É†¥¾³Ë’´Ê®Ç¯Æ£ÃÚŸ¶‹ªÁ…¤¹z™®s’§{™«w•¨g†™<Xh=Yj;Uf8Rc2L^7NU4IQ+<D8COAO[;JWxŽšš²¾ˆ¥¯Rm|l†”F]mYn}7JW9KV=QX>NX:KT9JS7GS2BN:JU6FS9HV2EO.?L5FS1BO0AM1AQ1AQ1AQ2BR2BR2BR2BR1AQ3CS4DT3CS2AQ0=M0=M/<L0:K1;L)3D(2C#.<)6$."'$), ! !#() -!" &'%&$$ /(%$OD=k•ºy¡Ä‹±Ó€¤Â‰§Â’®Æ‘«À•¬Ã‹©Â‚ ¹­È°Ê¯Í²Î{¡¿ƒ©Ç…¤È{›¾r“´o“´„¨Å„¨ÆgŒ¨|¡½†£¾¯Æœªw’œE\dCV]7FT>K[9FM3CP*<M$<R–²Ì€ž¹Œ¯Æ‹­Åˆ§À¢¸¡¸Œ¬Ã€ž¶{š¯|›°s’§r£m‹žk‰œ>Ym=Yj:Te8Rc6Pb1KQ/FO9IR>KX…“Ÿœ­º}–¢^x†[vƒf}ŒOct:L]BQbAN\;GSDMW;MV5GO1AM5EQ5EQ5ER9IV3BO1BO/@M3DQ/@L3CS/?O0@P2BR0@P0@P2BR3CS0@P1AQ1AQ1AQ,9I0=M1>N'4D+5F1;L'1B'1C"-;!*7$.$*&+/&*+"'((,-".+%-,#"%$#!!,+'/+*=98%-&- \ No newline at end of file diff --git a/vc/src/hello_pi/hello_triangle/Gaudi_128_128.raw b/vc/src/hello_pi/hello_triangle/Gaudi_128_128.raw Binary files differ. diff --git a/vc/src/hello_pi/hello_triangle/Lucca_128_128.raw b/vc/src/hello_pi/hello_triangle/Lucca_128_128.raw Binary files differ. diff --git a/vc/src/hello_pi/hello_triangle/Makefile b/vc/src/hello_pi/hello_triangle/Makefile @@ -1,5 +0,0 @@ -OBJS=triangle.o -BIN=hello_triangle.bin - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_triangle/cube_texture_and_coords.h b/vc/src/hello_pi/hello_triangle/cube_texture_and_coords.h @@ -1,100 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Spatial coordinates for the cube - -static const GLbyte quadx[6*4*3] = { - /* FRONT */ - -10, -10, 10, - 10, -10, 10, - -10, 10, 10, - 10, 10, 10, - - /* BACK */ - -10, -10, -10, - -10, 10, -10, - 10, -10, -10, - 10, 10, -10, - - /* LEFT */ - -10, -10, 10, - -10, 10, 10, - -10, -10, -10, - -10, 10, -10, - - /* RIGHT */ - 10, -10, -10, - 10, 10, -10, - 10, -10, 10, - 10, 10, 10, - - /* TOP */ - -10, 10, 10, - 10, 10, 10, - -10, 10, -10, - 10, 10, -10, - - /* BOTTOM */ - -10, -10, 10, - -10, -10, -10, - 10, -10, 10, - 10, -10, -10, -}; - -/** Texture coordinates for the quad. */ -static const GLfloat texCoords[6 * 4 * 2] = { - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f -}; - diff --git a/vc/src/hello_pi/hello_triangle/hello_triangle.bin b/vc/src/hello_pi/hello_triangle/hello_triangle.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_triangle/triangle.c b/vc/src/hello_pi/hello_triangle/triangle.c @@ -1,540 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// A rotating cube rendered with OpenGL|ES. Three images used as textures on the cube faces. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" - -#include "GLES/gl.h" -#include "EGL/egl.h" -#include "EGL/eglext.h" - -#include "cube_texture_and_coords.h" - -#define PATH "./" - -#define IMAGE_SIZE 128 - -#ifndef M_PI - #define M_PI 3.141592654 -#endif - - -typedef struct -{ - uint32_t screen_width; - uint32_t screen_height; -// OpenGL|ES objects - EGLDisplay display; - EGLSurface surface; - EGLContext context; - GLuint tex[6]; -// model rotation vector and direction - GLfloat rot_angle_x_inc; - GLfloat rot_angle_y_inc; - GLfloat rot_angle_z_inc; -// current model rotation angles - GLfloat rot_angle_x; - GLfloat rot_angle_y; - GLfloat rot_angle_z; -// current distance from camera - GLfloat distance; - GLfloat distance_inc; -// pointers to texture buffers - char *tex_buf1; - char *tex_buf2; - char *tex_buf3; -} CUBE_STATE_T; - -static void init_ogl(CUBE_STATE_T *state); -static void init_model_proj(CUBE_STATE_T *state); -static void reset_model(CUBE_STATE_T *state); -static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc); -static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc); -static void redraw_scene(CUBE_STATE_T *state); -static void update_model(CUBE_STATE_T *state); -static void init_textures(CUBE_STATE_T *state); -static void load_tex_images(CUBE_STATE_T *state); -static void exit_func(void); -static volatile int terminate; -static CUBE_STATE_T _state, *state=&_state; - - -/*********************************************************** - * Name: init_ogl - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Sets the display, OpenGL|ES context and screen stuff - * - * Returns: void - * - ***********************************************************/ -static void init_ogl(CUBE_STATE_T *state) -{ - int32_t success = 0; - EGLBoolean result; - EGLint num_config; - - static EGL_DISPMANX_WINDOW_T nativewindow; - - DISPMANX_ELEMENT_HANDLE_T dispman_element; - DISPMANX_DISPLAY_HANDLE_T dispman_display; - DISPMANX_UPDATE_HANDLE_T dispman_update; - VC_RECT_T dst_rect; - VC_RECT_T src_rect; - - static const EGLint attribute_list[] = - { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_NONE - }; - - EGLConfig config; - - // get an EGL display connection - state->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); - assert(state->display!=EGL_NO_DISPLAY); - - // initialize the EGL display connection - result = eglInitialize(state->display, NULL, NULL); - assert(EGL_FALSE != result); - - // get an appropriate EGL frame buffer configuration - result = eglChooseConfig(state->display, attribute_list, &config, 1, &num_config); - assert(EGL_FALSE != result); - - // create an EGL rendering context - state->context = eglCreateContext(state->display, config, EGL_NO_CONTEXT, NULL); - assert(state->context!=EGL_NO_CONTEXT); - - // create an EGL window surface - success = graphics_get_display_size(0 /* LCD */, &state->screen_width, &state->screen_height); - assert( success >= 0 ); - - dst_rect.x = 0; - dst_rect.y = 0; - dst_rect.width = state->screen_width; - dst_rect.height = state->screen_height; - - src_rect.x = 0; - src_rect.y = 0; - src_rect.width = state->screen_width << 16; - src_rect.height = state->screen_height << 16; - - dispman_display = vc_dispmanx_display_open( 0 /* LCD */); - dispman_update = vc_dispmanx_update_start( 0 ); - - dispman_element = vc_dispmanx_element_add ( dispman_update, dispman_display, - 0/*layer*/, &dst_rect, 0/*src*/, - &src_rect, DISPMANX_PROTECTION_NONE, 0 /*alpha*/, 0/*clamp*/, 0/*transform*/); - - nativewindow.element = dispman_element; - nativewindow.width = state->screen_width; - nativewindow.height = state->screen_height; - vc_dispmanx_update_submit_sync( dispman_update ); - - state->surface = eglCreateWindowSurface( state->display, config, &nativewindow, NULL ); - assert(state->surface != EGL_NO_SURFACE); - - // connect the context to the surface - result = eglMakeCurrent(state->display, state->surface, state->surface, state->context); - assert(EGL_FALSE != result); - - // Set background color and clear buffers - glClearColor(0.15f, 0.25f, 0.35f, 1.0f); - - // Enable back face culling. - glEnable(GL_CULL_FACE); - - glMatrixMode(GL_MODELVIEW); -} - -/*********************************************************** - * Name: init_model_proj - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Sets the OpenGL|ES model to default values - * - * Returns: void - * - ***********************************************************/ -static void init_model_proj(CUBE_STATE_T *state) -{ - float nearp = 1.0f; - float farp = 500.0f; - float hht; - float hwd; - - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); - - glViewport(0, 0, (GLsizei)state->screen_width, (GLsizei)state->screen_height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - hht = nearp * (float)tan(45.0 / 2.0 / 180.0 * M_PI); - hwd = hht * (float)state->screen_width / (float)state->screen_height; - - glFrustumf(-hwd, hwd, -hht, hht, nearp, farp); - - glEnableClientState( GL_VERTEX_ARRAY ); - glVertexPointer( 3, GL_BYTE, 0, quadx ); - - reset_model(state); -} - -/*********************************************************** - * Name: reset_model - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Resets the Model projection and rotation direction - * - * Returns: void - * - ***********************************************************/ -static void reset_model(CUBE_STATE_T *state) -{ - // reset model position - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.f, 0.f, -50.f); - - // reset model rotation - state->rot_angle_x = 45.f; state->rot_angle_y = 30.f; state->rot_angle_z = 0.f; - state->rot_angle_x_inc = 0.5f; state->rot_angle_y_inc = 0.5f; state->rot_angle_z_inc = 0.f; - state->distance = 40.f; -} - -/*********************************************************** - * Name: update_model - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Updates model projection to current position/rotation - * - * Returns: void - * - ***********************************************************/ -static void update_model(CUBE_STATE_T *state) -{ - // update position - state->rot_angle_x = inc_and_wrap_angle(state->rot_angle_x, state->rot_angle_x_inc); - state->rot_angle_y = inc_and_wrap_angle(state->rot_angle_y, state->rot_angle_y_inc); - state->rot_angle_z = inc_and_wrap_angle(state->rot_angle_z, state->rot_angle_z_inc); - state->distance = inc_and_clip_distance(state->distance, state->distance_inc); - - glLoadIdentity(); - // move camera back to see the cube - glTranslatef(0.f, 0.f, -state->distance); - - // Rotate model to new position - glRotatef(state->rot_angle_x, 1.f, 0.f, 0.f); - glRotatef(state->rot_angle_y, 0.f, 1.f, 0.f); - glRotatef(state->rot_angle_z, 0.f, 0.f, 1.f); -} - -/*********************************************************** - * Name: inc_and_wrap_angle - * - * Arguments: - * GLfloat angle current angle - * GLfloat angle_inc angle increment - * - * Description: Increments or decrements angle by angle_inc degrees - * Wraps to 0 at 360 deg. - * - * Returns: new value of angle - * - ***********************************************************/ -static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc) -{ - angle += angle_inc; - - if (angle >= 360.0) - angle -= 360.f; - else if (angle <=0) - angle += 360.f; - - return angle; -} - -/*********************************************************** - * Name: inc_and_clip_distance - * - * Arguments: - * GLfloat distance current distance - * GLfloat distance_inc distance increment - * - * Description: Increments or decrements distance by distance_inc units - * Clips to range - * - * Returns: new value of angle - * - ***********************************************************/ -static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc) -{ - distance += distance_inc; - - if (distance >= 120.0f) - distance = 120.f; - else if (distance <= 40.0f) - distance = 40.0f; - - return distance; -} - -/*********************************************************** - * Name: redraw_scene - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Draws the model and calls eglSwapBuffers - * to render to screen - * - * Returns: void - * - ***********************************************************/ -static void redraw_scene(CUBE_STATE_T *state) -{ - // Start with a clear screen - glClear( GL_COLOR_BUFFER_BIT ); - - // Draw first (front) face: - // Bind texture surface to current vertices - glBindTexture(GL_TEXTURE_2D, state->tex[0]); - - // Need to rotate textures - do this by rotating each cube face - glRotatef(270.f, 0.f, 0.f, 1.f ); // front face normal along z axis - - // draw first 4 vertices - glDrawArrays( GL_TRIANGLE_STRIP, 0, 4); - - // same pattern for other 5 faces - rotation chosen to make image orientation 'nice' - glBindTexture(GL_TEXTURE_2D, state->tex[1]); - glRotatef(90.f, 0.f, 0.f, 1.f ); // back face normal along z axis - glDrawArrays( GL_TRIANGLE_STRIP, 4, 4); - - glBindTexture(GL_TEXTURE_2D, state->tex[2]); - glRotatef(90.f, 1.f, 0.f, 0.f ); // left face normal along x axis - glDrawArrays( GL_TRIANGLE_STRIP, 8, 4); - - glBindTexture(GL_TEXTURE_2D, state->tex[3]); - glRotatef(90.f, 1.f, 0.f, 0.f ); // right face normal along x axis - glDrawArrays( GL_TRIANGLE_STRIP, 12, 4); - - glBindTexture(GL_TEXTURE_2D, state->tex[4]); - glRotatef(270.f, 0.f, 1.f, 0.f ); // top face normal along y axis - glDrawArrays( GL_TRIANGLE_STRIP, 16, 4); - - glBindTexture(GL_TEXTURE_2D, state->tex[5]); - glRotatef(90.f, 0.f, 1.f, 0.f ); // bottom face normal along y axis - glDrawArrays( GL_TRIANGLE_STRIP, 20, 4); - - eglSwapBuffers(state->display, state->surface); -} - -/*********************************************************** - * Name: init_textures - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Initialise OGL|ES texture surfaces to use image - * buffers - * - * Returns: void - * - ***********************************************************/ -static void init_textures(CUBE_STATE_T *state) -{ - // load three texture buffers but use them on six OGL|ES texture surfaces - load_tex_images(state); - glGenTextures(6, &state->tex[0]); - - // setup first texture - glBindTexture(GL_TEXTURE_2D, state->tex[0]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, - GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf1); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); - - // setup second texture - reuse first image - glBindTexture(GL_TEXTURE_2D, state->tex[1]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, - GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf1); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); - - // third texture - glBindTexture(GL_TEXTURE_2D, state->tex[2]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, - GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf2); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); - - // fourth texture - reuse second image - glBindTexture(GL_TEXTURE_2D, state->tex[3]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, - GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf2); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); - - //fifth texture - glBindTexture(GL_TEXTURE_2D, state->tex[4]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, - GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf3); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); - - // sixth texture - reuse third image - glBindTexture(GL_TEXTURE_2D, state->tex[5]); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, IMAGE_SIZE, IMAGE_SIZE, 0, - GL_RGB, GL_UNSIGNED_BYTE, state->tex_buf3); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, (GLfloat)GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, (GLfloat)GL_NEAREST); - - // setup overall texture environment - glTexCoordPointer(2, GL_FLOAT, 0, texCoords); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - glEnable(GL_TEXTURE_2D); -} - -/*********************************************************** - * Name: load_tex_images - * - * Arguments: - * void - * - * Description: Loads three raw images to use as textures on faces - * - * Returns: void - * - ***********************************************************/ -static void load_tex_images(CUBE_STATE_T *state) -{ - FILE *tex_file1 = NULL, *tex_file2=NULL, *tex_file3 = NULL; - int bytes_read, image_sz = IMAGE_SIZE*IMAGE_SIZE*3; - - state->tex_buf1 = malloc(image_sz); - state->tex_buf2 = malloc(image_sz); - state->tex_buf3 = malloc(image_sz); - - tex_file1 = fopen(PATH "Lucca_128_128.raw", "rb"); - if (tex_file1 && state->tex_buf1) - { - bytes_read=fread(state->tex_buf1, 1, image_sz, tex_file1); - assert(bytes_read == image_sz); // some problem with file? - fclose(tex_file1); - } - - tex_file2 = fopen(PATH "Djenne_128_128.raw", "rb"); - if (tex_file2 && state->tex_buf2) - { - bytes_read=fread(state->tex_buf2, 1, image_sz, tex_file2); - assert(bytes_read == image_sz); // some problem with file? - fclose(tex_file2); - } - - tex_file3 = fopen(PATH "Gaudi_128_128.raw", "rb"); - if (tex_file3 && state->tex_buf3) - { - bytes_read=fread(state->tex_buf3, 1, image_sz, tex_file3); - assert(bytes_read == image_sz); // some problem with file? - fclose(tex_file3); - } -} - -//------------------------------------------------------------------------------ - -static void exit_func(void) -// Function to be passed to atexit(). -{ - // clear screen - glClear( GL_COLOR_BUFFER_BIT ); - eglSwapBuffers(state->display, state->surface); - - // Release OpenGL resources - eglMakeCurrent( state->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); - eglDestroySurface( state->display, state->surface ); - eglDestroyContext( state->display, state->context ); - eglTerminate( state->display ); - - // release texture buffers - free(state->tex_buf1); - free(state->tex_buf2); - free(state->tex_buf3); - - printf("\ncube closed\n"); -} // exit_func() - -//============================================================================== - -int main () -{ - bcm_host_init(); - - // Clear application state - memset( state, 0, sizeof( *state ) ); - - // Start OGLES - init_ogl(state); - - // Setup the model world - init_model_proj(state); - - // initialise the OGLES texture(s) - init_textures(state); - - while (!terminate) - { - update_model(state); - redraw_scene(state); - } - exit_func(); - return 0; -} - diff --git a/vc/src/hello_pi/hello_triangle2/Makefile b/vc/src/hello_pi/hello_triangle2/Makefile @@ -1,5 +0,0 @@ -OBJS=triangle2.o -BIN=hello_triangle2.bin - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_triangle2/hello_triangle2.bin b/vc/src/hello_pi/hello_triangle2/hello_triangle2.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_triangle2/triangle2.c b/vc/src/hello_pi/hello_triangle2/triangle2.c @@ -1,509 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// OpenGL|ES 2 demo using shader to compute mandelbrot/julia sets -// Thanks to Peter de Rivas for original Python code - -#include <stdio.h> -#include <fcntl.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" - -#include "GLES2/gl2.h" -#include "EGL/egl.h" -#include "EGL/eglext.h" - -typedef struct -{ - uint32_t screen_width; - uint32_t screen_height; -// OpenGL|ES objects - EGLDisplay display; - EGLSurface surface; - EGLContext context; - - GLuint verbose; - GLuint vshader; - GLuint fshader; - GLuint mshader; - GLuint program; - GLuint program2; - GLuint tex_fb; - GLuint tex; - GLuint buf; -// julia attribs - GLuint unif_color, attr_vertex, unif_scale, unif_offset, unif_tex, unif_centre; -// mandelbrot attribs - GLuint attr_vertex2, unif_scale2, unif_offset2, unif_centre2; -} CUBE_STATE_T; - -static CUBE_STATE_T _state, *state=&_state; - -#define check() assert(glGetError() == 0) - -static void showlog(GLint shader) -{ - // Prints the compile log for a shader - char log[1024]; - glGetShaderInfoLog(shader,sizeof log,NULL,log); - printf("%d:shader:\n%s\n", shader, log); -} - -static void showprogramlog(GLint shader) -{ - // Prints the information log for a program object - char log[1024]; - glGetProgramInfoLog(shader,sizeof log,NULL,log); - printf("%d:program:\n%s\n", shader, log); -} - -/*********************************************************** - * Name: init_ogl - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Sets the display, OpenGL|ES context and screen stuff - * - * Returns: void - * - ***********************************************************/ -static void init_ogl(CUBE_STATE_T *state) -{ - int32_t success = 0; - EGLBoolean result; - EGLint num_config; - - static EGL_DISPMANX_WINDOW_T nativewindow; - - DISPMANX_ELEMENT_HANDLE_T dispman_element; - DISPMANX_DISPLAY_HANDLE_T dispman_display; - DISPMANX_UPDATE_HANDLE_T dispman_update; - VC_RECT_T dst_rect; - VC_RECT_T src_rect; - - static const EGLint attribute_list[] = - { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_NONE - }; - - static const EGLint context_attributes[] = - { - EGL_CONTEXT_CLIENT_VERSION, 2, - EGL_NONE - }; - EGLConfig config; - - // get an EGL display connection - state->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); - assert(state->display!=EGL_NO_DISPLAY); - check(); - - // initialize the EGL display connection - result = eglInitialize(state->display, NULL, NULL); - assert(EGL_FALSE != result); - check(); - - // get an appropriate EGL frame buffer configuration - result = eglChooseConfig(state->display, attribute_list, &config, 1, &num_config); - assert(EGL_FALSE != result); - check(); - - // get an appropriate EGL frame buffer configuration - result = eglBindAPI(EGL_OPENGL_ES_API); - assert(EGL_FALSE != result); - check(); - - // create an EGL rendering context - state->context = eglCreateContext(state->display, config, EGL_NO_CONTEXT, context_attributes); - assert(state->context!=EGL_NO_CONTEXT); - check(); - - // create an EGL window surface - success = graphics_get_display_size(0 /* LCD */, &state->screen_width, &state->screen_height); - assert( success >= 0 ); - - dst_rect.x = 0; - dst_rect.y = 0; - dst_rect.width = state->screen_width; - dst_rect.height = state->screen_height; - - src_rect.x = 0; - src_rect.y = 0; - src_rect.width = state->screen_width << 16; - src_rect.height = state->screen_height << 16; - - dispman_display = vc_dispmanx_display_open( 0 /* LCD */); - dispman_update = vc_dispmanx_update_start( 0 ); - - dispman_element = vc_dispmanx_element_add ( dispman_update, dispman_display, - 0/*layer*/, &dst_rect, 0/*src*/, - &src_rect, DISPMANX_PROTECTION_NONE, 0 /*alpha*/, 0/*clamp*/, 0/*transform*/); - - nativewindow.element = dispman_element; - nativewindow.width = state->screen_width; - nativewindow.height = state->screen_height; - vc_dispmanx_update_submit_sync( dispman_update ); - - check(); - - state->surface = eglCreateWindowSurface( state->display, config, &nativewindow, NULL ); - assert(state->surface != EGL_NO_SURFACE); - check(); - - // connect the context to the surface - result = eglMakeCurrent(state->display, state->surface, state->surface, state->context); - assert(EGL_FALSE != result); - check(); - - // Set background color and clear buffers - glClearColor(0.15f, 0.25f, 0.35f, 1.0f); - glClear( GL_COLOR_BUFFER_BIT ); - - check(); -} - - -static void init_shaders(CUBE_STATE_T *state) -{ - static const GLfloat vertex_data[] = { - -1.0,-1.0,1.0,1.0, - 1.0,-1.0,1.0,1.0, - 1.0,1.0,1.0,1.0, - -1.0,1.0,1.0,1.0 - }; - const GLchar *vshader_source = - "attribute vec4 vertex;" - "varying vec2 tcoord;" - "void main(void) {" - " vec4 pos = vertex;" - " gl_Position = pos;" - " tcoord = vertex.xy*0.5+0.5;" - "}"; - - //Mandelbrot - const GLchar *mandelbrot_fshader_source = -"uniform vec4 color;" -"uniform vec2 scale;" -"uniform vec2 centre;" -"varying vec2 tcoord;" -"void main(void) {" -" float intensity;" -" vec4 color2;" -" float cr=(gl_FragCoord.x-centre.x)*scale.x;" -" float ci=(gl_FragCoord.y-centre.y)*scale.y;" -" float ar=cr;" -" float ai=ci;" -" float tr,ti;" -" float col=0.0;" -" float p=0.0;" -" int i=0;" -" for(int i2=1;i2<16;i2++)" -" {" -" tr=ar*ar-ai*ai+cr;" -" ti=2.0*ar*ai+ci;" -" p=tr*tr+ti*ti;" -" ar=tr;" -" ai=ti;" -" if (p>16.0)" -" {" -" i=i2;" -" break;" -" }" -" }" -" color2 = vec4(float(i)*0.0625,0,0,1);" -" gl_FragColor = color2;" -"}"; - - // Julia - const GLchar *julia_fshader_source = -"uniform vec4 color;" -"uniform vec2 scale;" -"uniform vec2 centre;" -"uniform vec2 offset;" -"varying vec2 tcoord;" -"uniform sampler2D tex;" -"void main(void) {" -" float intensity;" -" vec4 color2;" -" float ar=(gl_FragCoord.x-centre.x)*scale.x;" -" float ai=(gl_FragCoord.y-centre.y)*scale.y;" -" float cr=(offset.x-centre.x)*scale.x;" -" float ci=(offset.y-centre.y)*scale.y;" -" float tr,ti;" -" float col=0.0;" -" float p=0.0;" -" int i=0;" -" vec2 t2;" -" t2.x=tcoord.x+(offset.x-centre.x)*(0.5/centre.y);" -" t2.y=tcoord.y+(offset.y-centre.y)*(0.5/centre.x);" -" for(int i2=1;i2<16;i2++)" -" {" -" tr=ar*ar-ai*ai+cr;" -" ti=2.0*ar*ai+ci;" -" p=tr*tr+ti*ti;" -" ar=tr;" -" ai=ti;" -" if (p>16.0)" -" {" -" i=i2;" -" break;" -" }" -" }" -" color2 = vec4(0,float(i)*0.0625,0,1);" -" color2 = color2+texture2D(tex,t2);" -" gl_FragColor = color2;" -"}"; - - state->vshader = glCreateShader(GL_VERTEX_SHADER); - glShaderSource(state->vshader, 1, &vshader_source, 0); - glCompileShader(state->vshader); - check(); - - if (state->verbose) - showlog(state->vshader); - - state->fshader = glCreateShader(GL_FRAGMENT_SHADER); - glShaderSource(state->fshader, 1, &julia_fshader_source, 0); - glCompileShader(state->fshader); - check(); - - if (state->verbose) - showlog(state->fshader); - - state->mshader = glCreateShader(GL_FRAGMENT_SHADER); - glShaderSource(state->mshader, 1, &mandelbrot_fshader_source, 0); - glCompileShader(state->mshader); - check(); - - if (state->verbose) - showlog(state->mshader); - - // julia - state->program = glCreateProgram(); - glAttachShader(state->program, state->vshader); - glAttachShader(state->program, state->fshader); - glLinkProgram(state->program); - check(); - - if (state->verbose) - showprogramlog(state->program); - - state->attr_vertex = glGetAttribLocation(state->program, "vertex"); - state->unif_color = glGetUniformLocation(state->program, "color"); - state->unif_scale = glGetUniformLocation(state->program, "scale"); - state->unif_offset = glGetUniformLocation(state->program, "offset"); - state->unif_tex = glGetUniformLocation(state->program, "tex"); - state->unif_centre = glGetUniformLocation(state->program, "centre"); - - // mandelbrot - state->program2 = glCreateProgram(); - glAttachShader(state->program2, state->vshader); - glAttachShader(state->program2, state->mshader); - glLinkProgram(state->program2); - check(); - - if (state->verbose) - showprogramlog(state->program2); - - state->attr_vertex2 = glGetAttribLocation(state->program2, "vertex"); - state->unif_scale2 = glGetUniformLocation(state->program2, "scale"); - state->unif_offset2 = glGetUniformLocation(state->program2, "offset"); - state->unif_centre2 = glGetUniformLocation(state->program2, "centre"); - check(); - - glClearColor ( 0.0, 1.0, 1.0, 1.0 ); - - glGenBuffers(1, &state->buf); - - check(); - - // Prepare a texture image - glGenTextures(1, &state->tex); - check(); - glBindTexture(GL_TEXTURE_2D,state->tex); - check(); - // glActiveTexture(0) - glTexImage2D(GL_TEXTURE_2D,0,GL_RGB,state->screen_width,state->screen_height,0,GL_RGB,GL_UNSIGNED_SHORT_5_6_5,0); - check(); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - check(); - // Prepare a framebuffer for rendering - glGenFramebuffers(1,&state->tex_fb); - check(); - glBindFramebuffer(GL_FRAMEBUFFER,state->tex_fb); - check(); - glFramebufferTexture2D(GL_FRAMEBUFFER,GL_COLOR_ATTACHMENT0,GL_TEXTURE_2D,state->tex,0); - check(); - glBindFramebuffer(GL_FRAMEBUFFER,0); - check(); - // Prepare viewport - glViewport ( 0, 0, state->screen_width, state->screen_height ); - check(); - - // Upload vertex data to a buffer - glBindBuffer(GL_ARRAY_BUFFER, state->buf); - glBufferData(GL_ARRAY_BUFFER, sizeof(vertex_data), - vertex_data, GL_STATIC_DRAW); - glVertexAttribPointer(state->attr_vertex, 4, GL_FLOAT, 0, 16, 0); - glEnableVertexAttribArray(state->attr_vertex); - check(); -} - - -static void draw_mandelbrot_to_texture(CUBE_STATE_T *state, GLfloat cx, GLfloat cy, GLfloat scale) -{ - // Draw the mandelbrot to a texture - glBindFramebuffer(GL_FRAMEBUFFER,state->tex_fb); - check(); - glBindBuffer(GL_ARRAY_BUFFER, state->buf); - - glUseProgram ( state->program2 ); - check(); - - glUniform2f(state->unif_scale2, scale, scale); - glUniform2f(state->unif_centre2, cx, cy); - check(); - glDrawArrays ( GL_TRIANGLE_FAN, 0, 4 ); - check(); - - glFlush(); - glFinish(); - check(); -} - -static void draw_triangles(CUBE_STATE_T *state, GLfloat cx, GLfloat cy, GLfloat scale, GLfloat x, GLfloat y) -{ - // Now render to the main frame buffer - glBindFramebuffer(GL_FRAMEBUFFER,0); - // Clear the background (not really necessary I suppose) - glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); - check(); - - glBindBuffer(GL_ARRAY_BUFFER, state->buf); - check(); - glUseProgram ( state->program ); - check(); - glBindTexture(GL_TEXTURE_2D,state->tex); - check(); - glUniform4f(state->unif_color, 0.5, 0.5, 0.8, 1.0); - glUniform2f(state->unif_scale, scale, scale); - glUniform2f(state->unif_offset, x, y); - glUniform2f(state->unif_centre, cx, cy); - glUniform1i(state->unif_tex, 0); // I don't really understand this part, perhaps it relates to active texture? - check(); - - glDrawArrays ( GL_TRIANGLE_FAN, 0, 4 ); - check(); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - - glFlush(); - glFinish(); - check(); - - eglSwapBuffers(state->display, state->surface); - check(); -} - -static int get_mouse(CUBE_STATE_T *state, int *outx, int *outy) -{ - static int fd = -1; - const int width=state->screen_width, height=state->screen_height; - static int x=800, y=400; - const int XSIGN = 1<<4, YSIGN = 1<<5; - if (fd<0) { - fd = open("/dev/input/mouse0",O_RDONLY|O_NONBLOCK); - } - if (fd>=0) { - struct {char buttons, dx, dy; } m; - while (1) { - int bytes = read(fd, &m, sizeof m); - if (bytes < (int)sizeof m) goto _exit; - if (m.buttons&8) { - break; // This bit should always be set - } - read(fd, &m, 1); // Try to sync up again - } - if (m.buttons&3) - return m.buttons&3; - x+=m.dx; - y+=m.dy; - if (m.buttons&XSIGN) - x-=256; - if (m.buttons&YSIGN) - y-=256; - if (x<0) x=0; - if (y<0) y=0; - if (x>width) x=width; - if (y>height) y=height; - } -_exit: - if (outx) *outx = x; - if (outy) *outy = y; - return 0; -} - -//============================================================================== - -int main () -{ - int terminate = 0; - GLfloat cx, cy; - bcm_host_init(); - - // Clear application state - memset( state, 0, sizeof( *state ) ); - - // Start OGLES - init_ogl(state); - init_shaders(state); - cx = state->screen_width/2; - cy = state->screen_height/2; - - draw_mandelbrot_to_texture(state, cx, cy, 0.003); - while (!terminate) - { - int x, y, b; - b = get_mouse(state, &x, &y); - if (b) break; - draw_triangles(state, cx, cy, 0.003, x, y); - } - return 0; -} - diff --git a/vc/src/hello_pi/hello_video/Makefile b/vc/src/hello_pi/hello_video/Makefile @@ -1,6 +0,0 @@ -OBJS=video.o -BIN=hello_video.bin -LDFLAGS+=-lilclient - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_video/README b/vc/src/hello_pi/hello_video/README @@ -1 +0,0 @@ -The video clip test.h264 is (c) copyright 2008, Blender Foundation / www.bigbuckbunny.org diff --git a/vc/src/hello_pi/hello_video/hello_video.bin b/vc/src/hello_pi/hello_video/hello_video.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_video/test.h264 b/vc/src/hello_pi/hello_video/test.h264 Binary files differ. diff --git a/vc/src/hello_pi/hello_video/video.c b/vc/src/hello_pi/hello_video/video.c @@ -1,222 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Video deocode demo using OpenMAX IL though the ilcient helper library - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "bcm_host.h" -#include "ilclient.h" - -static int video_decode_test(char *filename) -{ - OMX_VIDEO_PARAM_PORTFORMATTYPE format; - OMX_TIME_CONFIG_CLOCKSTATETYPE cstate; - COMPONENT_T *video_decode = NULL, *video_scheduler = NULL, *video_render = NULL, *clock = NULL; - COMPONENT_T *list[5]; - TUNNEL_T tunnel[4]; - ILCLIENT_T *client; - FILE *in; - int status = 0; - unsigned int data_len = 0; - - memset(list, 0, sizeof(list)); - memset(tunnel, 0, sizeof(tunnel)); - - if((in = fopen(filename, "rb")) == NULL) - return -2; - - if((client = ilclient_init()) == NULL) - { - fclose(in); - return -3; - } - - if(OMX_Init() != OMX_ErrorNone) - { - ilclient_destroy(client); - fclose(in); - return -4; - } - - // create video_decode - if(ilclient_create_component(client, &video_decode, "video_decode", ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_ENABLE_INPUT_BUFFERS) != 0) - status = -14; - list[0] = video_decode; - - // create video_render - if(status == 0 && ilclient_create_component(client, &video_render, "video_render", ILCLIENT_DISABLE_ALL_PORTS) != 0) - status = -14; - list[1] = video_render; - - // create clock - if(status == 0 && ilclient_create_component(client, &clock, "clock", ILCLIENT_DISABLE_ALL_PORTS) != 0) - status = -14; - list[2] = clock; - - memset(&cstate, 0, sizeof(cstate)); - cstate.nSize = sizeof(cstate); - cstate.nVersion.nVersion = OMX_VERSION; - cstate.eState = OMX_TIME_ClockStateWaitingForStartTime; - cstate.nWaitMask = 1; - if(clock != NULL && OMX_SetParameter(ILC_GET_HANDLE(clock), OMX_IndexConfigTimeClockState, &cstate) != OMX_ErrorNone) - status = -13; - - // create video_scheduler - if(status == 0 && ilclient_create_component(client, &video_scheduler, "video_scheduler", ILCLIENT_DISABLE_ALL_PORTS) != 0) - status = -14; - list[3] = video_scheduler; - - set_tunnel(tunnel, video_decode, 131, video_scheduler, 10); - set_tunnel(tunnel+1, video_scheduler, 11, video_render, 90); - set_tunnel(tunnel+2, clock, 80, video_scheduler, 12); - - // setup clock tunnel first - if(status == 0 && ilclient_setup_tunnel(tunnel+2, 0, 0) != 0) - status = -15; - else - ilclient_change_component_state(clock, OMX_StateExecuting); - - if(status == 0) - ilclient_change_component_state(video_decode, OMX_StateIdle); - - memset(&format, 0, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); - format.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE); - format.nVersion.nVersion = OMX_VERSION; - format.nPortIndex = 130; - format.eCompressionFormat = OMX_VIDEO_CodingAVC; - - if(status == 0 && - OMX_SetParameter(ILC_GET_HANDLE(video_decode), OMX_IndexParamVideoPortFormat, &format) == OMX_ErrorNone && - ilclient_enable_port_buffers(video_decode, 130, NULL, NULL, NULL) == 0) - { - OMX_BUFFERHEADERTYPE *buf; - int port_settings_changed = 0; - int first_packet = 1; - - ilclient_change_component_state(video_decode, OMX_StateExecuting); - - while((buf = ilclient_get_input_buffer(video_decode, 130, 1)) != NULL) - { - // feed data and wait until we get port settings changed - unsigned char *dest = buf->pBuffer; - - data_len += fread(dest, 1, buf->nAllocLen-data_len, in); - - if(port_settings_changed == 0 && - ((data_len > 0 && ilclient_remove_event(video_decode, OMX_EventPortSettingsChanged, 131, 0, 0, 1) == 0) || - (data_len == 0 && ilclient_wait_for_event(video_decode, OMX_EventPortSettingsChanged, 131, 0, 0, 1, - ILCLIENT_EVENT_ERROR | ILCLIENT_PARAMETER_CHANGED, 10000) == 0))) - { - port_settings_changed = 1; - - if(ilclient_setup_tunnel(tunnel, 0, 0) != 0) - { - status = -7; - break; - } - - ilclient_change_component_state(video_scheduler, OMX_StateExecuting); - - // now setup tunnel to video_render - if(ilclient_setup_tunnel(tunnel+1, 0, 1000) != 0) - { - status = -12; - break; - } - - ilclient_change_component_state(video_render, OMX_StateExecuting); - } - if(!data_len) - break; - - buf->nFilledLen = data_len; - data_len = 0; - - buf->nOffset = 0; - if(first_packet) - { - buf->nFlags = OMX_BUFFERFLAG_STARTTIME; - first_packet = 0; - } - else - buf->nFlags = OMX_BUFFERFLAG_TIME_UNKNOWN; - - if(OMX_EmptyThisBuffer(ILC_GET_HANDLE(video_decode), buf) != OMX_ErrorNone) - { - status = -6; - break; - } - } - - buf->nFilledLen = 0; - buf->nFlags = OMX_BUFFERFLAG_TIME_UNKNOWN | OMX_BUFFERFLAG_EOS; - - if(OMX_EmptyThisBuffer(ILC_GET_HANDLE(video_decode), buf) != OMX_ErrorNone) - status = -20; - - // wait for EOS from render - ilclient_wait_for_event(video_render, OMX_EventBufferFlag, 90, 0, OMX_BUFFERFLAG_EOS, 0, - ILCLIENT_BUFFER_FLAG_EOS, 10000); - - // need to flush the renderer to allow video_decode to disable its input port - ilclient_flush_tunnels(tunnel, 0); - - ilclient_disable_port_buffers(video_decode, 130, NULL, NULL, NULL); - } - - fclose(in); - - ilclient_disable_tunnel(tunnel); - ilclient_disable_tunnel(tunnel+1); - ilclient_disable_tunnel(tunnel+2); - ilclient_teardown_tunnels(tunnel); - - ilclient_state_transition(list, OMX_StateIdle); - ilclient_state_transition(list, OMX_StateLoaded); - - ilclient_cleanup_components(list); - - OMX_Deinit(); - - ilclient_destroy(client); - return status; -} - -int main (int argc, char **argv) -{ - if (argc < 2) { - printf("Usage: %s <filename>\n", argv[0]); - exit(1); - } - bcm_host_init(); - return video_decode_test(argv[1]); -} - - diff --git a/vc/src/hello_pi/hello_videocube/Makefile b/vc/src/hello_pi/hello_videocube/Makefile @@ -1,7 +0,0 @@ -OBJS=triangle.o video.o -BIN=hello_videocube.bin -LDFLAGS+=-lilclient - -include ../Makefile.include - - diff --git a/vc/src/hello_pi/hello_videocube/README.md b/vc/src/hello_pi/hello_videocube/README.md @@ -1,4 +0,0 @@ -hello_videocube -=============== - -Sample for Raspberry Pi that uses egl_render to display video on an animated cube.- \ No newline at end of file diff --git a/vc/src/hello_pi/hello_videocube/cube_texture_and_coords.h b/vc/src/hello_pi/hello_videocube/cube_texture_and_coords.h @@ -1,100 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Spatial coordinates for the cube - -static const GLbyte quadx[6*4*3] = { - /* FRONT */ - -10, -10, 10, - 10, -10, 10, - -10, 10, 10, - 10, 10, 10, - - /* BACK */ - -10, -10, -10, - -10, 10, -10, - 10, -10, -10, - 10, 10, -10, - - /* LEFT */ - -10, -10, 10, - -10, 10, 10, - -10, -10, -10, - -10, 10, -10, - - /* RIGHT */ - 10, -10, -10, - 10, 10, -10, - 10, -10, 10, - 10, 10, 10, - - /* TOP */ - -10, 10, 10, - 10, 10, 10, - -10, 10, -10, - 10, 10, -10, - - /* BOTTOM */ - -10, -10, 10, - -10, -10, -10, - 10, -10, 10, - 10, -10, -10, -}; - -/** Texture coordinates for the quad. */ -static const GLfloat texCoords[6 * 4 * 2] = { - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f, - - 0.f, 0.f, - 0.f, 1.f, - 1.f, 0.f, - 1.f, 1.f -}; - diff --git a/vc/src/hello_pi/hello_videocube/hello_videocube.bin b/vc/src/hello_pi/hello_videocube/hello_videocube.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_videocube/triangle.c b/vc/src/hello_pi/hello_videocube/triangle.c @@ -1,481 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -Copyright (c) 2012, OtherCrashOverride -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// A rotating cube rendered with OpenGL|ES. Three images used as textures on the cube faces. - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <math.h> -#include <assert.h> -#include <unistd.h> - -#include "bcm_host.h" - -#include "GLES/gl.h" -#include "EGL/egl.h" -#include "EGL/eglext.h" - -#include "cube_texture_and_coords.h" - -#include "triangle.h" -#include <pthread.h> - - -#define PATH "./" - -#define IMAGE_SIZE_WIDTH 1920 -#define IMAGE_SIZE_HEIGHT 1080 - -#ifndef M_PI - #define M_PI 3.141592654 -#endif - - -typedef struct -{ - uint32_t screen_width; - uint32_t screen_height; -// OpenGL|ES objects - EGLDisplay display; - EGLSurface surface; - EGLContext context; - GLuint tex; -// model rotation vector and direction - GLfloat rot_angle_x_inc; - GLfloat rot_angle_y_inc; - GLfloat rot_angle_z_inc; -// current model rotation angles - GLfloat rot_angle_x; - GLfloat rot_angle_y; - GLfloat rot_angle_z; -// current distance from camera - GLfloat distance; - GLfloat distance_inc; -} CUBE_STATE_T; - -static void init_ogl(CUBE_STATE_T *state); -static void init_model_proj(CUBE_STATE_T *state); -static void reset_model(CUBE_STATE_T *state); -static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc); -static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc); -static void redraw_scene(CUBE_STATE_T *state); -static void update_model(CUBE_STATE_T *state); -static void init_textures(CUBE_STATE_T *state); -static void exit_func(void); -static volatile int terminate; -static CUBE_STATE_T _state, *state=&_state; - -static void* eglImage = 0; -static pthread_t thread1; - - -/*********************************************************** - * Name: init_ogl - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Sets the display, OpenGL|ES context and screen stuff - * - * Returns: void - * - ***********************************************************/ -static void init_ogl(CUBE_STATE_T *state) -{ - int32_t success = 0; - EGLBoolean result; - EGLint num_config; - - static EGL_DISPMANX_WINDOW_T nativewindow; - - DISPMANX_ELEMENT_HANDLE_T dispman_element; - DISPMANX_DISPLAY_HANDLE_T dispman_display; - DISPMANX_UPDATE_HANDLE_T dispman_update; - VC_RECT_T dst_rect; - VC_RECT_T src_rect; - - static const EGLint attribute_list[] = - { - EGL_RED_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_BLUE_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_DEPTH_SIZE, 16, - //EGL_SAMPLES, 4, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_NONE - }; - - EGLConfig config; - - // get an EGL display connection - state->display = eglGetDisplay(EGL_DEFAULT_DISPLAY); - assert(state->display!=EGL_NO_DISPLAY); - - // initialize the EGL display connection - result = eglInitialize(state->display, NULL, NULL); - assert(EGL_FALSE != result); - - // get an appropriate EGL frame buffer configuration - // this uses a BRCM extension that gets the closest match, rather than standard which returns anything that matches - result = eglSaneChooseConfigBRCM(state->display, attribute_list, &config, 1, &num_config); - assert(EGL_FALSE != result); - - // create an EGL rendering context - state->context = eglCreateContext(state->display, config, EGL_NO_CONTEXT, NULL); - assert(state->context!=EGL_NO_CONTEXT); - - // create an EGL window surface - success = graphics_get_display_size(0 /* LCD */, &state->screen_width, &state->screen_height); - assert( success >= 0 ); - - dst_rect.x = 0; - dst_rect.y = 0; - dst_rect.width = state->screen_width; - dst_rect.height = state->screen_height; - - src_rect.x = 0; - src_rect.y = 0; - src_rect.width = state->screen_width << 16; - src_rect.height = state->screen_height << 16; - - dispman_display = vc_dispmanx_display_open( 0 /* LCD */); - dispman_update = vc_dispmanx_update_start( 0 ); - - dispman_element = vc_dispmanx_element_add ( dispman_update, dispman_display, - 0/*layer*/, &dst_rect, 0/*src*/, - &src_rect, DISPMANX_PROTECTION_NONE, 0 /*alpha*/, 0/*clamp*/, 0/*transform*/); - - nativewindow.element = dispman_element; - nativewindow.width = state->screen_width; - nativewindow.height = state->screen_height; - vc_dispmanx_update_submit_sync( dispman_update ); - - state->surface = eglCreateWindowSurface( state->display, config, &nativewindow, NULL ); - assert(state->surface != EGL_NO_SURFACE); - - // connect the context to the surface - result = eglMakeCurrent(state->display, state->surface, state->surface, state->context); - assert(EGL_FALSE != result); - - // Set background color and clear buffers - glClearColor(0.15f, 0.25f, 0.35f, 1.0f); - - // Enable back face culling. - glEnable(GL_CULL_FACE); - - glMatrixMode(GL_MODELVIEW); -} - -/*********************************************************** - * Name: init_model_proj - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Sets the OpenGL|ES model to default values - * - * Returns: void - * - ***********************************************************/ -static void init_model_proj(CUBE_STATE_T *state) -{ - float nearp = 1.0f; - float farp = 500.0f; - float hht; - float hwd; - - glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); - - glViewport(0, 0, (GLsizei)state->screen_width, (GLsizei)state->screen_height); - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - hht = nearp * (float)tan(45.0 / 2.0 / 180.0 * M_PI); - hwd = hht * (float)state->screen_width / (float)state->screen_height; - - glFrustumf(-hwd, hwd, -hht, hht, nearp, farp); - - glEnableClientState( GL_VERTEX_ARRAY ); - glVertexPointer( 3, GL_BYTE, 0, quadx ); - - reset_model(state); -} - -/*********************************************************** - * Name: reset_model - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Resets the Model projection and rotation direction - * - * Returns: void - * - ***********************************************************/ -static void reset_model(CUBE_STATE_T *state) -{ - // reset model position - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.f, 0.f, -50.f); - - // reset model rotation - state->rot_angle_x = 45.f; state->rot_angle_y = 30.f; state->rot_angle_z = 0.f; - state->rot_angle_x_inc = 0.5f; state->rot_angle_y_inc = 0.5f; state->rot_angle_z_inc = 0.f; - state->distance = 40.f; -} - -/*********************************************************** - * Name: update_model - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Updates model projection to current position/rotation - * - * Returns: void - * - ***********************************************************/ -static void update_model(CUBE_STATE_T *state) -{ - // update position - state->rot_angle_x = inc_and_wrap_angle(state->rot_angle_x, state->rot_angle_x_inc); - state->rot_angle_y = inc_and_wrap_angle(state->rot_angle_y, state->rot_angle_y_inc); - state->rot_angle_z = inc_and_wrap_angle(state->rot_angle_z, state->rot_angle_z_inc); - state->distance = inc_and_clip_distance(state->distance, state->distance_inc); - - glLoadIdentity(); - // move camera back to see the cube - glTranslatef(0.f, 0.f, -state->distance); - - // Rotate model to new position - glRotatef(state->rot_angle_x, 1.f, 0.f, 0.f); - glRotatef(state->rot_angle_y, 0.f, 1.f, 0.f); - glRotatef(state->rot_angle_z, 0.f, 0.f, 1.f); -} - -/*********************************************************** - * Name: inc_and_wrap_angle - * - * Arguments: - * GLfloat angle current angle - * GLfloat angle_inc angle increment - * - * Description: Increments or decrements angle by angle_inc degrees - * Wraps to 0 at 360 deg. - * - * Returns: new value of angle - * - ***********************************************************/ -static GLfloat inc_and_wrap_angle(GLfloat angle, GLfloat angle_inc) -{ - angle += angle_inc; - - if (angle >= 360.0) - angle -= 360.f; - else if (angle <=0) - angle += 360.f; - - return angle; -} - -/*********************************************************** - * Name: inc_and_clip_distance - * - * Arguments: - * GLfloat distance current distance - * GLfloat distance_inc distance increment - * - * Description: Increments or decrements distance by distance_inc units - * Clips to range - * - * Returns: new value of angle - * - ***********************************************************/ -static GLfloat inc_and_clip_distance(GLfloat distance, GLfloat distance_inc) -{ - distance += distance_inc; - - if (distance >= 120.0f) - distance = 120.f; - else if (distance <= 40.0f) - distance = 40.0f; - - return distance; -} - -/*********************************************************** - * Name: redraw_scene - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Draws the model and calls eglSwapBuffers - * to render to screen - * - * Returns: void - * - ***********************************************************/ -static void redraw_scene(CUBE_STATE_T *state) -{ - // Start with a clear screen - glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); - - // Need to rotate textures - do this by rotating each cube face - glRotatef(270.f, 0.f, 0.f, 1.f ); // front face normal along z axis - - // draw first 4 vertices - glDrawArrays( GL_TRIANGLE_STRIP, 0, 4); - - // same pattern for other 5 faces - rotation chosen to make image orientation 'nice' - glRotatef(90.f, 0.f, 0.f, 1.f ); // back face normal along z axis - glDrawArrays( GL_TRIANGLE_STRIP, 4, 4); - - glRotatef(90.f, 1.f, 0.f, 0.f ); // left face normal along x axis - glDrawArrays( GL_TRIANGLE_STRIP, 8, 4); - - glRotatef(90.f, 1.f, 0.f, 0.f ); // right face normal along x axis - glDrawArrays( GL_TRIANGLE_STRIP, 12, 4); - - glRotatef(270.f, 0.f, 1.f, 0.f ); // top face normal along y axis - glDrawArrays( GL_TRIANGLE_STRIP, 16, 4); - - glRotatef(90.f, 0.f, 1.f, 0.f ); // bottom face normal along y axis - glDrawArrays( GL_TRIANGLE_STRIP, 20, 4); - - eglSwapBuffers(state->display, state->surface); -} - -/*********************************************************** - * Name: init_textures - * - * Arguments: - * CUBE_STATE_T *state - holds OGLES model info - * - * Description: Initialise OGL|ES texture surfaces to use image - * buffers - * - * Returns: void - * - ***********************************************************/ -static void init_textures(CUBE_STATE_T *state) -{ - //// load three texture buffers but use them on six OGL|ES texture surfaces - glGenTextures(1, &state->tex); - - glBindTexture(GL_TEXTURE_2D, state->tex); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, IMAGE_SIZE_WIDTH, IMAGE_SIZE_HEIGHT, 0, - GL_RGBA, GL_UNSIGNED_BYTE, NULL); - - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - - /* Create EGL Image */ - eglImage = eglCreateImageKHR( - state->display, - state->context, - EGL_GL_TEXTURE_2D_KHR, - (EGLClientBuffer)state->tex, - 0); - - if (eglImage == EGL_NO_IMAGE_KHR) - { - printf("eglCreateImageKHR failed.\n"); - exit(1); - } - - // Start rendering - pthread_create(&thread1, NULL, video_decode_test, eglImage); - - // setup overall texture environment - glTexCoordPointer(2, GL_FLOAT, 0, texCoords); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - - glEnable(GL_TEXTURE_2D); - - // Bind texture surface to current vertices - glBindTexture(GL_TEXTURE_2D, state->tex); -} -//------------------------------------------------------------------------------ - -static void exit_func(void) -// Function to be passed to atexit(). -{ - if (eglImage != 0) - { - if (!eglDestroyImageKHR(state->display, (EGLImageKHR) eglImage)) - printf("eglDestroyImageKHR failed."); - } - - // clear screen - glClear( GL_COLOR_BUFFER_BIT ); - eglSwapBuffers(state->display, state->surface); - - // Release OpenGL resources - eglMakeCurrent( state->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT ); - eglDestroySurface( state->display, state->surface ); - eglDestroyContext( state->display, state->context ); - eglTerminate( state->display ); - - printf("\ncube closed\n"); -} // exit_func() - -//============================================================================== - -int main () -{ - bcm_host_init(); - printf("Note: ensure you have sufficient gpu_mem configured\n"); - - // Clear application state - memset( state, 0, sizeof( *state ) ); - - // Start OGLES - init_ogl(state); - - // Setup the model world - init_model_proj(state); - - // initialise the OGLES texture(s) - init_textures(state); - - while (!terminate) - { - update_model(state); - redraw_scene(state); - } - exit_func(); - return 0; -} - diff --git a/vc/src/hello_pi/hello_videocube/triangle.h b/vc/src/hello_pi/hello_videocube/triangle.h @@ -1,30 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ -#pragma once - - -void* video_decode_test(void* arg); diff --git a/vc/src/hello_pi/hello_videocube/video.c b/vc/src/hello_pi/hello_videocube/video.c @@ -1,266 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -Copyright (c) 2012, OtherCrashOverride -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Video decode demo using OpenMAX IL though the ilcient helper library - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "bcm_host.h" -#include "ilclient.h" - -static OMX_BUFFERHEADERTYPE* eglBuffer = NULL; -static COMPONENT_T* egl_render = NULL; - -static void* eglImage = 0; - -void my_fill_buffer_done(void* data, COMPONENT_T* comp) -{ - if (OMX_FillThisBuffer(ilclient_get_handle(egl_render), eglBuffer) != OMX_ErrorNone) - { - printf("OMX_FillThisBuffer failed in callback\n"); - exit(1); - } -} - - -// Modified function prototype to work with pthreads -void *video_decode_test(void* arg) -{ - const char* filename = "/opt/vc/src/hello_pi/hello_video/test.h264"; - eglImage = arg; - - if (eglImage == 0) - { - printf("eglImage is null.\n"); - exit(1); - } - - OMX_VIDEO_PARAM_PORTFORMATTYPE format; - OMX_TIME_CONFIG_CLOCKSTATETYPE cstate; - COMPONENT_T *video_decode = NULL, *video_scheduler = NULL, *clock = NULL; - COMPONENT_T *list[5]; - TUNNEL_T tunnel[4]; - ILCLIENT_T *client; - FILE *in; - int status = 0; - unsigned int data_len = 0; - - memset(list, 0, sizeof(list)); - memset(tunnel, 0, sizeof(tunnel)); - - if((in = fopen(filename, "rb")) == NULL) - return (void *)-2; - - if((client = ilclient_init()) == NULL) - { - fclose(in); - return (void *)-3; - } - - if(OMX_Init() != OMX_ErrorNone) - { - ilclient_destroy(client); - fclose(in); - return (void *)-4; - } - - // callback - ilclient_set_fill_buffer_done_callback(client, my_fill_buffer_done, 0); - - // create video_decode - if(ilclient_create_component(client, &video_decode, "video_decode", ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_ENABLE_INPUT_BUFFERS) != 0) - status = -14; - list[0] = video_decode; - - // create egl_render - if(status == 0 && ilclient_create_component(client, &egl_render, "egl_render", ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_ENABLE_OUTPUT_BUFFERS) != 0) - status = -14; - list[1] = egl_render; - - // create clock - if(status == 0 && ilclient_create_component(client, &clock, "clock", ILCLIENT_DISABLE_ALL_PORTS) != 0) - status = -14; - list[2] = clock; - - memset(&cstate, 0, sizeof(cstate)); - cstate.nSize = sizeof(cstate); - cstate.nVersion.nVersion = OMX_VERSION; - cstate.eState = OMX_TIME_ClockStateWaitingForStartTime; - cstate.nWaitMask = 1; - if(clock != NULL && OMX_SetParameter(ILC_GET_HANDLE(clock), OMX_IndexConfigTimeClockState, &cstate) != OMX_ErrorNone) - status = -13; - - // create video_scheduler - if(status == 0 && ilclient_create_component(client, &video_scheduler, "video_scheduler", ILCLIENT_DISABLE_ALL_PORTS) != 0) - status = -14; - list[3] = video_scheduler; - - set_tunnel(tunnel, video_decode, 131, video_scheduler, 10); - set_tunnel(tunnel+1, video_scheduler, 11, egl_render, 220); - set_tunnel(tunnel+2, clock, 80, video_scheduler, 12); - - // setup clock tunnel first - if(status == 0 && ilclient_setup_tunnel(tunnel+2, 0, 0) != 0) - status = -15; - else - ilclient_change_component_state(clock, OMX_StateExecuting); - - if(status == 0) - ilclient_change_component_state(video_decode, OMX_StateIdle); - - memset(&format, 0, sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE)); - format.nSize = sizeof(OMX_VIDEO_PARAM_PORTFORMATTYPE); - format.nVersion.nVersion = OMX_VERSION; - format.nPortIndex = 130; - format.eCompressionFormat = OMX_VIDEO_CodingAVC; - - if(status == 0 && - OMX_SetParameter(ILC_GET_HANDLE(video_decode), OMX_IndexParamVideoPortFormat, &format) == OMX_ErrorNone && - ilclient_enable_port_buffers(video_decode, 130, NULL, NULL, NULL) == 0) - { - OMX_BUFFERHEADERTYPE *buf; - int port_settings_changed = 0; - int first_packet = 1; - - ilclient_change_component_state(video_decode, OMX_StateExecuting); - - while((buf = ilclient_get_input_buffer(video_decode, 130, 1)) != NULL) - { - // feed data and wait until we get port settings changed - unsigned char *dest = buf->pBuffer; - - // loop if at end - if (feof(in)) - rewind(in); - - data_len += fread(dest, 1, buf->nAllocLen-data_len, in); - - if(port_settings_changed == 0 && - ((data_len > 0 && ilclient_remove_event(video_decode, OMX_EventPortSettingsChanged, 131, 0, 0, 1) == 0) || - (data_len == 0 && ilclient_wait_for_event(video_decode, OMX_EventPortSettingsChanged, 131, 0, 0, 1, - ILCLIENT_EVENT_ERROR | ILCLIENT_PARAMETER_CHANGED, 10000) == 0))) - { - port_settings_changed = 1; - - if(ilclient_setup_tunnel(tunnel, 0, 0) != 0) - { - status = -7; - break; - } - - ilclient_change_component_state(video_scheduler, OMX_StateExecuting); - - // now setup tunnel to egl_render - if(ilclient_setup_tunnel(tunnel+1, 0, 1000) != 0) - { - status = -12; - break; - } - - // Set egl_render to idle - ilclient_change_component_state(egl_render, OMX_StateIdle); - - // Enable the output port and tell egl_render to use the texture as a buffer - //ilclient_enable_port(egl_render, 221); THIS BLOCKS SO CANT BE USED - if (OMX_SendCommand(ILC_GET_HANDLE(egl_render), OMX_CommandPortEnable, 221, NULL) != OMX_ErrorNone) - { - printf("OMX_CommandPortEnable failed.\n"); - exit(1); - } - - if (OMX_UseEGLImage(ILC_GET_HANDLE(egl_render), &eglBuffer, 221, NULL, eglImage) != OMX_ErrorNone) - { - printf("OMX_UseEGLImage failed.\n"); - exit(1); - } - - // Set egl_render to executing - ilclient_change_component_state(egl_render, OMX_StateExecuting); - - - // Request egl_render to write data to the texture buffer - if(OMX_FillThisBuffer(ILC_GET_HANDLE(egl_render), eglBuffer) != OMX_ErrorNone) - { - printf("OMX_FillThisBuffer failed.\n"); - exit(1); - } - } - if(!data_len) - break; - - buf->nFilledLen = data_len; - data_len = 0; - - buf->nOffset = 0; - if(first_packet) - { - buf->nFlags = OMX_BUFFERFLAG_STARTTIME; - first_packet = 0; - } - else - buf->nFlags = OMX_BUFFERFLAG_TIME_UNKNOWN; - - if(OMX_EmptyThisBuffer(ILC_GET_HANDLE(video_decode), buf) != OMX_ErrorNone) - { - status = -6; - break; - } - } - - buf->nFilledLen = 0; - buf->nFlags = OMX_BUFFERFLAG_TIME_UNKNOWN | OMX_BUFFERFLAG_EOS; - - if(OMX_EmptyThisBuffer(ILC_GET_HANDLE(video_decode), buf) != OMX_ErrorNone) - status = -20; - - // need to flush the renderer to allow video_decode to disable its input port - ilclient_flush_tunnels(tunnel, 0); - - ilclient_disable_port_buffers(video_decode, 130, NULL, NULL, NULL); - } - - fclose(in); - - ilclient_disable_tunnel(tunnel); - ilclient_disable_tunnel(tunnel+1); - ilclient_disable_tunnel(tunnel+2); - ilclient_teardown_tunnels(tunnel); - - ilclient_state_transition(list, OMX_StateIdle); - ilclient_state_transition(list, OMX_StateLoaded); - - ilclient_cleanup_components(list); - - OMX_Deinit(); - - ilclient_destroy(client); - return (void *)status; -} - diff --git a/vc/src/hello_pi/hello_world/Makefile b/vc/src/hello_pi/hello_world/Makefile @@ -1,5 +0,0 @@ -OBJS=world.o -BIN=hello_world.bin - -include ../Makefile.include - diff --git a/vc/src/hello_pi/hello_world/hello_world.bin b/vc/src/hello_pi/hello_world/hello_world.bin Binary files differ. diff --git a/vc/src/hello_pi/hello_world/world.c b/vc/src/hello_pi/hello_world/world.c @@ -1,36 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Classic Hello World - -#include <stdio.h> - -int main(void) -{ - printf("Hello world!\n"); - return 0; -} diff --git a/vc/src/hello_pi/libs/ilclient/Makefile b/vc/src/hello_pi/libs/ilclient/Makefile @@ -1,5 +0,0 @@ -OBJS=ilclient.o ilcore.o -LIB=libilclient.a - -include ../../Makefile.include - diff --git a/vc/src/hello_pi/libs/ilclient/ilclient.c b/vc/src/hello_pi/libs/ilclient/ilclient.c @@ -1,1836 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * \file - * - * \brief This API defines helper functions for writing IL clients. - * - * This file defines an IL client side library. This is useful when - * writing IL clients, since there tends to be much repeated and - * common code across both single and multiple clients. This library - * seeks to remove that common code and abstract some of the - * interactions with components. There is a wrapper around a - * component and tunnel, and some operations can be done on lists of - * these. The callbacks from components are handled, and specific - * events can be checked or waited for. -*/ - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <ctype.h> -#include <assert.h> - -#include "interface/vcos/vcos.h" -#include "interface/vcos/vcos_logging.h" -#include "interface/vmcs_host/vchost.h" - -#include "IL/OMX_Broadcom.h" -#include "ilclient.h" - -#define VCOS_LOG_CATEGORY (&ilclient_log_category) - -#ifndef ILCLIENT_THREAD_DEFAULT_STACK_SIZE -#define ILCLIENT_THREAD_DEFAULT_STACK_SIZE (6<<10) -#endif - -static VCOS_LOG_CAT_T ilclient_log_category; - -/****************************************************************************** -Static data and types used only in this file. -******************************************************************************/ - -struct _ILEVENT_T { - OMX_EVENTTYPE eEvent; - OMX_U32 nData1; - OMX_U32 nData2; - OMX_PTR pEventData; - struct _ILEVENT_T *next; -}; - -#define NUM_EVENTS 100 -struct _ILCLIENT_T { - ILEVENT_T *event_list; - VCOS_SEMAPHORE_T event_sema; - ILEVENT_T event_rep[NUM_EVENTS]; - - ILCLIENT_CALLBACK_T port_settings_callback; - void *port_settings_callback_data; - ILCLIENT_CALLBACK_T eos_callback; - void *eos_callback_data; - ILCLIENT_CALLBACK_T error_callback; - void *error_callback_data; - ILCLIENT_BUFFER_CALLBACK_T fill_buffer_done_callback; - void *fill_buffer_done_callback_data; - ILCLIENT_BUFFER_CALLBACK_T empty_buffer_done_callback; - void *empty_buffer_done_callback_data; - ILCLIENT_CALLBACK_T configchanged_callback; - void *configchanged_callback_data; -}; - -struct _COMPONENT_T { - OMX_HANDLETYPE comp; - ILCLIENT_CREATE_FLAGS_T flags; - VCOS_SEMAPHORE_T sema; - VCOS_EVENT_FLAGS_T event; - struct _COMPONENT_T *related; - OMX_BUFFERHEADERTYPE *out_list; - OMX_BUFFERHEADERTYPE *in_list; - char name[32]; - char bufname[32]; - unsigned int error_mask; - unsigned int private; - ILEVENT_T *list; - ILCLIENT_T *client; -}; - -#define random_wait() -static char *states[] = {"Invalid", "Loaded", "Idle", "Executing", "Pause", "WaitingForResources"}; - -typedef enum { - ILCLIENT_ERROR_UNPOPULATED = 0x1, - ILCLIENT_ERROR_SAMESTATE = 0x2, - ILCLIENT_ERROR_BADPARAMETER = 0x4 -} ILERROR_MASK_T; - -/****************************************************************************** -Static functions. -******************************************************************************/ - -static OMX_ERRORTYPE ilclient_empty_buffer_done(OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); -static OMX_ERRORTYPE ilclient_empty_buffer_done_error(OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer); -static OMX_ERRORTYPE ilclient_fill_buffer_done(OMX_OUT OMX_HANDLETYPE hComponent, - OMX_OUT OMX_PTR pAppData, - OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); -static OMX_ERRORTYPE ilclient_fill_buffer_done_error(OMX_OUT OMX_HANDLETYPE hComponent, - OMX_OUT OMX_PTR pAppData, - OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer); -static OMX_ERRORTYPE ilclient_event_handler(OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_EVENTTYPE eEvent, - OMX_IN OMX_U32 nData1, - OMX_IN OMX_U32 nData2, - OMX_IN OMX_PTR pEventData); -static void ilclient_lock_events(ILCLIENT_T *st); -static void ilclient_unlock_events(ILCLIENT_T *st); - -/****************************************************************************** -Global functions -******************************************************************************/ - -/*********************************************************** - * Name: ilclient_init - * - * Description: Creates ilclient pointer - * - * Returns: pointer to client structure - ***********************************************************/ -ILCLIENT_T *ilclient_init() -{ - ILCLIENT_T *st = vcos_malloc(sizeof(ILCLIENT_T), "ilclient"); - int i; - - if (!st) - return NULL; - - vcos_log_set_level(VCOS_LOG_CATEGORY, VCOS_LOG_WARN); - vcos_log_register("ilclient", VCOS_LOG_CATEGORY); - - memset(st, 0, sizeof(ILCLIENT_T)); - - i = vcos_semaphore_create(&st->event_sema, "il:event", 1); - vc_assert(i == VCOS_SUCCESS); - - ilclient_lock_events(st); - st->event_list = NULL; - for (i=0; i<NUM_EVENTS; i++) - { - st->event_rep[i].eEvent = -1; // mark as unused - st->event_rep[i].next = st->event_list; - st->event_list = st->event_rep+i; - } - ilclient_unlock_events(st); - return st; -} - -/*********************************************************** - * Name: ilclient_destroy - * - * Description: frees client state - * - * Returns: void - ***********************************************************/ -void ilclient_destroy(ILCLIENT_T *st) -{ - vcos_semaphore_delete(&st->event_sema); - vcos_free(st); - vcos_log_unregister(VCOS_LOG_CATEGORY); -} - -/*********************************************************** - * Name: ilclient_set_port_settings_callback - * - * Description: sets the callback used when receiving port settings - * changed messages. The data field in the callback function will be - * the port index reporting the message. - * - * Returns: void - ***********************************************************/ -void ilclient_set_port_settings_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) -{ - st->port_settings_callback = func; - st->port_settings_callback_data = userdata; -} - -/*********************************************************** - * Name: ilclient_set_eos_callback - * - * Description: sets the callback used when receiving eos flags. The - * data parameter in the callback function will be the port index - * reporting an eos flag. - * - * Returns: void - ***********************************************************/ -void ilclient_set_eos_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) -{ - st->eos_callback = func; - st->eos_callback_data = userdata; -} - -/*********************************************************** - * Name: ilclient_set_error_callback - * - * Description: sets the callback used when receiving error events. - * The data parameter in the callback function will be the error code - * being reported. - * - * Returns: void - ***********************************************************/ -void ilclient_set_error_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) -{ - st->error_callback = func; - st->error_callback_data = userdata; -} - -/*********************************************************** - * Name: ilclient_set_fill_buffer_done_callback - * - * Description: sets the callback used when receiving - * fill_buffer_done event - * - * Returns: void - ***********************************************************/ -void ilclient_set_fill_buffer_done_callback(ILCLIENT_T *st, ILCLIENT_BUFFER_CALLBACK_T func, void *userdata) -{ - st->fill_buffer_done_callback = func; - st->fill_buffer_done_callback_data = userdata; -} - -/*********************************************************** - * Name: ilclient_set_empty_buffer_done_callback - * - * Description: sets the callback used when receiving - * empty_buffer_done event - * - * Returns: void - ***********************************************************/ -void ilclient_set_empty_buffer_done_callback(ILCLIENT_T *st, ILCLIENT_BUFFER_CALLBACK_T func, void *userdata) -{ - st->empty_buffer_done_callback = func; - st->empty_buffer_done_callback_data = userdata; -} - -/*********************************************************** - * Name: ilclient_set_configchanged_callback - * - * Description: sets the callback used when a config changed - * event is received - * - * Returns: void - ***********************************************************/ -void ilclient_set_configchanged_callback(ILCLIENT_T *st, ILCLIENT_CALLBACK_T func, void *userdata) -{ - st->configchanged_callback = func; - st->configchanged_callback_data = userdata; -} - -/*********************************************************** - * Name: ilclient_create_component - * - * Description: initialises a component state structure and creates - * the IL component. - * - * Returns: 0 on success, -1 on failure - ***********************************************************/ -int ilclient_create_component(ILCLIENT_T *client, COMPONENT_T **comp, char *name, - ILCLIENT_CREATE_FLAGS_T flags) -{ - OMX_CALLBACKTYPE callbacks; - OMX_ERRORTYPE error; - char component_name[128]; - int32_t status; - - *comp = vcos_malloc(sizeof(COMPONENT_T), "il:comp"); - if(!*comp) - return -1; - - memset(*comp, 0, sizeof(COMPONENT_T)); - -#define COMP_PREFIX "OMX.broadcom." - - status = vcos_event_flags_create(&(*comp)->event,"il:comp"); - vc_assert(status == VCOS_SUCCESS); - status = vcos_semaphore_create(&(*comp)->sema, "il:comp", 1); - vc_assert(status == VCOS_SUCCESS); - (*comp)->client = client; - - vcos_snprintf((*comp)->name, sizeof((*comp)->name), "cl:%s", name); - vcos_snprintf((*comp)->bufname, sizeof((*comp)->bufname), "cl:%s buffer", name); - vcos_snprintf(component_name, sizeof(component_name), "%s%s", COMP_PREFIX, name); - - (*comp)->flags = flags; - - callbacks.EventHandler = ilclient_event_handler; - callbacks.EmptyBufferDone = flags & ILCLIENT_ENABLE_INPUT_BUFFERS ? ilclient_empty_buffer_done : ilclient_empty_buffer_done_error; - callbacks.FillBufferDone = flags & ILCLIENT_ENABLE_OUTPUT_BUFFERS ? ilclient_fill_buffer_done : ilclient_fill_buffer_done_error; - - error = OMX_GetHandle(&(*comp)->comp, component_name, *comp, &callbacks); - - if (error == OMX_ErrorNone) - { - OMX_UUIDTYPE uid; - char name[128]; - OMX_VERSIONTYPE compVersion, specVersion; - - if(OMX_GetComponentVersion((*comp)->comp, name, &compVersion, &specVersion, &uid) == OMX_ErrorNone) - { - char *p = (char *) uid + strlen(COMP_PREFIX); - - vcos_snprintf((*comp)->name, sizeof((*comp)->name), "cl:%s", p); - (*comp)->name[sizeof((*comp)->name)-1] = 0; - vcos_snprintf((*comp)->bufname, sizeof((*comp)->bufname), "cl:%s buffer", p); - (*comp)->bufname[sizeof((*comp)->bufname)-1] = 0; - } - - if(flags & (ILCLIENT_DISABLE_ALL_PORTS | ILCLIENT_OUTPUT_ZERO_BUFFERS)) - { - OMX_PORT_PARAM_TYPE ports; - OMX_INDEXTYPE types[] = {OMX_IndexParamAudioInit, OMX_IndexParamVideoInit, OMX_IndexParamImageInit, OMX_IndexParamOtherInit}; - int i; - - ports.nSize = sizeof(OMX_PORT_PARAM_TYPE); - ports.nVersion.nVersion = OMX_VERSION; - - for(i=0; i<4; i++) - { - OMX_ERRORTYPE error = OMX_GetParameter((*comp)->comp, types[i], &ports); - if(error == OMX_ErrorNone) - { - uint32_t j; - for(j=0; j<ports.nPorts; j++) - { - if(flags & ILCLIENT_DISABLE_ALL_PORTS) - ilclient_disable_port(*comp, ports.nStartPortNumber+j); - - if(flags & ILCLIENT_OUTPUT_ZERO_BUFFERS) - { - OMX_PARAM_PORTDEFINITIONTYPE portdef; - portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = ports.nStartPortNumber+j; - if(OMX_GetParameter((*comp)->comp, OMX_IndexParamPortDefinition, &portdef) == OMX_ErrorNone) - { - if(portdef.eDir == OMX_DirOutput && portdef.nBufferCountActual > 0) - { - portdef.nBufferCountActual = 0; - OMX_SetParameter((*comp)->comp, OMX_IndexParamPortDefinition, &portdef); - } - } - } - } - } - } - } - return 0; - } - else - { - vcos_event_flags_delete(&(*comp)->event); - vcos_semaphore_delete(&(*comp)->sema); - vcos_free(*comp); - *comp = NULL; - return -1; - } -} - -/*********************************************************** - * Name: ilclient_remove_event - * - * Description: Removes an event from a component event list. ignore1 - * and ignore2 are flags indicating whether to not match on nData1 and - * nData2 respectively. - * - * Returns: 0 if the event was removed. -1 if no matching event was - * found. - ***********************************************************/ -int ilclient_remove_event(COMPONENT_T *st, OMX_EVENTTYPE eEvent, - OMX_U32 nData1, int ignore1, OMX_IN OMX_U32 nData2, int ignore2) -{ - ILEVENT_T *cur, *prev; - uint32_t set; - ilclient_lock_events(st->client); - - cur = st->list; - prev = NULL; - - while (cur && !(cur->eEvent == eEvent && (ignore1 || cur->nData1 == nData1) && (ignore2 || cur->nData2 == nData2))) - { - prev = cur; - cur = cur->next; - } - - if (cur == NULL) - { - ilclient_unlock_events(st->client); - return -1; - } - - if (prev == NULL) - st->list = cur->next; - else - prev->next = cur->next; - - // add back into spare list - cur->next = st->client->event_list; - st->client->event_list = cur; - cur->eEvent = -1; // mark as unused - - // if we're removing an OMX_EventError or OMX_EventParamOrConfigChanged event, then clear the error bit from the eventgroup, - // since the user might have been notified through the error callback, and then - // can't clear the event bit - this will then cause problems the next time they - // wait for an error. - if(eEvent == OMX_EventError) - vcos_event_flags_get(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); - else if(eEvent == OMX_EventParamOrConfigChanged) - vcos_event_flags_get(&st->event, ILCLIENT_CONFIG_CHANGED, VCOS_OR_CONSUME, 0, &set); - - ilclient_unlock_events(st->client); - return 0; -} - -/*********************************************************** - * Name: ilclient_state_transition - * - * Description: Transitions a null terminated list of IL components to - * a given state. All components are told to transition in a random - * order before any are checked for transition completion. - * - * Returns: void - ***********************************************************/ -void ilclient_state_transition(COMPONENT_T *list[], OMX_STATETYPE state) -{ - OMX_ERRORTYPE error; - int i, num; - uint32_t set; - - num=0; - while (list[num]) - num++; - - // if we transition the supplier port first, it will call freebuffer on the non - // supplier, which will correctly signal a port unpopulated error. We want to - // ignore these errors. - if (state == OMX_StateLoaded) - for (i=0; i<num; i++) - list[i]->error_mask |= ILCLIENT_ERROR_UNPOPULATED; - for (i=0; i<num; i++) - list[i]->private = ((rand() >> 13) & 0xff)+1; - - for (i=0; i<num; i++) - { - // transition the components in a random order - int j, min = -1; - for (j=0; j<num; j++) - if (list[j]->private && (min == -1 || list[min]->private > list[j]->private)) - min = j; - - list[min]->private = 0; - - random_wait(); - //Clear error event for this component - vcos_event_flags_get(&list[min]->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); - - error = OMX_SendCommand(list[min]->comp, OMX_CommandStateSet, state, NULL); - vc_assert(error == OMX_ErrorNone); - } - - random_wait(); - - for (i=0; i<num; i++) - if(ilclient_wait_for_command_complete(list[i], OMX_CommandStateSet, state) < 0) - vc_assert(0); - - if (state == OMX_StateLoaded) - for (i=0; i<num; i++) - list[i]->error_mask &= ~ILCLIENT_ERROR_UNPOPULATED; -} - -/*********************************************************** - * Name: ilclient_teardown_tunnels - * - * Description: tears down a null terminated list of tunnels. - * - * Returns: void - ***********************************************************/ -void ilclient_teardown_tunnels(TUNNEL_T *tunnel) -{ - int i; - OMX_ERRORTYPE error; - - i=0;; - while (tunnel[i].source) - { - error = OMX_SetupTunnel(tunnel[i].source->comp, tunnel[i].source_port, NULL, 0); - vc_assert(error == OMX_ErrorNone); - - error = OMX_SetupTunnel(tunnel[i].sink->comp, tunnel[i].sink_port, NULL, 0); - vc_assert(error == OMX_ErrorNone); - i++; - } -} - -/*********************************************************** - * Name: ilclient_disable_tunnel - * - * Description: disables a tunnel by disabling the ports. Allows - * ports to signal same state error if they were already disabled. - * - * Returns: void - ***********************************************************/ -void ilclient_disable_tunnel(TUNNEL_T *tunnel) -{ - OMX_ERRORTYPE error; - - if(tunnel->source == 0 || tunnel->sink == 0) - return; - - tunnel->source->error_mask |= ILCLIENT_ERROR_UNPOPULATED; - tunnel->sink->error_mask |= ILCLIENT_ERROR_UNPOPULATED; - - error = OMX_SendCommand(tunnel->source->comp, OMX_CommandPortDisable, tunnel->source_port, NULL); - vc_assert(error == OMX_ErrorNone); - - error = OMX_SendCommand(tunnel->sink->comp, OMX_CommandPortDisable, tunnel->sink_port, NULL); - vc_assert(error == OMX_ErrorNone); - - if(ilclient_wait_for_command_complete(tunnel->source, OMX_CommandPortDisable, tunnel->source_port) < 0) - vc_assert(0); - - if(ilclient_wait_for_command_complete(tunnel->sink, OMX_CommandPortDisable, tunnel->sink_port) < 0) - vc_assert(0); - - tunnel->source->error_mask &= ~ILCLIENT_ERROR_UNPOPULATED; - tunnel->sink->error_mask &= ~ILCLIENT_ERROR_UNPOPULATED; -} - -/*********************************************************** - * Name: ilclient_enable_tunnel - * - * Description: enables a tunnel by enabling the ports - * - * Returns: 0 on success, -1 on failure - ***********************************************************/ -int ilclient_enable_tunnel(TUNNEL_T *tunnel) -{ - OMX_STATETYPE state; - OMX_ERRORTYPE error; - - ilclient_debug_output("ilclient: enable tunnel from %x/%d to %x/%d", - tunnel->source, tunnel->source_port, - tunnel->sink, tunnel->sink_port); - - error = OMX_SendCommand(tunnel->source->comp, OMX_CommandPortEnable, tunnel->source_port, NULL); - vc_assert(error == OMX_ErrorNone); - - error = OMX_SendCommand(tunnel->sink->comp, OMX_CommandPortEnable, tunnel->sink_port, NULL); - vc_assert(error == OMX_ErrorNone); - - // to complete, the sink component can't be in loaded state - error = OMX_GetState(tunnel->sink->comp, &state); - vc_assert(error == OMX_ErrorNone); - if (state == OMX_StateLoaded) - { - int ret = 0; - - if(ilclient_wait_for_command_complete(tunnel->sink, OMX_CommandPortEnable, tunnel->sink_port) != 0 || - OMX_SendCommand(tunnel->sink->comp, OMX_CommandStateSet, OMX_StateIdle, NULL) != OMX_ErrorNone || - (ret = ilclient_wait_for_command_complete_dual(tunnel->sink, OMX_CommandStateSet, OMX_StateIdle, tunnel->source)) < 0) - { - if(ret == -2) - { - // the error was reported fom the source component: clear this error and disable the sink component - ilclient_wait_for_command_complete(tunnel->source, OMX_CommandPortEnable, tunnel->source_port); - ilclient_disable_port(tunnel->sink, tunnel->sink_port); - } - - ilclient_debug_output("ilclient: could not change component state to IDLE"); - ilclient_disable_port(tunnel->source, tunnel->source_port); - return -1; - } - } - else - { - if (ilclient_wait_for_command_complete(tunnel->sink, OMX_CommandPortEnable, tunnel->sink_port) != 0) - { - ilclient_debug_output("ilclient: could not change sink port %d to enabled", tunnel->sink_port); - - //Oops failed to enable the sink port - ilclient_disable_port(tunnel->source, tunnel->source_port); - //Clean up the port enable event from the source port. - ilclient_wait_for_event(tunnel->source, OMX_EventCmdComplete, - OMX_CommandPortEnable, 0, tunnel->source_port, 0, - ILCLIENT_PORT_ENABLED | ILCLIENT_EVENT_ERROR, VCOS_EVENT_FLAGS_SUSPEND); - return -1; - } - } - - if(ilclient_wait_for_command_complete(tunnel->source, OMX_CommandPortEnable, tunnel->source_port) != 0) - { - ilclient_debug_output("ilclient: could not change source port %d to enabled", tunnel->source_port); - - //Failed to enable the source port - ilclient_disable_port(tunnel->sink, tunnel->sink_port); - return -1; - } - - return 0; -} - - -/*********************************************************** - * Name: ilclient_flush_tunnels - * - * Description: flushes all ports used in a null terminated list of - * tunnels. max specifies the maximum number of tunnels to flush from - * the list, where max=0 means all tunnels. - * - * Returns: void - ***********************************************************/ -void ilclient_flush_tunnels(TUNNEL_T *tunnel, int max) -{ - OMX_ERRORTYPE error; - int i; - - i=0; - while (tunnel[i].source && (max == 0 || i < max)) - { - error = OMX_SendCommand(tunnel[i].source->comp, OMX_CommandFlush, tunnel[i].source_port, NULL); - vc_assert(error == OMX_ErrorNone); - - error = OMX_SendCommand(tunnel[i].sink->comp, OMX_CommandFlush, tunnel[i].sink_port, NULL); - vc_assert(error == OMX_ErrorNone); - - ilclient_wait_for_event(tunnel[i].source, OMX_EventCmdComplete, - OMX_CommandFlush, 0, tunnel[i].source_port, 0, - ILCLIENT_PORT_FLUSH, VCOS_EVENT_FLAGS_SUSPEND); - ilclient_wait_for_event(tunnel[i].sink, OMX_EventCmdComplete, - OMX_CommandFlush, 0, tunnel[i].sink_port, 0, - ILCLIENT_PORT_FLUSH, VCOS_EVENT_FLAGS_SUSPEND); - i++; - } -} - - -/*********************************************************** - * Name: ilclient_return_events - * - * Description: Returns all events from a component event list to the - * list of unused event structures. - * - * Returns: void - ***********************************************************/ -void ilclient_return_events(COMPONENT_T *comp) -{ - ilclient_lock_events(comp->client); - while (comp->list) - { - ILEVENT_T *next = comp->list->next; - comp->list->next = comp->client->event_list; - comp->client->event_list = comp->list; - comp->list = next; - } - ilclient_unlock_events(comp->client); -} - -/*********************************************************** - * Name: ilclient_cleanup_components - * - * Description: frees all components from a null terminated list and - * deletes resources used in component state structure. - * - * Returns: void - ***********************************************************/ -void ilclient_cleanup_components(COMPONENT_T *list[]) -{ - int i; - OMX_ERRORTYPE error; - - i=0; - while (list[i]) - { - ilclient_return_events(list[i]); - if (list[i]->comp) - { - error = OMX_FreeHandle(list[i]->comp); - - vc_assert(error == OMX_ErrorNone); - } - i++; - } - - i=0; - while (list[i]) - { - vcos_event_flags_delete(&list[i]->event); - vcos_semaphore_delete(&list[i]->sema); - vcos_free(list[i]); - list[i] = NULL; - i++; - } -} - -/*********************************************************** - * Name: ilclient_change_component_state - * - * Description: changes the state of a single component. Note: this - * may not be suitable if the component is tunnelled and requires - * connected components to also change state. - * - * Returns: 0 on success, -1 on failure (note - trying to change to - * the same state which causes a OMX_ErrorSameState is treated as - * success) - ***********************************************************/ -int ilclient_change_component_state(COMPONENT_T *comp, OMX_STATETYPE state) -{ - OMX_ERRORTYPE error; - error = OMX_SendCommand(comp->comp, OMX_CommandStateSet, state, NULL); - vc_assert(error == OMX_ErrorNone); - if(ilclient_wait_for_command_complete(comp, OMX_CommandStateSet, state) < 0) - { - ilclient_debug_output("ilclient: could not change component state to %d", state); - ilclient_remove_event(comp, OMX_EventError, 0, 1, 0, 1); - return -1; - } - return 0; -} - -/*********************************************************** - * Name: ilclient_disable_port - * - * Description: disables a port on a given component. - * - * Returns: void - ***********************************************************/ -void ilclient_disable_port(COMPONENT_T *comp, int portIndex) -{ - OMX_ERRORTYPE error; - error = OMX_SendCommand(comp->comp, OMX_CommandPortDisable, portIndex, NULL); - vc_assert(error == OMX_ErrorNone); - if(ilclient_wait_for_command_complete(comp, OMX_CommandPortDisable, portIndex) < 0) - vc_assert(0); -} - -/*********************************************************** - * Name: ilclient_enabled_port - * - * Description: enables a port on a given component. - * - * Returns: void - ***********************************************************/ -void ilclient_enable_port(COMPONENT_T *comp, int portIndex) -{ - OMX_ERRORTYPE error; - error = OMX_SendCommand(comp->comp, OMX_CommandPortEnable, portIndex, NULL); - vc_assert(error == OMX_ErrorNone); - if(ilclient_wait_for_command_complete(comp, OMX_CommandPortEnable, portIndex) < 0) - vc_assert(0); -} - - -/*********************************************************** - * Name: ilclient_enable_port_buffers - * - * Description: enables a port on a given component which requires - * buffers to be supplied by the client. - * - * Returns: void - ***********************************************************/ -int ilclient_enable_port_buffers(COMPONENT_T *comp, int portIndex, - ILCLIENT_MALLOC_T ilclient_malloc, - ILCLIENT_FREE_T ilclient_free, - void *private) -{ - OMX_ERRORTYPE error; - OMX_PARAM_PORTDEFINITIONTYPE portdef; - OMX_BUFFERHEADERTYPE *list = NULL, **end = &list; - OMX_STATETYPE state; - int i; - - memset(&portdef, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); - portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = portIndex; - - // work out buffer requirements, check port is in the right state - error = OMX_GetParameter(comp->comp, OMX_IndexParamPortDefinition, &portdef); - if(error != OMX_ErrorNone || portdef.bEnabled != OMX_FALSE || portdef.nBufferCountActual == 0 || portdef.nBufferSize == 0) - return -1; - - // check component is in the right state to accept buffers - error = OMX_GetState(comp->comp, &state); - if (error != OMX_ErrorNone || !(state == OMX_StateIdle || state == OMX_StateExecuting || state == OMX_StatePause)) - return -1; - - // send the command - error = OMX_SendCommand(comp->comp, OMX_CommandPortEnable, portIndex, NULL); - vc_assert(error == OMX_ErrorNone); - - for (i=0; i != portdef.nBufferCountActual; i++) - { - unsigned char *buf; - if(ilclient_malloc) - buf = ilclient_malloc(private, portdef.nBufferSize, portdef.nBufferAlignment, comp->bufname); - else - buf = vcos_malloc_aligned(portdef.nBufferSize, portdef.nBufferAlignment, comp->bufname); - - if(!buf) - break; - - error = OMX_UseBuffer(comp->comp, end, portIndex, NULL, portdef.nBufferSize, buf); - if(error != OMX_ErrorNone) - { - if(ilclient_free) - ilclient_free(private, buf); - else - vcos_free(buf); - - break; - } - end = (OMX_BUFFERHEADERTYPE **) &((*end)->pAppPrivate); - } - - // queue these buffers - vcos_semaphore_wait(&comp->sema); - - if(portdef.eDir == OMX_DirInput) - { - *end = comp->in_list; - comp->in_list = list; - } - else - { - *end = comp->out_list; - comp->out_list = list; - } - - vcos_semaphore_post(&comp->sema); - - if(i != portdef.nBufferCountActual || - ilclient_wait_for_command_complete(comp, OMX_CommandPortEnable, portIndex) < 0) - { - ilclient_disable_port_buffers(comp, portIndex, NULL, ilclient_free, private); - - // at this point the first command might have terminated with an error, which means that - // the port is disabled before the disable_port_buffers function is called, so we're left - // with the error bit set and an error event in the queue. Clear these now if they exist. - ilclient_remove_event(comp, OMX_EventError, 0, 1, 1, 0); - - return -1; - } - - // success - return 0; -} - - -/*********************************************************** - * Name: ilclient_disable_port_buffers - * - * Description: disables a port on a given component which has - * buffers supplied by the client. - * - * Returns: void - ***********************************************************/ -void ilclient_disable_port_buffers(COMPONENT_T *comp, int portIndex, - OMX_BUFFERHEADERTYPE *bufferList, - ILCLIENT_FREE_T ilclient_free, - void *private) -{ - OMX_ERRORTYPE error; - OMX_BUFFERHEADERTYPE *list = bufferList; - OMX_BUFFERHEADERTYPE **head, *clist, *prev; - OMX_PARAM_PORTDEFINITIONTYPE portdef; - int num; - - // get the buffers off the relevant queue - memset(&portdef, 0, sizeof(OMX_PARAM_PORTDEFINITIONTYPE)); - portdef.nSize = sizeof(OMX_PARAM_PORTDEFINITIONTYPE); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = portIndex; - - // work out buffer requirements, check port is in the right state - error = OMX_GetParameter(comp->comp, OMX_IndexParamPortDefinition, &portdef); - if(error != OMX_ErrorNone || portdef.bEnabled != OMX_TRUE || portdef.nBufferCountActual == 0 || portdef.nBufferSize == 0) - return; - - num = portdef.nBufferCountActual; - - error = OMX_SendCommand(comp->comp, OMX_CommandPortDisable, portIndex, NULL); - vc_assert(error == OMX_ErrorNone); - - while(num > 0) - { - VCOS_UNSIGNED set; - - if(list == NULL) - { - vcos_semaphore_wait(&comp->sema); - - // take buffers for this port off the relevant queue - head = portdef.eDir == OMX_DirInput ? &comp->in_list : &comp->out_list; - clist = *head; - prev = NULL; - - while(clist) - { - if((portdef.eDir == OMX_DirInput ? clist->nInputPortIndex : clist->nOutputPortIndex) == portIndex) - { - OMX_BUFFERHEADERTYPE *pBuffer = clist; - - if(!prev) - clist = *head = (OMX_BUFFERHEADERTYPE *) pBuffer->pAppPrivate; - else - clist = prev->pAppPrivate = (OMX_BUFFERHEADERTYPE *) pBuffer->pAppPrivate; - - pBuffer->pAppPrivate = list; - list = pBuffer; - } - else - { - prev = clist; - clist = (OMX_BUFFERHEADERTYPE *) &(clist->pAppPrivate); - } - } - - vcos_semaphore_post(&comp->sema); - } - - while(list) - { - void *buf = list->pBuffer; - OMX_BUFFERHEADERTYPE *next = list->pAppPrivate; - - error = OMX_FreeBuffer(comp->comp, portIndex, list); - vc_assert(error == OMX_ErrorNone); - - if(ilclient_free) - ilclient_free(private, buf); - else - vcos_free(buf); - - num--; - list = next; - } - - if(num) - { - OMX_U32 mask = ILCLIENT_PORT_DISABLED | ILCLIENT_EVENT_ERROR; - mask |= (portdef.eDir == OMX_DirInput ? ILCLIENT_EMPTY_BUFFER_DONE : ILCLIENT_FILL_BUFFER_DONE); - - // also wait for command complete/error in case we didn't have all the buffers allocated - vcos_event_flags_get(&comp->event, mask, VCOS_OR_CONSUME, -1, &set); - - if((set & ILCLIENT_EVENT_ERROR) && ilclient_remove_event(comp, OMX_EventError, 0, 1, 1, 0) >= 0) - return; - - if((set & ILCLIENT_PORT_DISABLED) && ilclient_remove_event(comp, OMX_EventCmdComplete, OMX_CommandPortDisable, 0, portIndex, 0) >= 0) - return; - } - } - - if(ilclient_wait_for_command_complete(comp, OMX_CommandPortDisable, portIndex) < 0) - vc_assert(0); -} - - -/*********************************************************** - * Name: ilclient_setup_tunnel - * - * Description: creates a tunnel between components that require that - * ports be inititially disabled, then enabled after tunnel setup. If - * timeout is non-zero, it will initially wait until a port settings - * changes message has been received by the output port. If port - * streams are supported by the output port, the requested port stream - * will be selected. - * - * Returns: 0 indicates success, negative indicates failure. - * -1: a timeout waiting for the parameter changed - * -2: an error was returned instead of parameter changed - * -3: no streams are available from this port - * -4: requested stream is not available from this port - * -5: the data format was not acceptable to the sink - ***********************************************************/ -int ilclient_setup_tunnel(TUNNEL_T *tunnel, unsigned int portStream, int timeout) -{ - OMX_ERRORTYPE error; - OMX_PARAM_U32TYPE param; - OMX_STATETYPE state; - int32_t status; - int enable_error; - - // source component must at least be idle, not loaded - error = OMX_GetState(tunnel->source->comp, &state); - vc_assert(error == OMX_ErrorNone); - if (state == OMX_StateLoaded && ilclient_change_component_state(tunnel->source, OMX_StateIdle) < 0) - return -2; - - // wait for the port parameter changed from the source port - if(timeout) - { - status = ilclient_wait_for_event(tunnel->source, OMX_EventPortSettingsChanged, - tunnel->source_port, 0, -1, 1, - ILCLIENT_PARAMETER_CHANGED | ILCLIENT_EVENT_ERROR, timeout); - - if (status < 0) - { - ilclient_debug_output( - "ilclient: timed out waiting for port settings changed on port %d", tunnel->source_port); - return status; - } - } - - // disable ports - ilclient_disable_tunnel(tunnel); - - // if this source port uses port streams, we need to select one of them before proceeding - // if getparameter causes an error that's fine, nothing needs selecting - param.nSize = sizeof(OMX_PARAM_U32TYPE); - param.nVersion.nVersion = OMX_VERSION; - param.nPortIndex = tunnel->source_port; - if (OMX_GetParameter(tunnel->source->comp, OMX_IndexParamNumAvailableStreams, &param) == OMX_ErrorNone) - { - if (param.nU32 == 0) - { - // no streams available - // leave the source port disabled, and return a failure - return -3; - } - if (param.nU32 <= portStream) - { - // requested stream not available - // no streams available - // leave the source port disabled, and return a failure - return -4; - } - - param.nU32 = portStream; - error = OMX_SetParameter(tunnel->source->comp, OMX_IndexParamActiveStream, &param); - vc_assert(error == OMX_ErrorNone); - } - - // now create the tunnel - error = OMX_SetupTunnel(tunnel->source->comp, tunnel->source_port, tunnel->sink->comp, tunnel->sink_port); - - enable_error = 0; - - if (error != OMX_ErrorNone || (enable_error=ilclient_enable_tunnel(tunnel)) < 0) - { - // probably format not compatible - error = OMX_SetupTunnel(tunnel->source->comp, tunnel->source_port, NULL, 0); - vc_assert(error == OMX_ErrorNone); - error = OMX_SetupTunnel(tunnel->sink->comp, tunnel->sink_port, NULL, 0); - vc_assert(error == OMX_ErrorNone); - - if(enable_error) - { - //Clean up the errors. This does risk removing an error that was nothing to do with this tunnel :-/ - ilclient_remove_event(tunnel->sink, OMX_EventError, 0, 1, 0, 1); - ilclient_remove_event(tunnel->source, OMX_EventError, 0, 1, 0, 1); - } - - ilclient_debug_output("ilclient: could not setup/enable tunnel (setup=0x%x,enable=%d)", - error, enable_error); - return -5; - } - - return 0; -} - -/*********************************************************** - * Name: ilclient_wait_for_event - * - * Description: waits for a given event to appear on a component event - * list. If not immediately present, will wait on that components - * event group for the given event flag. - * - * Returns: 0 indicates success, negative indicates failure. - * -1: a timeout was received. - * -2: an error event was received. - * -3: a config change event was received. - ***********************************************************/ -int ilclient_wait_for_event(COMPONENT_T *comp, OMX_EVENTTYPE event, - OMX_U32 nData1, int ignore1, OMX_IN OMX_U32 nData2, int ignore2, - int event_flag, int suspend) -{ - int32_t status; - uint32_t set; - - while (ilclient_remove_event(comp, event, nData1, ignore1, nData2, ignore2) < 0) - { - // if we want to be notified of errors, check the list for an error now - // before blocking, the event flag may have been cleared already. - if(event_flag & ILCLIENT_EVENT_ERROR) - { - ILEVENT_T *cur; - ilclient_lock_events(comp->client); - cur = comp->list; - while(cur && cur->eEvent != OMX_EventError) - cur = cur->next; - - if(cur) - { - // clear error flag - vcos_event_flags_get(&comp->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); - ilclient_unlock_events(comp->client); - return -2; - } - - ilclient_unlock_events(comp->client); - } - // check for config change event if we are asked to be notified of that - if(event_flag & ILCLIENT_CONFIG_CHANGED) - { - ILEVENT_T *cur; - ilclient_lock_events(comp->client); - cur = comp->list; - while(cur && cur->eEvent != OMX_EventParamOrConfigChanged) - cur = cur->next; - - ilclient_unlock_events(comp->client); - - if(cur) - return ilclient_remove_event(comp, event, nData1, ignore1, nData2, ignore2) == 0 ? 0 : -3; - } - - status = vcos_event_flags_get(&comp->event, event_flag, VCOS_OR_CONSUME, - suspend, &set); - if (status != 0) - return -1; - if (set & ILCLIENT_EVENT_ERROR) - return -2; - if (set & ILCLIENT_CONFIG_CHANGED) - return ilclient_remove_event(comp, event, nData1, ignore1, nData2, ignore2) == 0 ? 0 : -3; - } - - return 0; -} - - - -/*********************************************************** - * Name: ilclient_wait_for_command_complete_dual - * - * Description: Waits for an event signalling command completion. In - * this version we may also return failure if there is an error event - * that has terminated a command on a second component. - * - * Returns: 0 on success, -1 on failure of comp, -2 on failure of other - ***********************************************************/ -int ilclient_wait_for_command_complete_dual(COMPONENT_T *comp, OMX_COMMANDTYPE command, OMX_U32 nData2, COMPONENT_T *other) -{ - OMX_U32 mask = ILCLIENT_EVENT_ERROR; - int ret = 0; - - switch(command) { - case OMX_CommandStateSet: mask |= ILCLIENT_STATE_CHANGED; break; - case OMX_CommandPortDisable: mask |= ILCLIENT_PORT_DISABLED; break; - case OMX_CommandPortEnable: mask |= ILCLIENT_PORT_ENABLED; break; - default: return -1; - } - - if(other) - other->related = comp; - - while(1) - { - ILEVENT_T *cur, *prev = NULL; - VCOS_UNSIGNED set; - - ilclient_lock_events(comp->client); - - cur = comp->list; - while(cur && - !(cur->eEvent == OMX_EventCmdComplete && cur->nData1 == command && cur->nData2 == nData2) && - !(cur->eEvent == OMX_EventError && cur->nData2 == 1)) - { - prev = cur; - cur = cur->next; - } - - if(cur) - { - if(prev == NULL) - comp->list = cur->next; - else - prev->next = cur->next; - - // work out whether this was a success or a fail event - ret = cur->eEvent == OMX_EventCmdComplete || cur->nData1 == OMX_ErrorSameState ? 0 : -1; - - if(cur->eEvent == OMX_EventError) - vcos_event_flags_get(&comp->event, ILCLIENT_EVENT_ERROR, VCOS_OR_CONSUME, 0, &set); - - // add back into spare list - cur->next = comp->client->event_list; - comp->client->event_list = cur; - cur->eEvent = -1; // mark as unused - - ilclient_unlock_events(comp->client); - break; - } - else if(other != NULL) - { - // check the other component for an error event that terminates a command - cur = other->list; - while(cur && !(cur->eEvent == OMX_EventError && cur->nData2 == 1)) - cur = cur->next; - - if(cur) - { - // we don't remove the event in this case, since the user - // can confirm that this event errored by calling wait_for_command on the - // other component - - ret = -2; - ilclient_unlock_events(comp->client); - break; - } - } - - ilclient_unlock_events(comp->client); - - vcos_event_flags_get(&comp->event, mask, VCOS_OR_CONSUME, VCOS_SUSPEND, &set); - } - - if(other) - other->related = NULL; - - return ret; -} - - -/*********************************************************** - * Name: ilclient_wait_for_command_complete - * - * Description: Waits for an event signalling command completion. - * - * Returns: 0 on success, -1 on failure. - ***********************************************************/ -int ilclient_wait_for_command_complete(COMPONENT_T *comp, OMX_COMMANDTYPE command, OMX_U32 nData2) -{ - return ilclient_wait_for_command_complete_dual(comp, command, nData2, NULL); -} - -/*********************************************************** - * Name: ilclient_get_output_buffer - * - * Description: Returns an output buffer returned from a component - * using the OMX_FillBufferDone callback from the output list for the - * given component and port index. - * - * Returns: pointer to buffer if available, otherwise NULL - ***********************************************************/ -OMX_BUFFERHEADERTYPE *ilclient_get_output_buffer(COMPONENT_T *comp, int portIndex, int block) -{ - OMX_BUFFERHEADERTYPE *ret = NULL, *prev = NULL; - VCOS_UNSIGNED set; - - do { - vcos_semaphore_wait(&comp->sema); - ret = comp->out_list; - while(ret != NULL && ret->nOutputPortIndex != portIndex) - { - prev = ret; - ret = ret->pAppPrivate; - } - - if(ret) - { - if(prev == NULL) - comp->out_list = ret->pAppPrivate; - else - prev->pAppPrivate = ret->pAppPrivate; - - ret->pAppPrivate = NULL; - } - vcos_semaphore_post(&comp->sema); - - if(block && !ret) - vcos_event_flags_get(&comp->event, ILCLIENT_FILL_BUFFER_DONE, VCOS_OR_CONSUME, -1, &set); - - } while(block && !ret); - - return ret; -} - -/*********************************************************** - * Name: ilclient_get_input_buffer - * - * Description: Returns an input buffer return from a component using - * the OMX_EmptyBufferDone callback from the output list for the given - * component and port index. - * - * Returns: pointer to buffer if available, otherwise NULL - ***********************************************************/ -OMX_BUFFERHEADERTYPE *ilclient_get_input_buffer(COMPONENT_T *comp, int portIndex, int block) -{ - OMX_BUFFERHEADERTYPE *ret = NULL, *prev = NULL; - - do { - VCOS_UNSIGNED set; - - vcos_semaphore_wait(&comp->sema); - ret = comp->in_list; - while(ret != NULL && ret->nInputPortIndex != portIndex) - { - prev = ret; - ret = ret->pAppPrivate; - } - - if(ret) - { - if(prev == NULL) - comp->in_list = ret->pAppPrivate; - else - prev->pAppPrivate = ret->pAppPrivate; - - ret->pAppPrivate = NULL; - } - vcos_semaphore_post(&comp->sema); - - if(block && !ret) - vcos_event_flags_get(&comp->event, ILCLIENT_EMPTY_BUFFER_DONE, VCOS_OR_CONSUME, -1, &set); - - } while(block && !ret); - - return ret; -} - -/*********************************************************** - * Name: ilclient_debug_output - * - * Description: prints a varg message to the log or the debug screen - * under win32 - * - * Returns: void - ***********************************************************/ -void ilclient_debug_output(char *format, ...) -{ - va_list args; - - va_start(args, format); - vcos_vlog_info(format, args); - va_end(args); -} - -/****************************************************************************** -Static functions -******************************************************************************/ - -/*********************************************************** - * Name: ilclient_lock_events - * - * Description: locks the client event structure - * - * Returns: void - ***********************************************************/ -static void ilclient_lock_events(ILCLIENT_T *st) -{ - vcos_semaphore_wait(&st->event_sema); -} - -/*********************************************************** - * Name: ilclient_unlock_events - * - * Description: unlocks the client event structure - * - * Returns: void - ***********************************************************/ -static void ilclient_unlock_events(ILCLIENT_T *st) -{ - vcos_semaphore_post(&st->event_sema); -} - -/*********************************************************** - * Name: ilclient_event_handler - * - * Description: event handler passed to core to use as component - * callback - * - * Returns: success - ***********************************************************/ -static OMX_ERRORTYPE ilclient_event_handler(OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_EVENTTYPE eEvent, - OMX_IN OMX_U32 nData1, - OMX_IN OMX_U32 nData2, - OMX_IN OMX_PTR pEventData) -{ - COMPONENT_T *st = (COMPONENT_T *) pAppData; - ILEVENT_T *event; - OMX_ERRORTYPE error = OMX_ErrorNone; - - ilclient_lock_events(st->client); - - // go through the events on this component and remove any duplicates in the - // existing list, since the client probably doesn't need them. it's better - // than asserting when we run out. - event = st->list; - while(event != NULL) - { - ILEVENT_T **list = &(event->next); - while(*list != NULL) - { - if((*list)->eEvent == event->eEvent && - (*list)->nData1 == event->nData1 && - (*list)->nData2 == event->nData2) - { - // remove this duplicate - ILEVENT_T *rem = *list; - ilclient_debug_output("%s: removing %d/%d/%d", st->name, event->eEvent, event->nData1, event->nData2); - *list = rem->next; - rem->eEvent = -1; - rem->next = st->client->event_list; - st->client->event_list = rem; - } - else - list = &((*list)->next); - } - - event = event->next; - } - - vc_assert(st->client->event_list); - event = st->client->event_list; - - switch (eEvent) { - case OMX_EventCmdComplete: - switch (nData1) { - case OMX_CommandStateSet: - ilclient_debug_output("%s: callback state changed (%s)", st->name, states[nData2]); - vcos_event_flags_set(&st->event, ILCLIENT_STATE_CHANGED, VCOS_OR); - break; - case OMX_CommandPortDisable: - ilclient_debug_output("%s: callback port disable %d", st->name, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_PORT_DISABLED, VCOS_OR); - break; - case OMX_CommandPortEnable: - ilclient_debug_output("%s: callback port enable %d", st->name, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_PORT_ENABLED, VCOS_OR); - break; - case OMX_CommandFlush: - ilclient_debug_output("%s: callback port flush %d", st->name, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_PORT_FLUSH, VCOS_OR); - break; - case OMX_CommandMarkBuffer: - ilclient_debug_output("%s: callback mark buffer %d", st->name, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_MARKED_BUFFER, VCOS_OR); - break; - default: - vc_assert(0); - } - break; - case OMX_EventError: - { - // check if this component failed a command, and we have to notify another command - // of this failure - if(nData2 == 1 && st->related != NULL) - vcos_event_flags_set(&st->related->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - - error = nData1; - switch (error) { - case OMX_ErrorPortUnpopulated: - if (st->error_mask & ILCLIENT_ERROR_UNPOPULATED) - { - ilclient_debug_output("%s: ignore error: port unpopulated (%d)", st->name, nData2); - event = NULL; - break; - } - ilclient_debug_output("%s: port unpopulated %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorSameState: - if (st->error_mask & ILCLIENT_ERROR_SAMESTATE) - { - ilclient_debug_output("%s: ignore error: same state (%d)", st->name, nData2); - event = NULL; - break; - } - ilclient_debug_output("%s: same state %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorBadParameter: - if (st->error_mask & ILCLIENT_ERROR_BADPARAMETER) - { - ilclient_debug_output("%s: ignore error: bad parameter (%d)", st->name, nData2); - event = NULL; - break; - } - ilclient_debug_output("%s: bad parameter %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorIncorrectStateTransition: - ilclient_debug_output("%s: incorrect state transition %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorBadPortIndex: - ilclient_debug_output("%s: bad port index %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorStreamCorrupt: - ilclient_debug_output("%s: stream corrupt %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorInsufficientResources: - ilclient_debug_output("%s: insufficient resources %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorUnsupportedSetting: - ilclient_debug_output("%s: unsupported setting %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorOverflow: - ilclient_debug_output("%s: overflow %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorDiskFull: - ilclient_debug_output("%s: disk full %x (%d)", st->name, error, nData2); - //we do not set the error - break; - case OMX_ErrorMaxFileSize: - ilclient_debug_output("%s: max file size %x (%d)", st->name, error, nData2); - //we do not set the error - break; - case OMX_ErrorDrmUnauthorised: - ilclient_debug_output("%s: drm file is unauthorised %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorDrmExpired: - ilclient_debug_output("%s: drm file has expired %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - case OMX_ErrorDrmGeneral: - ilclient_debug_output("%s: drm library error %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - default: - vc_assert(0); - ilclient_debug_output("%s: unexpected error %x (%d)", st->name, error, nData2); - vcos_event_flags_set(&st->event, ILCLIENT_EVENT_ERROR, VCOS_OR); - break; - } - } - break; - case OMX_EventBufferFlag: - ilclient_debug_output("%s: buffer flag %d/%x", st->name, nData1, nData2); - if (nData2 & OMX_BUFFERFLAG_EOS) - { - vcos_event_flags_set(&st->event, ILCLIENT_BUFFER_FLAG_EOS, VCOS_OR); - nData2 = OMX_BUFFERFLAG_EOS; - } - else - vc_assert(0); - break; - case OMX_EventPortSettingsChanged: - ilclient_debug_output("%s: port settings changed %d", st->name, nData1); - vcos_event_flags_set(&st->event, ILCLIENT_PARAMETER_CHANGED, VCOS_OR); - break; - case OMX_EventMark: - ilclient_debug_output("%s: buffer mark %p", st->name, pEventData); - vcos_event_flags_set(&st->event, ILCLIENT_BUFFER_MARK, VCOS_OR); - break; - case OMX_EventParamOrConfigChanged: - ilclient_debug_output("%s: param/config 0x%X on port %d changed", st->name, nData2, nData1); - vcos_event_flags_set(&st->event, ILCLIENT_CONFIG_CHANGED, VCOS_OR); - break; - default: - vc_assert(0); - break; - } - - if (event) - { - // fill in details - event->eEvent = eEvent; - event->nData1 = nData1; - event->nData2 = nData2; - event->pEventData = pEventData; - - // remove from top of spare list - st->client->event_list = st->client->event_list->next; - - // put at head of component event queue - event->next = st->list; - st->list = event; - } - ilclient_unlock_events(st->client); - - // now call any callbacks without the event lock so the client can - // remove the event in context - switch(eEvent) { - case OMX_EventError: - if(event && st->client->error_callback) - st->client->error_callback(st->client->error_callback_data, st, error); - break; - case OMX_EventBufferFlag: - if ((nData2 & OMX_BUFFERFLAG_EOS) && st->client->eos_callback) - st->client->eos_callback(st->client->eos_callback_data, st, nData1); - break; - case OMX_EventPortSettingsChanged: - if (st->client->port_settings_callback) - st->client->port_settings_callback(st->client->port_settings_callback_data, st, nData1); - break; - case OMX_EventParamOrConfigChanged: - if (st->client->configchanged_callback) - st->client->configchanged_callback(st->client->configchanged_callback_data, st, nData2); - break; - default: - // ignore - break; - } - - return OMX_ErrorNone; -} - -/*********************************************************** - * Name: ilclient_empty_buffer_done - * - * Description: passed to core to use as component callback, puts - * buffer on list - * - * Returns: - ***********************************************************/ -static OMX_ERRORTYPE ilclient_empty_buffer_done(OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) -{ - COMPONENT_T *st = (COMPONENT_T *) pAppData; - OMX_BUFFERHEADERTYPE *list; - - ilclient_debug_output("%s: empty buffer done %p", st->name, pBuffer); - - vcos_semaphore_wait(&st->sema); - // insert at end of the list, so we process buffers in - // the same order - list = st->in_list; - while(list && list->pAppPrivate) - list = list->pAppPrivate; - - if(!list) - st->in_list = pBuffer; - else - list->pAppPrivate = pBuffer; - - pBuffer->pAppPrivate = NULL; - vcos_semaphore_post(&st->sema); - - vcos_event_flags_set(&st->event, ILCLIENT_EMPTY_BUFFER_DONE, VCOS_OR); - - if (st->client->empty_buffer_done_callback) - st->client->empty_buffer_done_callback(st->client->empty_buffer_done_callback_data, st); - - return OMX_ErrorNone; -} - -/*********************************************************** - * Name: ilclient_empty_buffer_done_error - * - * Description: passed to core to use as component callback, asserts - * on use as client not expecting component to use this callback. - * - * Returns: - ***********************************************************/ -static OMX_ERRORTYPE ilclient_empty_buffer_done_error(OMX_IN OMX_HANDLETYPE hComponent, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_BUFFERHEADERTYPE* pBuffer) -{ - vc_assert(0); - return OMX_ErrorNone; -} - -/*********************************************************** - * Name: ilclient_fill_buffer_done - * - * Description: passed to core to use as component callback, puts - * buffer on list - * - * Returns: - ***********************************************************/ -static OMX_ERRORTYPE ilclient_fill_buffer_done(OMX_OUT OMX_HANDLETYPE hComponent, - OMX_OUT OMX_PTR pAppData, - OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer) -{ - COMPONENT_T *st = (COMPONENT_T *) pAppData; - OMX_BUFFERHEADERTYPE *list; - - ilclient_debug_output("%s: fill buffer done %p", st->name, pBuffer); - - vcos_semaphore_wait(&st->sema); - // insert at end of the list, so we process buffers in - // the correct order - list = st->out_list; - while(list && list->pAppPrivate) - list = list->pAppPrivate; - - if(!list) - st->out_list = pBuffer; - else - list->pAppPrivate = pBuffer; - - pBuffer->pAppPrivate = NULL; - vcos_semaphore_post(&st->sema); - - vcos_event_flags_set(&st->event, ILCLIENT_FILL_BUFFER_DONE, VCOS_OR); - - if (st->client->fill_buffer_done_callback) - st->client->fill_buffer_done_callback(st->client->fill_buffer_done_callback_data, st); - - return OMX_ErrorNone; -} - -/*********************************************************** - * Name: ilclient_fill_buffer_done_error - * - * Description: passed to core to use as component callback, asserts - * on use as client not expecting component to use this callback. - * - * Returns: - ***********************************************************/ -static OMX_ERRORTYPE ilclient_fill_buffer_done_error(OMX_OUT OMX_HANDLETYPE hComponent, - OMX_OUT OMX_PTR pAppData, - OMX_OUT OMX_BUFFERHEADERTYPE* pBuffer) -{ - vc_assert(0); - return OMX_ErrorNone; -} - - - -OMX_HANDLETYPE ilclient_get_handle(COMPONENT_T *comp) -{ - vcos_assert(comp); - return comp->comp; -} - - -static struct { - OMX_PORTDOMAINTYPE dom; - int param; -} port_types[] = { - { OMX_PortDomainVideo, OMX_IndexParamVideoInit }, - { OMX_PortDomainAudio, OMX_IndexParamAudioInit }, - { OMX_PortDomainImage, OMX_IndexParamImageInit }, - { OMX_PortDomainOther, OMX_IndexParamOtherInit }, -}; - -int ilclient_get_port_index(COMPONENT_T *comp, OMX_DIRTYPE dir, OMX_PORTDOMAINTYPE type, int index) -{ - uint32_t i; - // for each possible port type... - for (i=0; i<sizeof(port_types)/sizeof(port_types[0]); i++) - { - if ((port_types[i].dom == type) || (type == (OMX_PORTDOMAINTYPE) -1)) - { - OMX_PORT_PARAM_TYPE param; - OMX_ERRORTYPE error; - uint32_t j; - - param.nSize = sizeof(param); - param.nVersion.nVersion = OMX_VERSION; - error = OMX_GetParameter(ILC_GET_HANDLE(comp), port_types[i].param, &param); - assert(error == OMX_ErrorNone); - - // for each port of this type... - for (j=0; j<param.nPorts; j++) - { - int port = param.nStartPortNumber+j; - - OMX_PARAM_PORTDEFINITIONTYPE portdef; - portdef.nSize = sizeof(portdef); - portdef.nVersion.nVersion = OMX_VERSION; - portdef.nPortIndex = port; - - error = OMX_GetParameter(ILC_GET_HANDLE(comp), OMX_IndexParamPortDefinition, &portdef); - assert(error == OMX_ErrorNone); - - if (portdef.eDir == dir) - { - if (index-- == 0) - return port; - } - } - } - } - return -1; -} - -int ilclient_suggest_bufsize(COMPONENT_T *comp, OMX_U32 nBufSizeHint) -{ - OMX_PARAM_BRCMOUTPUTBUFFERSIZETYPE param; - OMX_ERRORTYPE error; - - param.nSize = sizeof(param); - param.nVersion.nVersion = OMX_VERSION; - param.nBufferSize = nBufSizeHint; - error = OMX_SetParameter(ILC_GET_HANDLE(comp), OMX_IndexParamBrcmOutputBufferSize, - &param); - assert(error == OMX_ErrorNone); - - return (error == OMX_ErrorNone) ? 0 : -1; -} - -unsigned int ilclient_stack_size(void) -{ - return ILCLIENT_THREAD_DEFAULT_STACK_SIZE; -} - diff --git a/vc/src/hello_pi/libs/ilclient/ilclient.h b/vc/src/hello_pi/libs/ilclient/ilclient.h @@ -1,1039 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * \file - * - * \brief This API defines helper functions for writing IL clients. - * - * This file defines an IL client side library. This is useful when - * writing IL clients, since there tends to be much repeated and - * common code across both single and multiple clients. This library - * seeks to remove that common code and abstract some of the - * interactions with components. There is a wrapper around a - * component and tunnel, and some operations can be done on lists of - * these. The callbacks from components are handled, and specific - * events can be checked or waited for. - */ - -#ifndef _IL_CLIENT_H -#define _IL_CLIENT_H - -#include "IL/OMX_Broadcom.h" -#include "interface/vcos/vcos.h" - -/** - * The <DFN>ILCLIENT_T</DFN> structure encapsulates the state needed for the IL - * Client API. It contains a set of callback functions used to - * communicate with the user. It also includes a linked list of free - * event structures. - ***********************************************************/ -typedef struct _ILCLIENT_T ILCLIENT_T; - - -/** - * Each <DFN>ILEVENT_T</DFN> structure stores the result of an <DFN>EventHandler</DFN> - * callback from a component, storing the event message type and any - * parameters returned. - ***********************************************************/ -typedef struct _ILEVENT_T ILEVENT_T; - - - -struct _COMPONENT_T; - -/** - * The <DFN>COMPONENT_T</DFN> structure represents an IL component, - * together with the necessary extra information required by the IL - * Client API. This structure stores the handle to the OMX component, - * as well as the event list containing all events sent by this - * component. The component state structure also holds a pair of - * buffer queues, for input and output buffers returned to the client - * by the <DFN>FillBufferDone</DFN> and <DFN>EmptyBufferDone</DFN> - * callbacks. As some operations result in error callbacks that can - * be ignored, an error mask is maintained to allow some errors to be - * ignored. A pointer to the client state structure is also added. - ***********************************************************/ -typedef struct _COMPONENT_T COMPONENT_T; - - -/** - * The generic callback function is used for communicating events from - * a particular component to the user. - * - * @param userdata The data returned from when the callback was registered. - * - * @param comp The component structure representing the component that - * originated this event. - * - * @param data The relevant data field from the event. - * - * @return Void. - ***********************************************************/ -typedef void (*ILCLIENT_CALLBACK_T)(void *userdata, COMPONENT_T *comp, OMX_U32 data); - - -/** - * The buffer callback function is used for indicating that a - * component has returned a buffer on a port using client buffer - * communication. - * - * @param data The data returned from when the callback was registered. - * - * @param comp The component from which the buffer originated. - * - * @return Void. - ***********************************************************/ -typedef void (*ILCLIENT_BUFFER_CALLBACK_T)(void *data, COMPONENT_T *comp); - - -/** - * The malloc function is passed into - * <DFN>ilclient_enable_port_buffers()</DFN> and used for allocating the - * buffer payload. - * - * @param userdata Private pointer passed into - * <DFN>ilclient_enable_port_buffers()</DFN> call. - * - * @param size Size in bytes of the requested memory region. - * - * @param align Alignment requirement in bytes for the base memory address. - * - * @param description Text description of the memory being allocated. - * - * @return The memory address on success, <DFN>NULL</DFN> on failure. - ***********************************************************/ -typedef void *(*ILCLIENT_MALLOC_T)(void *userdata, VCOS_UNSIGNED size, VCOS_UNSIGNED align, const char *description); - - -/** - * The free function is passed into - * <DFN>ilclient_enable_port_buffers()</DFN> and - * <DFN>ilclient_disable_port_buffers()</DFN> and used for freeing the - * buffer payload. - * - * @param userdata Private pointer passed into - * <DFN>ilclient_enable_port_buffers()</DFN> and - * <DFN>ilclient_disable_port_buffers()</DFN>. - * - * @param pointer Memory address to free, that was previously returned - * from <DFN>ILCLIENT_MALLOC_T</DFN> function. - * - * @return Void. - ***********************************************************/ -typedef void (*ILCLIENT_FREE_T)(void *userdata, void *pointer); - - -/** - * The event mask enumeration describes the possible events that the - * user can ask to wait for when waiting for a particular event. - ***********************************************************/ -typedef enum { - ILCLIENT_EMPTY_BUFFER_DONE = 0x1, /**< Set when a buffer is - returned from an input - port */ - - ILCLIENT_FILL_BUFFER_DONE = 0x2, /**< Set when a buffer is - returned from an output - port */ - - ILCLIENT_PORT_DISABLED = 0x4, /**< Set when a port indicates - it has completed a disable - command. */ - - ILCLIENT_PORT_ENABLED = 0x8, /**< Set when a port indicates - is has completed an enable - command. */ - - ILCLIENT_STATE_CHANGED = 0x10, /**< Set when a component - indicates it has completed - a state change command. */ - - ILCLIENT_BUFFER_FLAG_EOS = 0x20, /**< Set when a port signals - an EOS event. */ - - ILCLIENT_PARAMETER_CHANGED = 0x40, /**< Set when a port signals a - port settings changed - event. */ - - ILCLIENT_EVENT_ERROR = 0x80, /**< Set when a component - indicates an error. */ - - ILCLIENT_PORT_FLUSH = 0x100, /**< Set when a port indicates - is has completed a flush - command. */ - - ILCLIENT_MARKED_BUFFER = 0x200, /**< Set when a port indicates - it has marked a buffer. */ - - ILCLIENT_BUFFER_MARK = 0x400, /**< Set when a port indicates - it has received a buffer - mark. */ - - ILCLIENT_CONFIG_CHANGED = 0x800 /**< Set when a config parameter - changed. */ -} ILEVENT_MASK_T; - - -/** - * On component creation the user can set flags to control the - * creation of that component. - ***********************************************************/ -typedef enum { - ILCLIENT_FLAGS_NONE = 0x0, /**< Used if no flags are - set. */ - - ILCLIENT_ENABLE_INPUT_BUFFERS = 0x1, /**< If set we allow the - client to communicate with - input ports via buffer - communication, rather than - tunneling with another - component. */ - - ILCLIENT_ENABLE_OUTPUT_BUFFERS = 0x2, /**< If set we allow the - client to communicate with - output ports via buffer - communication, rather than - tunneling with another - component. */ - - ILCLIENT_DISABLE_ALL_PORTS = 0x4, /**< If set we disable all - ports on creation. */ - - ILCLIENT_HOST_COMPONENT = 0x8, /**< Create a host component. - The default host ilcore - only can create host components - by being locally hosted - so should only be used for testing - purposes. */ - - ILCLIENT_OUTPUT_ZERO_BUFFERS = 0x10 /**< All output ports will have - nBufferCountActual set to zero, - if supported by the component. */ -} ILCLIENT_CREATE_FLAGS_T; - - -/** - * \brief This structure represents a tunnel in the OpenMAX IL API. - * - * Some operations in this API act on a tunnel, so the tunnel state - * structure (<DFN>TUNNEL_T</DFN>) is a convenient store of the source and sink - * of the tunnel. For each, a pointer to the relevant component state - * structure and the port index is stored. - ***********************************************************/ -typedef struct { - COMPONENT_T *source; /**< The source component */ - int source_port; /**< The output port index on the source component */ - COMPONENT_T *sink; /**< The sink component */ - int sink_port; /**< The input port index on the sink component */ -} TUNNEL_T; - - -/** - * The <DFN>set_tunnel</DFN> macro is a useful function that initialises a - * <DFN>TUNNEL_T</DFN> structure. - ***********************************************************/ -#define set_tunnel(t,a,b,c,d) do {TUNNEL_T *_ilct = (t); \ - _ilct->source = (a); _ilct->source_port = (b); \ - _ilct->sink = (c); _ilct->sink_port = (d);} while(0) - -/** - * For calling OpenMAX IL methods directory, we need to access the - * <DFN>OMX_HANDLETYPE</DFN> corresponding to the <DFN>COMPONENT_T</DFN> structure. This - * macro enables this while keeping the <DFN>COMPONENT_T</DFN> structure opaque. - * The parameter <DFN>x</DFN> should be of the type <DFN>*COMPONENT_T</DFN>. - ***********************************************************/ -#define ILC_GET_HANDLE(x) ilclient_get_handle(x) - -/** - * An IL Client structure is created by the <DFN>ilclient_init()</DFN> - * method. This structure is used when creating components, but - * otherwise is not needed in other API functions as a pointer to this - * structure is maintained in the <DFN>COMPONENT_T</DFN> structure. - * - * @return pointer to client structure - ***********************************************************/ -VCHPRE_ ILCLIENT_T VCHPOST_ *ilclient_init(void); - -/** - * When all components have been deleted, the IL Client structure can - * be destroyed by calling the <DFN>ilclient_destroy()</DFN> function. - * - * @param handle The client handle. After calling this function, this - * handle should not be used. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_destroy(ILCLIENT_T *handle); - -/** - * The <DFN>ilclient_set_port_settings_callback()</DFN> function registers a - * callback to be used when the <DFN>OMX_EventPortSettingsChanged</DFN> event is - * received. When the event is received, a pointer to the component - * structure and port index is returned by the callback. - * - * @param handle The client handle - * - * @param func The callback function to use. Calling this function - * with a <DFN>NULL</DFN> function pointer will deregister any existing - * registered callback. - * - * @param userdata Data to be passed back when calling the callback - * function. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_set_port_settings_callback(ILCLIENT_T *handle, - ILCLIENT_CALLBACK_T func, - void *userdata); - -/** - * The <DFN>ilclient_set_eos_callback()</DFN> function registers a callback to be - * used when the <DFN>OMX_EventBufferFlag</DFN> is received with the - * <DFN>OMX_BUFFERFLAG_EOS</DFN> flag set. When the event is received, a pointer - * to the component structure and port index is returned by the - * callback. - * - * @param handle The client handle - * - * @param func The callback function to use. Calling this function - * with a <DFN>NULL</DFN> function pointer will deregister any existing - * registered callback. - * - * @param userdata Data to be passed back when calling the callback - * function. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_set_eos_callback(ILCLIENT_T *handle, - ILCLIENT_CALLBACK_T func, - void *userdata); - -/** - * The <DFN>ilclient_set_error_callback()</DFN> function registers a callback to be - * used when the <DFN>OMX_EventError</DFN> is received from a component. When - * the event is received, a pointer to the component structure and the - * error code are reported by the callback. - * - * @param handle The client handle - * - * @param func The callback function to use. Calling this function - * with a <DFN>NULL</DFN> function pointer will deregister any existing - * registered callback. - * - * @param userdata Data to be passed back when calling the callback - * function. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_set_error_callback(ILCLIENT_T *handle, - ILCLIENT_CALLBACK_T func, - void *userdata); - -/** - * The <DFN>ilclient_set_configchanged_callback()</DFN> function - * registers a callback to be used when an - * <DFN>OMX_EventParamOrConfigChanged</DFN> event occurs. When the - * event is received, a pointer to the component structure and the - * index value that has changed are reported by the callback. The - * user may then use an <DFN>OMX_GetConfig</DFN> call with the index - * as specified to retrieve the updated information. - * - * @param handle The client handle - * - * @param func The callback function to use. Calling this function - * with a <DFN>NULL</DFN> function pointer will deregister any existing - * registered callback. - * - * @param userdata Data to be passed back when calling the callback - * function. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_set_configchanged_callback(ILCLIENT_T *handle, - ILCLIENT_CALLBACK_T func, - void *userdata); - - -/** - * The <DFN>ilclient_set_fill_buffer_done_callback()</DFN> function registers a - * callback to be used when a buffer passed to an output port using the - * <DFN>OMX_FillBuffer</DFN> call is returned with the <DFN>OMX_FillBufferDone</DFN> - * callback. When the event is received, a pointer to the component - * structure is returned by the callback. The user may then use the - * <DFN>ilclient_get_output_buffer()</DFN> function to retrieve the buffer. - * - * @param handle The client handle - * - * @param func The callback function to use. Calling this function - * with a <DFN>NULL</DFN> function pointer will deregister any existing - * registered callback. - * - * @param userdata Data to be passed back when calling the callback - * function. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_set_fill_buffer_done_callback(ILCLIENT_T *handle, - ILCLIENT_BUFFER_CALLBACK_T func, - void *userdata); - -/** - * The <DFN>ilclient_set_empty_buffer_done_callback()</DFN> function registers a - * callback to be used when a buffer passed to an input port using the - * <DFN>OMX_EmptyBuffer</DFN> call is returned with the <DFN>OMX_EmptyBufferDone</DFN> - * callback. When the event is received, a pointer to the component - * structure is returned by the callback. The user may then use the - * <DFN>ilclient_get_input_buffer()</DFN> function to retrieve the buffer. - * - * @param handle The client handle - * - * @param func The callback function to use. Calling this function - * with a <DFN>NULL</DFN> function pointer will deregister any existing - * registered callback. - * - * @param userdata Data to be passed back when calling the callback - * function. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_set_empty_buffer_done_callback(ILCLIENT_T *handle, - ILCLIENT_BUFFER_CALLBACK_T func, - void *userdata); - - -/** - * Components are created using the <DFN>ilclient_create_component()</DFN> - * function. - * - * @param handle The client handle - * - * @param comp On successful creation, the component structure pointer - * will be written back into <DFN>comp</DFN>. - * - * @param name The name of the component to be created. Component - * names as provided are automatically prefixed with - * <DFN>"OMX.broadcom."</DFN> before passing to the IL core. The name - * provided will also be used in debugging messages added about this - * component. - * - * @param flags The client can specify some creation behaviour by using - * the <DFN>flags</DFN> field. The meaning of each flag is defined - * by the <DFN>ILCLIENT_CREATE_FLAGS_T</DFN> type. - * - * @return 0 on success, -1 on failure - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_create_component(ILCLIENT_T *handle, - COMPONENT_T **comp, - char *name, - ILCLIENT_CREATE_FLAGS_T flags); - -/** - * The <DFN>ilclient_cleanup_components()</DFN> function deallocates all - * state associated with components and frees the OpenMAX component - * handles. All tunnels connecting components should have been torn - * down explicitly, and all components must be in loaded state. - * - * @param list A null-terminated list of component pointers to be - * deallocated. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_cleanup_components(COMPONENT_T *list[]); - - -/** - * The <DFN>ilclient_change_component_state()</DFN> function changes the - * state of an individual component. This will trigger the state - * change, and also wait for that state change to be completed. It - * should not be called if this state change has dependencies on other - * components also changing states. Trying to change a component to - * its current state is treated as success. - * - * @param comp The component to change. - * - * @param state The new state to transition to. - * - * @return 0 on success, -1 on failure. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_change_component_state(COMPONENT_T *comp, - OMX_STATETYPE state); - - -/** - * The <DFN>ilclient_state_transition()</DFN> function transitions a set of - * components that need to perform a simultaneous state transition; - * for example, when two components are tunnelled and the buffer - * supplier port needs to allocate and pass buffers to a non-supplier - * port. All components are sent a command to change state, then the - * function will wait for all components to signal that they have - * changed state. - * - * @param list A null-terminated list of component pointers. - * - * @param state The new state to which to transition all components. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_state_transition(COMPONENT_T *list[], - OMX_STATETYPE state); - - -/** - * The <DFN>ilclient_disable_port()</DFN> function disables a port on a - * given component. This function sends the disable port message to - * the component and waits for the component to signal that this has - * taken place. If the port is already disabled, this is treated as a - * sucess. - * - * @param comp The component containing the port to disable. - * - * @param portIndex The port index of the port to disable. This must - * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_disable_port(COMPONENT_T *comp, - int portIndex); - - -/** - * The <DFN>ilclient_enable_port()</DFN> function enables a port on a - * given component. This function sends the enable port message to - * the component and waits for the component to signal that this has - * taken place. If the port is already disabled, this is treated as a - * sucess. - * - * @param comp The component containing the port to enable. - * - * @param portIndex The port index of the port to enable. This must - * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_enable_port(COMPONENT_T *comp, - int portIndex); - - - -/** - * The <DFN>ilclient_enable_port_buffers()</DFN> function enables a port - * in base profile mode on a given component. The port is not - * tunneled, so requires buffers to be allocated. - * - * @param comp The component containing the port to enable. - * - * @param portIndex The port index of the port to enable. This must - * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. - * - * @param ilclient_malloc This function will be used to allocate - * buffer payloads. If <DFN>NULL</DFN> then - * <DFN>vcos_malloc_aligned</DFN> will be used. - * - * @param ilclient_free If an error occurs, this function is used to - * free previously allocated payloads. If <DFN>NULL</DFN> then - * <DFN>vcos_free</DFN> will be used. - * - * @param userdata The first argument to calls to - * <DFN>ilclient_malloc</DFN> and <DFN>ilclient_free</DFN>, if these - * arguments are not <DFN>NULL</DFN>. - * - * @return 0 indicates success. -1 indicates failure. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_enable_port_buffers(COMPONENT_T *comp, - int portIndex, - ILCLIENT_MALLOC_T ilclient_malloc, - ILCLIENT_FREE_T ilclient_free, - void *userdata); - - -/** - * The <DFN>ilclient_disable_port_buffers()</DFN> function disables a - * port in base profile mode on a given component. The port is not - * tunneled, and has been supplied with buffers by the client. - * - * @param comp The component containing the port to disable. - * - * @param portIndex The port index of the port to disable. This must - * be a named port index, rather than a <DFN>OMX_ALL</DFN> value. - * - * @param bufferList A list of buffers, using <DFN>pAppPrivate</DFN> - * as the next pointer that were allocated on this port, and currently - * held by the application. If buffers on this port are held by IL - * client or the component then these are automatically freed. - * - * @param ilclient_free This function is used to free the buffer payloads. - * If <DFN>NULL</DFN> then <DFN>vcos_free</DFN> will be used. - * - * @param userdata The first argument to calls to - * <DFN>ilclient_free</DFN>. - * - * @return void - */ -VCHPRE_ void VCHPOST_ ilclient_disable_port_buffers(COMPONENT_T *comp, - int portIndex, - OMX_BUFFERHEADERTYPE *bufferList, - ILCLIENT_FREE_T ilclient_free, - void *userdata); - - -/** - * With a populated tunnel structure, the - * <DFN>ilclient_setup_tunnel()</DFN> function connects the tunnel. It - * first transitions the source component to idle if currently in - * loaded state, and then optionally checks the source event list for - * a port settings changed event from the source port. If this event - * is not in the event queue then this function optionally waits for - * it to arrive. To disable this check for the port settings changed - * event, set <DFN>timeout</DFN> to zero. - * - * Both ports are then disabled, and the source port is inspected for - * a port streams parameter. If this is supported, then the - * <DFN>portStream</DFN> argument is used to select which port stream - * to use. The two ports are then tunnelled using the - * <DFN>OMX_SetupTunnel</DFN> function. If this is successful, then - * both ports are enabled. Note that for disabling and enabling the - * tunnelled ports, the functions <DFN>ilclient_disable_tunnel()</DFN> - * and <DFN>ilclient_enable_tunnel()</DFN> are used, so the relevant - * documentation for those functions applies here. - * - * @param tunnel The tunnel structure representing the tunnel to - * set up. - * - * @param portStream If port streams are supported on the output port - * of the tunnel, then this parameter indicates the port stream to - * select on this port. - * - * @param timeout The time duration in milliseconds to wait for the - * output port to signal a port settings changed event before - * returning a timeout failure. If this is 0, then we do not check - * for a port settings changed before setting up the tunnel. - * - * @return 0 indicates success, negative indicates failure: - * - -1: a timeout waiting for the parameter changed - * - -2: an error was returned instead of parameter changed - * - -3: no streams are available from this port - * - -4: requested stream is not available from this port - * - -5: the data format was not acceptable to the sink - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_setup_tunnel(TUNNEL_T *tunnel, - unsigned int portStream, - int timeout); - - -/** - * The <DFN>ilclient_disable_tunnel()</DFN> function disables both ports listed in - * the tunnel structure. It will send a port disable command to each - * port, then waits for both to indicate they have completed the - * transition. The errors <DFN>OMX_ErrorPortUnpopulated</DFN> and - * <DFN>OMX_ErrorSameState</DFN> are both ignored by this function; the former - * since the first port to disable may deallocate buffers before the - * second port has been disabled, leading to the second port reporting - * the unpopulated error. - * - * @param tunnel The tunnel to disable. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_disable_tunnel(TUNNEL_T *tunnel); - - -/** - * The <DFN>ilclient_enable_tunnel()</DFN> function enables both ports listed in - * the tunnel structure. It will first send a port enable command to - * each port. It then checks whether the sink component is not in - * loaded state - if so, the function waits for both ports to complete - * the requested port enable. If the sink component was in loaded - * state, then this component is transitioned to idle to allow the - * ports to exchange buffers and enable the ports. This is since - * typically this function is used when creating a tunnel between two - * components, where the source component is processing data to enable - * it to report the port settings changed event, and the sink port has - * yet to be used. Before transitioning the sink component to idle, - * this function waits for the sink port to be enabled - since the - * component is in loaded state, this will happen quickly. If the - * transition to idle fails, the sink component is transitioned back - * to loaded and the source port disabled. If the transition - * succeeds, the function then waits for the source port to complete - * the requested port enable. - * - * @param tunnel The tunnel to enable. - * - * @return 0 on success, -1 on failure. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_enable_tunnel(TUNNEL_T *tunnel); - - -/** - * The <DFN>ilclient_flush_tunnels()</DFN> function will flush a number of tunnels - * from the list of tunnels presented. For each tunnel that is to be - * flushed, both source and sink ports are sent a flush command. The - * function then waits for both ports to report they have completed - * the flush operation. - * - * @param tunnel List of tunnels. The list must be terminated with a - * tunnel structure with <DFN>NULL</DFN> component entries. - * - * @param max The maximum number of tunnels to flush from the list. - * A value of 0 indicates that all tunnels in the list are flushed. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_flush_tunnels(TUNNEL_T *tunnel, - int max); - - -/** - * The <DFN>ilclient_teardown_tunnels()</DFN> function tears down all tunnels in - * the list of tunnels presented. For each tunnel in the list, the - * <DFN>OMX_SetupTunnel</DFN> is called on the source port and on the sink port, - * where for both calls the destination component is <DFN>NULL</DFN> and the - * destination port is zero. The VMCSX IL implementation requires - * that all tunnels are torn down in this manner before components are - * freed. - * - * @param tunnels List of tunnels to teardown. The list must be - * terminated with a tunnel structure with <DFN>NULL</DFN> component entries. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_teardown_tunnels(TUNNEL_T *tunnels); - - -/** - * The <DFN>ilclient_get_output_buffer()</DFN> function returns a buffer - * that was sent to an output port and that has been returned from a - * component using the <DFN>OMX_FillBufferDone</DFN> callback. - * - * @param comp The component that returned the buffer. - * - * @param portIndex The port index on the component that the buffer - * was returned from. - * - * @param block If non-zero, the function will block until a buffer is available. - * - * @return Pointer to buffer if available, otherwise <DFN>NULL</DFN>. - ***********************************************************/ -VCHPRE_ OMX_BUFFERHEADERTYPE* VCHPOST_ ilclient_get_output_buffer(COMPONENT_T *comp, - int portIndex, - int block); - - -/** - * The <DFN>ilclient_get_input_buffer()</DFN> function returns a buffer - * that was sent to an input port and that has been returned from a - * component using the <DFN>OMX_EmptyBufferDone</DFN> callback. - * - * @param comp The component that returned the buffer. - * - * @param portIndex The port index on the component from which the buffer - * was returned. - * - * @param block If non-zero, the function will block until a buffer is available. - * - * @return pointer to buffer if available, otherwise <DFN>NULL</DFN> - ***********************************************************/ -VCHPRE_ OMX_BUFFERHEADERTYPE* VCHPOST_ ilclient_get_input_buffer(COMPONENT_T *comp, - int portIndex, - int block); - - -/** - * The <DFN>ilclient_remove_event()</DFN> function queries the event list for the - * given component, matching against the given criteria. If a matching - * event is found, it is removed and added to the free event list. - * - * @param comp The component that returned the matching event. - * - * @param event The event type of the matching event. - * - * @param nData1 The <DFN>nData1</DFN> field of the matching event. - * - * @param ignore1 Whether to ignore the <DFN>nData1</DFN> field when finding a - * matching event. A value of 0 indicates that <DFN>nData1</DFN> must match, a - * value of 1 indicates that <DFN>nData1</DFN> does not have to match. - * - * @param nData2 The <DFN>nData2</DFN> field of the matching event. - * - * @param ignore2 Whether to ignore the <DFN>nData2</DFN> field when finding a - * matching event. A value of 0 indicates that <DFN>nData2</DFN> must match, a - * value of 1 indicates that <DFN>nData2</DFN> does not have to match. - * - * @return 0 if the event was removed. -1 if no matching event was - * found. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_remove_event(COMPONENT_T *comp, - OMX_EVENTTYPE event, - OMX_U32 nData1, - int ignore1, - OMX_U32 nData2, - int ignore2); - - -/** - * The <DFN>ilclient_return_events()</DFN> function removes all events - * from a component event list and adds them to the IL client free - * event list. This function is automatically called when components - * are freed. - * - * @param comp The component from which all events should be moved to - * the free list. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_return_events(COMPONENT_T *comp); - - -/** - * The <DFN>ilclient_wait_for_event()</DFN> function is similar to - * <DFN>ilclient_remove_event()</DFN>, but allows the caller to block until that - * event arrives. - * - * @param comp The component that returned the matching event. - * - * @param event The event type of the matching event. - * - * @param nData1 The <DFN>nData1</DFN> field of the matching event. - * - * @param ignore1 Whether to ignore the <DFN>nData1</DFN> field when finding a - * matching event. A value of 0 indicates that <DFN>nData1</DFN> must match, a - * value of 1 indicates that <DFN>nData1</DFN> does not have to match. - * - * @param nData2 The <DFN>nData2</DFN> field of the matching event. - * - * @param ignore2 Whether to ignore the <DFN>nData2</DFN> field when finding a - * matching event. A value of 0 indicates that <DFN>nData2</DFN> must match, a - * value of 1 indicates that <DFN>nData2</DFN> does not have to match. - * - * @param event_flag Specifies a bitfield of IL client events to wait - * for, given in <DFN>ILEVENT_MASK_T</DFN>. If any of these events - * are signalled by the component, the event list is then re-checked - * for a matching event. If the <DFN>ILCLIENT_EVENT_ERROR</DFN> bit - * is included, and an error is signalled by the component, then the - * function will return an error code. If the - * <DFN>ILCLIENT_CONFIG_CHANGED</DFN> bit is included, and this bit is - * signalled by the component, then the function will return an error - * code. - * - * @param timeout Specifies how long to block for in milliseconds - * before returning a failure. - * - * @return 0 indicates success, a matching event has been removed from - * the component's event queue. A negative return indicates failure, - * in this case no events have been removed from the component's event - * queue. - * - -1: a timeout was received. - * - -2: an error event was received. - * - -3: a config changed event was received. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_wait_for_event(COMPONENT_T *comp, - OMX_EVENTTYPE event, - OMX_U32 nData1, - int ignore1, - OMX_U32 nData2, - int ignore2, - int event_flag, - int timeout); - - -/** - * The <DFN>ilclient_wait_for_command_complete()</DFN> function waits - * for a message from a component that indicates that the command - * has completed. This is either a command success message, or an - * error message that signals the completion of an event. - * - * @param comp The component currently processing a command. - * - * @param command The command being processed. This must be either - * <DFN>OMX_CommandStateSet</DFN>, <DFN>OMX_CommandPortDisable</DFN> - * or <DFN>OMX_CommandPortEnable</DFN>. - * - * @param nData2 The expected value of <DFN>nData2</DFN> in the - * command complete message. - * - * @return 0 indicates success, either the command successfully completed - * or the <DFN>OMX_ErrorSameState</DFN> was returned. -1 indicates - * that the command terminated with a different error message. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_wait_for_command_complete(COMPONENT_T *comp, - OMX_COMMANDTYPE command, - OMX_U32 nData2); - - -/** - * The <DFN>ilclient_wait_for_command_complete_dual()</DFN> function - * is similar to <DFN>ilclient_wait_for_command_complete()</DFN>. The - * difference is that while waiting for the component to complete the - * event or raise an error, we can also report if another reports an - * error that terminates a command. This is useful if the two - * components are tunneled, and we need to wait for one component to - * enable a port, or change state to <DFN>OMX_StateIdle</DFN>. If the - * other component is the buffer supplier and reports an error, then - * it will not allocate buffers, so our first component may stall. - * - * @param comp The component currently processing a command. - * - * @param command The command being processed. This must be either - * <DFN>OMX_CommandStateSet</DFN>, <DFN>OMX_CommandPortDisable</DFN> - * or <DFN>OMX_CommandPortEnable</DFN>. - * - * @param nData2 The expected value of <DFN>nData2</DFN> in the - * command complete message. - * - * @param related Another component, where we will return if this - * component raises an error that terminates a command. - * - * @return 0 indicates success, either the command successfully - * completed or the <DFN>OMX_ErrorSameState</DFN> was returned. -1 - * indicates that the command terminated with a different error - * message. -2 indicates that the related component raised an error. - * In this case, the error is not cleared from the related - * component's event list. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_wait_for_command_complete_dual(COMPONENT_T *comp, - OMX_COMMANDTYPE command, - OMX_U32 nData2, - COMPONENT_T *related); - - -/** - * The <DFN>ilclient_debug_output()</DFN> function adds a message to a - * host-specific debug display. For a local VideoCore host the message is - * added to the internal message log. For a Win32 host the message is - * printed to the debug display. This function should be customised - * when IL client is ported to another platform. - * - * @param format A message to add, together with the variable - * argument list similar to <DFN>printf</DFN> and other standard C functions. - * - * @return void - ***********************************************************/ -VCHPRE_ void VCHPOST_ ilclient_debug_output(char *format, ...); - -/** - * The <DFN>ilclient_get_handle()</DFN> function returns the - * underlying OMX component held by an IL component handle. This is - * needed when calling methods such as <DFN>OMX_SetParameter</DFN> on - * a component created using the IL client library. - * - * @param comp IL component handle - * - * @return The <DFN>OMX_HANDLETYPE</DFN> value for the component. - ***********************************************************/ -VCHPRE_ OMX_HANDLETYPE VCHPOST_ ilclient_get_handle(COMPONENT_T *comp); - - -#ifndef OMX_SKIP64BIT - -/** - * Macro to return <DFN>OMX_TICKS</DFN> from a signed 64 bit value. - * This is the version where <DFN>OMX_TICKS</DFN> is a signed 64 bit - * value, an alternative definition is used when <DFN>OMX_TICKS</DFN> - * is a structure. - */ -#define ilclient_ticks_from_s64(s) (s) - -/** - * Macro to return signed 64 bit value from <DFN>OMX_TICKS</DFN>. - * This is the version where <DFN>OMX_TICKS</DFN> is a signed 64 bit - * value, an alternative definition is used when <DFN>OMX_TICKS</DFN> - * is a structure. - */ -#define ilclient_ticks_to_s64(t) (t) - -#else - -/** - * Inline function to return <DFN>OMX_TICKS</DFN> from a signed 64 bit - * value. This is the version where <DFN>OMX_TICKS</DFN> is a - * structure, an alternative definition is used when - * <DFN>OMX_TICKS</DFN> is a signed 64 bit value. - */ -static inline OMX_TICKS ilclient_ticks_from_s64(int64_t s) { - OMX_TICKS ret; - ret.nLowPart = s; - ret.nHighPart = s>>32; - return ret; -} - -/** - * Inline function to return signed 64 bit value from - * <DFN>OMX_TICKS</DFN>. This is the version where - * <DFN>OMX_TICKS</DFN> is a structure, an alternative definition is - * used when <DFN>OMX_TICKS</DFN> is a signed 64 bit value. - */ -static inline int64_t ilclient_ticks_to_s64(OMX_TICKS t) { - uint64_t u = t.nLowPart | ((uint64_t)t.nHighPart << 32); - return u; -} - - -#endif /* OMX_SKIP64BIT */ - -/** - * The <DFN>ilclient_get_port_index()</DFN> function returns the n'th - * port index of the specified type and direction for the given - * component. - * - * @param comp The component of interest - * @param dir The direction - * @param type The type, or -1 for any type. - * @param index Which port (counting from 0). - * - * @return The port index, or -1 if not found. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_get_port_index(COMPONENT_T *comp, - OMX_DIRTYPE dir, - OMX_PORTDOMAINTYPE type, - int index); - - -/** - * The <DFN>ilclient_suggest_bufsize()</DFN> function gives a - * component a hint about the size of buffer it should use. This size - * is set on the component by setting the - * <DFN>OMX_IndexParamBrcmOutputBufferSize</DFN> index on the given - * component. - * - * @param comp IL component handle - * @param nBufSizeHint Size of buffer in bytes - * - * @return 0 indicates success, -1 indicates failure. - ***********************************************************/ -VCHPRE_ int VCHPOST_ ilclient_suggest_bufsize(COMPONENT_T *comp, - OMX_U32 nBufSizeHint); - - -/** - * The <DFN>ilclient_stack_size()</DFN> function suggests a minimum - * stack size that tasks calling into with API will require. - * - * @return Suggested stack size in bytes. - ***********************************************************/ -VCHPRE_ unsigned int VCHPOST_ ilclient_stack_size(void); - -#endif /* ILCLIENT_H */ diff --git a/vc/src/hello_pi/libs/ilclient/ilcore.c b/vc/src/hello_pi/libs/ilclient/ilcore.c @@ -1,308 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * \file - * - * \brief Host core implementation. - */ - -#include <stdio.h> -#include <stdarg.h> - -//includes -#include <memory.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "IL/OMX_Component.h" -#include "interface/vcos/vcos.h" - -#include "interface/vmcs_host/vcilcs.h" -#include "interface/vmcs_host/vchost.h" -#include "interface/vmcs_host/vcilcs_common.h" - -static int coreInit = 0; -static int nActiveHandles = 0; -static ILCS_SERVICE_T *ilcs_service = NULL; -static VCOS_MUTEX_T lock; -static VCOS_ONCE_T once = VCOS_ONCE_INIT; - -/* Atomic creation of lock protecting shared state */ -static void initOnce(void) -{ - VCOS_STATUS_T status; - status = vcos_mutex_create(&lock, VCOS_FUNCTION); - vcos_demand(status == VCOS_SUCCESS); -} - -/* OMX_Init */ -OMX_ERRORTYPE OMX_APIENTRY OMX_Init(void) -{ - VCOS_STATUS_T status; - OMX_ERRORTYPE err = OMX_ErrorNone; - - status = vcos_once(&once, initOnce); - vcos_demand(status == VCOS_SUCCESS); - - vcos_mutex_lock(&lock); - - if(coreInit == 0) - { - // we need to connect via an ILCS connection to VideoCore - VCHI_INSTANCE_T initialise_instance; - VCHI_CONNECTION_T *connection; - ILCS_CONFIG_T config; - - vc_host_get_vchi_state(&initialise_instance, &connection); - - vcilcs_config(&config); - - ilcs_service = ilcs_init((VCHIQ_INSTANCE_T) initialise_instance, (void **) &connection, &config, 0); - - if(ilcs_service == NULL) - { - err = OMX_ErrorHardware; - goto end; - } - - coreInit = 1; - } - else - coreInit++; - -end: - vcos_mutex_unlock(&lock); - return err; -} - -/* OMX_Deinit */ -OMX_ERRORTYPE OMX_APIENTRY OMX_Deinit(void) -{ - if(coreInit == 0) // || (coreInit == 1 && nActiveHandles > 0)) - return OMX_ErrorNotReady; - - vcos_mutex_lock(&lock); - - coreInit--; - - if(coreInit == 0) - { - // we need to teardown the ILCS connection to VideoCore - ilcs_deinit(ilcs_service); - ilcs_service = NULL; - } - - vcos_mutex_unlock(&lock); - - return OMX_ErrorNone; -} - - -/* OMX_ComponentNameEnum */ -OMX_ERRORTYPE OMX_APIENTRY OMX_ComponentNameEnum( - OMX_OUT OMX_STRING cComponentName, - OMX_IN OMX_U32 nNameLength, - OMX_IN OMX_U32 nIndex) -{ - if(ilcs_service == NULL) - return OMX_ErrorBadParameter; - - return vcil_out_component_name_enum(ilcs_get_common(ilcs_service), cComponentName, nNameLength, nIndex); -} - - -/* OMX_GetHandle */ -OMX_ERRORTYPE OMX_APIENTRY OMX_GetHandle( - OMX_OUT OMX_HANDLETYPE* pHandle, - OMX_IN OMX_STRING cComponentName, - OMX_IN OMX_PTR pAppData, - OMX_IN OMX_CALLBACKTYPE* pCallBacks) -{ - OMX_ERRORTYPE eError; - OMX_COMPONENTTYPE *pComp; - OMX_HANDLETYPE hHandle = 0; - - if (pHandle == NULL || cComponentName == NULL || pCallBacks == NULL || ilcs_service == NULL) - { - if(pHandle) - *pHandle = NULL; - return OMX_ErrorBadParameter; - } - - { - pComp = (OMX_COMPONENTTYPE *)malloc(sizeof(OMX_COMPONENTTYPE)); - if (!pComp) - { - vcos_assert(0); - return OMX_ErrorInsufficientResources; - } - memset(pComp, 0, sizeof(OMX_COMPONENTTYPE)); - hHandle = (OMX_HANDLETYPE)pComp; - pComp->nSize = sizeof(OMX_COMPONENTTYPE); - pComp->nVersion.nVersion = OMX_VERSION; - eError = vcil_out_create_component(ilcs_get_common(ilcs_service), hHandle, cComponentName); - - if (eError == OMX_ErrorNone) { - // Check that all function pointers have been filled in. - // All fields should be non-zero. - int i; - uint32_t *p = (uint32_t *) pComp; - for(i=0; i<sizeof(OMX_COMPONENTTYPE)>>2; i++) - if(*p++ == 0) - eError = OMX_ErrorInvalidComponent; - - if(eError != OMX_ErrorNone && pComp->ComponentDeInit) - pComp->ComponentDeInit(hHandle); - } - - if (eError == OMX_ErrorNone) { - eError = pComp->SetCallbacks(hHandle,pCallBacks,pAppData); - if (eError != OMX_ErrorNone) - pComp->ComponentDeInit(hHandle); - } - if (eError == OMX_ErrorNone) { - *pHandle = hHandle; - } - else { - *pHandle = NULL; - free(pComp); - } - } - - if (eError == OMX_ErrorNone) { - vcos_mutex_lock(&lock); - nActiveHandles++; - vcos_mutex_unlock(&lock); - } - - return eError; -} - -/* OMX_FreeHandle */ -OMX_ERRORTYPE OMX_APIENTRY OMX_FreeHandle( - OMX_IN OMX_HANDLETYPE hComponent) -{ - OMX_ERRORTYPE eError = OMX_ErrorNone; - OMX_COMPONENTTYPE *pComp; - - if (hComponent == NULL || ilcs_service == NULL) - return OMX_ErrorBadParameter; - - pComp = (OMX_COMPONENTTYPE*)hComponent; - - if (ilcs_service == NULL) - return OMX_ErrorBadParameter; - - eError = (pComp->ComponentDeInit)(hComponent); - if (eError == OMX_ErrorNone) { - vcos_mutex_lock(&lock); - --nActiveHandles; - vcos_mutex_unlock(&lock); - free(pComp); - } - - vcos_assert(nActiveHandles >= 0); - - return eError; -} - -/* OMX_SetupTunnel */ -OMX_ERRORTYPE OMX_APIENTRY OMX_SetupTunnel( - OMX_IN OMX_HANDLETYPE hOutput, - OMX_IN OMX_U32 nPortOutput, - OMX_IN OMX_HANDLETYPE hInput, - OMX_IN OMX_U32 nPortInput) -{ - OMX_ERRORTYPE eError = OMX_ErrorNone; - OMX_COMPONENTTYPE *pCompIn, *pCompOut; - OMX_TUNNELSETUPTYPE oTunnelSetup; - - if ((hOutput == NULL && hInput == NULL) || ilcs_service == NULL) - return OMX_ErrorBadParameter; - - oTunnelSetup.nTunnelFlags = 0; - oTunnelSetup.eSupplier = OMX_BufferSupplyUnspecified; - - pCompOut = (OMX_COMPONENTTYPE*)hOutput; - - if (hOutput){ - eError = pCompOut->ComponentTunnelRequest(hOutput, nPortOutput, hInput, nPortInput, &oTunnelSetup); - } - - if (eError == OMX_ErrorNone && hInput) { - pCompIn = (OMX_COMPONENTTYPE*)hInput; - eError = pCompIn->ComponentTunnelRequest(hInput, nPortInput, hOutput, nPortOutput, &oTunnelSetup); - - if (eError != OMX_ErrorNone && hOutput) { - /* cancel tunnel request on output port since input port failed */ - pCompOut->ComponentTunnelRequest(hOutput, nPortOutput, NULL, 0, NULL); - } - } - return eError; -} - -/* OMX_GetComponentsOfRole */ -OMX_ERRORTYPE OMX_GetComponentsOfRole ( - OMX_IN OMX_STRING role, - OMX_INOUT OMX_U32 *pNumComps, - OMX_INOUT OMX_U8 **compNames) -{ - OMX_ERRORTYPE eError = OMX_ErrorNone; - - *pNumComps = 0; - return eError; -} - -/* OMX_GetRolesOfComponent */ -OMX_ERRORTYPE OMX_GetRolesOfComponent ( - OMX_IN OMX_STRING compName, - OMX_INOUT OMX_U32 *pNumRoles, - OMX_OUT OMX_U8 **roles) -{ - OMX_ERRORTYPE eError = OMX_ErrorNone; - - *pNumRoles = 0; - return eError; -} - -/* OMX_GetDebugInformation */ -OMX_ERRORTYPE OMX_GetDebugInformation ( - OMX_OUT OMX_STRING debugInfo, - OMX_INOUT OMX_S32 *pLen) -{ - if(ilcs_service == NULL) - return OMX_ErrorBadParameter; - - return vcil_out_get_debug_information(ilcs_get_common(ilcs_service), debugInfo, pLen); -} - - - -/* File EOF */ - diff --git a/vc/src/hello_pi/libs/ilclient/libilclient.a b/vc/src/hello_pi/libs/ilclient/libilclient.a Binary files differ. diff --git a/vc/src/hello_pi/libs/vgfont/Makefile b/vc/src/hello_pi/libs/vgfont/Makefile @@ -1,7 +0,0 @@ -OBJS=font.o vgft.o graphics.o -LIB=libvgfont.a - -INCLUDES+=-I$(SDKSTAGE)/usr/include/freetype2 -I$(SDKSTAGE)/usr/include -I$(SDKSTAGE)/usr/include/arm-linux-gnueabi - -include ../../Makefile.include - diff --git a/vc/src/hello_pi/libs/vgfont/font.c b/vc/src/hello_pi/libs/vgfont/font.c @@ -1,355 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Font handling for graphicsx - -/** @file font.c - * - * Fairly primitive font handling, just enough to emulate the old API. - * - * Hinting and Font Size - * - * The old API does not create fonts explicitly, it just renders them - * as needed. That works fine for unhinted fonts, but for hinted fonts we - * care about font size. - * - * Since we now *can* do hinted fonts, we should do. Regenerating the - * fonts each time becomes quite slow, so we maintain a cache of fonts. - * - * For the typical applications which use graphics_x this is fine, but - * won't work well if lots of fonts sizes are used. - * - * Unicode - * - * This API doesn't support unicode at all at present, nor UTF-8. - */ - -#include <fcntl.h> -#include <stdio.h> -#include <unistd.h> -#include <sys/types.h> - -#include "graphics_x_private.h" -#include "vgft.h" - -#define VMCS_INSTALL_PREFIX "" - -/** The one and only (default) font we support for now. - */ -static struct -{ - const char *file; - void *mem; - size_t len; -} default_font = { "fixedsys.ttf" }; - -/** An entry in our list of fonts - */ -typedef struct gx_font_cache_entry_t -{ - struct gx_font_cache_entry_t *next; - VGFT_FONT_T font; - uint32_t ptsize; /** size in points, 26.6 */ -} gx_font_cache_entry_t; - -static char fname[128]; -static int inited; -static gx_font_cache_entry_t *fonts; - -static VGFT_FONT_T *find_font(const char *text, uint32_t text_size); - -VCOS_STATUS_T gx_priv_font_init(const char *font_dir) -{ - VCOS_STATUS_T ret; - size_t len; - int rc; - if (vgft_init()) - { - ret = VCOS_ENOMEM; - goto fail_init; - } - - int fd = -1; - // search for the font - sprintf(fname, "%s/%s", font_dir, default_font.file); - fd = open(fname, O_RDONLY); - - if (fd < 0) - { - GX_ERROR("Could not open font file '%s'", default_font.file); - ret = VCOS_ENOENT; - goto fail_open; - } - - len = lseek(fd, 0, SEEK_END); - lseek(fd, 0, SEEK_SET); - - default_font.mem = vcos_malloc(len, default_font.file); - if (!default_font.mem) - { - GX_ERROR("No memory for font %s", fname); - ret = VCOS_ENOMEM; - goto fail_mem; - } - - rc = read(fd, default_font.mem, len); - if (rc != len) - { - GX_ERROR("Could not read font %s", fname); - ret = VCOS_EINVAL; - goto fail_rd; - } - default_font.len = len; - close(fd); - - GX_TRACE("Opened font file '%s'", fname); - - inited = 1; - return VCOS_SUCCESS; - -fail_rd: - vcos_free(default_font.mem); -fail_mem: - if (fd >= 0) close(fd); -fail_open: - vgft_term(); -fail_init: - return ret; -} - -void gx_priv_font_term(void) -{ - gx_font_cache_flush(); - vgft_term(); - vcos_free(default_font.mem); -} - -/** Render text. - * - * FIXME: Not at all optimal - re-renders each time. - * FIXME: Not UTF-8 aware - * FIXME: better caching - */ -VCOS_STATUS_T gx_priv_render_text( GX_DISPLAY_T *disp, - GRAPHICS_RESOURCE_HANDLE res, - int32_t x, - int32_t y, - uint32_t width, - uint32_t height, - uint32_t fg_colour, - uint32_t bg_colour, - const char *text, - uint32_t text_length, - uint32_t text_size ) -{ - VGfloat vg_colour[4]; - VGFT_FONT_T *font; - VGPaint fg; - GX_CLIENT_STATE_T save; - VCOS_STATUS_T status = VCOS_SUCCESS; - int clip = 1; - - vcos_demand(inited); // has gx_font_init() been called? - - gx_priv_save(&save, res); - - if (width == GRAPHICS_RESOURCE_WIDTH && - height == GRAPHICS_RESOURCE_HEIGHT) - { - clip = 0; - } - - width = (width == GRAPHICS_RESOURCE_WIDTH) ? res->width : width; - height = (height == GRAPHICS_RESOURCE_HEIGHT) ? res->height : height; - font = find_font(text, text_size); - if (!font) - { - status = VCOS_ENOMEM; - goto finish; - } - - // setup the clipping rectangle - if (clip) - { - VGint coords[] = {x,y,width,height}; - vgSeti(VG_SCISSORING, VG_TRUE); - vgSetiv(VG_SCISSOR_RECTS, 4, coords); - } - - // setup the background colour if needed - if (bg_colour != GRAPHICS_TRANSPARENT_COLOUR) - { - int err; - VGfloat rendered_w, rendered_h; - VGfloat vg_bg_colour[4]; - - // setup the background colour... - gx_priv_colour_to_paint(bg_colour, vg_bg_colour); - vgSetfv(VG_CLEAR_COLOR, 4, vg_bg_colour); - - // fill in a rectangle... - vgft_get_text_extents(font, text, text_length, (VGfloat)x, (VGfloat)y, &rendered_w, &rendered_h); - - if ( ( 0 < (VGint)rendered_w ) && ( 0 < (VGint)rendered_h ) ) - { - // Have to compensate for the messed up y position of multiline text. - VGfloat offset = vgft_first_line_y_offset(font); - int32_t bottom = y + offset - rendered_h; - - vgClear(x, bottom, (VGint)rendered_w, (VGint)rendered_h); - err = vgGetError(); - if (err) - { - GX_LOG("Error %d clearing bg text %d %d %g %g", - err, x, y, rendered_w, rendered_h); - vcos_assert(0); - } // if - } // if - } // if - // setup the foreground colour - fg = vgCreatePaint(); - if (!fg) - { - status = VCOS_ENOMEM; - goto finish; - } - - // draw the foreground text - vgSetParameteri(fg, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR); - gx_priv_colour_to_paint(fg_colour, vg_colour); - vgSetParameterfv(fg, VG_PAINT_COLOR, 4, vg_colour); - vgSetPaint(fg, VG_FILL_PATH); - - vgft_font_draw(font, (VGfloat)x, (VGfloat)y, text, text_length, VG_FILL_PATH); - - vgDestroyPaint(fg); - - vcos_assert(vgGetError() == 0); - vgSeti(VG_SCISSORING, VG_FALSE); - -finish: - gx_priv_restore(&save); - - return status; -} - - -/** Find a font in our cache, or create a new entry in the cache. - * - * Very primitive at present. - */ -static VGFT_FONT_T *find_font(const char *text, uint32_t text_size) -{ - int ptsize, dpi_x = 0, dpi_y = 0; - VCOS_STATUS_T status; - gx_font_cache_entry_t *font; - - ptsize = text_size << 6; // freetype takes size in points, in 26.6 format. - - for (font = fonts; font; font = font->next) - { - if (font->ptsize == ptsize) - return &font->font; - } - - font = vcos_malloc(sizeof(*font), "font"); - if (!font) - return NULL; - - font->ptsize = ptsize; - - status = vgft_font_init(&font->font); - if (status != VCOS_SUCCESS) - { - vcos_free(font); - return NULL; - } - - // load the font - status = vgft_font_load_mem(&font->font, default_font.mem, default_font.len); - if (status != VCOS_SUCCESS) - { - GX_LOG("Could not load font from memory: %d", status); - vgft_font_term(&font->font); - vcos_free(font); - return NULL; - } - - status = vgft_font_convert_glyphs(&font->font, ptsize, dpi_x, dpi_y); - if (status != VCOS_SUCCESS) - { - GX_LOG("Could not convert font '%s' at size %d", fname, ptsize); - vgft_font_term(&font->font); - vcos_free(font); - return NULL; - } - - font->next = fonts; - fonts = font; - - return &font->font; -} - -void gx_font_cache_flush(void) -{ - while (fonts != NULL) - { - struct gx_font_cache_entry_t *next = fonts->next; - vgft_font_term(&fonts->font); - vcos_free(fonts); - fonts = next; - } -} - -int32_t graphics_resource_text_dimensions_ext(GRAPHICS_RESOURCE_HANDLE res, - const char *text, - const uint32_t text_length, - uint32_t *width, - uint32_t *height, - const uint32_t text_size ) -{ - GX_CLIENT_STATE_T save; - VGfloat w, h; - int ret = -1; - - gx_priv_save(&save, res); - - VGFT_FONT_T *font = find_font(text, text_size); - if (!font) - goto finish; - - - vgft_get_text_extents(font, text, text_length, 0.0, 0.0, &w, &h); - *width = w; - *height = h; - ret = 0; - -finish: - gx_priv_restore(&save); - return ret; -} - diff --git a/vc/src/hello_pi/libs/vgfont/graphics.c b/vc/src/hello_pi/libs/vgfont/graphics.c @@ -1,1609 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Graphics library for VG - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <assert.h> -#include "vgfont.h" -#include "graphics_x_private.h" - -/****************************************************************************** -Defines. -******************************************************************************/ -#define ATEXT_FONT_SIZE 12 /*< Default font size (font size can be set with *_ext functions). */ - -/****************************************************************************** -Local data -******************************************************************************/ -static GX_DISPLAY_T display; /*< Our one and only EGL display. */ - -/** - * We create one eglContext for each of the possible graphics_x resource types - * that are supported. - ***********************************************************/ -static EGLContext gx_contexts[GRAPHICS_RESOURCE_HANDLE_TYPE_MAX]; - -/** Note: we have to share all our contexts, because otherwise it seems - * to be not valid to blit from one image to another if the images - * have different contexts. - * - * That means we have to use a single global lock to serialise all accesses - * to any contexts. - ***********************************************************/ -static VCOS_MUTEX_T lock; - -static EGLConfig gx_configs[GRAPHICS_RESOURCE_HANDLE_TYPE_MAX]; - -static int inited; - -/****************************************************************************** -Local Functions -******************************************************************************/ - -/** Convert graphics_x colour formats into EGL format. */ -static int gx_egl_attrib_colours(EGLint *attribs, GRAPHICS_RESOURCE_TYPE_T res_type) -{ - int i, n; - static EGLint rgba[] = {EGL_RED_SIZE, EGL_GREEN_SIZE, EGL_BLUE_SIZE, EGL_ALPHA_SIZE}; - static uint8_t rgb565[] = {5,6,5,0}; - static uint8_t rgb888[] = {8,8,8,0}; - static uint8_t rgb32a[] = {8,8,8,8}; - - uint8_t *sizes = NULL; - - switch (res_type) - { - case GRAPHICS_RESOURCE_RGB565: - sizes = rgb565; - break; - case GRAPHICS_RESOURCE_RGB888: - sizes = rgb888; - break; - case GRAPHICS_RESOURCE_RGBA32: - sizes = rgb32a; - break; - default: - vcos_assert(0); - return -1; - } - for (n=0, i=0; i<countof(rgba); i++) - { - attribs[n++] = rgba[i]; - attribs[n++] = sizes[i]; - } - return n; -} - -/* Create an EGLContext for a given GRAPHICS_RESOURCE_TYPE */ -static VCOS_STATUS_T create_context(EGLDisplay disp, - GRAPHICS_RESOURCE_TYPE_T image_type, - EGLContext *shared_with) -{ - int n; - EGLConfig configs[1]; - EGLint nconfigs, attribs[32]; - n = gx_egl_attrib_colours(attribs, image_type); - - // we want to be able to do OpenVG on this surface... - attribs[n++] = EGL_RENDERABLE_TYPE; attribs[n++] = EGL_OPENVG_BIT; - attribs[n++] = EGL_SURFACE_TYPE; attribs[n++] = EGL_WINDOW_BIT; - - attribs[n] = EGL_NONE; - - EGLBoolean egl_ret = eglChooseConfig(disp, - attribs, configs, - countof(configs), &nconfigs); - - if (!egl_ret || !nconfigs) - { - GX_LOG("%s: no suitable configurations for res type %d", - __FUNCTION__, image_type); - return VCOS_EINVAL; - } - - EGLContext cxt = eglCreateContext(disp, configs[0], *shared_with, 0); - if (!cxt) - { - GX_LOG("Could not create context for image type %d: 0x%x", - image_type, eglGetError()); - return VCOS_ENOSPC; - } - - gx_contexts[image_type] = cxt; - gx_configs[image_type] = configs[0]; - *shared_with = cxt; - - return VCOS_SUCCESS; -} - -/****************************************************************************** -Functions private to code inside GraphicsX -******************************************************************************/ - -static VCOS_STATUS_T gx_priv_initialise( void ) -{ - int i; - EGLDisplay disp; - EGLint egl_maj, egl_min; - int32_t ret = VCOS_EINVAL; - EGLBoolean result; - - vcos_demand(inited == 0); - - vcos_log_set_level(&gx_log_cat, VCOS_LOG_WARN); - vcos_log_register("graphics", &gx_log_cat); - - memset(&display,0,sizeof(display)); - - gx_priv_init(); - - disp = eglGetDisplay(EGL_DEFAULT_DISPLAY); - - if (disp == EGL_NO_DISPLAY) - { - GX_LOG("Could not open display: 0x%x", eglGetError()); - vcos_assert(0); - goto fail_disp; - } - - result = eglInitialize(disp, &egl_maj, &egl_min); - if (!result) - { - GX_LOG("Could not init display :0x%x", eglGetError()); - vcos_assert(0); // really can't continue - goto fail_egl_init; - } - - result = eglBindAPI(EGL_OPENVG_API); - vcos_assert(result); // really should succeed - - display.disp = disp; - - GX_TRACE("Supported client APIS: %s", eglQueryString(disp, EGL_CLIENT_APIS)); - - // create the available contexts - EGLContext shared_context = EGL_NO_CONTEXT; - ret = create_context(disp,GRAPHICS_RESOURCE_RGB565, &shared_context); - ret |= create_context(disp,GRAPHICS_RESOURCE_RGB888, &shared_context); - ret |= create_context(disp,GRAPHICS_RESOURCE_RGBA32, &shared_context); - - if (ret != VCOS_SUCCESS) - goto fail_cxt; - - eglSwapInterval(disp, 1); - - inited = 1; - - return ret; - -fail_cxt: - for (i=0; i<GRAPHICS_RESOURCE_HANDLE_TYPE_MAX; i++) - { - if (gx_contexts[i]) - { - eglDestroyContext(display.disp,gx_contexts[i]); - vcos_mutex_delete(&lock); - } - } - eglTerminate(display.disp); -fail_egl_init: -fail_disp: - return ret; -} - -/*****************************************************************************/ -void gx_priv_save(GX_CLIENT_STATE_T *state, GRAPHICS_RESOURCE_HANDLE res) -{ - EGLBoolean egl_result; - vcos_assert(res == NULL || (res->magic == RES_MAGIC)); - vcos_assert(res == NULL || !res->context_bound); - - state->context = eglGetCurrentContext(); - state->api = eglQueryAPI(); - state->read_surface = eglGetCurrentSurface(EGL_READ); - state->draw_surface = eglGetCurrentSurface(EGL_DRAW); - state->res = res; - - vcos_assert(state->api); // should never be anything other than VG or GL - - vcos_mutex_lock(&lock); - - egl_result = eglBindAPI(EGL_OPENVG_API); - vcos_assert(egl_result); - - if (res) - { - GX_TRACE("gx_priv_save: eglMakeCurrent: %s, res %x surface %x, cxt %x", vcos_thread_get_name(vcos_thread_current()), - (uint32_t)res, (uint32_t)res->surface, (uint32_t)res->context); - - egl_result = eglMakeCurrent(display.disp, res->surface, - res->surface, res->context); - vcos_assert(egl_result); - - res->context_bound = 1; - } -} - -/*****************************************************************************/ -void gx_priv_restore(GX_CLIENT_STATE_T *state) -{ - EGLBoolean egl_result; - - GX_TRACE("gx_priv_restore: eglMakeCurrent: %s, res %x draw_surface %x, surface %x, cxt %x", vcos_thread_get_name(vcos_thread_current()), - (uint32_t)state->res, (uint32_t)state->draw_surface, (uint32_t)state->read_surface, (uint32_t)state->context); - - // disconnect our thread from this context, so we other threads can use it via - // this API - egl_result = eglMakeCurrent(display.disp, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - vcos_assert(egl_result); - - // now return to the client's API binding - egl_result = eglBindAPI(state->api); - vcos_assert(egl_result); - - egl_result = eglMakeCurrent(display.disp, state->draw_surface, state->read_surface, state->context); - vcos_assert(egl_result); - - if (state->res) state->res->context_bound = 0; - - vcos_mutex_unlock(&lock); -} - -/****************************************************************************** -Functions and data exported as part of the public GraphicsX API -******************************************************************************/ - -VCOS_LOG_CAT_T gx_log_cat; /*< Logging category for GraphicsX. */ - -int32_t graphics_initialise( void ) -{ - // dummy initialisation function. This is typically called - // early in the day before VLLs are available, and so cannot - // do anything useful. - return 0; -} - -/*****************************************************************************/ -int32_t graphics_uninitialise( void ) -{ - int i; - vcos_assert(inited); - - gx_priv_font_term(); - - for (i=0; i<GRAPHICS_RESOURCE_HANDLE_TYPE_MAX; i++) - if (gx_contexts[i]) - eglDestroyContext(display.disp,gx_contexts[i]); - - eglTerminate(display.disp); - gx_priv_destroy(); - vcos_log_unregister(&gx_log_cat); - inited = 0; - return 0; -} - -/*****************************************************************************/ -VCOS_STATUS_T gx_create_window( uint32_t screen_id, - uint32_t width, - uint32_t height, - GRAPHICS_RESOURCE_TYPE_T image_type, - GRAPHICS_RESOURCE_HANDLE *resource_handle ) -{ - int rc; - VCOS_STATUS_T status = VCOS_SUCCESS; - GRAPHICS_RESOURCE_HANDLE h; - EGLBoolean egl_result; - void *cookie; - GX_CLIENT_STATE_T save; - - if (!gx_contexts[image_type]) - { - GX_LOG("Invalid image type %d", image_type); - return VCOS_EINVAL; - } - - h = vcos_calloc(1,sizeof(*h), "graphics_x_resource"); - if (!h) - { - GX_LOG("%s: no memory for resource", __FUNCTION__); - return VCOS_ENOMEM; - } - - // now need to get the native window - rc = gx_priv_create_native_window(screen_id, - width, height, image_type, - &h->u.native_window, - &cookie); - if (rc < 0) - { - GX_LOG("%s: could not create native window", __FUNCTION__); - status = VCOS_ENOMEM; - goto fail_create_native_win; - } - - h->magic = RES_MAGIC; - h->type = GX_WINDOW; - h->alpha = 1.0; - - h->surface = eglCreateWindowSurface(display.disp, gx_configs[image_type], &h->u.native_window.egl_win, NULL); - if (!h->surface) - { - GX_LOG("Could not create window surface: 0x%x", eglGetError()); - status = VCOS_ENOMEM; - goto fail_win; - } - - egl_result = eglSurfaceAttrib(display.disp, h->surface, - EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED); - vcos_assert(egl_result); - - h->context = gx_contexts[image_type]; - h->screen_id = screen_id; - h->width = width; - h->height = height; - h->restype = image_type; - - gx_priv_save(&save, h); - - // fill it with black - status = gx_priv_resource_fill(h, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); - vcos_assert(status == VCOS_SUCCESS); - - gx_priv_finish_native_window(h, cookie); - gx_priv_flush(h); - - *resource_handle = h; - gx_priv_restore(&save); - return status; - -fail_win: - gx_priv_destroy_native_window(h); -fail_create_native_win: - vcos_free(h); - gx_priv_restore(&save); - return status; -} - -/*****************************************************************************/ -int32_t graphics_delete_resource( GRAPHICS_RESOURCE_HANDLE res ) -{ - EGLBoolean result; - - if (!res) - { - // let it slide - mimics old behaviour - return 0; - } - GX_TRACE("delete resource @%p", res); - - vcos_assert(res->magic == RES_MAGIC); - - if (res->type == GX_PBUFFER) - { - GX_CLIENT_STATE_T save; - gx_priv_save(&save, res); - vgDestroyImage(res->u.pixmap); - vcos_assert(vgGetError() == 0); - gx_priv_restore(&save); - } - - GX_TRACE("graphics_delete_resource: calling eglDestroySurface..."); - result = eglDestroySurface(display.disp, res->surface); - vcos_assert(result); - - GX_TRACE("graphics_delete_resource: calling eglWaitClient..."); - eglWaitClient(); // wait for EGL to finish sorting out its surfaces - - if (res->type == GX_WINDOW) - { - GX_TRACE("graphics_delete_resource: calling gx_priv_destroy_native_window..."); - gx_priv_destroy_native_window(res); - } - - res->magic = ~RES_MAGIC; - vcos_free(res); - GX_TRACE("graphics_delete_resource: done"); - - return 0; -} - -/*****************************************************************************/ -int32_t graphics_update_displayed_resource(GRAPHICS_RESOURCE_HANDLE res, - const uint32_t x_offset, - const uint32_t y_offset, - const uint32_t width, - const uint32_t height ) -{ - GX_CLIENT_STATE_T save; - gx_priv_save(&save, res); - - gx_priv_flush(res); - - gx_priv_restore(&save); - - return 0; -} - -/*****************************************************************************/ -int32_t graphics_resource_fill(GRAPHICS_RESOURCE_HANDLE res, - uint32_t x, - uint32_t y, - uint32_t width, - uint32_t height, - uint32_t fill_colour ) -{ - GX_CLIENT_STATE_T save; - gx_priv_save(&save, res); - - VCOS_STATUS_T st = gx_priv_resource_fill( - res, - x, res->height-y-height, - width, height, - fill_colour); - - gx_priv_restore(&save); - - return st == VCOS_SUCCESS ? 0 : -1; -} - -/*****************************************************************************/ -int32_t graphics_resource_render_text_ext( GRAPHICS_RESOURCE_HANDLE res, - const int32_t x, - const int32_t y, - const uint32_t width, - const uint32_t height, - const uint32_t fg_colour, - const uint32_t bg_colour, - const char *text, - const uint32_t text_length, - const uint32_t text_size ) -{ - - /* - * FIXME: Not at all optimal - re-renders each time. - * FIXME: Not UTF-8 safe - * FIXME: much better caching (or any caching) - */ - VCOS_STATUS_T rc = gx_priv_render_text( - &display, res, - x, res->height-y-text_size, width, height, fg_colour, bg_colour, - text, text_length, text_size); - - return (rc == VCOS_SUCCESS) ? 0 : -1; -} - -/*****************************************************************************/ -int32_t graphics_resource_render_text( GRAPHICS_RESOURCE_HANDLE res, - const int32_t x, - const int32_t y, - const uint32_t width, /* this can be GRAPHICS_RESOURCE_WIDTH for no clipping */ - const uint32_t height, /* this can be GRAPHICS_RESOURCE_HEIGHT for no clipping */ - const uint32_t fg_colour, - const uint32_t bg_colour, - const char *text, - const uint32_t text_length) -{ - return graphics_resource_render_text_ext(res, x, y, width, height, - fg_colour, bg_colour, - text, text_length, - ATEXT_FONT_SIZE); -} - -/*****************************************************************************/ -int32_t graphics_get_resource_size( - const GRAPHICS_RESOURCE_HANDLE res, - uint32_t *w, - uint32_t *h) -{ - if (w) *w = res->width; - if (h) *h = res->height; - return 0; -} - -/*****************************************************************************/ -int32_t graphics_get_resource_type(const GRAPHICS_RESOURCE_HANDLE res, GRAPHICS_RESOURCE_TYPE_T *type) -{ - if (type) *type = res->restype; - return 0; -} - -/*****************************************************************************/ -int32_t graphics_bitblt( const GRAPHICS_RESOURCE_HANDLE src, - const uint32_t x, // offset within source - const uint32_t y, // offset within source - const uint32_t width, - const uint32_t height, - GRAPHICS_RESOURCE_HANDLE dest, - const uint32_t x_pos, - const uint32_t y_pos ) -{ - int rc = -1; - VGfloat old[9]; - uint32_t w, h; - VGPaint paint = VG_INVALID_HANDLE; - GX_CLIENT_STATE_T save; - int is_child = 0; - VGImage img = VG_INVALID_HANDLE; - - gx_priv_save(&save, dest); - - if (src->type != GX_PBUFFER) - { - vcos_assert(0); - goto finish; - } - - // create a child image that contains just the part wanted - w = width == GRAPHICS_RESOURCE_WIDTH ? src->width : width; - h = height == GRAPHICS_RESOURCE_HEIGHT ? src->height : height; - - if (x==0 && y==0 && - w == src->width && - h == src->height) - { - img = src->u.pixmap; - } - else - { - is_child = 1; - img = vgChildImage(src->u.pixmap, x, y, w, h); - if (img == VG_INVALID_HANDLE) - { - vcos_assert(0); - goto finish; - } - } - - vcos_assert(vgGetError()==0); - - vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE); - vgGetMatrix(old); - vgLoadIdentity(); - vgTranslate((VGfloat)x_pos, (VGfloat)(dest->height-y_pos)); - vgScale(1.0, -1.0); - - // Do we have a translucency going on? - if (src->alpha != 1.0) - { - VGfloat colour[4] = {1.0,1.0,1.0,src->alpha}; - paint = vgCreatePaint(); - - vgSetParameterfv(paint, VG_PAINT_COLOR, 4, colour); - vgSeti(VG_IMAGE_MODE, VG_DRAW_IMAGE_MULTIPLY); - vgSetPaint(paint, VG_STROKE_PATH | VG_FILL_PATH); - } - vcos_assert(vgGetError()==0); - - vgDrawImage(img); - vcos_assert(vgGetError()==0); - vgLoadMatrix(old); - - int err = vgGetError(); - - if (err) - { - GX_LOG("vg error %x blitting area", err); - vcos_assert(0); - rc = -1; - } - else - { - rc = 0; - } -finish: - if (paint != VG_INVALID_HANDLE) - vgDestroyPaint(paint); - - if (is_child) - vgDestroyImage(img); - - gx_priv_restore(&save); - return rc; -} - -void gx_priv_flush(GRAPHICS_RESOURCE_HANDLE res) -{ - EGLBoolean result; - result = eglSwapBuffers(display.disp, res->surface); - vcos_assert(result); -} - - -/** Map a colour, which the client will have supplied in RGB888. - */ - -void gx_priv_colour_to_paint(uint32_t col, VGfloat *rgba) -{ - // with OpenVG we use RGB order. - rgba[0] = ((VGfloat)((col & R_888_MASK) >> 16 )) / 0xff; - rgba[1] = ((VGfloat)((col & G_888_MASK) >> 8 )) / 0xff; - rgba[2] = ((VGfloat)((col & B_888_MASK) >> 0 )) / 0xff; - rgba[3] = ((VGfloat)((col & ALPHA_888_MASK) >> 24)) / 0xff; -} - -/** Fill an area of a surface with a fixed colour. - */ -VCOS_STATUS_T gx_priv_resource_fill(GRAPHICS_RESOURCE_HANDLE res, - uint32_t x, - uint32_t y, - uint32_t width, - uint32_t height, - uint32_t fill_colour ) -{ - VGfloat vg_clear_colour[4]; - - gx_priv_colour_to_paint(fill_colour, vg_clear_colour); - vgSeti(VG_SCISSORING, VG_FALSE); - - vgSetfv(VG_CLEAR_COLOR, 4, vg_clear_colour); - vgClear(x, y, width, height); - - int err = vgGetError(); - if (err) - { - GX_LOG("vg error %x filling area", err); - vcos_assert(0); - } - - return VCOS_SUCCESS; -} - -VCOS_STATUS_T gx_priv_get_pixels(const GRAPHICS_RESOURCE_HANDLE res, void **p_pixels, GX_RASTER_ORDER_T raster_order) -{ - VCOS_STATUS_T status = VCOS_SUCCESS; - void *pixels, *dest; - uint32_t width, height; - int data_size, pitch; - VGImageFormat image_format; - - if (!p_pixels) - { - status = VCOS_EINVAL; - goto finish; - } - - GX_TRACE("%s: res %p", __FUNCTION__, res); - - graphics_get_resource_size(res, &width, &height); - - /* FIXME: implement e.g. gx_get_pitch */ - switch (res->restype) - { - case GRAPHICS_RESOURCE_RGB565: - pitch = ((width + 31)&(~31)) << 1; - break; - case GRAPHICS_RESOURCE_RGB888: - case GRAPHICS_RESOURCE_RGBA32: - pitch = ((width + 31)&(~31)) << 2; - break; - default: - { - GX_LOG("Unsupported pixel format"); - status = VCOS_EINVAL; - goto finish; - } - } - - data_size = pitch * height; - - /* NB: vgReadPixels requires that the data pointer is aligned, but does not - require the stride to be aligned. Most implementations probably will - require that as well though... */ - pixels = vcos_malloc(data_size, "gx_get_pixels data"); - if (!pixels) - { - GX_LOG("Could not allocate %d bytes for vgReadPixels", data_size); - status = VCOS_ENOMEM; - goto finish; - } - /* FIXME: introduce e.g. GX_COLOR_FORMAT and mapping to VGImageFormat... */ - - /* Hand out image data formatted to match OpenGL RGBA format. - */ - switch (res->restype) - { - case GRAPHICS_RESOURCE_RGB565: - image_format = VG_sBGR_565; - break; - case GRAPHICS_RESOURCE_RGB888: - image_format = VG_sXBGR_8888; - break; - case GRAPHICS_RESOURCE_RGBA32: - image_format = VG_sABGR_8888; - break; - default: - { - GX_LOG("Unsupported pixel format"); - status = VCOS_EINVAL; - goto finish; - } - } - - /* VG raster order is bottom-to-top */ - if (raster_order == GX_TOP_BOTTOM) - { - dest = ((uint8_t*)pixels)+(pitch*(height-1)); - pitch = -pitch; - } - else - { - dest = pixels; - } - - vgReadPixels(dest, pitch, image_format, 0, 0, width, height); - - vcos_assert(vgGetError() == 0); - - *p_pixels = pixels; - -finish: - return status; -} - -static VCOS_STATUS_T convert_image_type(GRAPHICS_RESOURCE_TYPE_T image_type, - VGImageFormat *vg_image_type, - int *pbytes_per_pixel) -{ - int bytes_per_pixel; - - switch (image_type) - { - case GRAPHICS_RESOURCE_RGB565: - *vg_image_type = VG_sRGB_565; - bytes_per_pixel = 2; - break; - case GRAPHICS_RESOURCE_RGB888: - *vg_image_type = VG_sRGBX_8888; - bytes_per_pixel = 3; // 24 bpp - break; - case GRAPHICS_RESOURCE_RGBA32: - *vg_image_type = VG_sARGB_8888; - bytes_per_pixel = 4; - break; - default: - vcos_assert(0); - *vg_image_type = 0; - return VCOS_EINVAL; - } - if (pbytes_per_pixel) - *pbytes_per_pixel = bytes_per_pixel; - - return VCOS_SUCCESS; -} - - -/*****************************************************************************/ -VCOS_STATUS_T gx_create_pbuffer( uint32_t width, - uint32_t height, - GRAPHICS_RESOURCE_TYPE_T image_type, - GRAPHICS_RESOURCE_HANDLE *resource_handle ) -{ - VCOS_STATUS_T status = VCOS_SUCCESS; - GRAPHICS_RESOURCE_HANDLE h; - VGImage image; - VGImageFormat vg_image_type; - GX_CLIENT_STATE_T save; - - h = vcos_calloc(1,sizeof(*h), "graphics_x_resource"); - if (!h) - { - GX_LOG("%s: no memory for resource", __FUNCTION__); - return VCOS_ENOMEM; - } - - status = convert_image_type(image_type, &vg_image_type, NULL); - if (status != VCOS_SUCCESS) - { - vcos_free(h); - return status; - } - - h->magic = RES_MAGIC; - h->context = gx_contexts[image_type]; - h->config = gx_configs[image_type]; - h->alpha = 1.0; - h->type = GX_PBUFFER; - h->width = width; - h->height = height; - h->restype = image_type; - - GX_TRACE("Creating pbuffer surface"); - - EGLint attribs[] = {EGL_WIDTH, width, EGL_HEIGHT, height, EGL_NONE}; - h->surface = eglCreatePbufferSurface(display.disp, h->config, - attribs); - if (!h->surface) - { - GX_LOG("Could not create EGL pbuffer surface: 0x%x", eglGetError()); - vcos_free(h); - return VCOS_EINVAL; - } - - gx_priv_save(&save, h); - - image = vgCreateImage(vg_image_type, width, height, VG_IMAGE_QUALITY_BETTER); - if (image == VG_INVALID_HANDLE) - { - GX_LOG("Could not create vg image type %d: vg error 0x%x", - vg_image_type, vgGetError()); - eglDestroySurface(display.disp, h->surface); - vcos_free(h); - status = VCOS_ENOMEM; - goto finish; - } - - h->u.pixmap = image; - - // fill it with black - status = gx_priv_resource_fill(h, 0, 0, width, height, GRAPHICS_RGBA32(0,0,0,0xff)); - vcos_assert(status == VCOS_SUCCESS); - - *resource_handle = h; -finish: - gx_priv_restore(&save); - return status; -} - -/*****************************************************************************/ -GX_PAINT_T *gx_create_gradient(GRAPHICS_RESOURCE_HANDLE res, - uint32_t start_colour, - uint32_t end_colour) -{ - // holds the two colour stops (offset,r,g,b,a). - VGfloat fill_stops[10]; - GX_CLIENT_STATE_T save; - VGPaint paint = VG_INVALID_HANDLE; - - gx_priv_save(&save, res); - - paint = vgCreatePaint(); - if (!paint) - { - gx_priv_restore(&save); - vcos_log("Could not create paint: vg %d\n", vgGetError()); - vcos_assert(0); - goto finish; - } - - fill_stops[0] = 0.0; - gx_priv_colour_to_paint(start_colour, fill_stops+1); - - fill_stops[5] = 1.0; - gx_priv_colour_to_paint(end_colour, fill_stops+6); - - vgSetParameteri(paint, VG_PAINT_TYPE, VG_PAINT_TYPE_LINEAR_GRADIENT); - vgSetParameterfv(paint, VG_PAINT_COLOR_RAMP_STOPS, 5*2, fill_stops); - -finish: - gx_priv_restore(&save); - return (GX_PAINT_T*)paint; -} - -/*****************************************************************************/ -void gx_destroy_paint(GRAPHICS_RESOURCE_HANDLE res, GX_PAINT_T *p) -{ - GX_CLIENT_STATE_T save; - VGPaint paint = (VGPaint)p; - gx_priv_save(&save, res); - vgDestroyPaint(paint); - gx_priv_restore(&save); -} - -/*****************************************************************************/ -VCOS_STATUS_T gx_fill_gradient(GRAPHICS_RESOURCE_HANDLE dest, - uint32_t x, uint32_t y, - uint32_t width, uint32_t height, - uint32_t radius, - GX_PAINT_T *p) -{ - /* Define start and end points of gradient, see OpenVG specification, - section 9.3.3. */ - VGfloat gradient[4] = {0.0, 0.0, 0.0, 0.0}; - VGPaint paint = (VGPaint)p; - VGPath path; - GX_CLIENT_STATE_T save; - VCOS_STATUS_T status = VCOS_SUCCESS; - - if (!paint) - return VCOS_EINVAL; - - gx_priv_save(&save, dest); - - if (width == GRAPHICS_RESOURCE_WIDTH) - width = dest->width; - - if (height == GRAPHICS_RESOURCE_HEIGHT) - height = dest->height; - - gradient[2] = width; - - vgSetParameterfv(paint, VG_PAINT_LINEAR_GRADIENT, 4, gradient); - vgSetPaint(paint, VG_FILL_PATH); - - path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32, - 1.0, 0.0, 8, 8, VG_PATH_CAPABILITY_ALL); - if (!path) - { - status = VCOS_ENOMEM; - goto finish; - } - - vguRoundRect(path, (VGfloat)x, (VGfloat)y, (VGfloat)width, (VGfloat)height, - (VGfloat)radius, (VGfloat)radius); - vgDrawPath(path, VG_FILL_PATH); - vgDestroyPath(path); - - vcos_assert(vgGetError() == 0); - -finish: - gx_priv_restore(&save); - - return status; -} - -/*****************************************************************************/ -VCOS_STATUS_T gx_graphics_init(const char *font_dir) -{ - GX_CLIENT_STATE_T save; - VCOS_STATUS_T rc; - - gx_priv_save(&save, NULL); - - rc = gx_priv_initialise(); - if (rc == VCOS_SUCCESS) - rc = gx_priv_font_init(font_dir); - - gx_priv_restore(&save); - - return rc; -} - -/*****************************************************************************/ -int gx_is_double_buffered(void) -{ - return 1; -} - -/*****************************************************************************/ -int32_t graphics_userblt(GRAPHICS_RESOURCE_TYPE_T src_type, - const void *src_data, - const uint32_t src_x, - const uint32_t src_y, - const uint32_t width, - const uint32_t height, - const uint32_t pitch, - GRAPHICS_RESOURCE_HANDLE dest, - const uint32_t x_pos, - const uint32_t y_pos ) -{ - VCOS_STATUS_T status; - VGImageFormat vg_src_type; - int bytes_per_pixel; - GX_CLIENT_STATE_T save; - - status = convert_image_type(src_type, &vg_src_type, &bytes_per_pixel); - if (status != VCOS_SUCCESS) - return status; - - gx_priv_save(&save, dest); - - if (dest->type == GX_PBUFFER) - { - vgImageSubData(dest->u.pixmap, - src_data, - pitch, - vg_src_type, - x_pos, y_pos, width, height); - } - else if (dest->type == GX_WINDOW) - { - // need to invert this as VG thinks zero is at the bottom - // while graphics_x thinks it is at the top. - vgWritePixels((uint8_t*)src_data + pitch*(height-1), - -pitch, - vg_src_type, - x_pos, dest->height-y_pos-height, width, height); - } - else - { - vcos_assert(0); - } - - if (vgGetError() == 0) - status = VCOS_SUCCESS; - else - { - vcos_assert(0); - status = VCOS_EINVAL; - } - - gx_priv_restore(&save); - return status; -} - -/*****************************************************************************/ -int32_t graphics_resource_text_dimensions( GRAPHICS_RESOURCE_HANDLE resource_handle, - const char *text, - const uint32_t text_length, - uint32_t *width, - uint32_t *height ) -{ - return graphics_resource_text_dimensions_ext(resource_handle, text, text_length, width, height, ATEXT_FONT_SIZE); -} - -/*****************************************************************************/ -VCOS_STATUS_T gx_render_arrowhead(GRAPHICS_RESOURCE_HANDLE res, - uint32_t tip_x, uint32_t tip_y, - int32_t w, int32_t h, - GX_PAINT_T *p) -{ - VGfloat gradient[4]; - VGPaint paint = (VGPaint)p; - VGPath path; - VCOS_STATUS_T status = VCOS_SUCCESS; - - GX_CLIENT_STATE_T save; - gx_priv_save(&save, res); - - if (!paint) - { - vcos_assert(0); - status = VCOS_EINVAL; - goto finish; - } - - gradient[0] = 0.0; gradient[1] = 0.0; - gradient[2] = w; gradient[2] = 0.0; - - vgSetParameterfv(paint, VG_PAINT_LINEAR_GRADIENT, 4, gradient); - vgSetPaint(paint, VG_FILL_PATH); - - path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_S_32, - 1.0, 0.0, 8, 8, VG_PATH_CAPABILITY_ALL); - if (!path) - { - status = VCOS_ENOMEM; - goto finish; - } - VGfloat points[] = { - (VGfloat)tip_x, (VGfloat)tip_y, - (VGfloat)tip_x + w, (VGfloat)tip_y + h/2, - (VGfloat)tip_x + w, (VGfloat)tip_y - h/2, - }; - - vguPolygon(path, points, 3, 1); - - vgDrawPath(path, VG_FILL_PATH); - vgDestroyPath(path); - - vcos_assert(vgGetError()==0); - -finish: - gx_priv_restore(&save); - return status; -} - -/*****************************************************************************/ -int32_t gx_apply_alpha( GRAPHICS_RESOURCE_HANDLE resource_handle, - const uint8_t alpha ) -{ - vcos_assert(resource_handle); - if (resource_handle->type != GX_PBUFFER) - { - vcos_assert(0); - return -1; - } - resource_handle->alpha = 1.0*alpha/255; - return 0; -} - -/*****************************************************************************/ -int32_t graphics_resource_set_alpha_per_colour( GRAPHICS_RESOURCE_HANDLE res, - const uint32_t colour, - const uint8_t alpha ) -{ - GX_ERROR("Not implemented yet!"); - return 0; -} - -/*****************************************************************************/ -VCOS_STATUS_T gx_get_pixels(const GRAPHICS_RESOURCE_HANDLE res, void **pixels) -{ - VCOS_STATUS_T status = VCOS_SUCCESS; - GX_CLIENT_STATE_T save; - gx_priv_save(&save, res); - - /* Default to top-top-bottom raster scan order */ - status = gx_priv_get_pixels(res, pixels, GX_TOP_BOTTOM); - - gx_priv_restore(&save); - return status; -} - -/*****************************************************************************/ -VCOS_STATUS_T gx_get_pixels_in_raster_order(const GRAPHICS_RESOURCE_HANDLE res, - void **pixels, - GX_RASTER_ORDER_T raster_order) -{ - VCOS_STATUS_T status = VCOS_SUCCESS; - GX_CLIENT_STATE_T save; - gx_priv_save(&save, res); - - status = gx_priv_get_pixels(res, pixels, raster_order); - - gx_priv_restore(&save); - return status; -} - -/*****************************************************************************/ -void gx_free_pixels(const GRAPHICS_RESOURCE_HANDLE res, void *pixels) -{ - vcos_free(pixels); -} - -VCOS_STATUS_T gx_bind_vg( GX_CLIENT_STATE_T *save, GRAPHICS_RESOURCE_HANDLE res ) -{ - gx_priv_save(save, res); - vcos_assert(vgGetError()==0); - return VCOS_SUCCESS; -} - -/** Unbind VG */ -void gx_unbind_vg(GX_CLIENT_STATE_T *restore) -{ - gx_priv_restore(restore); -} - - -GX_CLIENT_STATE_T *gx_alloc_context(void) -{ - GX_CLIENT_STATE_T *ret = vcos_calloc(1,sizeof(*ret), "gx_client_state"); - return ret; -} - -void gx_free_context(GX_CLIENT_STATE_T *state) -{ - vcos_free(state); -} - -void gx_convert_colour(uint32_t colour, float *dest) -{ - gx_priv_colour_to_paint(colour, dest); -} - - -#define MAX_DISPLAY_HANDLES 4 - -#define CHANGE_LAYER (1<<0) -#define CHANGE_OPACITY (1<<1) -#define CHANGE_DEST (1<<2) -#define CHANGE_SRC (1<<3) -#define CHANGE_MASK (1<<4) -#define CHANGE_XFORM (1<<5) - -typedef struct -{ - /** Keep a display handle going for each connected screen (LCD, HDMI). */ - DISPMANX_DISPLAY_HANDLE_T screens[MAX_DISPLAY_HANDLES]; - int refcounts[MAX_DISPLAY_HANDLES]; - - //a flag to count the number of dispman starts that have been invoked - - uint32_t dispman_start_count; - // maintain the single global handle to the update in progress - DISPMANX_UPDATE_HANDLE_T current_update; - - VCOS_MUTEX_T lock; -} gx_priv_state_t; - -static gx_priv_state_t gx; - -void gx_priv_init(void) -{ - vcos_mutex_create(&gx.lock,NULL); -} - -void gx_priv_destroy(void) -{ - vcos_mutex_delete(&gx.lock); -} - - -static -int32_t gx_priv_open_screen(uint32_t index, DISPMANX_DISPLAY_HANDLE_T *pscreen) -{ - int ret = -1; - vcos_mutex_lock(&gx.lock); - - if (gx.refcounts[index] != 0) - { - *pscreen = gx.screens[index]; - gx.refcounts[index]++; - ret = 0; - } - else - { - DISPMANX_DISPLAY_HANDLE_T h = vc_dispmanx_display_open(index); - if (h == DISPMANX_NO_HANDLE) - { - GX_LOG("Could not open dispmanx display %d", index); - ret = -1; - goto finish; - } - gx.screens[index] = h; - gx.refcounts[index] = 1; - *pscreen = h; - ret = 0; - } -finish: - vcos_mutex_unlock(&gx.lock); - return ret; -} - -static -int32_t gx_priv_release_screen(uint32_t index) -{ - vcos_mutex_lock(&gx.lock); - gx.refcounts[index]--; - if (gx.refcounts[index] == 0) - { - vc_dispmanx_display_close(gx.screens[index]); - gx.screens[index] = DISPMANX_NO_HANDLE; - } - vcos_mutex_unlock(&gx.lock); - return 0; -} - - - - -int gx_priv_create_native_window(uint32_t screen_id, - uint32_t w, uint32_t h, - GRAPHICS_RESOURCE_TYPE_T type, - GX_NATIVE_WINDOW_T *win, - void **cookie) -{ - int rc; - DISPMANX_DISPLAY_HANDLE_T dispmanx_display; - VC_RECT_T dst_rect; - VC_RECT_T src_rect; - DISPMANX_UPDATE_HANDLE_T current_update; - *cookie = NULL; - - rc = gx_priv_open_screen(screen_id, &dispmanx_display); - if (rc < 0) - { - GX_LOG("Could not open display %d", screen_id); - goto fail_screen; - } - - current_update = vc_dispmanx_update_start(0); - if (!current_update) - { - GX_LOG("Could not start update on screen %d", screen_id); - goto fail_update; - } - - src_rect.x = src_rect.y = 0; - src_rect.width = w << 16; - src_rect.height = h << 16; - - dst_rect.x = dst_rect.y = 0; - dst_rect.width = dst_rect.height = 1; - - win->egl_win.width = w; - win->egl_win.height = h; - VC_DISPMANX_ALPHA_T alpha; - memset(&alpha, 0x0, sizeof(VC_DISPMANX_ALPHA_T)); - alpha.flags = DISPMANX_FLAGS_ALPHA_FROM_SOURCE; - - DISPMANX_CLAMP_T clamp; - memset(&clamp, 0x0, sizeof(DISPMANX_CLAMP_T)); - - win->egl_win.element = vc_dispmanx_element_add(current_update, dispmanx_display, - 0 /* layer */, &dst_rect, - 0 /* src */, &src_rect, - DISPMANX_PROTECTION_NONE, - &alpha /* alpha */, - &clamp /* clamp */, - 0 /* transform */); - - if ( !win->egl_win.element ) - { - GX_LOG("Could not add element %dx%d",w,h); - vc_dispmanx_update_submit_sync(current_update); - rc = -1; - } - - // have to pass back the update so it can be completed *After* the - // window has been initialised (filled with background colour). - *cookie = (void*)current_update; - - return 0; - -fail_update: - gx_priv_release_screen(screen_id); -fail_screen: - return rc; -} - -void gx_priv_finish_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res, - void *current_update) -{ - vc_dispmanx_update_submit_sync((DISPMANX_UPDATE_HANDLE_T)current_update); -} - -void -gx_priv_destroy_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res) -{ - DISPMANX_UPDATE_HANDLE_T current_update; - - if((current_update = vc_dispmanx_update_start(0)) != 0) - { - int ret = vc_dispmanx_element_remove(current_update, res->u.native_window.egl_win.element); - vcos_assert(ret == 0); - ret = vc_dispmanx_update_submit_sync(current_update); - vcos_assert(ret == 0); - } - - gx_priv_release_screen(res->screen_id); -} - - -/*********************************************************** - * Name: graphics_get_display_size - * - * Arguments: - * void - * - * Description: Return size of display - * - * Returns: int32_t: - * >=0 if it succeeded - * - ***********************************************************/ -int32_t graphics_get_display_size( const uint16_t display_number, - uint32_t *width, - uint32_t *height) -{ - DISPMANX_MODEINFO_T mode_info; - int32_t success = -1; - DISPMANX_DISPLAY_HANDLE_T disp; - vcos_assert(width && height); - *width = *height = 0; - - if(vcos_verify(display_number < MAX_DISPLAY_HANDLES)) - { - // TODO Shouldn't this close the display if it wasn't previously open? - if (gx_priv_open_screen(display_number, &disp) < 0) - { - vcos_assert(0); - return -1; - } - success = vc_dispmanx_display_get_info(disp, &mode_info); - - if( success >= 0 ) - { - *width = mode_info.width; - *height = mode_info.height; - vcos_assert(*height > 64); - } - else - { - vcos_assert(0); - } - } - - return success; -} - -static inline uint16_t auto_size(uint16_t arg, uint16_t actual_size) -{ - return arg == GRAPHICS_RESOURCE_WIDTH ? actual_size : arg; -} - -int32_t graphics_display_resource( GRAPHICS_RESOURCE_HANDLE res, - const uint16_t screen_number, - const int16_t z_order, - const uint16_t offset_x, - const uint16_t offset_y, - const uint16_t dest_width, - const uint16_t dest_height, - const VC_DISPMAN_TRANSFORM_T transform, - const uint8_t display ) -{ - DISPMANX_UPDATE_HANDLE_T update; - int32_t rc; - int xform_changed; - - if (!res) - { - // mimics old behaviour. - (void)vcos_verify(0); - return 0; - } - vcos_assert(res->magic == RES_MAGIC); - - xform_changed = transform != res->transform; - res->transform = transform; - - rc = graphics_update_start(); - update = gx.current_update; - vcos_assert(rc == 0); - - if (display) - { - VC_RECT_T src_rect, dest_rect; - - int32_t src_width = res->width; - int32_t src_height = res->height; - - uint32_t change_flags = CHANGE_LAYER; - - // has the destination position changed? - uint32_t w = auto_size(dest_width, res->width); - uint32_t h = auto_size(dest_height, res->height); - - vcos_assert(screen_number == res->screen_id); - - if (gx.screens[screen_number] == 0) - { - vcos_assert(0); - DISPMANX_DISPLAY_HANDLE_T display_handle; - gx_priv_open_screen(screen_number, &display_handle); - } - - if ((offset_x != res->dest.x) || - (offset_y != res->dest.y) || - (h != res->dest.height) || - (w != res->dest.width)) - { - change_flags |= CHANGE_DEST; - res->dest.x = offset_x; - res->dest.y = offset_y; - res->dest.height = h; - res->dest.width = w; - } - - if (xform_changed) - change_flags |= CHANGE_XFORM; - - vc_dispmanx_rect_set( &src_rect, 0, 0, ((uint32_t)src_width)<<16, ((uint32_t)src_height)<<16 ); - vc_dispmanx_rect_set( &dest_rect, offset_x, offset_y, w, h); - - rc = vc_dispmanx_element_change_attributes(update, - res->u.native_window.egl_win.element, - change_flags, - z_order, /* layer */ - 0xff, /* opacity */ - &dest_rect, - &src_rect, - 0, transform); - - vcos_assert(rc==0); - gx_priv_flush(res); - - } - else - { - vgFinish(); - eglWaitClient(); - rc = vc_dispmanx_element_change_source(update, res->u.native_window.egl_win.element, 0); - vcos_assert(rc==0); - } - - rc = graphics_update_end(); - vcos_assert(rc==0); - - return rc; -} - -/*********************************************************** - * Name: graphics_update_start - * - * Arguments: - * void - * - * Description: Starts an update UNLESS and update is already in progress - * - * Returns: int32_t: - * >=0 if it succeeded - * - ***********************************************************/ -int32_t graphics_update_start(void) -{ - int32_t success = 0; - - //check we are not already in an update - if ( 0 == gx.dispman_start_count ) - { - gx.current_update = vc_dispmanx_update_start( 10 ); - if( gx.current_update == DISPMANX_NO_HANDLE ) - { - //error - success = -1; - vc_assert( 0 ); - } - } - - if( success == 0 ) - { - //inc the counter - gx.dispman_start_count++; - } - - return success; -} - - -/*********************************************************** - * Name: graphics_update_end - * - * Arguments: - * void - * - * Description: Ends an update UNLESS more than one update is in progress - * - * Returns: int32_t: - * >=0 if it succeeded - * - ***********************************************************/ -int32_t graphics_update_end( void ) -{ - int32_t success = -1; - - // make sure you are checking the return value of graphics_update_start - if(vcos_verify(gx.current_update != DISPMANX_NO_HANDLE)) - { - //check we are in an update - if(vcos_verify(gx.dispman_start_count > 0)) - { - //dec the counter - gx.dispman_start_count--; - - success = 0; - - //is the counter now 0? - if( 0 == gx.dispman_start_count ) - { - eglWaitClient(); - if( vc_dispmanx_update_submit_sync( gx.current_update ) != 0 ) - { - //error - success = -1; - vc_assert( 0 ); - } - } - } - } - - return success; -} - diff --git a/vc/src/hello_pi/libs/vgfont/graphics_x_private.h b/vc/src/hello_pi/libs/vgfont/graphics_x_private.h @@ -1,366 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Graphics library for VG - -#ifndef GRAPHICS_X_PRIVATE_H -#define GRAPHICS_X_PRIVATE_H - -#define VCOS_LOG_CATEGORY (&gx_log_cat) - -#include "EGL/egl.h" -#include "EGL/eglext.h" -#include "VG/openvg.h" -#include "VG/vgu.h" - -#include "vgfont.h" -#include "bcm_host.h" - -extern VCOS_LOG_CAT_T gx_log_cat; - -#define LOG_ERR( fmt, arg... ) vcos_log_error( "%s:%d " fmt, __func__, __LINE__, ##arg) - -#define GX_ERROR(format, arg...) if (1) {} else printf( format "\n", ##arg) -#define GX_LOG(format, arg...) if (1) {} else printf( format "\n", ##arg) -#define GX_TRACE(format, arg...) if (1) {} else printf( format "\n", ##arg) - -typedef struct -{ - EGL_DISPMANX_WINDOW_T egl_win; -} GX_NATIVE_WINDOW_T; - -typedef enum -{ - GX_TOP_BOTTOM, - GX_BOTTOM_TOP, -} GX_RASTER_ORDER_T; - -typedef struct {} GX_PAINT_T; - -typedef struct GX_CLIENT_STATE_T GX_CLIENT_STATE_T; -typedef struct { - EGLDisplay disp; -} GX_DISPLAY_T; - -struct GX_DISPLAY_T -{ - EGLDisplay disp; -}; - -typedef enum -{ - GX_WINDOW, GX_PIXMAP, GX_PBUFFER -} GX_RES_TYPE; - -#define RES_MAGIC ('G'<<24|'X'<<16|'R'<<8|'S'<<0) -#define GX_PRIV_FLAG_FLIP (1<<0) - -/** - * Structure encapsulating the per-surface state. - ***********************************************************/ -typedef struct GRAPHICS_RESOURCE_HANDLE_TABLE_T -{ - union - { - GX_NATIVE_WINDOW_T native_window; - VGImage pixmap; - } u; - GX_RES_TYPE type; - - uint32_t magic; /** To work around broken create interface */ - int context_bound; - const char *last_caller; - EGLSurface surface; - EGLContext context; - EGLConfig config; - uint32_t screen_id; /** 0-LCD, etc */ - uint16_t width; - uint16_t height; - GRAPHICS_RESOURCE_TYPE_T restype; - VC_DISPMAN_TRANSFORM_T transform; - - VC_RECT_T dest; /** destination rectangle in use, for book-keeping */ - - VGfloat alpha; -} GRAPHICS_RESOURCE_HANDLE_TABLE_T; - -/** - * Structure used to store an EGL client state. - ***********************************************************/ -struct GX_CLIENT_STATE_T -{ - EGLSurface read_surface; - EGLSurface draw_surface; - EGLContext context; - EGLenum api; - GRAPHICS_RESOURCE_HANDLE res; -}; - -/** - * \fixme add documentation - * - ***********************************************************/ -void gx_priv_init(void); - -/** - * \fixme add documentation - * - ***********************************************************/ -void gx_priv_destroy(void); - -/** - * \fixme add documentation - * - * @param col colour - * - * @param rgba OpenVG paint colour - * - ***********************************************************/ -void gx_priv_colour_to_paint(uint32_t col, VGfloat *rgba); - -/** - * Save current EGL client state. - * - * @param state upon return, holds the saved EGL client state. - * - * @param res handle to the surface the EGL client state belongs to (may be <code>NULL</code>). - * - */ -void gx_priv_save(GX_CLIENT_STATE_T *state, GRAPHICS_RESOURCE_HANDLE res); - -/** - * Restore current EGL client state. - * - * @param state the EGL client state to restore. - * - */ -void gx_priv_restore(GX_CLIENT_STATE_T *state); - -/** - * Create a native window for a surface. - * - * @param screen_id \fixme - * - * @param w width of the window - * - * @param h height of the window - * - * @param type color/raster format of the resource - * - * @param win upon successful return, holds a handle to the native window - * - * @param cookie \fixme - * - * @return VCOS_SUCCESS on success, or error code. - */ -int gx_priv_create_native_window(uint32_t screen_id, - uint32_t w, uint32_t h, - GRAPHICS_RESOURCE_TYPE_T type, - GX_NATIVE_WINDOW_T *win, - void **cookie); - -/** - * Destroy native window bound to surface. - * - * @param res Handle to surface. - * - */ -void gx_priv_destroy_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res); - -/** - * Initialise font from the given directory. - * - * @param font_dir path to font - * - * \fixme only supports Vera.tff at the moment? - * - * @return VCOS_SUCCESS on success, or error code. - */ -VCOS_STATUS_T gx_priv_font_init(const char *font_dir); - -/** - * \fixme add documentation - * - ***********************************************************/ -void gx_priv_font_term(void); - -/** - * Fill an area of a surface with a single colour. - * - * @param res Handle to surface. - * - * @param x x-offset of area to fill - * - * @param y y-offset of area to fill - * - * @param width width of area to fill - * - * @param height height of area to fill - * - * @param fill_colour fill colour - * - ***********************************************************/ -VCOS_STATUS_T gx_priv_resource_fill(GRAPHICS_RESOURCE_HANDLE res, - uint32_t x, - uint32_t y, - uint32_t width, - uint32_t height, - uint32_t fill_colour ); - -/** - * Render text into a surface - * - * @param disp Handle to display. - * - * @param res Handle to surface. - * - * @param x x-offset - * - * @param y y-offset - * - * @param width bounding rectangle width - * - * @param height bounding rectangle height - * - * @param fg_colour foreground color - * - * @param bg_colour background color - * - * @param text text to render - * - * @param text_length length of text - * - * @param text_size size of text - * - ***********************************************************/ -VCOS_STATUS_T gx_priv_render_text( GX_DISPLAY_T *disp, - GRAPHICS_RESOURCE_HANDLE res, - int32_t x, - int32_t y, - uint32_t width, - uint32_t height, - uint32_t fg_colour, - uint32_t bg_colour, - const char *text, - uint32_t text_length, - uint32_t text_size ); - -/** - * Flush a surface. - * - * @param res Handle to surface. - * - ***********************************************************/ -void gx_priv_flush(GRAPHICS_RESOURCE_HANDLE res); - -/** - * Called after the EGL/VG initialisation of a window has completed - * following its creation. - * - * @param res ??? - * - * @param cookie ??? - * - ***********************************************************/ -void gx_priv_finish_native_window(GRAPHICS_RESOURCE_HANDLE_TABLE_T *res, - void *cookie); - -/** - * Flush font cache. - * - ***********************************************************/ -void gx_font_cache_flush(void); - -/** - * Read a bitmap (.BMP) image from the given file. - * - * @param filename filename (must not be <code>NULL</code>). - * - * @param width holds the width of the image upon return. - * - * @param height holds the height of the image upon return. - * - * @param pitch_bytes holds the pitch of the image data (in bytes) upon return. - * - * @param restype holds the type of the image upon return. - * - * @param vg_format holds the OpenVG image format upon return. - * - * @param flags holds flags describing image properties upon return. - * - * @param image_data_size holds size of the image data upon return. - * - * @param pimage_data holds the image data buffer upon return (must not be <code>NULL</code>), - * the caller is responsible for releasing the buffer afterwards. - * - * @return 0 if success, non-zero otherwise (in which case the output parameters - * may be invalid). - * - ***********************************************************/ -int gx_priv_read_bmp(const char *file_name, - uint32_t *width, uint32_t *height, uint32_t *pitch_bytes, - GRAPHICS_RESOURCE_TYPE_T *restype, - VGImageFormat *vg_format, - uint32_t *flags, - uint32_t *image_data_size, - void **pimage_data); - -/** - * Read a Targa (.TGA) image from the given file. - * - * @param filename filename (must not be <code>NULL</code>). - * - * @param width holds the width of the image upon return. - * - * @param height holds the height of the image upon return. - * - * @param pitch_bytes holds the pitch of the image data (in bytes) upon return. - * - * @param restype holds the type of the image upon return. - * - * @param vg_format holds the OpenVG image format upon return. - * - * @param flags holds flags describing image properties upon return. - * - * @param image_data_size holds size of the image data upon return. - * - * @param pimage_data holds the image data buffer upon return (must not be <code>NULL</code>), - * the caller is responsible for releasing the memory afterwards. - * - * @return 0 if success, non-zero otherwise (in which case the output parameters. - * may be invalid). - * - ***********************************************************/ -int gx_priv_read_tga(const char *file_name, - uint32_t *width, uint32_t *height, uint32_t *pitch_bytes, - GRAPHICS_RESOURCE_TYPE_T *restype, - VGImageFormat *vg_format, - uint32_t *flags, - uint32_t *image_data_size, - void **pimage_data); - -#endif diff --git a/vc/src/hello_pi/libs/vgfont/libvgfont.a b/vc/src/hello_pi/libs/vgfont/libvgfont.a Binary files differ. diff --git a/vc/src/hello_pi/libs/vgfont/vgfont.h b/vc/src/hello_pi/libs/vgfont/vgfont.h @@ -1,136 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Font handling for graphicsx - -#ifndef VCFTLIB_H -#define VCFTLIB_H - -#include <stdint.h> -#include "interface/vmcs_host/vc_dispservice_x_defs.h" -#include "interface/vctypes/vc_image_types.h" -#include "interface/vcos/vcos.h" - -//Definitions which in certain functions can be used to mean the actual width and height of a resource, without -//having to know the data implicitly. -#define GRAPHICS_RESOURCE_WIDTH 0xFFFF -#define GRAPHICS_RESOURCE_HEIGHT 0xFFFF - -#define R_888_MASK (0x00FF0000) -#define G_888_MASK (0x0000FF00) -#define B_888_MASK (0x000000FF) -#define ALPHA_888_MASK (0xFF000000) -#define GRAPHICS_RGBA32( r, g, b, a ) GRAPHICS_RGBA888( r, g, b, a ) -#define GRAPHICS_RGBA888( r, g, b, a ) ( (((a) << (8+8+8)) & ALPHA_888_MASK) | (((b) << (8+8)) & R_888_MASK) | (((g) << 8) & G_888_MASK) | ((r) & B_888_MASK) ) -#define GRAPHICS_TRANSPARENT_COLOUR 0x00000001UL - -//resource defs - -typedef enum -{ - GRAPHICS_RESOURCE_HANDLE_TYPE_MIN, - - GRAPHICS_RESOURCE_RGB565, - GRAPHICS_RESOURCE_RGB888, /* 888 format is ONLY used when loading bitmaps - - you can't create or delete bitmaps with this format */ - GRAPHICS_RESOURCE_RGBA32, - GRAPHICS_RESOURCE_TF_RGB32A, - GRAPHICS_RESOURCE_TF_RGB565, - GRAPHICS_RESOURCE_YUV420, - - GRAPHICS_RESOURCE_HANDLE_TYPE_MAX - -} GRAPHICS_RESOURCE_TYPE_T; - - -typedef struct GRAPHICS_RESOURCE_HANDLE_TABLE_T *GRAPHICS_RESOURCE_HANDLE; - -VCOS_STATUS_T gx_graphics_init(const char *font_dir); -int32_t graphics_delete_resource( GRAPHICS_RESOURCE_HANDLE res ); -VCOS_STATUS_T gx_create_window( uint32_t screen_id, - uint32_t width, - uint32_t height, - GRAPHICS_RESOURCE_TYPE_T image_type, - GRAPHICS_RESOURCE_HANDLE *resource_handle ); - -int32_t graphics_display_resource( GRAPHICS_RESOURCE_HANDLE res, - const uint16_t screen_number, - const int16_t z_order, - const uint16_t offset_x, - const uint16_t offset_y, - const uint16_t dest_width, - const uint16_t dest_height, - const VC_DISPMAN_TRANSFORM_T transform, - const uint8_t display ); - -int32_t graphics_resource_fill(GRAPHICS_RESOURCE_HANDLE res, - uint32_t x, - uint32_t y, - uint32_t width, - uint32_t height, - uint32_t fill_colour ); - -int32_t graphics_update_displayed_resource(GRAPHICS_RESOURCE_HANDLE res, - const uint32_t x_offset, - const uint32_t y_offset, - const uint32_t width, - const uint32_t height ); - -int32_t graphics_resource_render_text_ext( GRAPHICS_RESOURCE_HANDLE res, - const int32_t x, - const int32_t y, - const uint32_t width, - const uint32_t height, - const uint32_t fg_colour, - const uint32_t bg_colour, - const char *text, - const uint32_t text_length, - const uint32_t text_size ); - -int32_t graphics_resource_text_dimensions_ext(GRAPHICS_RESOURCE_HANDLE res, - const char *text, - const uint32_t text_length, - uint32_t *width, - uint32_t *height, - const uint32_t text_size ); - -int32_t graphics_get_resource_size( - const GRAPHICS_RESOURCE_HANDLE res, - uint32_t *w, - uint32_t *h); - -int32_t graphics_update_start(void); - -int32_t graphics_update_end( void ); - -int32_t graphics_resource_text_dimensions( GRAPHICS_RESOURCE_HANDLE resource_handle, - const char *text, - const uint32_t text_length, - uint32_t *width, - uint32_t *height ); - -#endif diff --git a/vc/src/hello_pi/libs/vgfont/vgft.c b/vc/src/hello_pi/libs/vgfont/vgft.c @@ -1,416 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Font handling for graphicsx - -#include <assert.h> -#include <stdlib.h> - -#include "graphics_x_private.h" -#include "vgft.h" - -static FT_Library lib; - -int vgft_init(void) -{ - if (FT_Init_FreeType(&lib) == 0) - return 0; - else - { - return -1; - } -} - -void vgft_term(void) -{ - FT_Done_FreeType(lib); -} - -#define SEGMENTS_COUNT_MAX 256 -#define COORDS_COUNT_MAX 1024 - -static VGuint segments_count; -static VGubyte segments[SEGMENTS_COUNT_MAX]; -static VGuint coords_count; -static VGfloat coords[COORDS_COUNT_MAX]; - -static VGfloat float_from_26_6(FT_Pos x) -{ - return (VGfloat)x / 64.0f; -} - -static void convert_contour(const FT_Vector *points, const char *tags, short points_count) -{ - int first_coords = coords_count; - - int first = 1; - char last_tag = 0; - int c = 0; - - for (; points_count != 0; ++points, ++tags, --points_count) { - ++c; - - char tag = *tags; - if (first) { - assert(tag & 0x1); - assert(c==1); c=0; - segments[segments_count++] = VG_MOVE_TO; - first = 0; - } else if (tag & 0x1) { - /* on curve */ - - if (last_tag & 0x1) { - /* last point was also on -- line */ - assert(c==1); c=0; - segments[segments_count++] = VG_LINE_TO; - } else { - /* last point was off -- quad or cubic */ - if (last_tag & 0x2) { - /* cubic */ - assert(c==3); c=0; - segments[segments_count++] = VG_CUBIC_TO; - } else { - /* quad */ - assert(c==2); c=0; - segments[segments_count++] = VG_QUAD_TO; - } - } - } else { - /* off curve */ - - if (tag & 0x2) { - /* cubic */ - - assert((last_tag & 0x1) || (last_tag & 0x2)); /* last either on or off and cubic */ - } else { - /* quad */ - - if (!(last_tag & 0x1)) { - /* last was also off curve */ - - assert(!(last_tag & 0x2)); /* must be quad */ - - /* add on point half-way between */ - assert(c==2); c=1; - segments[segments_count++] = VG_QUAD_TO; - VGfloat x = (coords[coords_count - 2] + float_from_26_6(points->x)) * 0.5f; - VGfloat y = (coords[coords_count - 1] + float_from_26_6(points->y)) * 0.5f; - coords[coords_count++] = x; - coords[coords_count++] = y; - } - } - } - last_tag = tag; - - coords[coords_count++] = float_from_26_6(points->x); - coords[coords_count++] = float_from_26_6(points->y); - } - - if (last_tag & 0x1) { - /* last point was also on -- line (implicit with close path) */ - assert(c==0); - } else { - ++c; - - /* last point was off -- quad or cubic */ - if (last_tag & 0x2) { - /* cubic */ - assert(c==3); c=0; - segments[segments_count++] = VG_CUBIC_TO; - } else { - /* quad */ - assert(c==2); c=0; - segments[segments_count++] = VG_QUAD_TO; - } - - coords[coords_count++] = coords[first_coords + 0]; - coords[coords_count++] = coords[first_coords + 1]; - } - - segments[segments_count++] = VG_CLOSE_PATH; -} - -static void convert_outline(const FT_Vector *points, const char *tags, const short *contours, short contours_count, short points_count) -{ - segments_count = 0; - coords_count = 0; - - short last_contour = 0; - for (; contours_count != 0; ++contours, --contours_count) { - short contour = *contours + 1; - convert_contour(points + last_contour, tags + last_contour, contour - last_contour); - last_contour = contour; - } - assert(last_contour == points_count); - - assert(segments_count <= SEGMENTS_COUNT_MAX); /* oops... we overwrote some memory */ - assert(coords_count <= COORDS_COUNT_MAX); -} - -VCOS_STATUS_T vgft_font_init(VGFT_FONT_T *font) -{ - font->ft_face = NULL; - font->vg_font = vgCreateFont(0); - if (font->vg_font == VG_INVALID_HANDLE) - { - return VCOS_ENOMEM; - } - return VCOS_SUCCESS; -} - -VCOS_STATUS_T vgft_font_load_mem(VGFT_FONT_T *font, void *mem, size_t len) -{ - if (FT_New_Memory_Face(lib, mem, len, 0, &font->ft_face)) - { - return VCOS_EINVAL; - } - return VCOS_SUCCESS; -} - -VCOS_STATUS_T vgft_font_load_file(VGFT_FONT_T *font, const char *file) -{ - if (FT_New_Face(lib, file, 0, &font->ft_face)) { - return VCOS_EINVAL; - } - return VCOS_SUCCESS; -} - -VCOS_STATUS_T vgft_font_convert_glyphs(VGFT_FONT_T *font, unsigned int char_height, unsigned int dpi_x, unsigned int dpi_y) -{ - FT_UInt glyph_index; - FT_ULong ch; - - if (FT_Set_Char_Size(font->ft_face, 0, char_height, dpi_x, dpi_y)) - { - FT_Done_Face(font->ft_face); - vgDestroyFont(font->vg_font); - return VCOS_EINVAL; - } - - ch = FT_Get_First_Char(font->ft_face, &glyph_index); - - while (ch != 0) - { - if (FT_Load_Glyph(font->ft_face, glyph_index, FT_LOAD_DEFAULT)) { - FT_Done_Face(font->ft_face); - vgDestroyFont(font->vg_font); - return VCOS_ENOMEM; - } - - VGPath vg_path; - FT_Outline *outline = &font->ft_face->glyph->outline; - if (outline->n_contours != 0) { - vg_path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_ALL); - assert(vg_path != VG_INVALID_HANDLE); - - convert_outline(outline->points, outline->tags, outline->contours, outline->n_contours, outline->n_points); - vgAppendPathData(vg_path, segments_count, segments, coords); - } else { - vg_path = VG_INVALID_HANDLE; - } - - VGfloat origin[] = { 0.0f, 0.0f }; - VGfloat escapement[] = { float_from_26_6(font->ft_face->glyph->advance.x), float_from_26_6(font->ft_face->glyph->advance.y) }; - vgSetGlyphToPath(font->vg_font, glyph_index, vg_path, VG_FALSE, origin, escapement); - - if (vg_path != VG_INVALID_HANDLE) { - vgDestroyPath(vg_path); - } - ch = FT_Get_Next_Char(font->ft_face, ch, &glyph_index); - } - - return VCOS_SUCCESS; -} - -void vgft_font_term(VGFT_FONT_T *font) -{ - if (font->ft_face) - FT_Done_Face(font->ft_face); - if (font->vg_font) - vgDestroyFont(font->vg_font); - memset(font, 0, sizeof(*font)); -} - - -#define CHAR_COUNT_MAX 200 -static VGuint glyph_indices[CHAR_COUNT_MAX]; -static VGfloat adjustments_x[CHAR_COUNT_MAX]; -static VGfloat adjustments_y[CHAR_COUNT_MAX]; - -// Draws the first char_count characters from text, with adjustments, starting -// from the current origin. The peek argument indicates whether to peek ahead -// and get a final adjustment based on the next character past char_count, or -// else just assume that this is the end of the text and add no final -// adjustment. - -static void draw_chars(VGFT_FONT_T *font, const char *text, int char_count, VGbitfield paint_modes, int peek) { - // Put in first character - glyph_indices[0] = FT_Get_Char_Index(font->ft_face, text[0]); - int prev_glyph_index = glyph_indices[0]; - - // Calculate glyph_indices and adjustments - int i; - FT_Vector kern; - for (i = 1; i != char_count; ++i) { - int glyph_index = FT_Get_Char_Index(font->ft_face, text[i]); - if (!glyph_index) { return; } - glyph_indices[i] = glyph_index; - - if (FT_Get_Kerning(font->ft_face, prev_glyph_index, glyph_index, FT_KERNING_DEFAULT, &kern)) assert(0); - adjustments_x[i - 1] = float_from_26_6(kern.x); - adjustments_y[i - 1] = float_from_26_6(kern.y); - - prev_glyph_index = glyph_index; - } - - // Get the last adjustment? - if (peek) { - int peek_glyph_index = FT_Get_Char_Index(font->ft_face, text[i]); - if (!peek_glyph_index) { return; } - if (FT_Get_Kerning(font->ft_face, prev_glyph_index, peek_glyph_index, FT_KERNING_DEFAULT, &kern)) assert(0); - adjustments_x[char_count - 1] = float_from_26_6(kern.x); - adjustments_y[char_count - 1] = float_from_26_6(kern.y); - } else { - adjustments_x[char_count - 1] = 0.0f; - adjustments_y[char_count - 1] = 0.0f; - } - - vgDrawGlyphs(font->vg_font, char_count, glyph_indices, adjustments_x, adjustments_y, paint_modes, VG_FALSE); -} - -// Goes to the x,y position and draws arbitrary number of characters, draws -// iteratively if the char_count exceeds the max buffer size given above. - -static void draw_line(VGFT_FONT_T *font, VGfloat x, VGfloat y, const char *text, int char_count, VGbitfield paint_modes) { - if (char_count == 0) return; - - // Set origin to requested x,y - VGfloat glor[] = { x, y }; - vgSetfv(VG_GLYPH_ORIGIN, 2, glor); - - // Draw the characters in blocks to reuse buffer memory - const char *curr_text = text; - int chars_left = char_count; - while (chars_left > CHAR_COUNT_MAX) { - draw_chars(font, curr_text, CHAR_COUNT_MAX, paint_modes, 1); - chars_left -= CHAR_COUNT_MAX; - curr_text += CHAR_COUNT_MAX; - } - - // Draw the last block - draw_chars(font, curr_text, chars_left, paint_modes, 0); -} - -void vgft_font_draw(VGFT_FONT_T *font, VGfloat x, VGfloat y, const char *text, unsigned text_length, VGbitfield paint_modes) -{ - VGfloat descent = float_from_26_6(font->ft_face->size->metrics.descender); - int last_draw = 0; - int i = 0; - y -= descent; - for (;;) { - int last = !text[i] || (text_length && i==text_length); - - if ((text[i] == '\n') || last) - { - draw_line(font, x, y, text + last_draw, i - last_draw, paint_modes); - last_draw = i+1; - y -= float_from_26_6(font->ft_face->size->metrics.height); - } - if (last) - { - break; - } - ++i; - } -} - -// Get text extents for a single line - -static void line_extents(VGFT_FONT_T *font, VGfloat *x, VGfloat *y, const char *text, int chars_count) -{ - int i; - int prev_glyph_index = 0; - if (chars_count == 0) return; - - for (i=0; i < chars_count; i++) - { - int glyph_index = FT_Get_Char_Index(font->ft_face, text[i]); - if (!glyph_index) return; - - if (i != 0) - { - FT_Vector kern; - if (FT_Get_Kerning(font->ft_face, prev_glyph_index, glyph_index, - FT_KERNING_DEFAULT, &kern)) - { - assert(0); - } - *x += float_from_26_6(kern.x); - *y += float_from_26_6(kern.y); - } - FT_Load_Glyph(font->ft_face, glyph_index, FT_LOAD_DEFAULT); - *x += float_from_26_6(font->ft_face->glyph->advance.x); - - prev_glyph_index = glyph_index; - } -} - -// Text extents for some ASCII text. -// -// Use text_length if non-zero, otherwise look for trailing '\0'. - -void vgft_get_text_extents(VGFT_FONT_T *font, - const char *text, - unsigned text_length, - VGfloat unused0, VGfloat unused1, - VGfloat *w, VGfloat *h) { - int last_draw = 0; - VGfloat max_x = 0; - VGfloat y = 0; - - int i, last; - for (i = 0, last = 0; !last; ++i) { - last = !text[i] || (text_length && i==text_length); - if ((text[i] == '\n') || last) { - VGfloat x = 0; - line_extents(font, &x, &y, text + last_draw, i - last_draw); - last_draw = i + 1; - y -= float_from_26_6(font->ft_face->size->metrics.height); - if (x > max_x) max_x = x; - } - } - *w = max_x; - *h = -y; -} - -// Get y offset for first line; mitigates issue of start y being middle of block -// for multiline renders by vgft_font_draw. Currently simple, may be worth -// adding y kerning? - -VGfloat vgft_first_line_y_offset(VGFT_FONT_T *font) { - return float_from_26_6(font->ft_face->size->metrics.height); -} diff --git a/vc/src/hello_pi/libs/vgfont/vgft.h b/vc/src/hello_pi/libs/vgfont/vgft.h @@ -1,70 +0,0 @@ -/* -Copyright (c) 2012, Broadcom Europe Ltd -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the copyright holder nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -// Font handling for graphicsx - -#ifndef VGFT_H -#define VGFT_H - -#include "interface/vcos/vcos.h" -#include <VG/openvg.h> -#include <ft2build.h> - -typedef int VGFT_BOOL; -#define VGFT_FALSE 0 -#define VGFT_TRUE (!VGFT_FALSE) - -#include FT_FREETYPE_H - -/* Returns 0 on success */ -extern int vgft_init(void); -extern void vgft_term(void); - -typedef struct { - VGFont vg_font; - FT_Face ft_face; -} VGFT_FONT_T; - -/** Initialise a FT->VG font */ -VCOS_STATUS_T vgft_font_init(VGFT_FONT_T *font); - -/** Load a font file from memory */ -VCOS_STATUS_T vgft_font_load_mem(VGFT_FONT_T *font, void *mem, size_t len); - -/** Convert a font into VG glyphs */ -VCOS_STATUS_T vgft_font_convert_glyphs(VGFT_FONT_T *font, unsigned int char_height, unsigned int dpi_x, unsigned int dpi_y); - -/** Release a font. */ -void vgft_font_term(VGFT_FONT_T *font); - -void vgft_font_draw(VGFT_FONT_T *font, VGfloat x, VGfloat y, const char *text, unsigned text_length, VGbitfield paint_modes); - -void vgft_get_text_extents(VGFT_FONT_T *font, const char *text, unsigned text_length, VGfloat start_x, VGfloat start_y, VGfloat *w, VGfloat *h); - -VGfloat vgft_first_line_y_offset(VGFT_FONT_T *font); - -#endif diff --git a/vc/src/hello_pi/rebuild.sh b/vc/src/hello_pi/rebuild.sh @@ -1,32 +0,0 @@ -make -C libs/ilclient clean -make -C libs/vgfont clean -make -C hello_world clean -make -C hello_triangle clean -make -C hello_triangle2 clean -make -C hello_video clean -make -C hello_audio clean -make -C hello_font clean -make -C hello_dispmanx clean -make -C hello_tiger clean -make -C hello_encode clean -make -C hello_jpeg clean -make -C hello_videocube clean -make -C hello_teapot clean -make -C hello_fft clean - -make -C libs/ilclient -make -C libs/vgfont -make -C hello_world -make -C hello_triangle -make -C hello_triangle2 -make -C hello_video -make -C hello_audio -make -C hello_font -make -C hello_dispmanx -make -C hello_tiger -make -C hello_encode -make -C hello_jpeg -make -C hello_videocube -make -C hello_teapot -make -C hello_fft -