hardware/intel/libva
修訂 | 2be38edfb40e06d3a8a4b513ff458d9260633d1d (tree) |
---|---|
時間 | 2013-05-28 17:32:18 |
作者 | Gwenole Beauchesne <gwenole.beauchesne@inte...> |
Commiter | Xiang, Haihao |
vpp: allow input/output color primaries as requested.
XXX: this is still a complicated usage model. The color primary could
be a surface atttribute instead.
@@ -160,7 +160,13 @@ extern "C" { | ||
160 | 160 | * unsigned int num_forward_references; |
161 | 161 | * VASurfaceID *backward_references; |
162 | 162 | * unsigned int num_backward_references; |
163 | + * VAProcColorStandardType in_color_standards[VAProcColorStandardCount]; | |
164 | + * VAProcColorStandardType out_color_standards[VAProcColorStandardCount]; | |
163 | 165 | * |
166 | + * pipeline_caps.input_color_standards = NULL; | |
167 | + * pipeline_caps.num_input_color_standards = ARRAY_ELEMS(in_color_standards); | |
168 | + * pipeline_caps.output_color_standards = NULL; | |
169 | + * pipeline_caps.num_output_color_standards = ARRAY_ELEMS(out_color_standards); | |
164 | 170 | * vaQueryVideoProcPipelineCaps(va_dpy, vpp_ctx, |
165 | 171 | * filter_bufs, num_filter_bufs, |
166 | 172 | * &pipeline_caps |
@@ -298,6 +304,8 @@ typedef enum _VAProcColorStandardType { | ||
298 | 304 | VAProcColorStandardSMPTE240M, |
299 | 305 | /** \brief Generic film. */ |
300 | 306 | VAProcColorStandardGenericFilm, |
307 | + /** \brief Max number of color standard types. */ | |
308 | + VAProcColorStandardCount | |
301 | 309 | } VAProcColorStandardType; |
302 | 310 | |
303 | 311 | /** @name Video pipeline flags */ |
@@ -335,6 +343,14 @@ typedef struct _VAProcPipelineCaps { | ||
335 | 343 | unsigned int num_forward_references; |
336 | 344 | /** \brief Number of backward reference frames that are needed. */ |
337 | 345 | unsigned int num_backward_references; |
346 | + /** \brief List of color standards supported on input. */ | |
347 | + VAProcColorStandardType *input_color_standards; | |
348 | + /** \brief Number of elements in \ref input_color_standards array. */ | |
349 | + unsigned int num_input_color_standards; | |
350 | + /** \brief List of color standards supported on output. */ | |
351 | + VAProcColorStandardType *output_color_standards; | |
352 | + /** \brief Number of elements in \ref output_color_standards array. */ | |
353 | + unsigned int num_output_color_standards; | |
338 | 354 | } VAProcPipelineCaps; |
339 | 355 | |
340 | 356 | /** \brief Specification of values supported by the filter. */ |
@@ -397,6 +413,15 @@ typedef struct _VAProcPipelineParameterBuffer { | ||
397 | 413 | */ |
398 | 414 | const VARectangle *surface_region; |
399 | 415 | /** |
416 | + * \brief Requested input color primaries. | |
417 | + * | |
418 | + * Color primaries are implicitly converted throughout the processing | |
419 | + * pipeline. The video processor chooses the best moment to apply | |
420 | + * this conversion. The set of supported color primaries primaries | |
421 | + * for input shall be queried with vaQueryVideoProcPipelineCaps(). | |
422 | + */ | |
423 | + VAProcColorStandardType surface_color_standard; | |
424 | + /** | |
400 | 425 | * \brief Region within the output surface. |
401 | 426 | * |
402 | 427 | * Pointer to a #VARectangle defining the region within the output |
@@ -424,6 +449,10 @@ typedef struct _VAProcPipelineParameterBuffer { | ||
424 | 449 | */ |
425 | 450 | unsigned int output_background_color; |
426 | 451 | /** |
452 | + * \brief Requested output color primaries. | |
453 | + */ | |
454 | + VAProcColorStandardType output_color_standard; | |
455 | + /** | |
427 | 456 | * \brief Pipeline filters. See video pipeline flags. |
428 | 457 | * |
429 | 458 | * Flags to control the pipeline, like whether to apply subpictures |
@@ -679,12 +708,20 @@ vaQueryVideoProcFilterCaps( | ||
679 | 708 | * \c filters array defines the video processing pipeline and is an array |
680 | 709 | * of buffers holding filter parameters. |
681 | 710 | * |
711 | + * Note: the #VAProcPipelineCaps structure contains user-provided arrays. | |
712 | + * If non-NULL, the corresponding \c num_* fields shall be filled in on | |
713 | + * input with the number of elements allocated. Upon successful return, | |
714 | + * the actual number of elements will be overwritten into the \c num_* | |
715 | + * fields. Otherwise, \c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned | |
716 | + * and \c num_* fields are adjusted to the number of elements that would | |
717 | + * be returned if enough space was available. | |
718 | + * | |
682 | 719 | * @param[in] dpy the VA display |
683 | 720 | * @param[in] context the video processing context |
684 | 721 | * @param[in] filters the array of VA buffers defining the video |
685 | 722 | * processing pipeline |
686 | 723 | * @param[in] num_filters the number of elements in filters |
687 | - * @param[out] pipeline_caps the video processing pipeline capabilities | |
724 | + * @param[in,out] pipeline_caps the video processing pipeline capabilities | |
688 | 725 | */ |
689 | 726 | VAStatus |
690 | 727 | vaQueryVideoProcPipelineCaps( |