You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avutil/dovi_meta: add AVDOVIDataMapping.nlq_pivots
The NLQ pivots are not documented but should be present in the header for profile 7 RPU format. It has been verified using Dolby's verification toolkit. Signed-off-by: quietvoid <tcChlisop0@gmail.com> Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2024-03-07
|
|||||||
|
|
||||||
API changes, most recent first:
|
API changes, most recent first:
|
||||||
|
|
||||||
|
2024-04-xx - xxxxxxxxxx - lavu 59.11.100 - dovi_meta.h
|
||||||
|
Add AVDOVIDataMapping.nlq_pivots.
|
||||||
|
|
||||||
2024-03-29 - xxxxxxxxxx - lavf 61.3.100 - avformat.h
|
2024-03-29 - xxxxxxxxxx - lavf 61.3.100 - avformat.h
|
||||||
Add AVFormatContext.duration_probesize.
|
Add AVFormatContext.duration_probesize.
|
||||||
|
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ int ff_dovi_attach_side_data(DOVIContext *s, AVFrame *frame)
|
|||||||
/* Copy only the parts of these structs known to us at compiler-time. */
|
/* Copy only the parts of these structs known to us at compiler-time. */
|
||||||
#define COPY(t, a, b, last) memcpy(a, b, offsetof(t, last) + sizeof((b)->last))
|
#define COPY(t, a, b, last) memcpy(a, b, offsetof(t, last) + sizeof((b)->last))
|
||||||
COPY(AVDOVIRpuDataHeader, av_dovi_get_header(dovi), &s->header, disable_residual_flag);
|
COPY(AVDOVIRpuDataHeader, av_dovi_get_header(dovi), &s->header, disable_residual_flag);
|
||||||
COPY(AVDOVIDataMapping, av_dovi_get_mapping(dovi), s->mapping, nlq[2].linear_deadzone_threshold);
|
COPY(AVDOVIDataMapping, av_dovi_get_mapping(dovi), s->mapping, nlq_pivots);
|
||||||
COPY(AVDOVIColorMetadata, av_dovi_get_color(dovi), s->color, source_diagonal);
|
COPY(AVDOVIColorMetadata, av_dovi_get_color(dovi), s->color, source_diagonal);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -347,7 +347,14 @@ int ff_dovi_rpu_parse(DOVIContext *s, const uint8_t *rpu, size_t rpu_size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (use_nlq) {
|
if (use_nlq) {
|
||||||
|
int nlq_pivot = 0;
|
||||||
vdr->mapping.nlq_method_idc = get_bits(gb, 3);
|
vdr->mapping.nlq_method_idc = get_bits(gb, 3);
|
||||||
|
|
||||||
|
for (int i = 0; i < 2; i++) {
|
||||||
|
nlq_pivot += get_bits(gb, hdr->bl_bit_depth);
|
||||||
|
vdr->mapping.nlq_pivots[i] = av_clip_uint16(nlq_pivot);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The patent mentions another legal value, NLQ_MU_LAW, but it's
|
* The patent mentions another legal value, NLQ_MU_LAW, but it's
|
||||||
* not documented anywhere how to parse or apply that type of NLQ.
|
* not documented anywhere how to parse or apply that type of NLQ.
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ typedef struct AVDOVIDataMapping {
|
|||||||
uint32_t num_x_partitions;
|
uint32_t num_x_partitions;
|
||||||
uint32_t num_y_partitions;
|
uint32_t num_y_partitions;
|
||||||
AVDOVINLQParams nlq[3]; /* per component */
|
AVDOVINLQParams nlq[3]; /* per component */
|
||||||
|
uint16_t nlq_pivots[2];
|
||||||
} AVDOVIDataMapping;
|
} AVDOVIDataMapping;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define LIBAVUTIL_VERSION_MAJOR 59
|
#define LIBAVUTIL_VERSION_MAJOR 59
|
||||||
#define LIBAVUTIL_VERSION_MINOR 10
|
#define LIBAVUTIL_VERSION_MINOR 11
|
||||||
#define LIBAVUTIL_VERSION_MICRO 100
|
#define LIBAVUTIL_VERSION_MICRO 100
|
||||||
|
|
||||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||||
|
|||||||
Reference in New Issue
Block a user