VA-API  2.22.0
Public Attributes | List of all members
VAProcFilterParameterBufferColorBalance Struct Reference

Color balance filter parametrization. More...

#include <va_vpp.h>

Public Attributes

VAProcFilterType type
 Filter type. Shall be set to VAProcFilterColorBalance.
 
VAProcColorBalanceType attrib
 Color balance attribute.
 
float value
 Color balance value. More...
 
uint32_t va_reserved [VA_PADDING_LOW]
 Reserved bytes for future use, must be zero.
 

Detailed Description

Color balance filter parametrization.

This buffer defines color balance attributes. A VA buffer can hold several color balance attributes by creating a VA buffer of desired number of elements. This can be achieved by the following pseudo-code:

enum { kHue, kSaturation, kBrightness, kContrast };
// Initial color balance parameters
static const VAProcFilterParameterBufferColorBalance colorBalanceParams[4] =
{
[kHue] =
[kSaturation] =
[kBrightness] =
[kSaturation] =
};
// Create buffer
VABufferID colorBalanceBuffer;
vaCreateBuffer(va_dpy, vpp_ctx,
VAProcFilterParameterBufferType, sizeof(*pColorBalanceParam), 4,
colorBalanceParams,
&colorBalanceBuffer
);
vaMapBuffer(va_dpy, colorBalanceBuffer, &pColorBalanceParam);
{
// Change brightness only
pColorBalanceBuffer[kBrightness].value = 0.75;
}
vaUnmapBuffer(va_dpy, colorBalanceBuffer);
VAStatus vaCreateBuffer(VADisplay dpy, VAContextID context, VABufferType type, unsigned int size, unsigned int num_elements, void *data, VABufferID *buf_id)
VAGenericID VABufferID
Definition: va.h:2019
VAStatus vaUnmapBuffer(VADisplay dpy, VABufferID buf_id)
VAStatus vaMapBuffer(VADisplay dpy, VABufferID buf_id, void **pbuf)
@ VAProcFilterParameterBufferType
Video filter parameter buffer.
Definition: va.h:2076
@ VAProcFilterColorBalance
Color balance parameters.
Definition: va_vpp.h:247
@ VAProcColorBalanceHue
Hue.
Definition: va_vpp.h:281
@ VAProcColorBalanceSaturation
Saturation.
Definition: va_vpp.h:283
@ VAProcColorBalanceBrightness
Brightness.
Definition: va_vpp.h:285
Color balance filter parametrization.
Definition: va_vpp.h:1267

Member Data Documentation

◆ value

float VAProcFilterParameterBufferColorBalance::value

Color balance value.

Special case for automatically adjusted attributes. e.g. VAProcColorBalanceAutoSaturation, VAProcColorBalanceAutoBrightness, VAProcColorBalanceAutoContrast.

  • If value is 1.0 +/- FLT_EPSILON, the attribute is automatically adjusted and overrides any other attribute of the same type that would have been set explicitly;
  • If value is 0.0 +/- FLT_EPSILON, the attribute is disabled and other attribute of the same type is used instead.

The documentation for this struct was generated from the following file: