lavu/raw_color_params: add Panasonic RW2 parameters

The as-shot white balance of RW2 files, as red and blue multipliers
relative to green. The files carry no camera matrix.
This commit is contained in:
Lynne committed 2026-10-08 14:21:36 +09:00
1 parent 16e0ddc40d
commit e7420679a3
3 files changed
+34 -1

No files matched your search

+3
View File
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2026-06-23.
API changes, most recent first:
2026-10-xx - xxxxxxxxxx - lavu 61.13.100 - raw_color_params.h
Add AV_RAW_COLOR_PARAMS_RW2 and AVRW2RawColorParams.
2026-10-xx - xxxxxxxxxx - lavc 63.18.100 - codec_id.h
Add AV_CODEC_ID_RW2.
+30
View File
@@ -35,6 +35,12 @@ enum AVRawColorParamsType {
* (codec.prores_raw).
*/
AV_RAW_COLOR_PARAMS_PRORES_RAW,
/**
* The union is valid when interpreted as AVRW2RawColorParams
* (codec.rw2).
*/
AV_RAW_COLOR_PARAMS_RW2,
};
/**
@@ -80,6 +86,29 @@ typedef struct AVProResRawColorParams {
AVRational gain;
} AVProResRawColorParams;
/**
* Panasonic RW2 as-shot white balance, from the file's WB level tags.
*
* The file carries no camera matrix. After white balance and debayering,
* camera RGB needs a profile for the camera model, which the EXIF side data
* names.
*
* @note The struct must be allocated as part of AVRawColorParams using
* av_raw_color_params_alloc(). Its size is not a part of the public ABI.
*/
typedef struct AVRW2RawColorParams {
/**
* White balance multiplier for the red channel, applied pre-debayer.
*/
AVRational wb_red;
/**
* White balance multiplier for the blue channel, applied pre-debayer.
* The green channel is implicitly 1.0.
*/
AVRational wb_blue;
} AVRW2RawColorParams;
/**
* Per-frame color information for a RAW camera codec. Carried as side data of
* type AV_FRAME_DATA_RAW_COLOR_PARAMS.
@@ -125,6 +154,7 @@ typedef struct AVRawColorParams {
*/
union {
AVProResRawColorParams prores_raw;
AVRW2RawColorParams rw2;
} codec;
} AVRawColorParams;
+1 -1
View File
@@ -79,7 +79,7 @@
*/
#define LIBAVUTIL_VERSION_MAJOR 61
#define LIBAVUTIL_VERSION_MINOR 12
#define LIBAVUTIL_VERSION_MINOR 13
#define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \