Lines 1-7
Link Here
|
1 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/04b89e8ae33b |
|
|
2 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/64e2fb3f9d89 |
3 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/0463f5d6d56d |
4 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c5f314309067 |
5 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c33b4048859a |
1 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/c33b4048859a |
6 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a2b090da7932 |
2 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/a2b090da7932 |
7 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 |
3 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0 |
Lines 11-19
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d794b36a7788
Link Here
|
11 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be |
7 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be |
12 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a |
8 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a |
13 |
|
9 |
|
14 |
--- configure.orig 2021-10-24 20:47:11 UTC |
10 |
--- configure.orig 2022-04-04 14:40:22 UTC |
15 |
+++ configure |
11 |
+++ configure |
16 |
@@ -6430,7 +6430,7 @@ enabled libsrt && require_pkg_config libsrt |
12 |
@@ -6611,7 +6611,7 @@ enabled libsrt && require_pkg_config libsrt |
17 |
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init |
13 |
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init |
18 |
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init |
14 |
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init |
19 |
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket |
15 |
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket |
Lines 22-32
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
22 |
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow |
18 |
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow |
23 |
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate |
19 |
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate |
24 |
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg |
20 |
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg |
25 |
--- doc/encoders.texi.orig 2021-10-24 20:47:07 UTC |
21 |
--- doc/encoders.texi.orig 2022-01-14 18:45:39 UTC |
26 |
+++ doc/encoders.texi |
22 |
+++ doc/encoders.texi |
27 |
@@ -1754,28 +1754,15 @@ Set the operating point tier. |
23 |
@@ -1775,28 +1775,15 @@ This is the default. |
28 |
@item tier |
24 |
@item high |
29 |
Set the operating point tier. |
25 |
@end table |
30 |
|
26 |
|
31 |
-@item rc |
27 |
-@item rc |
32 |
-Set the rate control mode to use. |
28 |
-Set the rate control mode to use. |
Lines 56-62
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
56 |
@item qp |
52 |
@item qp |
57 |
Set the quantizer used in cqp rate control mode (0-63). |
53 |
Set the quantizer used in cqp rate control mode (0-63). |
58 |
|
54 |
|
59 |
@@ -1786,14 +1773,18 @@ Set number of frames to look ahead (0-120). |
55 |
@@ -1807,14 +1794,18 @@ Set number of frames to look ahead (0-120). |
60 |
Set number of frames to look ahead (0-120). |
56 |
Set number of frames to look ahead (0-120). |
61 |
|
57 |
|
62 |
@item preset |
58 |
@item preset |
Lines 77-83
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
77 |
|
73 |
|
78 |
@end table |
74 |
@end table |
79 |
|
75 |
|
80 |
--- libavcodec/libsvtav1.c.orig 2021-10-24 20:47:07 UTC |
76 |
--- libavcodec/libsvtav1.c.orig 2022-01-14 18:45:40 UTC |
81 |
+++ libavcodec/libsvtav1.c |
77 |
+++ libavcodec/libsvtav1.c |
82 |
@@ -60,17 +60,20 @@ typedef struct SvtContext { |
78 |
@@ -60,17 +60,20 @@ typedef struct SvtContext { |
83 |
EOS_STATUS eos_flag; |
79 |
EOS_STATUS eos_flag; |
Lines 198-213
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
198 |
if (avctx->gop_size > 0) |
194 |
if (avctx->gop_size > 0) |
199 |
param->intra_period_length = avctx->gop_size - 1; |
195 |
param->intra_period_length = avctx->gop_size - 1; |
200 |
|
196 |
|
201 |
@@ -205,19 +221,56 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
197 |
@@ -205,21 +221,56 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
202 |
param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; |
198 |
param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; |
203 |
} |
199 |
} |
204 |
|
200 |
|
|
|
201 |
- param->enable_tpl_la = !!param->rate_control_mode; |
205 |
- if (param->rate_control_mode) { |
202 |
- if (param->rate_control_mode) { |
206 |
- param->max_qp_allowed = avctx->qmax; |
203 |
- param->max_qp_allowed = avctx->qmax; |
207 |
- param->min_qp_allowed = avctx->qmin; |
204 |
- param->min_qp_allowed = avctx->qmin; |
208 |
+ /* 2 = IDR, closed GOP, 1 = CRA, open GOP */ |
205 |
- } |
209 |
+ param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1; |
206 |
- |
210 |
+ |
207 |
/* 2 = IDR, closed GOP, 1 = CRA, open GOP */ |
|
|
208 |
param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1; |
209 |
|
210 |
- if (svt_enc->la_depth >= 0) |
211 |
- param->look_ahead_distance = svt_enc->la_depth; |
211 |
+#if SVT_AV1_CHECK_VERSION(0, 9, 1) |
212 |
+#if SVT_AV1_CHECK_VERSION(0, 9, 1) |
212 |
+ while ((en = av_dict_get(svt_enc->svtav1_opts, "", en, AV_DICT_IGNORE_SUFFIX))) { |
213 |
+ while ((en = av_dict_get(svt_enc->svtav1_opts, "", en, AV_DICT_IGNORE_SUFFIX))) { |
213 |
+ EbErrorType ret = svt_av1_enc_parse_parameter(param, en->key, en->value); |
214 |
+ EbErrorType ret = svt_av1_enc_parse_parameter(param, en->key, en->value); |
Lines 217-223
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
217 |
+ if (avctx->err_recognition & AV_EF_EXPLODE) |
218 |
+ if (avctx->err_recognition & AV_EF_EXPLODE) |
218 |
+ return AVERROR(EINVAL); |
219 |
+ return AVERROR(EINVAL); |
219 |
+ } |
220 |
+ } |
220 |
} |
221 |
+ } |
221 |
+#else |
222 |
+#else |
222 |
+ if ((en = av_dict_get(svt_enc->svtav1_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { |
223 |
+ if ((en = av_dict_get(svt_enc->svtav1_opts, "", NULL, AV_DICT_IGNORE_SUFFIX))) { |
223 |
+ int level = (avctx->err_recognition & AV_EF_EXPLODE) ? AV_LOG_ERROR : AV_LOG_WARNING; |
224 |
+ int level = (avctx->err_recognition & AV_EF_EXPLODE) ? AV_LOG_ERROR : AV_LOG_WARNING; |
Lines 228-243
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
228 |
+ } |
229 |
+ } |
229 |
+#endif |
230 |
+#endif |
230 |
|
231 |
|
231 |
- param->intra_refresh_type = 2; /* Real keyframes only */ |
232 |
- param->tile_columns = svt_enc->tile_columns; |
|
|
233 |
- param->tile_rows = svt_enc->tile_rows; |
232 |
+ param->source_width = avctx->width; |
234 |
+ param->source_width = avctx->width; |
233 |
+ param->source_height = avctx->height; |
235 |
+ param->source_height = avctx->height; |
234 |
|
236 |
|
235 |
- if (svt_enc->la_depth >= 0) |
|
|
236 |
- param->look_ahead_distance = svt_enc->la_depth; |
237 |
+ param->encoder_bit_depth = desc->comp[0].depth; |
237 |
+ param->encoder_bit_depth = desc->comp[0].depth; |
238 |
|
238 |
+ |
239 |
- param->tile_columns = svt_enc->tile_columns; |
|
|
240 |
- param->tile_rows = svt_enc->tile_rows; |
241 |
+ if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 1) |
239 |
+ if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 1) |
242 |
+ param->encoder_color_format = EB_YUV420; |
240 |
+ param->encoder_color_format = EB_YUV420; |
243 |
+ else if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 0) |
241 |
+ else if (desc->log2_chroma_w == 1 && desc->log2_chroma_h == 0) |
Lines 248-254
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
248 |
+ av_log(avctx, AV_LOG_ERROR , "Unsupported pixel format\n"); |
246 |
+ av_log(avctx, AV_LOG_ERROR , "Unsupported pixel format\n"); |
249 |
+ return AVERROR(EINVAL); |
247 |
+ return AVERROR(EINVAL); |
250 |
+ } |
248 |
+ } |
251 |
|
249 |
+ |
252 |
+ if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10) |
250 |
+ if ((param->encoder_color_format == EB_YUV422 || param->encoder_bit_depth > 10) |
253 |
+ && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) { |
251 |
+ && param->profile != FF_PROFILE_AV1_PROFESSIONAL ) { |
254 |
+ av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n"); |
252 |
+ av_log(avctx, AV_LOG_WARNING, "Forcing Professional profile\n"); |
Lines 263-269
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
263 |
return 0; |
261 |
return 0; |
264 |
} |
262 |
} |
265 |
|
263 |
|
266 |
@@ -472,21 +525,22 @@ static const AVOption options[] = { |
264 |
@@ -474,21 +525,22 @@ static const AVOption options[] = { |
267 |
#define OFFSET(x) offsetof(SvtContext, x) |
265 |
#define OFFSET(x) offsetof(SvtContext, x) |
268 |
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
266 |
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
269 |
static const AVOption options[] = { |
267 |
static const AVOption options[] = { |
Lines 295-306
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
295 |
|
293 |
|
296 |
FF_AV1_PROFILE_OPTS |
294 |
FF_AV1_PROFILE_OPTS |
297 |
|
295 |
|
298 |
@@ -518,21 +572,20 @@ static const AVOption options[] = { |
296 |
@@ -520,21 +572,20 @@ static const AVOption options[] = { |
299 |
{ LEVEL("7.3", 73) }, |
297 |
{ LEVEL("7.3", 73) }, |
300 |
#undef LEVEL |
298 |
#undef LEVEL |
301 |
|
299 |
|
302 |
- { "rc", "Bit rate control mode", OFFSET(rc_mode), |
300 |
- { "rc", "Bit rate control mode", OFFSET(rc_mode), |
303 |
- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, VE , "rc"}, |
301 |
- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "rc"}, |
304 |
- { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, |
302 |
- { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, |
305 |
- { "vbr", "Variable Bit Rate, use a target bitrate for the entire stream", 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "rc" }, |
303 |
- { "vbr", "Variable Bit Rate, use a target bitrate for the entire stream", 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "rc" }, |
306 |
- { "cvbr", "Constrained Variable Bit Rate, use a target bitrate for each GOP", 0, AV_OPT_TYPE_CONST,{ .i64 = 2 }, INT_MIN, INT_MAX, VE, "rc" }, |
304 |
- { "cvbr", "Constrained Variable Bit Rate, use a target bitrate for each GOP", 0, AV_OPT_TYPE_CONST,{ .i64 = 2 }, INT_MIN, INT_MAX, VE, "rc" }, |
Lines 328-368
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/e3c4442b249a
Link Here
|
328 |
{NULL}, |
326 |
{NULL}, |
329 |
}; |
327 |
}; |
330 |
|
328 |
|
331 |
@@ -544,9 +597,10 @@ static const AVCodecDefault eb_enc_defaults[] = { |
329 |
@@ -546,10 +597,10 @@ static const AVCodecDefault eb_enc_defaults[] = { |
332 |
}; |
330 |
}; |
333 |
|
331 |
|
334 |
static const AVCodecDefault eb_enc_defaults[] = { |
332 |
static const AVCodecDefault eb_enc_defaults[] = { |
335 |
- { "b", "7M" }, |
333 |
- { "b", "7M" }, |
336 |
+ { "b", "0" }, |
334 |
+ { "b", "0" }, |
337 |
+ { "flags", "+cgop" }, |
335 |
{ "flags", "+cgop" }, |
338 |
{ "g", "-1" }, |
336 |
{ "g", "-1" }, |
339 |
- { "qmin", "0" }, |
337 |
- { "qmin", "0" }, |
340 |
+ { "qmin", "1" }, |
338 |
+ { "qmin", "1" }, |
341 |
{ "qmax", "63" }, |
339 |
{ "qmax", "63" }, |
342 |
{ NULL }, |
340 |
{ NULL }, |
343 |
}; |
341 |
}; |
344 |
@@ -561,12 +615,11 @@ AVCodec ff_libsvtav1_encoder = { |
342 |
--- libavcodec/version.h.orig 2022-01-14 18:45:40 UTC |
345 |
.receive_packet = eb_receive_packet, |
|
|
346 |
.close = eb_enc_close, |
347 |
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS, |
348 |
- .caps_internal = FF_CODEC_CAP_AUTO_THREADS, |
349 |
+ .caps_internal = FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP, |
350 |
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, |
351 |
AV_PIX_FMT_YUV420P10, |
352 |
AV_PIX_FMT_NONE }, |
353 |
.priv_class = &class, |
354 |
.defaults = eb_enc_defaults, |
355 |
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, |
356 |
.wrapper_name = "libsvtav1", |
357 |
}; |
358 |
--- libavcodec/version.h.orig 2021-10-24 20:47:07 UTC |
359 |
+++ libavcodec/version.h |
343 |
+++ libavcodec/version.h |
360 |
@@ -168,5 +168,8 @@ |
344 |
@@ -63,5 +63,6 @@ |
361 |
#ifndef FF_API_INIT_PACKET |
345 |
#define FF_API_MPEGVIDEO_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) |
362 |
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60) |
346 |
#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60) |
363 |
#endif |
347 |
#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60) |
364 |
+#ifndef FF_API_SVTAV1_OPTS |
|
|
365 |
+#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) |
348 |
+#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) |
366 |
+#endif |
|
|
367 |
|
349 |
|
368 |
#endif /* AVCODEC_VERSION_H */ |
350 |
#endif /* AVCODEC_VERSION_H */ |