• Home
  • Raw
  • Download

Lines Matching refs:converter

1792 gst_d3d11_converter_set_config (GstD3D11Converter * converter,  in gst_d3d11_converter_set_config()  argument
1796 converter); in gst_d3d11_converter_set_config()
1811 GstD3D11Converter *converter = NULL; in gst_d3d11_converter_new() local
1839 converter = g_new0 (GstD3D11Converter, 1); in gst_d3d11_converter_new()
1840 converter->device = (GstD3D11Device *) gst_object_ref (device); in gst_d3d11_converter_new()
1841 converter->config = gst_structure_new_empty ("GstD3D11Converter-Config"); in gst_d3d11_converter_new()
1843 gst_d3d11_converter_set_config (converter, config); in gst_d3d11_converter_new()
1845 converter->alpha = GET_OPT_ALPHA_VALUE (converter); in gst_d3d11_converter_new()
1850 setup_convert_info_rgb_to_rgb (converter, in_info, out_info); in gst_d3d11_converter_new()
1853 setup_convert_info_rgb_to_yuv (converter, in_info, out_info); in gst_d3d11_converter_new()
1856 setup_convert_info_rgb_to_gray (converter, in_info, out_info); in gst_d3d11_converter_new()
1861 setup_convert_info_yuv_to_rgb (converter, in_info, out_info); in gst_d3d11_converter_new()
1864 setup_convert_info_yuv_to_yuv (converter, in_info, out_info); in gst_d3d11_converter_new()
1867 setup_convert_info_yuv_to_gray (converter, in_info, out_info); in gst_d3d11_converter_new()
1872 setup_convert_info_gray_to_rgb (converter, in_info, out_info); in gst_d3d11_converter_new()
1875 setup_convert_info_gray_to_yuv (converter, in_info, out_info); in gst_d3d11_converter_new()
1878 setup_convert_info_gray_to_gray (converter, in_info, out_info); in gst_d3d11_converter_new()
1886 if (converter_get_matrix (converter, &matrix, in_info, out_info)) { in gst_d3d11_converter_new()
1887 PixelShaderColorTransform *transform = &converter->convert_info.transform; in gst_d3d11_converter_new()
1905 converter->viewport[i].TopLeftX = 0; in gst_d3d11_converter_new()
1906 converter->viewport[i].TopLeftY = 0; in gst_d3d11_converter_new()
1907 converter->viewport[i].Width = GST_VIDEO_INFO_COMP_WIDTH (out_info, i); in gst_d3d11_converter_new()
1908 converter->viewport[i].Height = GST_VIDEO_INFO_COMP_HEIGHT (out_info, i); in gst_d3d11_converter_new()
1909 converter->viewport[i].MinDepth = 0.0f; in gst_d3d11_converter_new()
1910 converter->viewport[i].MaxDepth = 1.0f; in gst_d3d11_converter_new()
1913 ret = gst_d3d11_color_convert_setup_shader (converter, in gst_d3d11_converter_new()
1918 gst_d3d11_converter_free (converter); in gst_d3d11_converter_new()
1919 converter = NULL; in gst_d3d11_converter_new()
1921 converter->in_info = *in_info; in gst_d3d11_converter_new()
1922 converter->out_info = *out_info; in gst_d3d11_converter_new()
1925 return converter; in gst_d3d11_converter_new()
1942 gst_d3d11_converter_free (converter); in gst_d3d11_converter_new()
1948 gst_d3d11_converter_free (GstD3D11Converter * converter) in gst_d3d11_converter_free() argument
1952 g_return_if_fail (converter != NULL); in gst_d3d11_converter_free()
1955 if (converter->quad[i]) in gst_d3d11_converter_free()
1956 gst_d3d11_quad_free (converter->quad[i]); in gst_d3d11_converter_free()
1958 g_free (converter->convert_info.ps_body[i]); in gst_d3d11_converter_free()
1961 GST_D3D11_CLEAR_COM (converter->vertex_buffer); in gst_d3d11_converter_free()
1962 GST_D3D11_CLEAR_COM (converter->linear_sampler); in gst_d3d11_converter_free()
1963 GST_D3D11_CLEAR_COM (converter->alpha_const_buffer); in gst_d3d11_converter_free()
1965 gst_clear_object (&converter->device); in gst_d3d11_converter_free()
1967 if (converter->config) in gst_d3d11_converter_free()
1968 gst_structure_free (converter->config); in gst_d3d11_converter_free()
1970 g_free (converter); in gst_d3d11_converter_free()
2067 gst_d3d11_converter_convert (GstD3D11Converter * converter, in gst_d3d11_converter_convert() argument
2074 g_return_val_if_fail (converter != NULL, FALSE); in gst_d3d11_converter_convert()
2078 gst_d3d11_device_lock (converter->device); in gst_d3d11_converter_convert()
2079 ret = gst_d3d11_converter_convert_unlocked (converter, in gst_d3d11_converter_convert()
2081 gst_d3d11_device_unlock (converter->device); in gst_d3d11_converter_convert()
2087 gst_d3d11_converter_convert_unlocked (GstD3D11Converter * converter, in gst_d3d11_converter_convert_unlocked() argument
2099 g_return_val_if_fail (converter != NULL, FALSE); in gst_d3d11_converter_convert_unlocked()
2108 if (converter->update_vertex || in gst_d3d11_converter_convert_unlocked()
2109 desc.Width != (guint) converter->input_texture_width || in gst_d3d11_converter_convert_unlocked()
2110 desc.Height != (guint) converter->input_texture_height) { in gst_d3d11_converter_convert_unlocked()
2114 converter->input_texture_width = desc.Width; in gst_d3d11_converter_convert_unlocked()
2115 converter->input_texture_height = desc.Height; in gst_d3d11_converter_convert_unlocked()
2117 if (!gst_d3d11_converter_update_vertex_buffer (converter)) { in gst_d3d11_converter_convert_unlocked()
2123 if (converter->update_alpha) { in gst_d3d11_converter_convert_unlocked()
2129 g_assert (converter->alpha_const_buffer != nullptr); in gst_d3d11_converter_convert_unlocked()
2132 gst_d3d11_device_get_device_context_handle (converter->device); in gst_d3d11_converter_convert_unlocked()
2134 hr = context_handle->Map (converter->alpha_const_buffer, in gst_d3d11_converter_convert_unlocked()
2137 if (!gst_d3d11_result (hr, converter->device)) { in gst_d3d11_converter_convert_unlocked()
2143 alpha_const->alpha_mul = (FLOAT) converter->alpha; in gst_d3d11_converter_convert_unlocked()
2145 context_handle->Unmap (converter->alpha_const_buffer, 0); in gst_d3d11_converter_convert_unlocked()
2146 converter->update_alpha = FALSE; in gst_d3d11_converter_convert_unlocked()
2149 ret = gst_d3d11_draw_quad_unlocked (converter->quad[0], converter->viewport, in gst_d3d11_converter_convert_unlocked()
2150 1, srv, converter->num_input_view, rtv, 1, blend, blend_factor, in gst_d3d11_converter_convert_unlocked()
2151 &converter->linear_sampler, 1); in gst_d3d11_converter_convert_unlocked()
2156 if (converter->quad[1]) { in gst_d3d11_converter_convert_unlocked()
2157 ret = gst_d3d11_draw_quad_unlocked (converter->quad[1], in gst_d3d11_converter_convert_unlocked()
2158 &converter->viewport[1], converter->num_output_view - 1, in gst_d3d11_converter_convert_unlocked()
2159 srv, converter->num_input_view, &rtv[1], converter->num_output_view - 1, in gst_d3d11_converter_convert_unlocked()
2160 blend, blend_factor, &converter->linear_sampler, 1); in gst_d3d11_converter_convert_unlocked()
2170 gst_d3d11_converter_update_viewport (GstD3D11Converter * converter, in gst_d3d11_converter_update_viewport() argument
2173 g_return_val_if_fail (converter != NULL, FALSE); in gst_d3d11_converter_update_viewport()
2176 converter->viewport[0] = *viewport; in gst_d3d11_converter_update_viewport()
2178 switch (GST_VIDEO_INFO_FORMAT (&converter->out_info)) { in gst_d3d11_converter_update_viewport()
2190 converter->viewport[1].TopLeftX = converter->viewport[0].TopLeftX / 2; in gst_d3d11_converter_update_viewport()
2191 converter->viewport[1].TopLeftY = converter->viewport[0].TopLeftY / 2; in gst_d3d11_converter_update_viewport()
2192 converter->viewport[1].Width = converter->viewport[0].Width / 2; in gst_d3d11_converter_update_viewport()
2193 converter->viewport[1].Height = converter->viewport[0].Height / 2; in gst_d3d11_converter_update_viewport()
2195 for (i = 2; i < GST_VIDEO_INFO_N_PLANES (&converter->out_info); i++) in gst_d3d11_converter_update_viewport()
2196 converter->viewport[i] = converter->viewport[1]; in gst_d3d11_converter_update_viewport()
2205 converter->viewport[1].TopLeftX = converter->viewport[0].TopLeftX / 2; in gst_d3d11_converter_update_viewport()
2206 converter->viewport[1].TopLeftY = converter->viewport[0].TopLeftY; in gst_d3d11_converter_update_viewport()
2207 converter->viewport[1].Width = converter->viewport[0].Width / 2; in gst_d3d11_converter_update_viewport()
2208 converter->viewport[1].Height = converter->viewport[0].Height; in gst_d3d11_converter_update_viewport()
2210 for (i = 2; i < GST_VIDEO_INFO_N_PLANES (&converter->out_info); i++) in gst_d3d11_converter_update_viewport()
2211 converter->viewport[i] = converter->viewport[1]; in gst_d3d11_converter_update_viewport()
2221 for (i = 1; i < GST_VIDEO_INFO_N_PLANES (&converter->out_info); i++) in gst_d3d11_converter_update_viewport()
2222 converter->viewport[i] = converter->viewport[1]; in gst_d3d11_converter_update_viewport()
2226 if (converter->num_output_view > 1) in gst_d3d11_converter_update_viewport()
2235 gst_d3d11_converter_update_src_rect (GstD3D11Converter * converter, in gst_d3d11_converter_update_src_rect() argument
2238 g_return_val_if_fail (converter != NULL, FALSE); in gst_d3d11_converter_update_src_rect()
2241 gst_d3d11_device_lock (converter->device); in gst_d3d11_converter_update_src_rect()
2242 if (converter->src_rect.left != src_rect->left || in gst_d3d11_converter_update_src_rect()
2243 converter->src_rect.top != src_rect->top || in gst_d3d11_converter_update_src_rect()
2244 converter->src_rect.right != src_rect->right || in gst_d3d11_converter_update_src_rect()
2245 converter->src_rect.bottom != src_rect->bottom) { in gst_d3d11_converter_update_src_rect()
2246 converter->src_rect = *src_rect; in gst_d3d11_converter_update_src_rect()
2249 converter->update_vertex = TRUE; in gst_d3d11_converter_update_src_rect()
2251 gst_d3d11_device_unlock (converter->device); in gst_d3d11_converter_update_src_rect()
2257 gst_d3d11_converter_update_dest_rect (GstD3D11Converter * converter, in gst_d3d11_converter_update_dest_rect() argument
2260 g_return_val_if_fail (converter != NULL, FALSE); in gst_d3d11_converter_update_dest_rect()
2263 gst_d3d11_device_lock (converter->device); in gst_d3d11_converter_update_dest_rect()
2264 if (converter->dest_rect.left != dest_rect->left || in gst_d3d11_converter_update_dest_rect()
2265 converter->dest_rect.top != dest_rect->top || in gst_d3d11_converter_update_dest_rect()
2266 converter->dest_rect.right != dest_rect->right || in gst_d3d11_converter_update_dest_rect()
2267 converter->dest_rect.bottom != dest_rect->bottom) { in gst_d3d11_converter_update_dest_rect()
2268 converter->dest_rect = *dest_rect; in gst_d3d11_converter_update_dest_rect()
2271 converter->update_vertex = TRUE; in gst_d3d11_converter_update_dest_rect()
2273 gst_d3d11_device_unlock (converter->device); in gst_d3d11_converter_update_dest_rect()
2279 gst_d3d11_converter_update_config (GstD3D11Converter * converter, in gst_d3d11_converter_update_config() argument
2282 g_return_val_if_fail (converter != nullptr, FALSE); in gst_d3d11_converter_update_config()
2285 gst_d3d11_device_lock (converter->device); in gst_d3d11_converter_update_config()
2286 gst_d3d11_converter_set_config (converter, config); in gst_d3d11_converter_update_config()
2289 if (converter->alpha_const_buffer) { in gst_d3d11_converter_update_config()
2290 gdouble alpha = GET_OPT_ALPHA_VALUE (converter); in gst_d3d11_converter_update_config()
2292 if (alpha != converter->alpha) { in gst_d3d11_converter_update_config()
2293 GST_DEBUG ("Updating alpha %lf -> %lf", converter->alpha, alpha); in gst_d3d11_converter_update_config()
2294 converter->alpha = alpha; in gst_d3d11_converter_update_config()
2295 converter->update_alpha = TRUE; in gst_d3d11_converter_update_config()
2298 gst_d3d11_device_unlock (converter->device); in gst_d3d11_converter_update_config()