-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Submodule ffmpeg a577d313b2..8b4e32f30b Fix conflict of patch 0062/0063. Signed-off-by: Fei Wang <[email protected]>
- Loading branch information
Showing
3 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From e89bf2f7394c39f6f17e18e812111bf2c2772167 Mon Sep 17 00:00:00 2001 | ||
From 5d393ca42b40186fedccf0531075d167780d98fe Mon Sep 17 00:00:00 2001 | ||
From: Fei Wang <[email protected]> | ||
Date: Fri, 29 Apr 2022 15:59:38 +0800 | ||
Subject: [PATCH] lavu: add sub frame side data | ||
|
@@ -45,18 +45,18 @@ index 6e6fa8d800..1ec25a9d1e 100644 | |
|
||
OBJS-$(CONFIG_CUDA) += hwcontext_cuda.o | ||
diff --git a/libavutil/frame.c b/libavutil/frame.c | ||
index 2758f90e27..ca35130a0b 100644 | ||
index f0a0dba018..d836d29608 100644 | ||
--- a/libavutil/frame.c | ||
+++ b/libavutil/frame.c | ||
@@ -57,6 +57,7 @@ static const AVSideDataDescriptor sd_props[] = { | ||
@@ -58,6 +58,7 @@ static const AVSideDataDescriptor sd_props[] = { | ||
[AV_FRAME_DATA_SPHERICAL] = { "Spherical Mapping", AV_SIDE_DATA_PROP_GLOBAL }, | ||
[AV_FRAME_DATA_ICC_PROFILE] = { "ICC profile", AV_SIDE_DATA_PROP_GLOBAL }, | ||
[AV_FRAME_DATA_SEI_UNREGISTERED] = { "H.26[45] User Data Unregistered SEI message", AV_SIDE_DATA_PROP_MULTI }, | ||
+ [AV_FRAME_DATA_SUB_FRAME] = { "Sub frame Metadata" }, | ||
}; | ||
|
||
static void get_frame_defaults(AVFrame *frame) | ||
@@ -359,7 +360,9 @@ FF_ENABLE_DEPRECATION_WARNINGS | ||
@@ -360,7 +361,9 @@ FF_ENABLE_DEPRECATION_WARNINGS | ||
if ( sd_src->type == AV_FRAME_DATA_PANSCAN | ||
&& (src->width != dst->width || src->height != dst->height)) | ||
continue; | ||
|
@@ -68,13 +68,13 @@ index 2758f90e27..ca35130a0b 100644 | |
sd_src->size); | ||
if (!sd_dst) { | ||
diff --git a/libavutil/frame.h b/libavutil/frame.h | ||
index 5e0d8ae648..b1717c549a 100644 | ||
index f7806566d5..7ec9c8b65b 100644 | ||
--- a/libavutil/frame.h | ||
+++ b/libavutil/frame.h | ||
@@ -234,6 +234,11 @@ enum AVFrameSideDataType { | ||
* bytes intact. | ||
@@ -243,6 +243,11 @@ enum AVFrameSideDataType { | ||
* The data is an int storing the view ID. | ||
*/ | ||
AV_FRAME_DATA_LCEVC, | ||
AV_FRAME_DATA_VIEW_ID, | ||
+ | ||
+ /** | ||
+ * Sub frame of a target frame, as described by AVFrame. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
From b43a5fdf9cf870ad0ee8e2b5fae9956013bcb519 Mon Sep 17 00:00:00 2001 | ||
From f2c449a62dee3804c56fc5b5356e19e08897706f Mon Sep 17 00:00:00 2001 | ||
From: Fei Wang <[email protected]> | ||
Date: Fri, 29 Apr 2022 15:59:39 +0800 | ||
Subject: [PATCH 11/50] lavc: add sub frame options and flag | ||
Subject: [PATCH] lavc: add sub frame options and flag | ||
|
||
Note: remove version bump in libavcodec/version.h compare to version | ||
submitted to community: | ||
|
@@ -43,23 +43,23 @@ index 6bdeb664e7..fdcfdcaea3 100644 | |
@end table | ||
|
||
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h | ||
index 83dc487251..f89a063e98 100644 | ||
index 77ca8dee1f..7fdec356fd 100644 | ||
--- a/libavcodec/avcodec.h | ||
+++ b/libavcodec/avcodec.h | ||
@@ -419,6 +419,12 @@ typedef struct RcOverride{ | ||
@@ -425,6 +425,12 @@ typedef struct RcOverride{ | ||
*/ | ||
#define AV_CODEC_EXPORT_DATA_FILM_GRAIN (1 << 3) | ||
#define AV_CODEC_EXPORT_DATA_ENHANCEMENTS (1 << 4) | ||
|
||
+/** | ||
+ * Decoding only. | ||
+ * export sub frame through frame side data. | ||
+ */ | ||
+#define AV_CODEC_EXPORT_DATA_SUB_FRAME (1 << 4) | ||
+#define AV_CODEC_EXPORT_DATA_SUB_FRAME (1 << 5) | ||
+ | ||
/** | ||
* The decoder will keep a reference to the frame and may reuse it later. | ||
*/ | ||
@@ -2075,6 +2081,13 @@ typedef struct AVCodecContext { | ||
@@ -2086,6 +2092,13 @@ typedef struct AVCodecContext { | ||
*/ | ||
AVFrameSideData **decoded_side_data; | ||
int nb_decoded_side_data; | ||
|
@@ -74,18 +74,18 @@ index 83dc487251..f89a063e98 100644 | |
|
||
/** | ||
diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h | ||
index 6b7f09e647..c9912c7d2b 100644 | ||
index c8fc0bd532..3300b72ca2 100644 | ||
--- a/libavcodec/options_table.h | ||
+++ b/libavcodec/options_table.h | ||
@@ -93,6 +93,7 @@ static const AVOption avcodec_options[] = { | ||
{"prft", "export Producer Reference Time through packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_PRFT}, INT_MIN, INT_MAX, A|V|S|E, .unit = "export_side_data"}, | ||
@@ -94,6 +94,7 @@ static const AVOption avcodec_options[] = { | ||
{"venc_params", "export video encoding parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_VIDEO_ENC_PARAMS}, INT_MIN, INT_MAX, V|D, .unit = "export_side_data"}, | ||
{"film_grain", "export film grain parameters through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_FILM_GRAIN}, INT_MIN, INT_MAX, V|D, .unit = "export_side_data"}, | ||
{"enhancements", "export picture enhancement metadata through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_ENHANCEMENTS}, INT_MIN, INT_MAX, V|D, .unit = "export_side_data"}, | ||
+{"sub_frame", "export sub frame through frame side data", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_EXPORT_DATA_SUB_FRAME}, INT_MIN, INT_MAX, V|D, .unit = "export_side_data"}, | ||
{"time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, {.dbl = 0}, 0, INT_MAX}, | ||
{"g", "set the group of picture (GOP) size", OFFSET(gop_size), AV_OPT_TYPE_INT, {.i64 = 12 }, INT_MIN, INT_MAX, V|E}, | ||
{"ar", "set audio sampling rate (in Hz)", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, A|D|E}, | ||
@@ -408,6 +409,7 @@ static const AVOption avcodec_options[] = { | ||
@@ -413,6 +414,7 @@ static const AVOption avcodec_options[] = { | ||
{"mastering_display_metadata", .default_val.i64 = AV_PKT_DATA_MASTERING_DISPLAY_METADATA, .type = AV_OPT_TYPE_CONST, .flags = A|D, .unit = "side_data_pkt" }, | ||
{"content_light_level", .default_val.i64 = AV_PKT_DATA_CONTENT_LIGHT_LEVEL, .type = AV_OPT_TYPE_CONST, .flags = A|D, .unit = "side_data_pkt" }, | ||
{"icc_profile", .default_val.i64 = AV_PKT_DATA_ICC_PROFILE, .type = AV_OPT_TYPE_CONST, .flags = A|D, .unit = "side_data_pkt" }, | ||
|