~thopiekar/arm-mali/libvdpau-sunxi

« back to all changes in this revision

Viewing changes to device.c

  • Committer: Jens Kuske
  • Date: 2015-07-29 10:51:18 UTC
  • Revision ID: git-v1:906c36ed45ceb53fecd5fc72e821c11849eeb1a3
Remove unnecessary address operators from function pointers

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
                        VDPAU_DBG("Failed to open /dev/g2d! OSD disabled.");
55
55
        }
56
56
 
57
 
        *get_proc_address = &vdp_get_proc_address;
 
57
        *get_proc_address = vdp_get_proc_address;
58
58
 
59
59
        return VDP_STATUS_OK;
60
60
}
94
94
 
95
95
static void *const functions[] =
96
96
{
97
 
        [VDP_FUNC_ID_GET_ERROR_STRING]                                      = &vdp_get_error_string,
98
 
        [VDP_FUNC_ID_GET_PROC_ADDRESS]                                      = &vdp_get_proc_address,
99
 
        [VDP_FUNC_ID_GET_API_VERSION]                                       = &vdp_get_api_version,
100
 
        [VDP_FUNC_ID_GET_INFORMATION_STRING]                                = &vdp_get_information_string,
101
 
        [VDP_FUNC_ID_DEVICE_DESTROY]                                        = &vdp_device_destroy,
102
 
        [VDP_FUNC_ID_GENERATE_CSC_MATRIX]                                   = &vdp_generate_csc_matrix,
103
 
        [VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES]                      = &vdp_video_surface_query_capabilities,
104
 
        [VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES] = &vdp_video_surface_query_get_put_bits_y_cb_cr_capabilities,
105
 
        [VDP_FUNC_ID_VIDEO_SURFACE_CREATE]                                  = &vdp_video_surface_create,
106
 
        [VDP_FUNC_ID_VIDEO_SURFACE_DESTROY]                                 = &vdp_video_surface_destroy,
107
 
        [VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS]                          = &vdp_video_surface_get_parameters,
108
 
        [VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR]                        = &vdp_video_surface_get_bits_y_cb_cr,
109
 
        [VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR]                        = &vdp_video_surface_put_bits_y_cb_cr,
110
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES]                     = &vdp_output_surface_query_capabilities,
111
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES] = &vdp_output_surface_query_get_put_bits_native_capabilities,
112
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES]    = &vdp_output_surface_query_put_bits_indexed_capabilities,
113
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES]    = &vdp_output_surface_query_put_bits_y_cb_cr_capabilities,
114
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_CREATE]                                 = &vdp_output_surface_create,
115
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY]                                = &vdp_output_surface_destroy,
116
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS]                         = &vdp_output_surface_get_parameters,
117
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE]                        = &vdp_output_surface_get_bits_native,
118
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE]                        = &vdp_output_surface_put_bits_native,
119
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED]                       = &vdp_output_surface_put_bits_indexed,
120
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR]                       = &vdp_output_surface_put_bits_y_cb_cr,
121
 
        [VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES]                     = &vdp_bitmap_surface_query_capabilities,
122
 
        [VDP_FUNC_ID_BITMAP_SURFACE_CREATE]                                 = &vdp_bitmap_surface_create,
123
 
        [VDP_FUNC_ID_BITMAP_SURFACE_DESTROY]                                = &vdp_bitmap_surface_destroy,
124
 
        [VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS]                         = &vdp_bitmap_surface_get_parameters,
125
 
        [VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE]                        = &vdp_bitmap_surface_put_bits_native,
126
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE]                  = &vdp_output_surface_render_output_surface,
127
 
        [VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE]                  = &vdp_output_surface_render_bitmap_surface,
 
97
        [VDP_FUNC_ID_GET_ERROR_STRING]                                      = vdp_get_error_string,
 
98
        [VDP_FUNC_ID_GET_PROC_ADDRESS]                                      = vdp_get_proc_address,
 
99
        [VDP_FUNC_ID_GET_API_VERSION]                                       = vdp_get_api_version,
 
100
        [VDP_FUNC_ID_GET_INFORMATION_STRING]                                = vdp_get_information_string,
 
101
        [VDP_FUNC_ID_DEVICE_DESTROY]                                        = vdp_device_destroy,
 
102
        [VDP_FUNC_ID_GENERATE_CSC_MATRIX]                                   = vdp_generate_csc_matrix,
 
103
        [VDP_FUNC_ID_VIDEO_SURFACE_QUERY_CAPABILITIES]                      = vdp_video_surface_query_capabilities,
 
104
        [VDP_FUNC_ID_VIDEO_SURFACE_QUERY_GET_PUT_BITS_Y_CB_CR_CAPABILITIES] = vdp_video_surface_query_get_put_bits_y_cb_cr_capabilities,
 
105
        [VDP_FUNC_ID_VIDEO_SURFACE_CREATE]                                  = vdp_video_surface_create,
 
106
        [VDP_FUNC_ID_VIDEO_SURFACE_DESTROY]                                 = vdp_video_surface_destroy,
 
107
        [VDP_FUNC_ID_VIDEO_SURFACE_GET_PARAMETERS]                          = vdp_video_surface_get_parameters,
 
108
        [VDP_FUNC_ID_VIDEO_SURFACE_GET_BITS_Y_CB_CR]                        = vdp_video_surface_get_bits_y_cb_cr,
 
109
        [VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR]                        = vdp_video_surface_put_bits_y_cb_cr,
 
110
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_CAPABILITIES]                     = vdp_output_surface_query_capabilities,
 
111
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_GET_PUT_BITS_NATIVE_CAPABILITIES] = vdp_output_surface_query_get_put_bits_native_capabilities,
 
112
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_INDEXED_CAPABILITIES]    = vdp_output_surface_query_put_bits_indexed_capabilities,
 
113
        [VDP_FUNC_ID_OUTPUT_SURFACE_QUERY_PUT_BITS_Y_CB_CR_CAPABILITIES]    = vdp_output_surface_query_put_bits_y_cb_cr_capabilities,
 
114
        [VDP_FUNC_ID_OUTPUT_SURFACE_CREATE]                                 = vdp_output_surface_create,
 
115
        [VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY]                                = vdp_output_surface_destroy,
 
116
        [VDP_FUNC_ID_OUTPUT_SURFACE_GET_PARAMETERS]                         = vdp_output_surface_get_parameters,
 
117
        [VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE]                        = vdp_output_surface_get_bits_native,
 
118
        [VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE]                        = vdp_output_surface_put_bits_native,
 
119
        [VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED]                       = vdp_output_surface_put_bits_indexed,
 
120
        [VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_Y_CB_CR]                       = vdp_output_surface_put_bits_y_cb_cr,
 
121
        [VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES]                     = vdp_bitmap_surface_query_capabilities,
 
122
        [VDP_FUNC_ID_BITMAP_SURFACE_CREATE]                                 = vdp_bitmap_surface_create,
 
123
        [VDP_FUNC_ID_BITMAP_SURFACE_DESTROY]                                = vdp_bitmap_surface_destroy,
 
124
        [VDP_FUNC_ID_BITMAP_SURFACE_GET_PARAMETERS]                         = vdp_bitmap_surface_get_parameters,
 
125
        [VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE]                        = vdp_bitmap_surface_put_bits_native,
 
126
        [VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE]                  = vdp_output_surface_render_output_surface,
 
127
        [VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE]                  = vdp_output_surface_render_bitmap_surface,
128
128
        [VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_VIDEO_SURFACE_LUMA]              = NULL,
129
 
        [VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES]                            = &vdp_decoder_query_capabilities,
130
 
        [VDP_FUNC_ID_DECODER_CREATE]                                        = &vdp_decoder_create,
131
 
        [VDP_FUNC_ID_DECODER_DESTROY]                                       = &vdp_decoder_destroy,
132
 
        [VDP_FUNC_ID_DECODER_GET_PARAMETERS]                                = &vdp_decoder_get_parameters,
133
 
        [VDP_FUNC_ID_DECODER_RENDER]                                        = &vdp_decoder_render,
134
 
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT]                     = &vdp_video_mixer_query_feature_support,
135
 
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT]                   = &vdp_video_mixer_query_parameter_support,
136
 
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT]                   = &vdp_video_mixer_query_attribute_support,
137
 
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE]               = &vdp_video_mixer_query_parameter_value_range,
138
 
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE]               = &vdp_video_mixer_query_attribute_value_range,
139
 
        [VDP_FUNC_ID_VIDEO_MIXER_CREATE]                                    = &vdp_video_mixer_create,
140
 
        [VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES]                       = &vdp_video_mixer_set_feature_enables,
141
 
        [VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES]                      = &vdp_video_mixer_set_attribute_values,
142
 
        [VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT]                       = &vdp_video_mixer_get_feature_support,
143
 
        [VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES]                       = &vdp_video_mixer_get_feature_enables,
144
 
        [VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES]                      = &vdp_video_mixer_get_parameter_values,
145
 
        [VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES]                      = &vdp_video_mixer_get_attribute_values,
146
 
        [VDP_FUNC_ID_VIDEO_MIXER_DESTROY]                                   = &vdp_video_mixer_destroy,
147
 
        [VDP_FUNC_ID_VIDEO_MIXER_RENDER]                                    = &vdp_video_mixer_render,
148
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY]                     = &vdp_presentation_queue_target_destroy,
149
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE]                             = &vdp_presentation_queue_create,
150
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY]                            = &vdp_presentation_queue_destroy,
151
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR]               = &vdp_presentation_queue_set_background_color,
152
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR]               = &vdp_presentation_queue_get_background_color,
153
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME]                           = &vdp_presentation_queue_get_time,
154
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY]                            = &vdp_presentation_queue_display,
155
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE]           = &vdp_presentation_queue_block_until_surface_idle,
156
 
        [VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS]               = &vdp_presentation_queue_query_surface_status,
157
 
        [VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER]                          = &vdp_preemption_callback_register,
 
129
        [VDP_FUNC_ID_DECODER_QUERY_CAPABILITIES]                            = vdp_decoder_query_capabilities,
 
130
        [VDP_FUNC_ID_DECODER_CREATE]                                        = vdp_decoder_create,
 
131
        [VDP_FUNC_ID_DECODER_DESTROY]                                       = vdp_decoder_destroy,
 
132
        [VDP_FUNC_ID_DECODER_GET_PARAMETERS]                                = vdp_decoder_get_parameters,
 
133
        [VDP_FUNC_ID_DECODER_RENDER]                                        = vdp_decoder_render,
 
134
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT]                     = vdp_video_mixer_query_feature_support,
 
135
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_SUPPORT]                   = vdp_video_mixer_query_parameter_support,
 
136
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_SUPPORT]                   = vdp_video_mixer_query_attribute_support,
 
137
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_PARAMETER_VALUE_RANGE]               = vdp_video_mixer_query_parameter_value_range,
 
138
        [VDP_FUNC_ID_VIDEO_MIXER_QUERY_ATTRIBUTE_VALUE_RANGE]               = vdp_video_mixer_query_attribute_value_range,
 
139
        [VDP_FUNC_ID_VIDEO_MIXER_CREATE]                                    = vdp_video_mixer_create,
 
140
        [VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES]                       = vdp_video_mixer_set_feature_enables,
 
141
        [VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES]                      = vdp_video_mixer_set_attribute_values,
 
142
        [VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_SUPPORT]                       = vdp_video_mixer_get_feature_support,
 
143
        [VDP_FUNC_ID_VIDEO_MIXER_GET_FEATURE_ENABLES]                       = vdp_video_mixer_get_feature_enables,
 
144
        [VDP_FUNC_ID_VIDEO_MIXER_GET_PARAMETER_VALUES]                      = vdp_video_mixer_get_parameter_values,
 
145
        [VDP_FUNC_ID_VIDEO_MIXER_GET_ATTRIBUTE_VALUES]                      = vdp_video_mixer_get_attribute_values,
 
146
        [VDP_FUNC_ID_VIDEO_MIXER_DESTROY]                                   = vdp_video_mixer_destroy,
 
147
        [VDP_FUNC_ID_VIDEO_MIXER_RENDER]                                    = vdp_video_mixer_render,
 
148
        [VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY]                     = vdp_presentation_queue_target_destroy,
 
149
        [VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE]                             = vdp_presentation_queue_create,
 
150
        [VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY]                            = vdp_presentation_queue_destroy,
 
151
        [VDP_FUNC_ID_PRESENTATION_QUEUE_SET_BACKGROUND_COLOR]               = vdp_presentation_queue_set_background_color,
 
152
        [VDP_FUNC_ID_PRESENTATION_QUEUE_GET_BACKGROUND_COLOR]               = vdp_presentation_queue_get_background_color,
 
153
        [VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME]                           = vdp_presentation_queue_get_time,
 
154
        [VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY]                            = vdp_presentation_queue_display,
 
155
        [VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE]           = vdp_presentation_queue_block_until_surface_idle,
 
156
        [VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS]               = vdp_presentation_queue_query_surface_status,
 
157
        [VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER]                          = vdp_preemption_callback_register,
158
158
};
159
159
 
160
160
VdpStatus vdp_get_proc_address(VdpDevice device_handle,