From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH] lavc/libdav1d: fix exporting framerate
Date: Mon, 15 May 2023 09:41:55 -0300
Message-ID: <82e59f67-7087-2a81-9af3-2cab143bbb5e@gmail.com> (raw)
In-Reply-To: <20230515122240.2256-1-anton@khirnov.net>
On 5/15/2023 9:22 AM, Anton Khirnov wrote:
> Same issues as in the previous commit.
> ---
> libavcodec/Makefile | 2 +-
> libavcodec/libdav1d.c | 10 ++++------
> 2 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index 9587e56493..4d59411662 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -1086,7 +1086,7 @@ OBJS-$(CONFIG_LIBARIBCAPTION_DECODER) += libaribcaption.o ass.o
> OBJS-$(CONFIG_LIBCELT_DECODER) += libcelt_dec.o
> OBJS-$(CONFIG_LIBCODEC2_DECODER) += libcodec2.o
> OBJS-$(CONFIG_LIBCODEC2_ENCODER) += libcodec2.o
> -OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o
> +OBJS-$(CONFIG_LIBDAV1D_DECODER) += libdav1d.o av1_parse.o
> OBJS-$(CONFIG_LIBDAVS2_DECODER) += libdavs2.o
> OBJS-$(CONFIG_LIBFDK_AAC_DECODER) += libfdk-aacdec.o
> OBJS-$(CONFIG_LIBFDK_AAC_ENCODER) += libfdk-aacenc.o
> diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
> index af072da681..4c48f0099a 100644
> --- a/libavcodec/libdav1d.c
> +++ b/libavcodec/libdav1d.c
> @@ -30,6 +30,7 @@
> #include "libavutil/opt.h"
>
> #include "atsc_a53.h"
> +#include "av1_parse.h"
> #include "avcodec.h"
> #include "bytestream.h"
> #include "codec_internal.h"
> @@ -154,12 +155,9 @@ static void libdav1d_init_params(AVCodecContext *c, const Dav1dSequenceHeader *s
> else
> c->pix_fmt = pix_fmt[seq->layout][seq->hbd];
>
> - if (seq->num_units_in_tick && seq->time_scale) {
> - av_reduce(&c->framerate.den, &c->framerate.num,
> - seq->num_units_in_tick, seq->time_scale, INT_MAX);
> - if (seq->equal_picture_interval)
> - c->ticks_per_frame = seq->num_ticks_per_picture;
> - }
> + c->framerate = ff_av1_framerate(seq->num_ticks_per_picture,
> + (unsigned)seq->num_units_in_tick,
> + (unsigned)seq->time_scale);
>
> if (seq->film_grain_present)
> c->properties |= FF_CODEC_PROPERTY_FILM_GRAIN;
LGTM
_______________________________________________
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".
next prev parent reply other threads:[~2023-05-15 12:42 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 13:32 [FFmpeg-devel] [PATCH 01/13] lavu/frame: extend AVFrame.repeat_pict documentation Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 02/13] fftools/ffmpeg: fix computing video frame duration from repeat_pict Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 03/13] lavc/codec_desc: add a property for codecs that support field coding Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 04/13] lavf: use AV_CODEC_PROP_FIELDS where appropriate Anton Khirnov
2023-05-08 14:12 ` Michael Niedermayer
2023-05-09 8:37 ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2023-05-08 14:15 ` [FFmpeg-devel] [PATCH " Michael Niedermayer
2023-05-09 8:44 ` Anton Khirnov
2023-05-15 18:59 ` Michael Niedermayer
2023-05-15 20:44 ` Anton Khirnov
2023-05-16 17:41 ` Michael Niedermayer
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 05/13] lavc/av1*: fix exporting framerate Anton Khirnov
2023-05-10 11:52 ` James Almer
2023-05-14 19:39 ` [FFmpeg-devel] [PATCH] " Anton Khirnov
2023-05-14 19:50 ` James Almer
2023-05-15 8:22 ` Anton Khirnov
2023-05-15 11:41 ` James Almer
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 06/13] lavc/libdav1d: " Anton Khirnov
2023-05-15 8:22 ` [FFmpeg-devel] [PATCH] " Anton Khirnov
2023-05-15 11:47 ` James Almer
2023-05-15 12:22 ` Anton Khirnov
2023-05-15 12:41 ` James Almer [this message]
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 07/13] lavc/ratecontrol: use AVCodecContext.framerate when available Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 08/13] lavc/msmpeg4enc: " Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 09/13] libaomenc: " Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 10/13] lavc/libkvazaar, libopenh264enc: drop redundant checks Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 11/13] lavc/libvpxenc: send frame durations to the encoder Anton Khirnov
2023-05-09 1:18 ` James Zern
2023-05-09 9:09 ` [FFmpeg-devel] [PATCH v2 " Anton Khirnov
2023-05-09 18:17 ` James Zern
2023-05-10 6:34 ` Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 12/13] lavc: deprecate AVCodecContext.ticks_per_frame Anton Khirnov
2023-05-07 13:32 ` [FFmpeg-devel] [PATCH 13/13] fftools/ffmpeg: stop using deprecated ticks_per_frame Anton Khirnov
2023-05-07 16:59 ` [FFmpeg-devel] [PATCH 01/13] lavu/frame: extend AVFrame.repeat_pict documentation Kieran Kunhya
2023-05-07 18:01 ` Anton Khirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82e59f67-7087-2a81-9af3-2cab143bbb5e@gmail.com \
--to=jamrial@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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