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 10-18
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/50bc87263576
Link Here
|
10 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d794b36a7788 |
6 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/d794b36a7788 |
11 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be |
7 |
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be |
12 |
|
8 |
|
13 |
--- configure.orig 2021-10-24 20:47:11 UTC |
9 |
--- configure.orig 2022-01-14 18:45:39 UTC |
14 |
+++ configure |
10 |
+++ configure |
15 |
@@ -6430,7 +6430,7 @@ enabled libsrt && require_pkg_config libsrt |
11 |
@@ -6604,7 +6604,7 @@ enabled libsrt && require_pkg_config libsrt |
16 |
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init |
12 |
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init |
17 |
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init |
13 |
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init |
18 |
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket |
14 |
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket |
Lines 21-31
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
Link Here
|
21 |
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow |
17 |
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow |
22 |
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate |
18 |
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate |
23 |
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg |
19 |
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg |
24 |
--- doc/encoders.texi.orig 2021-10-24 20:47:07 UTC |
20 |
--- doc/encoders.texi.orig 2022-01-14 18:45:39 UTC |
25 |
+++ doc/encoders.texi |
21 |
+++ doc/encoders.texi |
26 |
@@ -1754,28 +1754,15 @@ Set the operating point tier. |
22 |
@@ -1775,28 +1775,15 @@ This is the default. |
27 |
@item tier |
23 |
@item high |
28 |
Set the operating point tier. |
24 |
@end table |
29 |
|
25 |
|
30 |
-@item rc |
26 |
-@item rc |
31 |
-Set the rate control mode to use. |
27 |
-Set the rate control mode to use. |
Lines 55-61
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
Link Here
|
55 |
@item qp |
51 |
@item qp |
56 |
Set the quantizer used in cqp rate control mode (0-63). |
52 |
Set the quantizer used in cqp rate control mode (0-63). |
57 |
|
53 |
|
58 |
@@ -1786,14 +1773,18 @@ Set number of frames to look ahead (0-120). |
54 |
@@ -1807,14 +1794,18 @@ Set number of frames to look ahead (0-120). |
59 |
Set number of frames to look ahead (0-120). |
55 |
Set number of frames to look ahead (0-120). |
60 |
|
56 |
|
61 |
@item preset |
57 |
@item preset |
Lines 76-82
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
Link Here
|
76 |
|
72 |
|
77 |
@end table |
73 |
@end table |
78 |
|
74 |
|
79 |
--- libavcodec/libsvtav1.c.orig 2021-10-24 20:47:07 UTC |
75 |
--- libavcodec/libsvtav1.c.orig 2022-01-14 18:45:40 UTC |
80 |
+++ libavcodec/libsvtav1.c |
76 |
+++ libavcodec/libsvtav1.c |
81 |
@@ -60,17 +60,20 @@ typedef struct SvtContext { |
77 |
@@ -60,17 +60,20 @@ typedef struct SvtContext { |
82 |
EOS_STATUS eos_flag; |
78 |
EOS_STATUS eos_flag; |
Lines 199-218
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
Link Here
|
199 |
if (avctx->gop_size > 0) |
195 |
if (avctx->gop_size > 0) |
200 |
param->intra_period_length = avctx->gop_size - 1; |
196 |
param->intra_period_length = avctx->gop_size - 1; |
201 |
|
197 |
|
202 |
@@ -205,19 +263,15 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
198 |
@@ -205,8 +263,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
203 |
param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; |
199 |
param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; |
204 |
} |
200 |
} |
205 |
|
201 |
|
|
|
202 |
- param->enable_tpl_la = !!param->rate_control_mode; |
206 |
- if (param->rate_control_mode) { |
203 |
- if (param->rate_control_mode) { |
207 |
+ avctx->bit_rate = param->target_bit_rate; |
204 |
+ avctx->bit_rate = param->target_bit_rate; |
208 |
+ if (avctx->bit_rate) { |
205 |
+ if (avctx->bit_rate) { |
209 |
param->max_qp_allowed = avctx->qmax; |
206 |
param->max_qp_allowed = avctx->qmax; |
210 |
param->min_qp_allowed = avctx->qmin; |
207 |
param->min_qp_allowed = avctx->qmin; |
211 |
} |
208 |
} |
212 |
|
209 |
@@ -214,12 +272,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
213 |
- param->intra_refresh_type = 2; /* Real keyframes only */ |
210 |
/* 2 = IDR, closed GOP, 1 = CRA, open GOP */ |
214 |
+ /* 2 = IDR, closed GOP, 1 = CRA, open GOP */ |
211 |
param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1; |
215 |
+ param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1; |
|
|
216 |
|
212 |
|
217 |
- if (svt_enc->la_depth >= 0) |
213 |
- if (svt_enc->la_depth >= 0) |
218 |
- param->look_ahead_distance = svt_enc->la_depth; |
214 |
- param->look_ahead_distance = svt_enc->la_depth; |
Lines 223-229
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
Link Here
|
223 |
return 0; |
219 |
return 0; |
224 |
} |
220 |
} |
225 |
|
221 |
|
226 |
@@ -472,21 +526,22 @@ static const AVOption options[] = { |
222 |
@@ -474,21 +526,22 @@ static const AVOption options[] = { |
227 |
#define OFFSET(x) offsetof(SvtContext, x) |
223 |
#define OFFSET(x) offsetof(SvtContext, x) |
228 |
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
224 |
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM |
229 |
static const AVOption options[] = { |
225 |
static const AVOption options[] = { |
Lines 255-266
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
Link Here
|
255 |
|
251 |
|
256 |
FF_AV1_PROFILE_OPTS |
252 |
FF_AV1_PROFILE_OPTS |
257 |
|
253 |
|
258 |
@@ -518,21 +573,20 @@ static const AVOption options[] = { |
254 |
@@ -520,21 +573,20 @@ static const AVOption options[] = { |
259 |
{ LEVEL("7.3", 73) }, |
255 |
{ LEVEL("7.3", 73) }, |
260 |
#undef LEVEL |
256 |
#undef LEVEL |
261 |
|
257 |
|
262 |
- { "rc", "Bit rate control mode", OFFSET(rc_mode), |
258 |
- { "rc", "Bit rate control mode", OFFSET(rc_mode), |
263 |
- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, VE , "rc"}, |
259 |
- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "rc"}, |
264 |
- { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, |
260 |
- { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, |
265 |
- { "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" }, |
261 |
- { "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" }, |
266 |
- { "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" }, |
262 |
- { "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 288-328
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/51c0b9e829be
Link Here
|
288 |
{NULL}, |
284 |
{NULL}, |
289 |
}; |
285 |
}; |
290 |
|
286 |
|
291 |
@@ -544,9 +598,10 @@ static const AVCodecDefault eb_enc_defaults[] = { |
287 |
@@ -546,10 +598,10 @@ static const AVCodecDefault eb_enc_defaults[] = { |
292 |
}; |
288 |
}; |
293 |
|
289 |
|
294 |
static const AVCodecDefault eb_enc_defaults[] = { |
290 |
static const AVCodecDefault eb_enc_defaults[] = { |
295 |
- { "b", "7M" }, |
291 |
- { "b", "7M" }, |
296 |
+ { "b", "0" }, |
292 |
+ { "b", "0" }, |
297 |
+ { "flags", "+cgop" }, |
293 |
{ "flags", "+cgop" }, |
298 |
{ "g", "-1" }, |
294 |
{ "g", "-1" }, |
299 |
- { "qmin", "0" }, |
295 |
- { "qmin", "0" }, |
300 |
+ { "qmin", "1" }, |
296 |
+ { "qmin", "1" }, |
301 |
{ "qmax", "63" }, |
297 |
{ "qmax", "63" }, |
302 |
{ NULL }, |
298 |
{ NULL }, |
303 |
}; |
299 |
}; |
304 |
@@ -561,12 +616,11 @@ AVCodec ff_libsvtav1_encoder = { |
300 |
--- libavcodec/version.h.orig 2022-01-14 18:45:40 UTC |
305 |
.receive_packet = eb_receive_packet, |
|
|
306 |
.close = eb_enc_close, |
307 |
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS, |
308 |
- .caps_internal = FF_CODEC_CAP_AUTO_THREADS, |
309 |
+ .caps_internal = FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP, |
310 |
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, |
311 |
AV_PIX_FMT_YUV420P10, |
312 |
AV_PIX_FMT_NONE }, |
313 |
.priv_class = &class, |
314 |
.defaults = eb_enc_defaults, |
315 |
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, |
316 |
.wrapper_name = "libsvtav1", |
317 |
}; |
318 |
--- libavcodec/version.h.orig 2021-10-24 20:47:07 UTC |
319 |
+++ libavcodec/version.h |
301 |
+++ libavcodec/version.h |
320 |
@@ -168,5 +168,8 @@ |
302 |
@@ -63,5 +63,6 @@ |
321 |
#ifndef FF_API_INIT_PACKET |
303 |
#define FF_API_MPEGVIDEO_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) |
322 |
#define FF_API_INIT_PACKET (LIBAVCODEC_VERSION_MAJOR < 60) |
304 |
#define FF_API_FLAG_TRUNCATED (LIBAVCODEC_VERSION_MAJOR < 60) |
323 |
#endif |
305 |
#define FF_API_SUB_TEXT_FORMAT (LIBAVCODEC_VERSION_MAJOR < 60) |
324 |
+#ifndef FF_API_SVTAV1_OPTS |
|
|
325 |
+#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) |
306 |
+#define FF_API_SVTAV1_OPTS (LIBAVCODEC_VERSION_MAJOR < 60) |
326 |
+#endif |
|
|
327 |
|
307 |
|
328 |
#endif /* AVCODEC_VERSION_H */ |
308 |
#endif /* AVCODEC_VERSION_H */ |