Re: [FFmpeg-devel] [PATCH] Add support for the new key & value API in libaom.

2021-02-08 Thread Christopher Degawa
Quick question as a user that is not entirely related to this patch, would
it be possible to add something like a `ffmpeg ... -libaom-params help -f
null -` or someother way that would print out the options available in the
compiled libaom? (In the case where we do not have aomenc compiled or it's
compiled using a different libaom version)
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libsvtav1: Add lp option

2021-02-09 Thread Christopher Degawa
From: Christopher Degawa 

Equivalent to the --lp option for SvtAv1EncApp, and is the only way
to control how much cpu power svt-av1 uses for now

Not using thread_count as it would be preferable to reserve that until
svt-av1 properly implements a threads option

0 == getconf _NPROCESSORS_ONLN

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..260acc3d78 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -71,6 +71,8 @@ typedef struct SvtContext {
 
 int tile_columns;
 int tile_rows;
+
+unsigned logical_processors;
 } SvtContext;
 
 static const struct {
@@ -218,6 +220,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;
 
+param->logical_processors = svt_enc->logical_processors;
+
 return 0;
 }
 
@@ -533,6 +537,9 @@ static const AVOption options[] = {
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},
 
+{ "lp", "Number of logical processors to run the encoder on, threads are 
managed by the OS scheduler", OFFSET(logical_processors),
+  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },
+
 {NULL},
 };
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libsvtav1: Add logical_processors option

2021-02-10 Thread Christopher Degawa
From: Christopher Degawa 

Equivalent to the --lp option for SvtAv1EncApp, and is the only way
to control how much cpu power svt-av1 uses for now

Not using thread_count as it would be preferable to reserve that until
svt-av1 properly implements a threads option

0 == getconf _NPROCESSORS_ONLN

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..2296735f25 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -71,6 +71,8 @@ typedef struct SvtContext {
 
 int tile_columns;
 int tile_rows;
+
+unsigned logical_processors;
 } SvtContext;
 
 static const struct {
@@ -218,6 +220,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;
 
+param->logical_processors = svt_enc->logical_processors;
+
 return 0;
 }
 
@@ -533,6 +537,9 @@ static const AVOption options[] = {
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},
 
+{ "logical_processors", "Number of logical processors to run the encoder 
on, threads are managed by the OS scheduler", OFFSET(logical_processors),
+  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },
+
 {NULL},
 };
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add lp option

2021-02-10 Thread Christopher Degawa
>
> It is very non-obvious what "lp" means, "logical_processors" would be
> better IMO.
>

Okay, I will change it to `-logical_processors`
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add logical_processors option

2021-02-10 Thread Christopher Degawa
Based on my limited understanding of the code, it's limiting the usage
using pthread_setaffinity_np and CPU_SET on Linux to limit the process to
certain CPUs, but it also has a default and max of the return of
`sysconf(_SC_NPROCESSORS_ONLN)`. According to Hassene Tmar of SVT-AV1, it
is a "target core count that SVT would do a best effort to achieve" and
"--lp 8 might still produce 50 threads". It does not actually limit how
many threads are deployed.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add logical_processors option

2021-02-14 Thread Christopher Degawa
>
> That said, if you have a general use-case where this is helpful and the
> documentation explains what it is doing (and warns about the bad cases)
> then maybe?
>

The main use case we have internally is to able to run multiple instances
of SvtAv1EncApp with `--lp 1` without worrying about potentially choking
out all of them and also for testing for potential single versus multi-core
issues. Also, it seems my wording was wrong and it's not to "certain CPUs",
but to a "certain number of CPUs"
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add logical_processors option

2021-02-17 Thread Christopher Degawa
On Sun, Feb 14, 2021 at 12:27 PM Christopher Degawa 
wrote:

> That said, if you have a general use-case where this is helpful and the
>> documentation explains what it is doing (and warns about the bad cases)
>> then maybe?
>>
>
> The main use case we have internally is to able to run multiple instances
> of SvtAv1EncApp with `--lp 1` without worrying about potentially choking
> out all of them and also for testing for potential single versus multi-core
> issues. Also, it seems my wording was wrong and it's not to "certain CPUs",
> but to a "certain number of CPUs"
>

Another usage for this option would be to limit the amount of memory used
as right now the ram usage is tied to the numbers of cores used.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add logical_processors option

2021-02-17 Thread Christopher Degawa
>
>  It does seem like the number correlates somehow with how much CPU it
> uses, but it's not an upper bound.
>

If it isn't, then that might be an issue, but the idea is that with the
logical_processor option you can limit the amount of ram a single encoder
instance will use since on a system with a lot of cores, but not much ram,
the encoder will error out when it tries to allocate more than what is
available. I can probably add that to the doc as the potential use case.

https://gitlab.com/AOMediaCodec/SVT-AV1#hardware
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v2] libsvtav1: Add logical_processors option

2021-02-19 Thread Christopher Degawa
From: Christopher Degawa 

Used for limiting the size of memory buffers and threads for a target
logical processor count, but does not set thread affinity or limit the
amount of threads used, although thread affinities can be controlled
with an additional parameters, it is prefered to add them until
a svtav1-params option or similar is added

Signed-off-by: Christopher Degawa 
---
 doc/encoders.texi  | 5 +
 libavcodec/libsvtav1.c | 7 +++
 2 files changed, 12 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index 8fb573c416..28c1a11a6c 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1757,6 +1757,11 @@ Set log2 of the number of rows of tiles to use (0-6).
 @item tile_columns
 Set log2 of the number of columns of tiles to use (0-4).
 
+@item logical_processors
+Number of logical processors to run the encoder on, threads are managed by the 
OS scheduler.
+Used for limiting the size of memory buffers and threads for a target logical 
processor count.
+Does not set thread affinity or limit threads.
+
 @end table
 
 @section libkvazaar
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..2296735f25 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -71,6 +71,8 @@ typedef struct SvtContext {
 
 int tile_columns;
 int tile_rows;
+
+unsigned logical_processors;
 } SvtContext;
 
 static const struct {
@@ -218,6 +220,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;
 
+param->logical_processors = svt_enc->logical_processors;
+
 return 0;
 }
 
@@ -533,6 +537,9 @@ static const AVOption options[] = {
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},
 
+{ "logical_processors", "Number of logical processors to run the encoder 
on, threads are managed by the OS scheduler", OFFSET(logical_processors),
+  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },
+
 {NULL},
 };
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v3] libsvtav1: Add logical_processors option

2021-02-26 Thread Christopher Degawa
From: Christopher Degawa 

Used for limiting the size of memory buffers and threads for a target
logical processor count, but does not set thread affinity or limit the
amount of threads used, although thread affinities can be controlled
with an additional parameters, it is prefered to add them until
a svtav1-params option or similar is added

Signed-off-by: Christopher Degawa 
---
 doc/encoders.texi  | 5 +
 libavcodec/libsvtav1.c | 7 +++
 2 files changed, 12 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index c9c8785afb..e3b5ae8bab 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1795,6 +1795,11 @@ Set log2 of the number of rows of tiles to use (0-6).
 @item tile_columns
 Set log2 of the number of columns of tiles to use (0-4).
 
+@item logical_processors
+Number of logical processors to run the encoder on, threads are managed by the 
OS scheduler.
+Used for limiting the size of memory buffers and threads for a target logical 
processor count.
+Does not set thread affinity or limit threads.
+
 @end table
 
 @section libkvazaar
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..087b14099f 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -71,6 +71,8 @@ typedef struct SvtContext {
 
 int tile_columns;
 int tile_rows;
+
+unsigned logical_processors;
 } SvtContext;
 
 static const struct {
@@ -218,6 +220,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;
 
+param->logical_processors = svt_enc->logical_processors;
+
 return 0;
 }
 
@@ -533,6 +537,9 @@ static const AVOption options[] = {
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},
 
+{ "logical_processors", "Number of logical processors to run the encoder 
on, used to limit the size of memory buffers and threads used", 
OFFSET(logical_processors),
+  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },
+
 {NULL},
 };
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v3] libsvtav1: Add logical_processors option

2021-02-26 Thread Christopher Degawa
> Maybe I am reading this wrong or not understanding but this says it is
> used for limiting threads and then in the next sentence says it does
> not limit threads?
>
> It is quite confusing.
>
it's confusing for me too, but the idea is that it doesn't set n threads,
but it can be used to make it so instead of t * nproc threads, you can make
it t * logical_processor amount of threads
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v4] libsvtav1: Add logical_processors option

2021-03-09 Thread Christopher Degawa
From: Christopher Degawa 

Used for limiting the size of memory buffers and threads for a target
logical processor count, but does not set thread affinity or the total
amount of threads used, although thread affinities can be controlled
with an additional parameters, it is prefered to add them until
a svtav1-params option or similar is added

Signed-off-by: Christopher Degawa 
---
 doc/encoders.texi  | 6 ++
 libavcodec/libsvtav1.c | 7 +++
 2 files changed, 13 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index c9c8785afb..7bb97d9dae 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1795,6 +1795,12 @@ Set log2 of the number of rows of tiles to use (0-6).
 @item tile_columns
 Set log2 of the number of columns of tiles to use (0-4).

+@item logical_processors
+Number of logical processors to run the encoder on, threads are managed by the 
OS scheduler.
+Used for limiting the size of memory buffers and threads for a target logical 
processor count.
+Does not set thread affinity or total threads, but instead sets t * 
logical_processors amount of threads
+with t being the amount of threads libsvtav1 sets per cpu (0 - ncpus).
+
 @end table

 @section libkvazaar
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..087b14099f 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -71,6 +71,8 @@ typedef struct SvtContext {

 int tile_columns;
 int tile_rows;
+
+unsigned logical_processors;
 } SvtContext;

 static const struct {
@@ -218,6 +220,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;

+param->logical_processors = svt_enc->logical_processors;
+
 return 0;
 }

@@ -533,6 +537,9 @@ static const AVOption options[] = {
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},

+{ "logical_processors", "Number of logical processors to run the encoder 
on, used to limit the size of memory buffers and threads used", 
OFFSET(logical_processors),
+  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },
+
 {NULL},
 };

--
2.25.1
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v4] libsvtav1: Add logical_processors option

2021-03-10 Thread Christopher Degawa
> You should restrict the line length here, just for consistency with the
> rest of this document. (It doesn't affect the formatting of the output
> documents, obviously.)
>
What would be a good line length for the docs to aim for? 75?


> > +unsigned logical_processors;
>
> The libsvtav1 API defines this as uint32_t, so I believe you should
> mirror that.
>
Changed locally, didn't see any other usage of stdint.h types in the file
so I just followed along



> > +  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },
>
> Probably UINT_MAX, though I doubt that such a number of processors will
> be reached. ;-) I don't know whether there's another natural limit
> within libsvtav1.
>
Changed locally, hopefully, one day this limit will actually have a use
(crossed fingers for AMD or some potentially arm or riscv).

The only internal limits I am aware of is the return type of sysconf being
shortened to uint32_t and windows' DWORD length

Thanks, Chris
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libsvtav1: Add crf and enable_tpl_la options

2021-03-10 Thread Christopher Degawa
libsvtav1 internally changed cqp to be crf while enable-tp-la is on,
which is on by default, and uses the same variables as cqp

Signed-off-by: Christopher Degawa 
---
 doc/encoders.texi  | 14 +-
 libavcodec/libsvtav1.c | 15 +--
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index c9c8785afb..86b7d27aeb 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1759,9 +1759,13 @@ Set the rate control mode to use.
 
 Possible modes:
 @table @option
+@item crf
+Constant quality mode: used a fixed value for quality throughout the stream.
+This mode is the default.
+
 @item cqp
 Constant quantizer: use fixed values of qindex (dependent on the frame type)
-throughout the stream.  This mode is the default.
+throughout the stream. This mode is enabled if enable_tpl_la is disabled.
 
 @item vbr
 Variable bitrate: use a target bitrate for the whole stream.
@@ -1776,6 +1780,9 @@ Set the maximum quantizer to use when using a bitrate 
mode.
 @item qmin
 Set the minimum quantizer to use when using a bitrate mode.
 
+@item crf
+Set the factor to use for the constant quality rate control mode (0-63).
+
 @item qp
 Set the quantizer used in cqp rate control mode (0-63).
 
@@ -1789,6 +1796,11 @@ Set number of frames to look ahead (0-120).
 Set the quality-speed tradeoff, in the range 0 to 8.  Higher values are
 faster but lower quality.  Defaults to 8 (highest speed).
 
+@item enable_tpl_la
+Enables changing the quantizer on a block to block basis within a frame
+and only works if la_depth is set to greater than zero or is set to -1.
+Is enabled by default and changes the cqp mode to crf (0-1).
+
 @item tile_rows
 Set log2 of the number of rows of tiles to use (0-6).
 
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..17f69b005d 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -69,6 +69,8 @@ typedef struct SvtContext {
 
 int tier;
 
+uint8_t enable_tpl_la;
+
 int tile_columns;
 int tile_rows;
 } SvtContext;
@@ -215,6 +217,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 if (svt_enc->la_depth >= 0)
 param->look_ahead_distance  = svt_enc->la_depth;
 
+param->enable_tpl_la = svt_enc->enable_tpl_la;
+
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;
 
@@ -520,16 +524,23 @@ static const AVOption options[] = {
 
 { "rc", "Bit rate control mode", OFFSET(rc_mode),
   AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 3, VE , "rc"},
-{ "cqp", "Constant quantizer", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  
INT_MIN, INT_MAX, VE, "rc" },
+{ "crf", "Constant quality mode, alias to cqp if enable_tpl_la is set 
to 0", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
+{ "cqp", "Constant quantizer, alias to crf if enable_tpl_la is set to 
1", 0, AV_OPT_TYPE_CONST, { .i64 = 0 },  INT_MIN, INT_MAX, VE, "rc" },
 { "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" },
 { "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" },
 
-{ "qp", "Quantizer to use with cqp rate control mode", OFFSET(qp),
+{ "crf", "Factor to use with for constant quality mode, alias to qp if 
enable_tpl_la is set to 0", OFFSET(qp),
+  AV_OPT_TYPE_INT, { .i64 = 50 }, 0, 63, VE },
+
+{ "qp", "Quantizer to use with cqp rate control mode, alias to crf if 
enable_tpl_la is set to 1", OFFSET(qp),
   AV_OPT_TYPE_INT, { .i64 = 50 }, 0, 63, VE },
 
 { "sc_detection", "Scene change detection", OFFSET(scd),
   AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE },
 
+{ "enable_tpl_la", "Enable changing qp on a block to block basis within a 
frame, only works if la_depth is greater than 0", OFFSET(enable_tpl_la),
+  AV_OPT_TYPE_BOOL, {.i64 = 1}, 0, 1, VE},
+
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libsvtav1: Add logical_processors option

2021-03-10 Thread Christopher Degawa
From: Christopher Degawa 

Used for limiting the size of memory buffers and threads for a target
logical processor count, but does not set thread affinity or the total
amount of threads used, although thread affinities can be controlled
with an additional parameters, it is prefered to add them until
a svtav1-params option or similar is added

Signed-off-by: Christopher Degawa 
---
 doc/encoders.texi  | 7 +++
 libavcodec/libsvtav1.c | 7 +++
 2 files changed, 14 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index c9c8785afb..96dd60a899 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1795,6 +1795,13 @@ Set log2 of the number of rows of tiles to use (0-6).
 @item tile_columns
 Set log2 of the number of columns of tiles to use (0-4).
 
+@item logical_processors
+Number of logical processors to run the encoder on, threads are managed by
+the OS scheduler. Used for limiting the size of memory buffers and threads
+for a target logical processor count. Does not set thread affinity or total
+threads, but instead sets t * logical_processors amount of threads with t
+being the amount of threads libsvtav1 sets per cpu (0 - ncpus).
+
 @end table
 
 @section libkvazaar
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..0f752dcdda 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -71,6 +71,8 @@ typedef struct SvtContext {
 
 int tile_columns;
 int tile_rows;
+
+uint32_t logical_processors;
 } SvtContext;
 
 static const struct {
@@ -218,6 +220,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;
 
+param->logical_processors = svt_enc->logical_processors;
+
 return 0;
 }
 
@@ -533,6 +537,9 @@ static const AVOption options[] = {
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},
 
+{ "logical_processors", "Number of logical processors to run the encoder 
on, used to limit the size of memory buffers and threads used", 
OFFSET(logical_processors),
+  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  UINT_MAX, VE },
+
 {NULL},
 };
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libavutil/timer: Fix clang reserved-user-defined-literal

2021-03-12 Thread Christopher Degawa
clang errors when compiling with C++11 about needing spaces between
literal and identifier

Signed-off-by: Christopher Degawa 
---
 libavutil/timer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/timer.h b/libavutil/timer.h
index 0bb353cfce..737bfc160e 100644
--- a/libavutil/timer.h
+++ b/libavutil/timer.h
@@ -87,7 +87,7 @@
 if (((tcount + tskip_count) & (tcount + tskip_count - 1)) == 0) { \
 int i;\
 av_log(NULL, AV_LOG_ERROR,\
-   "%7"PRIu64" " FF_TIMER_UNITS " in %s,%8d runs,%7d skips",   
   \
+   "%7" PRIu64 " " FF_TIMER_UNITS " in %s,%8d runs,%7d skips", 
 \
tsum * 10 / tcount, id, tcount, tskip_count);  \
 for (i = 0; i < 32; i++)  \
 av_log(NULL, AV_LOG_VERBOSE, " %2d", 
av_log2(2*thistogram[i]));\
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libavutil/timer: Fix clang reserved-user-defined-literal

2021-03-13 Thread Christopher Degawa
On Sat, Mar 13, 2021 at 01:09 Chris Degawa  wrote:

>
>
> > On Mar 13, 2021, at 00:57, Anton Khirnov  wrote:
> >
> > Quoting Christopher Degawa (2021-03-13 05:20:37)
> >> clang errors when compiling with C++11 about needing spaces between
> >> literal and identifier
> >
> > Why would you compile it with C++11? It's a private header, is it not?


The error occurred when compiling decklink_dec.cpp
>
Since I realized my email did not send out based on looking at the ml
archive, resending using the right email
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add crf and enable_tpl_la options

2021-03-16 Thread Christopher Degawa
ping on this patch
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add crf and enable_tpl_la options

2021-03-23 Thread Christopher Degawa
ping again, would rather not have to maintain this and the
logical_processor patch out of tree
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v2] libsvtav1: Add logical_processors option

2021-03-30 Thread Christopher Degawa
On Tue, Mar 30, 2021 at 4:53 PM Jan Ekström  wrote:

> > @@ -218,6 +220,8 @@ static int
> config_enc_params(EbSvtAv1EncConfiguration *param,
> >  param->tile_columns = svt_enc->tile_columns;
> >  param->tile_rows= svt_enc->tile_rows;
> >
> > +param->logical_processors = svt_enc->logical_processors;
> > +
>
> Do we already require a new enough SVT-AV1 to always have this option?
> If yes, great. If not, it might be OK to just bump the requirement
> then (to keep unnecessary ifdefs at bay for a relatively new and
> actively developed library)?
>

afaik, this option has existed before the ffmpeg wrapper was upstreamed, so
I do not think any ifdefs are needed

ref:
https://gitlab.com/AOMediaCodec/SVT-AV1/-/commit/a6c1f81989c6cab0f477adfa867d5ff3dad2725c


> > +{ "logical_processors", "Number of logical processors to run the
> encoder on, threads are managed by the OS scheduler",
> OFFSET(logical_processors),
> > +  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  INT_MAX, VE },
> > +
>
> I think this could just be made to mention that it's a thread count
> multiplier override to limit the amount of threads utilized.
>

after discussing this option on IRC, I think the wording of thread count
multiplier would probably fit better, something along the lines of

> { "logical_processors", "Thread count multiplier with a max of the number
of logical cores available",

I will resubmit an updated patch soon


> There is an int/unsigned mismatch, but I think that should be OK since
> you limit the value to 0-INT_MAX in the AVOption itself?
>

changed to

> AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  UINT_MAX, VE },


>
> Otherwise LGTM, and once again sorry for taking the time to get to this.
>
Thank you
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v2] libsvtav1: Add logical_processors option

2021-03-30 Thread Christopher Degawa
From: Christopher Degawa 

Used as a thread count multiplier with a max of the logical cores
available

Signed-off-by: Christopher Degawa 
---
 doc/encoders.texi  | 3 +++
 libavcodec/libsvtav1.c | 7 +++
 2 files changed, 10 insertions(+)

diff --git a/doc/encoders.texi b/doc/encoders.texi
index c9c8785afb..89e5593772 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1795,6 +1795,9 @@ Set log2 of the number of rows of tiles to use (0-6).
 @item tile_columns
 Set log2 of the number of columns of tiles to use (0-4).

+@item logical_processors
+Thread count multiplier (0 - ncpus).
+
 @end table

 @section libkvazaar
diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index eb6043bcac..b6f9cc1c6b 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -71,6 +71,8 @@ typedef struct SvtContext {

 int tile_columns;
 int tile_rows;
+
+uint32_t logical_processors;
 } SvtContext;

 static const struct {
@@ -218,6 +220,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;

+param->logical_processors = svt_enc->logical_processors;
+
 return 0;
 }

@@ -533,6 +537,9 @@ static const AVOption options[] = {
 { "tile_columns", "Log2 of number of tile columns to use", 
OFFSET(tile_columns), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 4, VE},
 { "tile_rows", "Log2 of number of tile rows to use", OFFSET(tile_rows), 
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 6, VE},

+{ "logical_processors", "Thread count multiplier with a max of the number 
of logical cores available", OFFSET(logical_processors),
+  AV_OPT_TYPE_INT, { .i64 = 0 }, 0,  UINT_MAX, VE },
+
 {NULL},
 };

--
2.27.0
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [GSoC 2021] about proposal

2021-04-08 Thread Christopher Degawa
You might want to check your email client as it has added a bunch of
` ` which mangles your message when viewed
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v2] libsvtav1: Add logical_processors option

2021-04-10 Thread Christopher Degawa
ping on this patch again
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v2] libsvtav1: Add logical_processors option

2021-04-14 Thread Christopher Degawa
On Sat, Apr 10, 2021 at 3:07 PM Christopher Degawa 
wrote:

> ping on this patch again
>

pong again
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] Unable to submit patches

2020-02-07 Thread Christopher Degawa
If you are talking about "[FFmpeg-devel] [PATCH] doc/ffmpeg: Fix bug
#8204", it seems the list has received it

On Sat, Feb 8, 2020 at 12:33 AM Gautam Ramakrishnan 
wrote:

> Hello,
>
> I wish to contribute to ffmpeg and though of submitting a small patch
> to fix a bug listed on the bug tracker. However, my patch submission
> does not reach the mailing list. I have checked all the instructions
> and use git format-path with git send-email. What should I do?
>
> --
> -
> Gautam |
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libsvtav1: Add crf and enable_tpl_la options

2021-04-21 Thread Christopher Degawa
ping.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] libsvtav1: pass color description info

2021-07-22 Thread Christopher Degawa
these fields are only available past svt-av1 0.8.7

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 20 
 1 file changed, 20 insertions(+)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index fabc4e6428..6c12777911 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -37,6 +37,14 @@
 #include "avcodec.h"
 #include "profiles.h"
 
+#ifndef SVTAV1_MAKE_VERSION
+#define SVTAV1_MAKE_VERSION(x,y,z) ((x) << 16 | (y) << 8 | z)
+#endif
+
+#ifndef SVTAV1_CURR_VERSION
+#define SVTAV1_CURR_VERSION SVTAV1_MAKE_VERSION(SVT_VERSION_MAJOR, 
SVT_VERSION_MINOR, SVT_VERSION_PATCHLEVEL)
+#endif
+
 typedef enum eos_status {
 EOS_NOT_REACHED = 0,
 EOS_SENT,
@@ -218,6 +226,18 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->tile_columns = svt_enc->tile_columns;
 param->tile_rows= svt_enc->tile_rows;
 
+#if SVTAV1_CURR_VERSION >= SVTAV1_MAKE_VERSION(0, 8, 7)
+if (desc->flags & AV_PIX_FMT_FLAG_RGB) {
+param->color_primaries = AVCOL_PRI_BT709;
+param->matrix_coefficients = AVCOL_SPC_RGB;
+param->transfer_characteristics = AVCOL_TRC_IEC61966_2_1;
+} else {
+param->color_primaries = avctx->color_primaries;
+param->matrix_coefficients = avctx->colorspace;
+param->transfer_characteristics = avctx->color_trc;
+}
+#endif
+
 return 0;
 }
 
-- 
2.32.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] libsvtav1: pass color description info

2021-07-29 Thread Christopher Degawa
On Thu, Jul 22, 2021 at 9:02 PM Christopher Degawa 
wrote:

> these fields are only available past svt-av1 0.8.7
>
> Signed-off-by: Christopher Degawa 
> ---
>  libavcodec/libsvtav1.c | 20 
>  1 file changed, 20 insertions(+)
>
> diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
> index fabc4e6428..6c12777911 100644
> --- a/libavcodec/libsvtav1.c
> +++ b/libavcodec/libsvtav1.c
> @@ -37,6 +37,14 @@
>  #include "avcodec.h"
>  #include "profiles.h"
>
> +#ifndef SVTAV1_MAKE_VERSION
> +#define SVTAV1_MAKE_VERSION(x,y,z) ((x) << 16 | (y) << 8 | z)
> +#endif
> +
> +#ifndef SVTAV1_CURR_VERSION
> +#define SVTAV1_CURR_VERSION SVTAV1_MAKE_VERSION(SVT_VERSION_MAJOR,
> SVT_VERSION_MINOR, SVT_VERSION_PATCHLEVEL)
> +#endif
> +
>  typedef enum eos_status {
>  EOS_NOT_REACHED = 0,
>  EOS_SENT,
> @@ -218,6 +226,18 @@ static int config_enc_params(EbSvtAv1EncConfiguration
> *param,
>  param->tile_columns = svt_enc->tile_columns;
>  param->tile_rows= svt_enc->tile_rows;
>
> +#if SVTAV1_CURR_VERSION >= SVTAV1_MAKE_VERSION(0, 8, 7)
> +if (desc->flags & AV_PIX_FMT_FLAG_RGB) {
> +param->color_primaries = AVCOL_PRI_BT709;
> +param->matrix_coefficients = AVCOL_SPC_RGB;
> +param->transfer_characteristics = AVCOL_TRC_IEC61966_2_1;
> +} else {
> +param->color_primaries = avctx->color_primaries;
> +param->matrix_coefficients = avctx->colorspace;
> +param->transfer_characteristics = avctx->color_trc;
> +}
> +#endif
> +
>  return 0;
>  }
>
> --
> 2.32.0
>

ping
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] libsvtav1: pass color description info

2021-07-30 Thread Christopher Degawa
On Fri, Jul 30, 2021 at 4:48 AM Jan Ekström  wrote:

> On Fri, Jul 23, 2021 at 5:02 AM Christopher Degawa 
> wrote:
> > +#ifndef SVTAV1_MAKE_VERSION
> > +#define SVTAV1_MAKE_VERSION(x,y,z) ((x) << 16 | (y) << 8 | z)
> > +#endif
> > +
> > +#ifndef SVTAV1_CURR_VERSION
> > +#define SVTAV1_CURR_VERSION SVTAV1_MAKE_VERSION(SVT_VERSION_MAJOR,
> SVT_VERSION_MINOR, SVT_VERSION_PATCHLEVEL)
> > +#endif
> > +
>
> How new SVT-AV1 would be required to have these macros? They are
> sensible but if it's not a large bump due to SVT-AV1 being a
> relatively new project it might just make sense to bump the
> requirement to keep ifdefs out of the module for now.
>

They aren't in svt-av1 at this moment, I could change this to where it just
requires 0.8.7 from pkg-config in the configure script and that would
probably be for the better considering the location of
EbSvtAv1EncConfiguration inside SvtContext


> > +#if SVTAV1_CURR_VERSION >= SVTAV1_MAKE_VERSION(0, 8, 7)
> > +if (desc->flags & AV_PIX_FMT_FLAG_RGB) {
> > +param->color_primaries = AVCOL_PRI_BT709;
> > +param->matrix_coefficients = AVCOL_SPC_RGB;
> > +param->transfer_characteristics = AVCOL_TRC_IEC61966_2_1;
>
> I would limit to forcing the AVCOL_SPC_RGB. It is valid to f.ex.
> encode RGB with BT.2020 primaries and PQ transfer function. And if the
> other values are not set then they're effectively unknown. Thus maybe
> it makes sense to either set values, or set them if they are not
> _UNSPECIFIED (depending on if SVT-AV1 handles unset with a different
> value to _UNSPECIFIED) - and then in case of RGB make sure that the
> matrix coefficients are set to RGB? That way the if should be very
> short and otherwise the two cases would share code.
>

This portion is partly copy/pasted from libaomenc.c and internally svt-av1
uses similar/exact code that aom uses when writing out and those changes
were done by Lynne and James, so I would probably defer to them on this one
https://github.com/FFmpeg/FFmpeg/commit/6a2f3f60ae02c8c3c62645b1d54ecc86bb21080d#diff-6a73483f2ead14e3748e317541bafceb16ef47ecc0011d1924adbfceb7f9b2ceR757
https://github.com/FFmpeg/FFmpeg/commit/36e51c190bb9cca4bb846e7dae4aebc6570ff258#diff-6a73483f2ead14e3748e317541bafceb16ef47ecc0011d1924adbfceb7f9b2ceR751

> +} else {
> > +param->color_primaries = avctx->color_primaries;
> > +param->matrix_coefficients = avctx->colorspace;
> > +param->transfer_characteristics = avctx->color_trc;
>
> Out of interest, what about chroma location? (although now that I
> checked, it seems to be mostly not passed in many other encoder
> wrappers - so this is not a blocker :<)
>

So far, out of the av1 encoder libraries present in ffmpeg, only rav1e
seems to pass that. Looking inside svt-av1, we have a field
"chroma_sample_position" in one of the structs, however that struct isn't
used in the API nor do we have any code to pass that field around, so it's
practically useless right now. I could try adding that as an API accessible
field, but that would require 0.8.8 at the minimum as svt-av1 doesn't have
any way to determine API stuff incrementally in the headers.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] duplicate symbol '_dec_init' in: fftools/ffmpeg_dec.o

2024-03-16 Thread Christopher Degawa
On Sat, Mar 16, 2024 at 09:08 Gnattu OC via ffmpeg-devel <
ffmpeg-devel@ffmpeg.org> wrote:

> If you are using Xcode >= 15 then you will need to add `-Wl,-ld_classic`
> to LDFLAGS.  During configure you will also need to set
> `--host-ldflags='-Wl,-ld_classic’`.
>
> > On Mar 16, 2024, at 09:04, Helmut K. C. Tessarek 
> wrote:
> >
> > Hello,
> >
> > It's me again - the dude who compiles ffmpeg for macOS... ;-)
> >
> > I haven't updated the referenced libbluray, but only compiled ffmpeg the
> way I always do. The last time was about 3 days ago and all was good.
> >
> > This is the git hash of ffmpeg I tried to compile: b47abd5737
> >
> > duplicate symbol '_dec_init' in:
> >fftools/ffmpeg_dec.o
> >/Users/Shared/ffmpeg/sw/lib/libbluray.a(libbluray_la-dec.o)
> > ld: 1 duplicate symbol for architecture x86_64
> > clang: error: linker command failed with exit code 1 (use -v to see
> invocation)
> >
> > The only code that changed was ffmpeg and libx265, thus I suspect it was
> a change to ffmpeg. I can't really do a git bisect, because this error only
> happens after ffmpeg is compiled at the linker stage, so that would take me
> forever
> >
> > However, the dev who did a change related to this would probably know
> right away.
> >
> > Cheers,
> >  K. C.
> >
> >
> > --
> > regards Helmut K. C. Tessarek  KeyID 0x172380A011EF4944
> > Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
> >
> > /*
> >   Thou shalt not follow the NULL pointer for chaos and madness
> >   await thee at its end.
> > */
> > ___
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".



Seems the conflict comes from
https://code.videolan.org/videolan/libbluray/-/blob/master/src/libbluray/disc/dec.c?ref_type=heads#L287
 and
https://github.com/FFmpeg/FFmpeg/commit/c4de5778bceab3c15f1239f1f16816749a7fd3b6

Perhaps you could also try asking libbluray if they could use an internal
prefix. Otherwise you might need to do a rename of that function on
ffmpeg's side.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] libavformat/dashdec: Fix issue with dash on Windows

2020-10-08 Thread Christopher Degawa
Use xmlFree instead of av_freep

snip from libxml2:

 * xmlGetProp:
...
 * Returns the attribute value or NULL if not found.
 * It's up to the caller to free the memory with xmlFree().

According to libxml2, you are supposed to use xmlFree instead of free
on the pointer returned by it, and also using av_freep on Windows will
call _aligned_free instead of normal free, causing _aligned_free to raise
SIGTRAP and crashing ffmpeg and ffplay.

To reproduce, download a build from gyan or BtBN for windows
(also happens with some of Zeranoe's builds)

https://www.gyan.dev/ffmpeg/builds/
https://github.com/BtbN/FFmpeg-Builds

and run either

ffplay.exe 
http://download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/mp4-live/mp4-live-mpd-AV-NBS.mpd

or

ffmpeg.exe -i 
http://download.tsi.telecom-paristech.fr/gpac/DASH_CONFORMANCE/TelecomParisTech/mp4-live/mp4-live-mpd-AV-NBS.mpd
 -f null -

Signed-off-by: Christopher Degawa 
---
 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 99b9c45439..42ea74635b 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1145,7 +1145,7 @@ static int parse_manifest_adaptationset(AVFormatContext 
*s, const char *url,
 }
 
 err:
-av_freep(&c->adaptionset_lang);
+xmlFree(c->adaptionset_lang);
 return ret;
 }
 
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libavformat/dashdec: Fix issue with dash on Windows

2020-10-08 Thread Christopher Degawa
> You should also reset c->adaptionset_lang to NULL after freeing it. (I
> remember finding this issue myself, but somehow forgot to fix it. Strange.)

Ah, I forgot that's what av_freep does in addition to freeing, do you
wish to make the change, or do you want me to?

> (Actually, the lifetime of adaptionset_lang does not extend beyond
> parse_manifest_adaptationset(), so one could even use a local variable
> for it.)

I do also see it being used in parse_manifest_representation, so that
would be one more place you would need to make sure to pass the local
variable, but that would save space on the struct.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH 1/2] avcodec/libsvtav1: remove compressed_ten_bit_format and simplify alloc_buffer

2022-10-19 Thread Christopher Degawa
From: Christopher Degawa 

compressed_ten_bit_format has been deprecated upstream and has no effect
and can be removed. Plus, technically it was never used in the first place
since it would require the app (ffmpeg) to set it and do additional
processing of the input frames.

Also simplify alloc_buffer by removing calculations relating to the
non-existant processing.

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 2f5634cee0..28da206cf8 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -124,16 +124,12 @@ static int svt_print_error(void *log_ctx, EbErrorType err,
 
 static int alloc_buffer(EbSvtAv1EncConfiguration *config, SvtContext *svt_enc)
 {
-const intpack_mode_10bit =
-(config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format 
== 0) ? 1 : 0;
-const size_t luma_size_8bit  =
-config->source_width * config->source_height * (1 << pack_mode_10bit);
-const size_t luma_size_10bit =
-(config->encoder_bit_depth > 8 && pack_mode_10bit == 0) ? 
luma_size_8bit : 0;
+const size_t luma_size = config->source_width * config->source_height *
+(config->encoder_bit_depth > 8 ? 2 : 1);
 
 EbSvtIOFormat *in_data;
 
-svt_enc->raw_size = (luma_size_8bit + luma_size_10bit) * 3 / 2;
+svt_enc->raw_size = luma_size * 3 / 2;
 
 // allocate buffer for in and out
 svt_enc->in_buf   = av_mallocz(sizeof(*svt_enc->in_buf));
-- 
2.38.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH 2/2] avcodec/libsvtav1: replace vbv_bufsize with maximum_buffer_size_ms

2022-10-19 Thread Christopher Degawa
From: Christopher Degawa 

svt-av1 v1.2.0 has deprecated vbv_bufsize in favor of using
- maximum_buffer_size_ms (--buf-sz)
- starting_buffer_level_ms (--buf-initial-sz)
- optimal_buffer_level_ms (--buf-optimal-sz)

and vbv_bufsize has not been in use since svt-av1 v0.8.6

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 28da206cf8..74dad9892b 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -179,7 +179,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->min_qp_allowed   = avctx->qmin;
 }
 param->max_bit_rate = avctx->rc_max_rate;
-param->vbv_bufsize  = avctx->rc_buffer_size;
+param->maximum_buffer_size_ms   = avctx->rc_buffer_size * 1000 / 
avctx->bit_rate;
 
 if (svt_enc->crf > 0) {
 param->qp   = svt_enc->crf;
@@ -296,7 +296,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 avctx->bit_rate   = param->rate_control_mode > 0 ?
 param->target_bit_rate : 0;
 avctx->rc_max_rate= param->max_bit_rate;
-avctx->rc_buffer_size = param->vbv_bufsize;
+avctx->rc_buffer_size = param->maximum_buffer_size_ms * avctx->bit_rate / 
1000;
 
 if (avctx->bit_rate || avctx->rc_max_rate || avctx->rc_buffer_size) {
 AVCPBProperties *cpb_props = ff_add_cpb_side_data(avctx);
-- 
2.38.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH 2/2] avcodec/libsvtav1: replace vbv_bufsize with maximum_buffer_size_ms

2022-10-19 Thread Christopher Degawa
On Wed, Oct 19, 2022 at 7:00 PM James Almer  wrote:

> On 10/19/2022 7:47 PM, Christopher Degawa wrote:
> > From: Christopher Degawa 
> > diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
> > index 28da206cf8..74dad9892b 100644
> > --- a/libavcodec/libsvtav1.c
> > +++ b/libavcodec/libsvtav1.c
> > @@ -179,7 +179,7 @@ static int
> config_enc_params(EbSvtAv1EncConfiguration *param,
> >   param->min_qp_allowed   = avctx->qmin;
> >   }
> >   param->max_bit_rate = avctx->rc_max_rate;
> > -param->vbv_bufsize  = avctx->rc_buffer_size;
> > +param->maximum_buffer_size_ms   = avctx->rc_buffer_size * 1000 /
> avctx->bit_rate;
>
> 1000LL. The multiplication could overflow otherwise.
>

Thanks, replaced locally.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v2 1/2] avcodec/libsvtav1: remove compressed_ten_bit_format and simplify alloc_buffer

2022-10-20 Thread Christopher Degawa
From: Christopher Degawa 

compressed_ten_bit_format has been deprecated upstream and has no effect
and can be removed. Plus, technically it was never used in the first place
since it would require the app (ffmpeg) to set it and do additional
processing of the input frames.

Also simplify alloc_buffer by removing calculations relating to the
non-existant processing.

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 2f5634cee0..28da206cf8 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -124,16 +124,12 @@ static int svt_print_error(void *log_ctx, EbErrorType err,
 
 static int alloc_buffer(EbSvtAv1EncConfiguration *config, SvtContext *svt_enc)
 {
-const intpack_mode_10bit =
-(config->encoder_bit_depth > 8) && (config->compressed_ten_bit_format 
== 0) ? 1 : 0;
-const size_t luma_size_8bit  =
-config->source_width * config->source_height * (1 << pack_mode_10bit);
-const size_t luma_size_10bit =
-(config->encoder_bit_depth > 8 && pack_mode_10bit == 0) ? 
luma_size_8bit : 0;
+const size_t luma_size = config->source_width * config->source_height *
+(config->encoder_bit_depth > 8 ? 2 : 1);
 
 EbSvtIOFormat *in_data;
 
-svt_enc->raw_size = (luma_size_8bit + luma_size_10bit) * 3 / 2;
+svt_enc->raw_size = luma_size * 3 / 2;
 
 // allocate buffer for in and out
 svt_enc->in_buf   = av_mallocz(sizeof(*svt_enc->in_buf));
-- 
2.38.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v2 2/2] avcodec/libsvtav1: replace vbv_bufsize with maximum_buffer_size_ms

2022-10-20 Thread Christopher Degawa
From: Christopher Degawa 

svt-av1 v1.2.0 has deprecated vbv_bufsize in favor of using
- maximum_buffer_size_ms (--buf-sz)
- starting_buffer_level_ms (--buf-initial-sz)
- optimal_buffer_level_ms (--buf-optimal-sz)

and vbv_bufsize has not been in use since svt-av1 v0.8.6

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 28da206cf8..48cd58a0b3 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -179,7 +179,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->min_qp_allowed   = avctx->qmin;
 }
 param->max_bit_rate = avctx->rc_max_rate;
-param->vbv_bufsize  = avctx->rc_buffer_size;
+param->maximum_buffer_size_ms   = avctx->rc_buffer_size * 1000LL / 
avctx->bit_rate;
 
 if (svt_enc->crf > 0) {
 param->qp   = svt_enc->crf;
@@ -296,7 +296,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 avctx->bit_rate   = param->rate_control_mode > 0 ?
 param->target_bit_rate : 0;
 avctx->rc_max_rate= param->max_bit_rate;
-avctx->rc_buffer_size = param->vbv_bufsize;
+avctx->rc_buffer_size = param->maximum_buffer_size_ms * avctx->bit_rate / 
1000LL;
 
 if (avctx->bit_rate || avctx->rc_max_rate || avctx->rc_buffer_size) {
 AVCPBProperties *cpb_props = ff_add_cpb_side_data(avctx);
-- 
2.38.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] codec2: use pkg-config file if it is available

2024-07-20 Thread Christopher Degawa
codec2.pc has been available since 2016, and I believe most distros
have it by now.

codec2-dev's commit:
https://github.com/drowe67/codec2-dev/commit/fdfda67436b5b7308cf0758d9192f1dd540d439d

Signed-off-by: Christopher Degawa 
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index f6f5c29fea..b935b4f44c 100755
--- a/configure
+++ b/configure
@@ -6852,7 +6852,8 @@ enabled libcelt   && require libcelt celt/celt.h 
celt_decode -lcelt0 &&
  { check_lib libcelt celt/celt.h 
celt_decoder_create_custom -lcelt0 ||
die "ERROR: libcelt must be installed and 
version must be >= 0.11.0."; }
 enabled libcaca   && require_pkg_config libcaca caca caca.h 
caca_create_canvas
-enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
-lcodec2
+enabled libcodec2 && { require_pkg_config libcodec2 codec2 codec2.h 
codec2_create ||
+   require libcodec2 codec2/codec2.h codec2_create 
-lcodec2; }
 enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.5.0" 
"dav1d/dav1d.h" dav1d_version
 enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
davs2.h davs2_decoder_open
 enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
dc1394/dc1394.h dc1394_new
-- 
2.45.2

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] codec2: use pkg-config file if it is available

2024-07-20 Thread Christopher Degawa
On Sun, Jul 21, 2024 at 12:03 AM Christopher Degawa 
wrote:

> +enabled libcodec2 && { require_pkg_config libcodec2 codec2
> codec2.h codec2_create ||
> +   require libcodec2 codec2/codec2.h
> codec2_create -lcodec2; }
>

I made a mistake and this should have been check_pkg_config instead.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v2] codec2: use pkg-config file if it is available

2024-07-20 Thread Christopher Degawa
codec2.pc has been available since 2016, and I believe most distros
have it by now.

codec2-dev's commit:
https://github.com/drowe67/codec2-dev/commit/fdfda67436b5b7308cf0758d9192f1dd540d439d

Signed-off-by: Christopher Degawa 
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index f6f5c29fea..bacbb1a557 100755
--- a/configure
+++ b/configure
@@ -6852,7 +6852,8 @@ enabled libcelt   && require libcelt celt/celt.h 
celt_decode -lcelt0 &&
  { check_lib libcelt celt/celt.h 
celt_decoder_create_custom -lcelt0 ||
die "ERROR: libcelt must be installed and 
version must be >= 0.11.0."; }
 enabled libcaca   && require_pkg_config libcaca caca caca.h 
caca_create_canvas
-enabled libcodec2 && require libcodec2 codec2/codec2.h codec2_create 
-lcodec2
+enabled libcodec2 && { check_pkg_config libcodec2 codec2 codec2.h 
codec2_create ||
+   require libcodec2 codec2/codec2.h codec2_create 
-lcodec2; }
 enabled libdav1d  && require_pkg_config libdav1d "dav1d >= 0.5.0" 
"dav1d/dav1d.h" dav1d_version
 enabled libdavs2  && require_pkg_config libdavs2 "davs2 >= 1.6.0" 
davs2.h davs2_decoder_open
 enabled libdc1394 && require_pkg_config libdc1394 libdc1394-2 
dc1394/dc1394.h dc1394_new
-- 
2.45.2

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2 1/2] avcodec/libsvtav1: remove compressed_ten_bit_format and simplify alloc_buffer

2022-10-27 Thread Christopher Degawa
On Thu, Oct 20, 2022 at 11:56 PM Christopher Degawa 
wrote:

> From: Christopher Degawa 
>
> compressed_ten_bit_format has been deprecated upstream and has no effect
> and can be removed. Plus, technically it was never used in the first place
> since it would require the app (ffmpeg) to set it and do additional
> processing of the input frames.
>
> Also simplify alloc_buffer by removing calculations relating to the
> non-existant processing.
>
> Signed-off-by: Christopher Degawa 
> ---
>

Ping on this and the other patch?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2 1/2] avcodec/libsvtav1: remove compressed_ten_bit_format and simplify alloc_buffer

2022-11-17 Thread Christopher Degawa
On Thu, Oct 27, 2022 at 11:23 AM Christopher Degawa 
wrote:

>
>
> On Thu, Oct 20, 2022 at 11:56 PM Christopher Degawa 
> wrote:
>
>> From: Christopher Degawa 
>>
>> compressed_ten_bit_format has been deprecated upstream and has no effect
>> and can be removed. Plus, technically it was never used in the first place
>> since it would require the app (ffmpeg) to set it and do additional
>> processing of the input frames.
>>
>> Also simplify alloc_buffer by removing calculations relating to the
>> non-existant processing.
>>
>> Signed-off-by: Christopher Degawa 
>> ---
>>
>
> Ping on this and the other patch?
>

ping again? I don't have push rights or anything and nobody is listed as
the maintainer for libsvtav1.c, so I don't really have anyone I can
specifically ping for these.

>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] avcodec/libsvtav1: guard against bit_rate being zero

2022-11-19 Thread Christopher Degawa
division by zero occurs if it's not specified

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 48cd58a0b3..06874dfa63 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -179,7 +179,9 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->min_qp_allowed   = avctx->qmin;
 }
 param->max_bit_rate = avctx->rc_max_rate;
-param->maximum_buffer_size_ms   = avctx->rc_buffer_size * 1000LL / 
avctx->bit_rate;
+param->maximum_buffer_size_ms   = avctx->bit_rate
+? (avctx->rc_buffer_size * 1000LL / avctx->bit_rate)
+: 0;
 
 if (svt_enc->crf > 0) {
 param->qp   = svt_enc->crf;
-- 
2.38.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: only set max_buf_sz if both bitrate and rc_buf_sz is set

2022-11-20 Thread Christopher Degawa
maximum_buffer_size_ms should only be set if both are specified or if
the user sets it through -svtav1-params buf-sz=val

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 48cd58a0b3..7605baddfe 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -179,7 +179,8 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->min_qp_allowed   = avctx->qmin;
 }
 param->max_bit_rate = avctx->rc_max_rate;
-param->maximum_buffer_size_ms   = avctx->rc_buffer_size * 1000LL / 
avctx->bit_rate;
+if (avctx->bit_rate && avctx->rc_buffer_size)
+param->maximum_buffer_size_ms = avctx->rc_buffer_size * 1000LL / 
avctx->bit_rate;
 
 if (svt_enc->crf > 0) {
 param->qp   = svt_enc->crf;
-- 
2.38.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: don't force a default value for deprecated options

2022-12-02 Thread Christopher Degawa
On Tue, Nov 29, 2022 at 4:38 PM James Almer  wrote:

> Stick to the library's default value instead.
>
> Should address AOMediaCodec/SVT-AV1 issue #2011.
>
> Signed-off-by: James Almer 
> ---
>  libavcodec/libsvtav1.c | 25 +++--
>  1 file changed, 15 insertions(+), 10 deletions(-)
>

Ping on this? It would be great since this would allow the library to apply
better defaults for the deprecated options.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit Windows

2023-01-02 Thread Christopher Degawa
previouslly, it only was an issue with 32-bit clang from msys2's
mingw32 repo, however, at some point with an update to gcc 12.2.0,
the same issue popped up. Tested with a clean clone of ffmpeg, and even
tested with n5.0, but the issue persists, so I presume it's a compiler
issue.

Related: https://trac.ffmpeg.org/ticket/8903

Signed-off-by: Christopher Degawa 
---
 libavcodec/x86/cabac.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index b046a56a6b..70f990db8d 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -178,7 +178,7 @@
 #if HAVE_7REGS && !BROKEN_COMPILER
 #define get_cabac_inline get_cabac_inline_x86
 static
-#if defined(_WIN32) && !defined(_WIN64) && defined(__clang__)
+#if defined(_WIN32) && !defined(_WIN64)
 av_noinline
 #else
 av_always_inline
-- 
2.39.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit Windows

2023-01-03 Thread Christopher Degawa
On Mon, Jan 2, 2023 at 5:36 PM Hendrik Leppkes  wrote:

> On Tue, Jan 3, 2023 at 12:01 AM Christopher Degawa 
> wrote:
> >
>
> I regularly build with 12.2 on win32 and its fine.
>
> In fact, there is a fate station for that:
>
> https://fate.ffmpeg.org/report.cgi?slot=x86_32-mingw-w64-dll-windows-native&time=20230102232810
>
> So if you are seeing this issue, more details that trigger it will be
> required, and maybe a more targeted fix.
>
> - Hendrik

I can try to see if I can narrow down the configuration more, and try the
one used in fate, but for now, I was reproducing it by using ../configure
&& make -j 12

As additional information for now, I'm using

Target: i686-w64-mingw32
gcc version 12.2.0 (Rev7, Built by MSYS2 project)

with no notable environment variables like CFLAGS etc.
I did make sure to update my packages from msys2.

Interestingly, when I ran "../configure  --enable-gpl
--enable-memory-poisoning --arch=x86 --cpu=i686 --enable-shared" there were
no errors, but did confirm that with just "../configure
 && make libavcodec/h264_cabac.o" the error reappeared.

CC  libavcodec/h264_cabac.o
In file included from C:/Users/cddeg/FFmpeg/libavcodec/cabac_functions.h:49,
 from C:/Users/cddeg/FFmpeg/libavcodec/h264_cabac.c:36:
In function 'get_cabac_inline_x86',
inlined from 'get_cabac' at
C:/Users/cddeg/FFmpeg/libavcodec/cabac_functions.h:145:12,
inlined from 'decode_cabac_mb_intra4x4_pred_mode' at
C:/Users/cddeg/FFmpeg/libavcodec/h264_cabac.c:1377:9,
inlined from 'ff_h264_decode_mb_cabac' at
C:/Users/cddeg/FFmpeg/libavcodec/h264_cabac.c:2081:32:
C:/Users/cddeg/FFmpeg/libavcodec/x86/cabac.h:199:5: error: 'asm' operand
has impossible constraints
  199 | __asm__ volatile(
  | ^~~
C:/Users/cddeg/FFmpeg/libavcodec/x86/cabac.h:199:5: error: 'asm' operand
has impossible constraints
C:/Users/cddeg/FFmpeg/libavcodec/x86/cabac.h:199:5: error: 'asm' operand
has impossible constraints
C:/Users/cddeg/FFmpeg/libavcodec/x86/cabac.h:199:5: error: 'asm' operand
has impossible constraints
make: *** [/c/Users/cddeg/FFmpeg/ffbuild/common.mak:81:
libavcodec/h264_cabac.o] Error 1


I will try to see which flag in that configure line causes the issues to
disappear
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit Windows

2023-01-03 Thread Christopher Degawa
On Tue, Jan 3, 2023 at 12:32 PM Christopher Degawa 
wrote:

>
>
> On Mon, Jan 2, 2023 at 5:36 PM Hendrik Leppkes 
> wrote:
>
>> On Tue, Jan 3, 2023 at 12:01 AM Christopher Degawa 
>> wrote:
>> >
>>
>> I regularly build with 12.2 on win32 and its fine.
>>
>> In fact, there is a fate station for that:
>>
>> https://fate.ffmpeg.org/report.cgi?slot=x86_32-mingw-w64-dll-windows-native&time=20230102232810
>>
>> So if you are seeing this issue, more details that trigger it will be
>> required, and maybe a more targeted fix.
>>
>> - Hendrik
>
> I will try to see which flag in that configure line causes the issues to
> disappear
>

Seems I got it to disappear with just "--cpu=i686", so "ARCH
   x86 (generic)" fails but "ARCH  x86 (i686)"
passes
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit Windows

2023-01-03 Thread Christopher Degawa
On Tue, Jan 3, 2023 at 4:16 AM Andreas Rheinhardt <
andreas.rheinha...@outlook.com> wrote:

> Christopher Degawa:
> > previouslly, it only was an issue with 32-bit clang from msys2's
> > mingw32 repo, however, at some point with an update to gcc 12.2.0,
> > the same issue popped up. Tested with a clean clone of ffmpeg, and even
> > tested with n5.0, but the issue persists, so I presume it's a compiler
> > issue.
>
> Have these presumed compiler bugs ever been reported upstream?
>
> - Andreas
>

 I'm not sure if it's necessarily a compiler bug, rather I'm suspecting
something was changed in msys2's i686 gcc's. Based on my small findings, it
might be related to what “generic” means for -mtune for the 32-bit
compiler. I was asking around msys2's channels to see if anyone else could
reproduce it, but nobody has responded yet.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit Windows

2023-01-03 Thread Christopher Degawa
On Tue, Jan 3, 2023 at 12:51 PM Christopher Degawa 
wrote:

>
>
> On Tue, Jan 3, 2023 at 4:16 AM Andreas Rheinhardt <
> andreas.rheinha...@outlook.com> wrote:
>
>> Christopher Degawa:
>> > previouslly, it only was an issue with 32-bit clang from msys2's
>> > mingw32 repo, however, at some point with an update to gcc 12.2.0,
>> > the same issue popped up. Tested with a clean clone of ffmpeg, and even
>> > tested with n5.0, but the issue persists, so I presume it's a compiler
>> > issue.
>>
>> Have these presumed compiler bugs ever been reported upstream?
>>
>> - Andreas
>>
>
>  I'm not sure if it's necessarily a compiler bug, rather I'm suspecting
> something was changed in msys2's i686 gcc's. Based on my small findings, it
> might be related to what “generic” means for -mtune for the 32-bit
> compiler. I was asking around msys2's channels to see if anyone else could
> reproduce it, but nobody has responded yet.
>

Seems some of them have encountered it
https://github.com/msys2/MINGW-packages/pull/11683
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] Problem with "-f concat" and mixed path types on Windows.

2021-01-03 Thread Christopher Degawa
>
> I used the devel list because I considered, and still consider this as
> a bug, and not a user "how-to" question.
>

My general rule of thumb I use whenever someone asks if they should post in
#ffmpeg or #ffmpeg-devel (irc) etc is to only ask on devel if you are
specifically hacking on ffmpeg and might need help on some things. Else,
everything else goes either on trac (for bugs) or the ffmpeg-user or
#ffmpeg for general or probing questions, such as
> does the concat work as intended when it's adding the prefix with a
letter: before the share
path?
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] Setup a rtmps server with nginx + ffmpeg.

2021-01-05 Thread Christopher Degawa
I think this topic is more suited for the ffmpeg-user mailing list instead
of the devel mailing list
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH] libavdevice/decklink_dec: mark get_bmd_timecode static

2021-01-06 Thread Christopher Degawa
the function is not used anywhere else and is causing mingw-w64 clang
builds to fail with

ffmpeg-git/libavdevice/decklink_dec.cpp:792:5: error: no previous prototype for 
function 'get_bmd_timecode' [-Werror,-Wmissing-prototypes]
int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational 
frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame)

Signed-off-by: Christopher Degawa 
---
 libavdevice/decklink_dec.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 6bd4676f5e..dd629fd90c 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -789,7 +789,7 @@ static int64_t get_pkt_pts(IDeckLinkVideoInputFrame 
*videoFrame,
 return pts;
 }
 
-int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational 
frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame)
+static int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc, AVRational 
frame_rate, BMDTimecodeFormat tc_format, IDeckLinkVideoInputFrame *videoFrame)
 {
 IDeckLinkTimecode *timecode;
 int ret = AVERROR(ENOENT);
-- 
2.25.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] libavdevice/decklink_dec: mark get_bmd_timecode static

2021-01-06 Thread Christopher Degawa
I forgot to mark get_frame_timecode as static as well
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1

2020-07-12 Thread Christopher Degawa
> Considering that 1.4.0 was released 10 months ago, I wonder whether
> anyone compiled against a recent libsrt since then?

I can confirm that this fixes compilation errors with the latest
master branch of srt
https://github.com/Haivision/srt/commit/0e2201aff6b379979cec43fee5e8f162717f6346
and FFmpeg 
https://github.com/FFmpeg/FFmpeg/commit/3205ed31a7756ae563301e2f5a5dd2c853b20349

> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1

2020-07-25 Thread Christopher Degawa
On Sat, Jul 18, 2020 at 9:24 AM myp...@gmail.com  wrote:
>
> On Thu, Jul 16, 2020 at 9:35 AM myp...@gmail.com  wrote:
> >
> > On Tue, Jul 14, 2020 at 9:47 PM Moritz Barsnick  wrote:
> > >
> > > On Sun, Jul 12, 2020 at 22:44:46 +0800, myp...@gmail.com wrote:
> > > > Maybe I give an inaccurate description in the commit message, in fact,
> > > > libsrt 1.4.1 remove the SRTO_STRICTENC/SRTO_SMOOTHER option, it's will
> > > > lead to FFmpeg build fail when using libsrt  version >= 1.4.1
> > >
> > > I don't mind you description. Yet your code change references 1.4.1:
> > > SRT_VERSION_VALUE >= 0x010401
> > > while I am trying to make the point that 1.4.0 also needs this change
> > > (or 1.3.0 in one case, which is already ensured by #if).
> > >
> >
> > After double-check, I think the patch is Ok, in fact, libsrt keeps the
> > deprecated SRTO_STRICTENC/SRTO_SMOOTHER options in srt.h (inclued the
> > options in libsrt 1.3.3/1.3.4/1.4.0) until commit
> > 0e2201aff6b379979cec43fee5e8f162717f6346 , so FFmpeg build with libsrt
> > 1.3.3/1.3.4/1.4.0 is OK with the patch.
> Ping
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Ping
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] Pull Request - Support Windows Subsystem for Linux

2020-08-01 Thread Christopher Degawa
Doesn't break msys2 builds, so it's okay to me.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH] configure: Add additional glslang libraries to make linking work

2020-08-20 Thread Christopher Degawa
This patch is needed to fix compilation on windows using the git
master branches of both glslang and ffmpeg, although I don't know what
version or commit of glslang started to require it, the earliest
record I have of this issue is july 5th.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-20 Thread Christopher Degawa
On Mon, Dec 20, 2021 at 3:31 PM Helmut K. C. Tessarek 
wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> Hello,
>
> The following 2 commits break the build with a deployment target of 10.9 on
> macOS.
>
> I agree that 10.9 is quite old, but the rest of the code worked perfectly
> fine, so were those 2 commits really necessary?
>
> * 4ac869ca2a | 2021-12-18 11:57:31 -0800 | avfilter: add
> vf_yadif_videotoolbox (Aman Karmani)
> * ecee6af8bd | 2021-12-18 11:55:47 -0800 | avfilter: add metal utilities
> (Aman Karmani)
>
> Can you make that code conditional?
>

To tack on to this, I currently am also experiencing issues with those
commits, but am running on 10.15, however, my issue isn't necessarily that
the code isn't compiling, but rather it seems it's failing to link with

xcrun metal libavfilter/metal/vf_yadif_videotoolbox.metal -o
libavfilter/metal/vf_yadif_videotoolbox.metal.air
air-lld: error: library not found for -lmetal_rt_osx_air2.2
metal: error: air-lld command failed with exit code 1 (use -v to see
invocation)
make: *** [libavfilter/metal/vf_yadif_videotoolbox.metal.air] Error 1

currently running a fresh clone of FFmpeg and only ran ./configure and then
make. If I run

xcrun metal
-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/31001.143/lib/darwin
libavfilter/metal/vf_yadif_videotoolbox.metal -o
libavfilter/metal/vf_yadif_videotoolbox.metal.air

then it succeeds, I don't think there's currently a way to export LDFLAGS
to metal as the rule for it is a simple `$(METALCC) $< -o $@`

So I've exported "LIBRARY_PATH" to
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/lib/clang/31001.143/lib/darwin"
in the profile since I can't easily update that on all of my CI
configurations.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-20 Thread Christopher Degawa
On Mon, Dec 20, 2021 at 6:39 PM Aman Karmani  wrote:

>
> Could you share the output of `xcrun metal -v`
>
>
xcrun metal -v
Apple LLVM version 31001.43 (metalfe-31001.43)
Target: air64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/bin
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-20 Thread Christopher Degawa
On Mon, Dec 20, 2021 at 6:55 PM Aman Karmani  wrote:

> On Mon, Dec 20, 2021 at 4:52 PM Helmut K. C. Tessarek <
> tessa...@evermeet.cx>
> wrote:
>
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA512
> >
> >
> >
> > On 2021-12-20 19:38, Aman Karmani wrote:
> > > Could you share the output of `xcrun metal -v`
> >
> > $ xcrun metal -v
> > Apple LLVM version 902.9 (metalfe-902.9.61)
> > Target: air64-apple-darwin18.7.0
> > Thread model: posix
> > InstalledDir:
> >
> >
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
> > /usr/metal/ios/bin
> >
>
> I am able to get the ios binary too, but only when I request is explicitly
> as follows:
>
> $ xcrun -sdk $(xcodebuild -sdk iphoneos -version Path) metal -v
>
> Apple metal version 31001.325 (metalfe-31001.325)
> Target: air64-apple-darwin20.6.0
> Thread model: posix
> InstalledDir:
>
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/bin
>
>

Running `xcrun -sdk $(xcodebuild -sdk macosx -version Path) metal
libavfilter/metal/vf_yadif_videotoolbox.metal -o
libavfilter/metal/vf_yadif_videotoolbox.metal.air` does indeed compile
properly and properly shows macos

xcrun -sdk $(xcodebuild -sdk macosx -version Path) metal -v
Apple LLVM version 31001.143 (metalfe-31001.143)
Target: air64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/bin

and I can indeed have FFmpeg configure and make with `./configure
--metalcc="xcrun -sdk $(xcodebuild -sdk macosx -version Path) metal"`, but
that would sorta ruin the whole idea of being able to simply clone and
./configure and make.

I tried looking online, and I guess maybe it's not something often asked as
I could not find relevant results to how to set the default xcrun sdk, so
I'm not sure how to make that -sdk flag apply to all xcruns regardless of
configure flags
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-20 Thread Christopher Degawa
On Mon, Dec 20, 2021 at 7:25 PM Aman Karmani  wrote:

> On Mon, Dec 20, 2021 at 5:19 PM Christopher Degawa 
> wrote:
>
> > On Mon, Dec 20, 2021 at 6:55 PM Aman Karmani  wrote:
> >
> > > On Mon, Dec 20, 2021 at 4:52 PM Helmut K. C. Tessarek <
> > > tessa...@evermeet.cx>
> > > wrote:
> > >
> > > > -BEGIN PGP SIGNED MESSAGE-
> > > > Hash: SHA512
> > > >
> > > >
> > > >
> > > > On 2021-12-20 19:38, Aman Karmani wrote:
> > > > > Could you share the output of `xcrun metal -v`
> > > >
> > > > $ xcrun metal -v
> > > > Apple LLVM version 902.9 (metalfe-902.9.61)
> > > > Target: air64-apple-darwin18.7.0
> > > > Thread model: posix
> > > > InstalledDir:
> > > >
> > > >
> > >
> >
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
> > > > /usr/metal/ios/bin
> > > >
> > >
> > > I am able to get the ios binary too, but only when I request is
> > explicitly
> > > as follows:
> > >
> > > $ xcrun -sdk $(xcodebuild -sdk iphoneos -version Path) metal -v
> > >
> > > Apple metal version 31001.325 (metalfe-31001.325)
> > > Target: air64-apple-darwin20.6.0
> > > Thread model: posix
> > > InstalledDir:
> > >
> > >
> >
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/bin
> > >
> > >
> >
> > Running `xcrun -sdk $(xcodebuild -sdk macosx -version Path) metal
> > libavfilter/metal/vf_yadif_videotoolbox.metal -o
> > libavfilter/metal/vf_yadif_videotoolbox.metal.air` does indeed compile
> > properly and properly shows macos
> >
>
> Great, thanks for the confirmation!
>
>
> >
> > xcrun -sdk $(xcodebuild -sdk macosx -version Path) metal -v
> > Apple LLVM version 31001.143 (metalfe-31001.143)
> > Target: air64-apple-darwin19.6.0
> > Thread model: posix
> > InstalledDir:
> >
> >
> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/bin
> >
> > and I can indeed have FFmpeg configure and make with `./configure
> > --metalcc="xcrun -sdk $(xcodebuild -sdk macosx -version Path) metal"`,
> but
> > that would sorta ruin the whole idea of being able to simply clone and
> > ./configure and make.
> >
>
> Cool, that's also good to hear.
>
> Does this work for you?
>
> $ xcrun --sdk macosx metal -v
>
> If so, then perhaps this patch is enough?
>
> diff --git a/configure b/configure
> index d9d41b2273..c4a59e0e3f 100755
> --- a/configure
> +++ b/configure
> @@ -3842,8 +3842,8 @@ host_cc_default="gcc"
>  doxygen_default="doxygen"
>  install="install"
>  ln_s_default="ln -s -f"
> -metalcc_default="xcrun metal"
> -metallib_default="xcrun metallib"
> +metalcc_default="xcrun --sdk macosx metal"
> +metallib_default="xcrun --sdk macosx metallib"
>  nm_default="nm -g"
>  pkg_config_default=pkg-config
>  ranlib_default="ranlib"
>
>
>
xcrun --sdk macosx metal -v
Apple LLVM version 31001.143 (metalfe-31001.143)
Target: air64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/bin

That does seem to work indeed

make
xcrun --sdk macosx metal libavfilter/metal/vf_yadif_videotoolbox.metal -o
libavfilter/metal/vf_yadif_videotoolbox.metal.air
xcrun --sdk macosx metallib --split-module-without-linking
libavfilter/metal/vf_yadif_videotoolbox.metal.air -o
libavfilter/metal/vf_yadif_videotoolbox.metallib
BIN2C   libavfilter/metal/vf_yadif_videotoolbox.metallib.c
CC  libavfilter/metal/vf_yadif_videotoolbox.metallib.o
AR  libavfilter/libavfilter.a
LD  ffmpeg_g
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-20 Thread Christopher Degawa
On Mon, Dec 20, 2021 at 7:29 PM Ridley Combs  wrote:

> The main thing that confuses me here is that this file does build for me
> when I use the iOS version of the metal compiler (tbh I didn't even know
> there was a difference between them).
>
> What Xcode and macOS version are you on?
>


system_profiler SPSoftwareDataType
Software:

System Software Overview:

  System Version: macOS 10.15.7 (19H1615)
  Kernel Version: Darwin 19.6.0


xcodebuild -version
Xcode 12.3
Build version 12C5020f

xcrun --version
xcrun version 59.

I don't know what other versions might be beneficial here.

I can't (don't want to) upgrade the macOS system version atm since last
time I tried it via softwareupdate, it managed to make the device
unresponsive until someone physically rebooted it and managed to do the
same with an aws mac1.metal instance running 12.0 just today.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-20 Thread Christopher Degawa
On Mon, Dec 20, 2021 at 7:21 PM Aman Karmani  wrote:

>
>
> On Mon, Dec 20, 2021 at 5:03 PM Helmut K. C. Tessarek <
> tessa...@evermeet.cx> wrote:
>
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA512
>>
>> On 2021-12-20 19:11, Christopher Degawa wrote:
>> > So I've exported "LIBRARY_PATH" to
>>
>> I'm sorry to say, this is a workaround but hardly a solution.
>>
>
> No one said this is the solution. We are just trying to figure out what is
> going on, and this added information is very helpful in that effort.
>
>
>> Before these 2 commits all worked perfectly. Now it doesn't. Tweaking the
>> build env is not a solution.
>> Next time someone commits something, are we supposed to tweak it again?
>> Where does it end?
>>
>
> I'm not sure what your point is. If you are having trouble with those
> commits, then you can use an older version?
>
> Or you can compile with `./configure --disable-metal` to disable the new
> feature.
>
> Obviously the code worked on both my and Ridley's computers. If it didn't
> work, we wouldn't have committed it.
>
> Once we figure out why some computers are using the wrong metal binary,
> then we can fix it and commit the fix to master as well.
>


Digging a bit into xcrun itself, looking at
https://real-world-systems.com/docs/xcrun.1.html, it says

> The SDK which will be searched defaults to the most recent available SDK

and

xcodebuild -version -sdk | head
iPhoneOS14.3.sdk - iOS 14.3 (iphoneos14.3)
SDKVersion: 14.3
Path:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk
PlatformVersion: 14.3

Which I'm guessing might be the reason, but still doesn't really make
logical sense and running

xcrun --verbose metal -v
...
xcrun: note: SDKROOT = '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
...
xcrun: note: lookup resolved in
'/var/folders/yf/4yc0fdvx7zv1t17w41kxmr0rgn/T/xcrun_db' :
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal'
Apple LLVM version 31001.43 (metalfe-31001.43)
Target: air64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/bin

which also, doesn't make sense.

exporting SDKROOT to `macosx` does make it show

xcrun: note: SDKROOT =
'/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk'

xcrun: note: lookup resolved in
'/var/folders/yf/4yc0fdvx7zv1t17w41kxmr0rgn/T/xcrun_db' :
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal'
Apple LLVM version 31001.143 (metalfe-31001.143)
Target: air64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/bin

so, I'm not sure what conclusion to bring from this.


>
>>
>>
>> - --
>> regards Helmut K. C. Tessarek  KeyID 0x172380A011EF4944
>> Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
>>
>> /*
>>Thou shalt not follow the NULL pointer for chaos and madness
>>await thee at its end.
>> */
>> -BEGIN PGP SIGNATURE-
>>
>> iQIzBAEBCgAdFiEE191csiqpm8f5Ln9WvgmFNJ1E3QAFAmHBJ/EACgkQvgmFNJ1E
>> 3QDsJg//WzTdNngpbNhCihB0foMLjtL687/1FWqZKPfsCx5pvvLZq/Xj8cd1G2G5
>> XJOehG1YYkjKXE+I1oWBrRxxQ/1mkW49DjX6jyzGUFPvEV+e0yf6f6TUPrE9IYDw
>> nFkIq25rjJMo/+IPxklHw1bIuZxoqo4ohgYHfmcyYJWOPDBXRWCd93GJkbWJy3Cv
>> fRRp4/gIeQJJzlld1ISqGLP6GDIwrevtW7oUwUZbwIWvnJyl25UdnHLAMl82fQPu
>> QnCEuWgRODXI1eaYNXf15MwD6gGy39n7njon4AJ5C63678Yc2H0FfVh6wI9lIv1e
>> LR6WY942ziQx8uqr3y/2IV5wGDSvLZqyEvCMSh199xTcJdfL4WNEZlNS8hlWxN51
>> TfLHBLpjJHqEq2i6+hyaYF4Y3M9ctRa/JVjv1EjciXFWzMx2Ddhehxv0TPu1tY0A
>> UxiQ0By0hJhZDDzOPxez9DgCs/ecmIcUxq4mKuk6KXLIBfJqFrNIN/Mzsn7hBOI7
>> EPLui0+Jo+cWB3AsDRIGNO9UwN+gZAGKxGHt9U9//Af5rzzY0TQ09Z+To14BxD0V
>> lTqDp69JlsutJIpQfOywkPb5ExaFgX7vYZmXEb1f05zlIScIeBRdPxKJ9Sip2Cyo
>> AVzTsQIDTGkNM3KUJE8m3EgrX8V+gJOXKtfK+phUr5YvyhP5IpE=
>> =maKQ
>> -END PGP SIGNATURE-
>> ___
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
>>
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-20 Thread Christopher Degawa
On Mon, Dec 20, 2021 at 7:53 PM Aman Karmani  wrote:

>
>
> On Mon, Dec 20, 2021 at 5:48 PM Christopher Degawa 
> wrote:
>
>>
>>
>> On Mon, Dec 20, 2021 at 7:21 PM Aman Karmani  wrote:
>>
>>>
>>>
>>> On Mon, Dec 20, 2021 at 5:03 PM Helmut K. C. Tessarek <
>>> tessa...@evermeet.cx> wrote:
>>>
>>>> -BEGIN PGP SIGNED MESSAGE-
>>>> Hash: SHA512
>>>>
>>>> On 2021-12-20 19:11, Christopher Degawa wrote:
>>>> > So I've exported "LIBRARY_PATH" to
>>>>
>>>> I'm sorry to say, this is a workaround but hardly a solution.
>>>>
>>>
>>> No one said this is the solution. We are just trying to figure out what
>>> is going on, and this added information is very helpful in that effort.
>>>
>>>
>>>> Before these 2 commits all worked perfectly. Now it doesn't. Tweaking
>>>> the
>>>> build env is not a solution.
>>>> Next time someone commits something, are we supposed to tweak it again?
>>>> Where does it end?
>>>>
>>>
>>> I'm not sure what your point is. If you are having trouble with those
>>> commits, then you can use an older version?
>>>
>>> Or you can compile with `./configure --disable-metal` to disable the new
>>> feature.
>>>
>>> Obviously the code worked on both my and Ridley's computers. If it
>>> didn't work, we wouldn't have committed it.
>>>
>>> Once we figure out why some computers are using the wrong metal binary,
>>> then we can fix it and commit the fix to master as well.
>>>
>>
>>
>> Digging a bit into xcrun itself, looking at
>> https://real-world-systems.com/docs/xcrun.1.html, it says
>>
>> > The SDK which will be searched defaults to the most recent available
>> SDK
>>
>> and
>>
>> xcodebuild -version -sdk | head
>> iPhoneOS14.3.sdk - iOS 14.3 (iphoneos14.3)
>> SDKVersion: 14.3
>> Path:
>> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.3.sdk
>> PlatformVersion: 14.3
>>
>> Which I'm guessing might be the reason, but still doesn't really make
>> logical sense and running
>>
>> xcrun --verbose metal -v
>> ...
>> xcrun: note: SDKROOT =
>> '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
>> ...
>> xcrun: note: lookup resolved in
>> '/var/folders/yf/4yc0fdvx7zv1t17w41kxmr0rgn/T/xcrun_db' :
>> '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal'
>> Apple LLVM version 31001.43 (metalfe-31001.43)
>> Target: air64-apple-darwin19.6.0
>> Thread model: posix
>> InstalledDir:
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios/bin
>>
>> which also, doesn't make sense.
>>
>> exporting SDKROOT to `macosx` does make it show
>>
>> xcrun: note: SDKROOT =
>> '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk'
>>
>> xcrun: note: lookup resolved in
>> '/var/folders/yf/4yc0fdvx7zv1t17w41kxmr0rgn/T/xcrun_db' :
>> '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal'
>> Apple LLVM version 31001.143 (metalfe-31001.143)
>> Target: air64-apple-darwin19.6.0
>> Thread model: posix
>> InstalledDir:
>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/metal/macos/bin
>>
>> so, I'm not sure what conclusion to bring from this.
>>
>
> Thanks for digging in and documenting this behavior.
>
> It seems like a bug in Xcode to me. Perhaps it's fixed in newer XC, which
> is why we're not seeing it?
>
> It may be worth filing a radar either way.
>
>

As an additional note, just spun up a new mac1.metal instance with macOS
10.15 to see if I could compile ffmpeg with nothing in the system other
than build tools and I am getting an error of

xcrun: error: unable to find utility "metal", not a developer tool or in
PATH

and realized that I can't even run xcodebuild because

xcodebuild --version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer
directory '/Library/Developer/CommandLineTools' is a command line tools
instance


It might be better to first check if `$metalcc --version` even runs first
before enabling or even checking if metal works
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] commits ecee6af8bd and 4ac869ca2a break build for macOS

2021-12-21 Thread Christopher Degawa
On Tue, Dec 21, 2021 at 1:40 AM Ridley Combs  wrote:

> Huh, TIL that the metal compiler doesn't exist without Xcode, but the
> metal framework does! Wacky. Anyway, this patch oughtta fix that (does more
> or less as you suggested); if this is all fine on your end, I'll go ahead
> and split this up into a few commits and send them to the list:
> https://gist.github.com/44e6575fbd4d84c016e63d8ddb1fb52e <
> https://gist.github.com/44e6575fbd4d84c016e63d8ddb1fb52e>
>

That indeed does fix the simple clone configure make triplet and I can now
build without errors and does not break compilation with metal stuff if
Xcode is installed
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] get_cabac_inline_x86: Don't inline if 32-bit clang on windows

2021-08-17 Thread Christopher Degawa
Fixes https://trac.ffmpeg.org/ticket/8903

relevant https://github.com/msys2/MINGW-packages/discussions/9258

Signed-off-by: Christopher Degawa 
---
 libavcodec/x86/cabac.h | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavcodec/x86/cabac.h b/libavcodec/x86/cabac.h
index 53d74c541e..b046a56a6b 100644
--- a/libavcodec/x86/cabac.h
+++ b/libavcodec/x86/cabac.h
@@ -177,8 +177,13 @@
 
 #if HAVE_7REGS && !BROKEN_COMPILER
 #define get_cabac_inline get_cabac_inline_x86
-static av_always_inline int get_cabac_inline_x86(CABACContext *c,
- uint8_t *const state)
+static
+#if defined(_WIN32) && !defined(_WIN64) && defined(__clang__)
+av_noinline
+#else
+av_always_inline
+#endif
+int get_cabac_inline_x86(CABACContext *c, uint8_t *const state)
 {
 int bit, tmp;
 #ifdef BROKEN_RELOCATIONS
-- 
2.32.0

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2 6/6] avcodec/libsvtav1: support constant quality mode

2021-09-19 Thread Christopher Degawa
On Fri, Sep 17, 2021 at 9:28 PM  wrote:

> From: Limin Wang 
>
> Signed-off-by: Limin Wang 
>
As a note, I personally favor this patch over mine since I don't think
`enable_tpl_la` is worth exposing to the user if its main role is to switch
between crf and cqp
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH v2 6/6] avcodec/libsvtav1: support constant quality mode

2021-09-23 Thread Christopher Degawa
On Sun, Sep 19, 2021 at 2:02 PM Christopher Degawa 
wrote:

>
>
> On Fri, Sep 17, 2021 at 9:28 PM  wrote:
>
>> From: Limin Wang 
>>
>> Signed-off-by: Limin Wang 
>>
> As a note, I personally favor this patch over mine since I don't think
> `enable_tpl_la` is worth exposing to the user if its main role is to switch
> between crf and cqp
>

Ping on this patch, this has been requested on SVT-AV1's side as well
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] avcodec/libsvtav1: pass pict_type to library

2022-04-25 Thread Christopher Degawa
match the behavior of SvtAv1EncApp to ensure pic_type is always set
before passing it to the library.

The other options for pic_type aren't currently used inside the library,
so they aren't introduced in this patch.

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 2e3d96ce37..eafb762a7d 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -404,6 +404,11 @@ static int eb_send_frame(AVCodecContext *avctx, const 
AVFrame *frame)
 headerPtr->p_app_private = NULL;
 headerPtr->pts   = frame->pts;
 
+switch (frame->pict_type) {
+case AV_PICTURE_TYPE_I: headerPtr->pic_type = EB_AV1_KEY_PICTURE; break;
+default: headerPtr->pic_type = EB_AV1_INVALID_PICTURE; break; // Actually 
means auto, or default.
+}
+
 svt_av1_enc_send_picture(svt_enc->svt_handle, headerPtr);
 
 return 0;
-- 
2.35.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v2] avcodec/libsvtav1: pass pict_type to library

2022-04-25 Thread Christopher Degawa
match the behavior of SvtAv1EncApp to ensure pic_type is always set
before passing it to the library.

The other options for pic_type aren't currently used inside the library,
so they aren't introduced in this patch.

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 2e3d96ce37..088b9bab02 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -404,6 +404,16 @@ static int eb_send_frame(AVCodecContext *avctx, const 
AVFrame *frame)
 headerPtr->p_app_private = NULL;
 headerPtr->pts   = frame->pts;
 
+switch (frame->pict_type) {
+case AV_PICTURE_TYPE_I:
+headerPtr->pic_type = EB_AV1_KEY_PICTURE;
+break;
+default:
+// Actually means auto, or default.
+headerPtr->pic_type = EB_AV1_INVALID_PICTURE;
+break;
+}
+
 svt_av1_enc_send_picture(svt_enc->svt_handle, headerPtr);
 
 return 0;
-- 
2.35.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] configure: add check for sdl2 >= 2.23.0

2022-05-10 Thread Christopher Degawa
sdl2 recently changed their versioning, moving the patch level to minor level
https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff

trac: https://trac.ffmpeg.org/ticket/9768

Signed-off-by: Christopher Degawa 
---
 configure | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/configure b/configure
index 4d2f4d9112..88777fed10 100755
--- a/configure
+++ b/configure
@@ -6743,6 +6743,13 @@ fi
 if enabled sdl2; then
 SDL2_CONFIG="${cross_prefix}sdl2-config"
 test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h 
SDL_PollEvent
+# sdl2 changed their versioning scheme to match GLib and flatpack moving 
the patch to
+# minor instead in
+# 
https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff
+# which obviously breaks the previous check, so go ahead and check for the 
new version
+if disabled sdl2; then
+test_pkg_config sdl2 "sdl2 >= 2.23.0" SDL_events.h SDL_PollEvent
+fi
 if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
 sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
 sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
-- 
2.35.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH v2] configure: add check for sdl2 >= 2.23.0

2022-05-10 Thread Christopher Degawa
sdl2 recently changed their versioning, moving the patch level to minor level
https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff

trac: https://trac.ffmpeg.org/ticket/9768

Signed-off-by: Christopher Degawa 
---
 configure | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/configure b/configure
index 4d2f4d9112..0fdab7391e 100755
--- a/configure
+++ b/configure
@@ -6743,6 +6743,13 @@ fi
 if enabled sdl2; then
 SDL2_CONFIG="${cross_prefix}sdl2-config"
 test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h 
SDL_PollEvent
+# sdl2 changed their versioning scheme to match GLib and flatpack moving 
the patch to
+# minor instead in
+# 
https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff
+# which obviously breaks the previous check, so go ahead and check for the 
new version
+if disabled sdl2; then
+test_pkg_config sdl2 "sdl2 >= 2.23.0 sdl2 < 3.0.0" SDL_events.h 
SDL_PollEvent
+fi
 if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
 sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
 sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
-- 
2.35.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] configure: extend check to less than 3.0.0

2022-05-11 Thread Christopher Degawa
sdl2 recently changed their versioning, moving the patch level to minor level
https://github.com/libsdl-org/SDL/commit/cd7c2f1de7d9e418bb554047d714dd7cacc020ff
and have said that they will instead ship sdl3.pc for 3.0.0

trac: https://trac.ffmpeg.org/ticket/9768

Signed-off-by: Christopher Degawa 
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 4d2f4d9112..0faf2455b7 100755
--- a/configure
+++ b/configure
@@ -6742,7 +6742,7 @@ fi
 
 if enabled sdl2; then
 SDL2_CONFIG="${cross_prefix}sdl2-config"
-test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h 
SDL_PollEvent
+test_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 3.0.0" SDL_events.h 
SDL_PollEvent
 if disabled sdl2 && "${SDL2_CONFIG}" --version > /dev/null 2>&1; then
 sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
 sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
-- 
2.35.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-devel] [PATCH] avformat/os_support: use windows stat structs with 64bit time_t

2022-06-10 Thread Christopher Degawa
On Thu, Jun 9, 2022 at 6:22 PM softworkz  wrote:

> From: softworkz 
>
> Signed-off-by: softworkz 
> ---
> avformat/os_support: use windows stat structs with 64bit time_t
>
> Signed-off-by: softworkz softwo...@hotmail.com
>
>
>
Ping on this patch, this fixes an error with decklink due to clang++
complaining about no conversions between the two struct types
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-devel] [PATCH] libavcodec/libsvtav1: Allow -1 for preset option

2023-05-10 Thread Christopher Degawa
Currently, the -1 (MR) preset is disallowed as it's taken as the preset
option not set, and the only way to access it was through svtav1-params.

Signed-off-by: Christopher Degawa 
---
 libavcodec/libsvtav1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/libsvtav1.c b/libavcodec/libsvtav1.c
index 9174e2753c..952ed0e1e7 100644
--- a/libavcodec/libsvtav1.c
+++ b/libavcodec/libsvtav1.c
@@ -170,7 +170,7 @@ static int config_enc_params(EbSvtAv1EncConfiguration 
*param,
 param->look_ahead_distance= svt_enc->la_depth;
 #endif
 
-if (svt_enc->enc_mode >= 0)
+if (svt_enc->enc_mode >= -1)
 param->enc_mode = svt_enc->enc_mode;
 
 if (avctx->bit_rate) {
@@ -593,7 +593,7 @@ static const AVOption options[] = {
 { "high", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, VE, "tier" },
 #endif
 { "preset", "Encoding preset",
-  OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -1 }, -1, MAX_ENC_PRESET, VE 
},
+  OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = -2 }, -2, MAX_ENC_PRESET, VE 
},
 
 FF_AV1_PROFILE_OPTS
 
-- 
2.40.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".