Lines 1-14
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 |
8 |
|
4 |
|
9 |
--- configure.orig 2021-10-24 20:47:11 UTC |
5 |
--- configure.orig 2022-01-14 18:45:39 UTC |
10 |
+++ configure |
6 |
+++ configure |
11 |
@@ -6430,7 +6430,7 @@ enabled libsoxr && require libsoxr soxr.h so |
7 |
@@ -6604,7 +6604,7 @@ enabled libsoxr && require libsoxr soxr.h so |
12 |
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init |
8 |
enabled libssh && require_pkg_config libssh libssh libssh/sftp.h sftp_init |
13 |
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init |
9 |
enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init |
14 |
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket |
10 |
enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket |
Lines 17-27
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Link Here
|
17 |
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow |
13 |
enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow |
18 |
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate |
14 |
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate |
19 |
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg |
15 |
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg |
20 |
--- doc/encoders.texi.orig 2021-10-24 20:47:07 UTC |
16 |
--- doc/encoders.texi.orig 2022-01-14 18:45:39 UTC |
21 |
+++ doc/encoders.texi |
17 |
+++ doc/encoders.texi |
22 |
@@ -1754,28 +1754,15 @@ Set the operating point level. |
18 |
@@ -1775,28 +1775,15 @@ This is the default. |
23 |
@item tier |
19 |
@item high |
24 |
Set the operating point tier. |
20 |
@end table |
25 |
|
21 |
|
26 |
-@item rc |
22 |
-@item rc |
27 |
-Set the rate control mode to use. |
23 |
-Set the rate control mode to use. |
Lines 51-57
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Link Here
|
51 |
@item qp |
47 |
@item qp |
52 |
Set the quantizer used in cqp rate control mode (0-63). |
48 |
Set the quantizer used in cqp rate control mode (0-63). |
53 |
|
49 |
|
54 |
@@ -1786,14 +1773,18 @@ Enable scene change detection. |
50 |
@@ -1807,14 +1794,18 @@ Enable scene change detection. |
55 |
Set number of frames to look ahead (0-120). |
51 |
Set number of frames to look ahead (0-120). |
56 |
|
52 |
|
57 |
@item preset |
53 |
@item preset |
Lines 72-78
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Link Here
|
72 |
|
68 |
|
73 |
@end table |
69 |
@end table |
74 |
|
70 |
|
75 |
--- libavcodec/libsvtav1.c.orig 2021-10-24 20:47:07 UTC |
71 |
--- libavcodec/libsvtav1.c.orig 2022-01-14 18:45:40 UTC |
76 |
+++ libavcodec/libsvtav1.c |
72 |
+++ libavcodec/libsvtav1.c |
77 |
@@ -37,6 +37,10 @@ |
73 |
@@ -37,6 +37,10 @@ |
78 |
#include "avcodec.h" |
74 |
#include "avcodec.h" |
Lines 179-198
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Link Here
|
179 |
if (avctx->gop_size > 0) |
175 |
if (avctx->gop_size > 0) |
180 |
param->intra_period_length = avctx->gop_size - 1; |
176 |
param->intra_period_length = avctx->gop_size - 1; |
181 |
|
177 |
|
182 |
@@ -205,19 +256,15 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
178 |
@@ -205,8 +256,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
183 |
param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; |
179 |
param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; |
184 |
} |
180 |
} |
185 |
|
181 |
|
|
|
182 |
- param->enable_tpl_la = !!param->rate_control_mode; |
186 |
- if (param->rate_control_mode) { |
183 |
- if (param->rate_control_mode) { |
187 |
+ avctx->bit_rate = param->target_bit_rate; |
184 |
+ avctx->bit_rate = param->target_bit_rate; |
188 |
+ if (avctx->bit_rate) { |
185 |
+ if (avctx->bit_rate) { |
189 |
param->max_qp_allowed = avctx->qmax; |
186 |
param->max_qp_allowed = avctx->qmax; |
190 |
param->min_qp_allowed = avctx->qmin; |
187 |
param->min_qp_allowed = avctx->qmin; |
191 |
} |
188 |
} |
192 |
|
189 |
@@ -214,12 +265,6 @@ static int config_enc_params(EbSvtAv1EncConfiguration |
193 |
- param->intra_refresh_type = 2; /* Real keyframes only */ |
190 |
/* 2 = IDR, closed GOP, 1 = CRA, open GOP */ |
194 |
+ /* 2 = IDR, closed GOP, 1 = CRA, open GOP */ |
191 |
param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1; |
195 |
+ param->intra_refresh_type = avctx->flags & AV_CODEC_FLAG_CLOSED_GOP ? 2 : 1; |
|
|
196 |
|
192 |
|
197 |
- if (svt_enc->la_depth >= 0) |
193 |
- if (svt_enc->la_depth >= 0) |
198 |
- param->look_ahead_distance = svt_enc->la_depth; |
194 |
- param->look_ahead_distance = svt_enc->la_depth; |
Lines 203-209
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Link Here
|
203 |
return 0; |
199 |
return 0; |
204 |
} |
200 |
} |
205 |
|
201 |
|
206 |
@@ -480,8 +527,8 @@ static const AVOption options[] = { |
202 |
@@ -482,8 +527,8 @@ static const AVOption options[] = { |
207 |
{ "la_depth", "Look ahead distance [0, 120]", OFFSET(la_depth), |
203 |
{ "la_depth", "Look ahead distance [0, 120]", OFFSET(la_depth), |
208 |
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 120, VE }, |
204 |
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 120, VE }, |
209 |
|
205 |
|
Lines 214-225
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Link Here
|
214 |
|
210 |
|
215 |
{ "tier", "Set operating point tier", OFFSET(tier), |
211 |
{ "tier", "Set operating point tier", OFFSET(tier), |
216 |
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "tier" }, |
212 |
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "tier" }, |
217 |
@@ -518,21 +565,19 @@ static const AVOption options[] = { |
213 |
@@ -520,21 +565,19 @@ static const AVOption options[] = { |
218 |
{ LEVEL("7.3", 73) }, |
214 |
{ LEVEL("7.3", 73) }, |
219 |
#undef LEVEL |
215 |
#undef LEVEL |
220 |
|
216 |
|
221 |
- { "rc", "Bit rate control mode", OFFSET(rc_mode), |
217 |
- { "rc", "Bit rate control mode", OFFSET(rc_mode), |
222 |
- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, VE , "rc"}, |
218 |
- AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "rc"}, |
223 |
- { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, |
219 |
- { "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, |
224 |
- { "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" }, |
220 |
- { "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" }, |
225 |
- { "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" }, |
221 |
- { "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 242-271
https://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff/1dddb930aaf0
Link Here
|
242 |
{NULL}, |
238 |
{NULL}, |
243 |
}; |
239 |
}; |
244 |
|
240 |
|
245 |
@@ -544,9 +589,10 @@ static const AVClass class = { |
241 |
@@ -546,10 +589,10 @@ static const AVClass class = { |
246 |
}; |
242 |
}; |
247 |
|
243 |
|
248 |
static const AVCodecDefault eb_enc_defaults[] = { |
244 |
static const AVCodecDefault eb_enc_defaults[] = { |
249 |
- { "b", "7M" }, |
245 |
- { "b", "7M" }, |
250 |
+ { "b", "0" }, |
246 |
+ { "b", "0" }, |
251 |
+ { "flags", "+cgop" }, |
247 |
{ "flags", "+cgop" }, |
252 |
{ "g", "-1" }, |
248 |
{ "g", "-1" }, |
253 |
- { "qmin", "0" }, |
249 |
- { "qmin", "0" }, |
254 |
+ { "qmin", "1" }, |
250 |
+ { "qmin", "1" }, |
255 |
{ "qmax", "63" }, |
251 |
{ "qmax", "63" }, |
256 |
{ NULL }, |
252 |
{ NULL }, |
257 |
}; |
253 |
}; |
258 |
@@ -561,12 +607,11 @@ AVCodec ff_libsvtav1_encoder = { |
|
|
259 |
.receive_packet = eb_receive_packet, |
260 |
.close = eb_enc_close, |
261 |
.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS, |
262 |
- .caps_internal = FF_CODEC_CAP_AUTO_THREADS, |
263 |
+ .caps_internal = FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP, |
264 |
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, |
265 |
AV_PIX_FMT_YUV420P10, |
266 |
AV_PIX_FMT_NONE }, |
267 |
.priv_class = &class, |
268 |
.defaults = eb_enc_defaults, |
269 |
- .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, |
270 |
.wrapper_name = "libsvtav1", |
271 |
}; |