* [FFmpeg-devel] [PATCH] lavc/vvc: Use av_log2 when destination is integer
@ 2024-01-25 17:05 post
2024-01-26 4:43 ` Nuo Mi
0 siblings, 1 reply; 3+ messages in thread
From: post @ 2024-01-25 17:05 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Frank Plowman
From: Frank Plowman <post@frankplowman.com>
Signed-off-by: Frank Plowman <post@frankplowman.com>
---
libavcodec/vvc/vvc_ctu.c | 4 ++--
libavcodec/vvc/vvc_ps.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavcodec/vvc/vvc_ctu.c b/libavcodec/vvc/vvc_ctu.c
index 307bc3490e..d166b16a19 100644
--- a/libavcodec/vvc/vvc_ctu.c
+++ b/libavcodec/vvc/vvc_ctu.c
@@ -257,8 +257,8 @@ static TransformBlock* add_tb(TransformUnit *tu, VVCLocalContext *lc,
tb->y0 = y0;
tb->tb_width = tb_width;
tb->tb_height = tb_height;
- tb->log2_tb_width = log2(tb_width);
- tb->log2_tb_height = log2(tb_height);
+ tb->log2_tb_width = av_log2(tb_width);
+ tb->log2_tb_height = av_log2(tb_height);
tb->max_scan_x = tb->max_scan_y = 0;
tb->min_scan_x = tb->min_scan_y = 0;
diff --git a/libavcodec/vvc/vvc_ps.c b/libavcodec/vvc/vvc_ps.c
index ac96ed9f43..c2afc0ac93 100644
--- a/libavcodec/vvc/vvc_ps.c
+++ b/libavcodec/vvc/vvc_ps.c
@@ -910,7 +910,7 @@ static void scaling_derive(VVCScalingList *sl, const H266RawAPS *aps)
{
for (int id = 0; id < SL_MAX_ID; id++) {
const int matrix_size = derive_matrix_size(id);
- const int log2_size = log2(matrix_size);
+ const int log2_size = av_log2(matrix_size);
const int list_size = matrix_size * matrix_size;
int coeff[SL_MAX_MATRIX_SIZE * SL_MAX_MATRIX_SIZE];
const uint8_t *pred;
--
2.43.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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] lavc/vvc: Use av_log2 when destination is integer
2024-01-25 17:05 [FFmpeg-devel] [PATCH] lavc/vvc: Use av_log2 when destination is integer post
@ 2024-01-26 4:43 ` Nuo Mi
2024-01-26 18:50 ` James Almer
0 siblings, 1 reply; 3+ messages in thread
From: Nuo Mi @ 2024-01-26 4:43 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Frank Plowman
LGTM
On Fri, Jan 26, 2024 at 1:05 AM <post@frankplowman.com> wrote:
> From: Frank Plowman <post@frankplowman.com>
>
> Signed-off-by: Frank Plowman <post@frankplowman.com>
> ---
> libavcodec/vvc/vvc_ctu.c | 4 ++--
> libavcodec/vvc/vvc_ps.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libavcodec/vvc/vvc_ctu.c b/libavcodec/vvc/vvc_ctu.c
> index 307bc3490e..d166b16a19 100644
> --- a/libavcodec/vvc/vvc_ctu.c
> +++ b/libavcodec/vvc/vvc_ctu.c
> @@ -257,8 +257,8 @@ static TransformBlock* add_tb(TransformUnit *tu,
> VVCLocalContext *lc,
> tb->y0 = y0;
> tb->tb_width = tb_width;
> tb->tb_height = tb_height;
> - tb->log2_tb_width = log2(tb_width);
> - tb->log2_tb_height = log2(tb_height);
> + tb->log2_tb_width = av_log2(tb_width);
> + tb->log2_tb_height = av_log2(tb_height);
>
> tb->max_scan_x = tb->max_scan_y = 0;
> tb->min_scan_x = tb->min_scan_y = 0;
> diff --git a/libavcodec/vvc/vvc_ps.c b/libavcodec/vvc/vvc_ps.c
> index ac96ed9f43..c2afc0ac93 100644
> --- a/libavcodec/vvc/vvc_ps.c
> +++ b/libavcodec/vvc/vvc_ps.c
> @@ -910,7 +910,7 @@ static void scaling_derive(VVCScalingList *sl, const
> H266RawAPS *aps)
> {
> for (int id = 0; id < SL_MAX_ID; id++) {
> const int matrix_size = derive_matrix_size(id);
> - const int log2_size = log2(matrix_size);
> + const int log2_size = av_log2(matrix_size);
> const int list_size = matrix_size * matrix_size;
> int coeff[SL_MAX_MATRIX_SIZE * SL_MAX_MATRIX_SIZE];
> const uint8_t *pred;
> --
> 2.43.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-request@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-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [FFmpeg-devel] [PATCH] lavc/vvc: Use av_log2 when destination is integer
2024-01-26 4:43 ` Nuo Mi
@ 2024-01-26 18:50 ` James Almer
0 siblings, 0 replies; 3+ messages in thread
From: James Almer @ 2024-01-26 18:50 UTC (permalink / raw)
To: ffmpeg-devel
On 1/26/2024 1:43 AM, Nuo Mi wrote:
> LGTM
Applied.
> On Fri, Jan 26, 2024 at 1:05 AM <post@frankplowman.com> wrote:
>
>> From: Frank Plowman <post@frankplowman.com>
>>
>> Signed-off-by: Frank Plowman <post@frankplowman.com>
>> ---
>> libavcodec/vvc/vvc_ctu.c | 4 ++--
>> libavcodec/vvc/vvc_ps.c | 2 +-
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavcodec/vvc/vvc_ctu.c b/libavcodec/vvc/vvc_ctu.c
>> index 307bc3490e..d166b16a19 100644
>> --- a/libavcodec/vvc/vvc_ctu.c
>> +++ b/libavcodec/vvc/vvc_ctu.c
>> @@ -257,8 +257,8 @@ static TransformBlock* add_tb(TransformUnit *tu,
>> VVCLocalContext *lc,
>> tb->y0 = y0;
>> tb->tb_width = tb_width;
>> tb->tb_height = tb_height;
>> - tb->log2_tb_width = log2(tb_width);
>> - tb->log2_tb_height = log2(tb_height);
>> + tb->log2_tb_width = av_log2(tb_width);
>> + tb->log2_tb_height = av_log2(tb_height);
>>
>> tb->max_scan_x = tb->max_scan_y = 0;
>> tb->min_scan_x = tb->min_scan_y = 0;
>> diff --git a/libavcodec/vvc/vvc_ps.c b/libavcodec/vvc/vvc_ps.c
>> index ac96ed9f43..c2afc0ac93 100644
>> --- a/libavcodec/vvc/vvc_ps.c
>> +++ b/libavcodec/vvc/vvc_ps.c
>> @@ -910,7 +910,7 @@ static void scaling_derive(VVCScalingList *sl, const
>> H266RawAPS *aps)
>> {
>> for (int id = 0; id < SL_MAX_ID; id++) {
>> const int matrix_size = derive_matrix_size(id);
>> - const int log2_size = log2(matrix_size);
>> + const int log2_size = av_log2(matrix_size);
>> const int list_size = matrix_size * matrix_size;
>> int coeff[SL_MAX_MATRIX_SIZE * SL_MAX_MATRIX_SIZE];
>> const uint8_t *pred;
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-01-26 18:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-25 17:05 [FFmpeg-devel] [PATCH] lavc/vvc: Use av_log2 when destination is integer post
2024-01-26 4:43 ` Nuo Mi
2024-01-26 18:50 ` James Almer
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git