OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/gpu/vaapi_wrapper.h" | 5 #include "media/gpu/vaapi_wrapper.h" |
6 | 6 |
7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 pipeline_param->surface = va_surface_src->id(); | 1055 pipeline_param->surface = va_surface_src->id(); |
1056 pipeline_param->surface_color_standard = VAProcColorStandardNone; | 1056 pipeline_param->surface_color_standard = VAProcColorStandardNone; |
1057 | 1057 |
1058 VARectangle output_region; | 1058 VARectangle output_region; |
1059 output_region.x = output_region.y = 0; | 1059 output_region.x = output_region.y = 0; |
1060 output_region.width = dest_size.width(); | 1060 output_region.width = dest_size.width(); |
1061 output_region.height = dest_size.height(); | 1061 output_region.height = dest_size.height(); |
1062 pipeline_param->output_region = &output_region; | 1062 pipeline_param->output_region = &output_region; |
1063 pipeline_param->output_background_color = 0xff000000; | 1063 pipeline_param->output_background_color = 0xff000000; |
1064 pipeline_param->output_color_standard = VAProcColorStandardNone; | 1064 pipeline_param->output_color_standard = VAProcColorStandardNone; |
1065 pipeline_param->filter_flags = VA_FILTER_SCALING_HQ; | 1065 pipeline_param->filter_flags = VA_FILTER_SCALING_DEFAULT; |
1066 | 1066 |
1067 VA_SUCCESS_OR_RETURN(vaUnmapBuffer(va_display_, va_vpp_buffer_id_), | 1067 VA_SUCCESS_OR_RETURN(vaUnmapBuffer(va_display_, va_vpp_buffer_id_), |
1068 "Couldn't unmap vpp buffer", false); | 1068 "Couldn't unmap vpp buffer", false); |
1069 | 1069 |
1070 VA_SUCCESS_OR_RETURN( | 1070 VA_SUCCESS_OR_RETURN( |
1071 vaBeginPicture(va_display_, va_vpp_context_id_, va_surface_dest->id()), | 1071 vaBeginPicture(va_display_, va_vpp_context_id_, va_surface_dest->id()), |
1072 "Couldn't begin picture", false); | 1072 "Couldn't begin picture", false); |
1073 | 1073 |
1074 VA_SUCCESS_OR_RETURN( | 1074 VA_SUCCESS_OR_RETURN( |
1075 vaRenderPicture(va_display_, va_vpp_context_id_, &va_vpp_buffer_id_, 1), | 1075 vaRenderPicture(va_display_, va_vpp_context_id_, &va_vpp_buffer_id_, 1), |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 drm_fd_.reset(HANDLE_EINTR(dup(fd))); | 1253 drm_fd_.reset(HANDLE_EINTR(dup(fd))); |
1254 } | 1254 } |
1255 #endif // USE_OZONE | 1255 #endif // USE_OZONE |
1256 | 1256 |
1257 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) { | 1257 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) { |
1258 return (major_version_ < major) || | 1258 return (major_version_ < major) || |
1259 (major_version_ == major && minor_version_ < minor); | 1259 (major_version_ == major && minor_version_ < minor); |
1260 } | 1260 } |
1261 | 1261 |
1262 } // namespace media | 1262 } // namespace media |
OLD | NEW |