VA-API  2.13.0.pre1
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,
vaMapBuffer(va_dpy, colorBalanceBuffer, &pColorBalanceParam);
// Change brightness only
pColorBalanceBuffer[kBrightness].value = 0.75;
vaUnmapBuffer(va_dpy, colorBalanceBuffer);

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: