Message ID | a6b9a8cdadb7fab8d773d8e72cbf68cb0db19f9a.camel@haerdin.se |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/3] lavc/speedhqdec: Add AV_CODEC_CAP_FRAME_THREADS | expand |
On Wed, 8 May 2024, Tomas Härdin wrote: > > What suprises me is that pict_type and the keyframe flag is not set already for decoding codecs with AV_CODEC_PROP_INTRA_ONLY flag. Is this intentional or just nobody had the time to set it up to work automatically? Thanks, Marton
On 5/8/2024 5:01 PM, Marton Balint wrote: > > > On Wed, 8 May 2024, Tomas Härdin wrote: > >> >> > > What suprises me is that pict_type and the keyframe flag is not set > already for decoding codecs with AV_CODEC_PROP_INTRA_ONLY flag. Is this > intentional or just nobody had the time to set it up to work automatically? For audio it's not always the case (See MLP/TrueHD). For video it might with intra-only codecs, but at least with non intra-only codecs, an I frame is not necessarily a keyframe (See AV1). > > Thanks, > Marton > _______________________________________________ > 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".
ons 2024-05-08 klockan 17:06 -0300 skrev James Almer: > On 5/8/2024 5:01 PM, Marton Balint wrote: > > > > > > On Wed, 8 May 2024, Tomas Härdin wrote: > > > > > > > > > > > > What suprises me is that pict_type and the keyframe flag is not set > > already for decoding codecs with AV_CODEC_PROP_INTRA_ONLY flag. Is > > this > > intentional or just nobody had the time to set it up to work > > automatically? > > For audio it's not always the case (See MLP/TrueHD). For video it > might > with intra-only codecs, but at least with non intra-only codecs, an I > frame is not necessarily a keyframe (See AV1). Yes, IDR frames exist. We're talking about intra-only though. I'll push this on Monday if there are no objections. We can adds some logic for always setting key_frame and/or pict_type in the appropriate place for intra-only codecs as a separate patch. That would allow us to simplify all intra-only codecs as well, which would be nice /Tomas
Tomas Härdin: > ons 2024-05-08 klockan 17:06 -0300 skrev James Almer: >> On 5/8/2024 5:01 PM, Marton Balint wrote: >>> >>> >>> On Wed, 8 May 2024, Tomas Härdin wrote: >>> >>>> >>>> >>> >>> What suprises me is that pict_type and the keyframe flag is not set >>> already for decoding codecs with AV_CODEC_PROP_INTRA_ONLY flag. Is >>> this >>> intentional or just nobody had the time to set it up to work >>> automatically? >> >> For audio it's not always the case (See MLP/TrueHD). For video it >> might >> with intra-only codecs, but at least with non intra-only codecs, an I >> frame is not necessarily a keyframe (See AV1). > > Yes, IDR frames exist. We're talking about intra-only though. > > I'll push this on Monday if there are no objections. We can adds some > logic for always setting key_frame and/or pict_type in the appropriate > place for intra-only codecs as a separate patch. That would allow us to > simplify all intra-only codecs as well, which would be nice > Already done: https://ffmpeg.org/pipermail/ffmpeg-devel/2024-May/327065.html - Andreas
fre 2024-05-10 klockan 14:48 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > ons 2024-05-08 klockan 17:06 -0300 skrev James Almer: > > > On 5/8/2024 5:01 PM, Marton Balint wrote: > > > > > > > > > > > > On Wed, 8 May 2024, Tomas Härdin wrote: > > > > > > > > > > > > > > > > > > > > > > What suprises me is that pict_type and the keyframe flag is not > > > > set > > > > already for decoding codecs with AV_CODEC_PROP_INTRA_ONLY flag. > > > > Is > > > > this > > > > intentional or just nobody had the time to set it up to work > > > > automatically? > > > > > > For audio it's not always the case (See MLP/TrueHD). For video it > > > might > > > with intra-only codecs, but at least with non intra-only codecs, > > > an I > > > frame is not necessarily a keyframe (See AV1). > > > > Yes, IDR frames exist. We're talking about intra-only though. > > > > I'll push this on Monday if there are no objections. We can adds > > some > > logic for always setting key_frame and/or pict_type in the > > appropriate > > place for intra-only codecs as a separate patch. That would allow > > us to > > simplify all intra-only codecs as well, which would be nice > > > > Already done: > https://ffmpeg.org/pipermail/ffmpeg-devel/2024-May/327065.html Cool. I'll not bother with this patch then. /Tomas
sön 2024-05-12 klockan 01:07 +0200 skrev Tomas Härdin: > fre 2024-05-10 klockan 14:48 +0200 skrev Andreas Rheinhardt: > > Tomas Härdin: > > > ons 2024-05-08 klockan 17:06 -0300 skrev James Almer: > > > > On 5/8/2024 5:01 PM, Marton Balint wrote: > > > > > > > > > > > > > > > On Wed, 8 May 2024, Tomas Härdin wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > What suprises me is that pict_type and the keyframe flag is > > > > > not > > > > > set > > > > > already for decoding codecs with AV_CODEC_PROP_INTRA_ONLY > > > > > flag. > > > > > Is > > > > > this > > > > > intentional or just nobody had the time to set it up to work > > > > > automatically? > > > > > > > > For audio it's not always the case (See MLP/TrueHD). For video > > > > it > > > > might > > > > with intra-only codecs, but at least with non intra-only > > > > codecs, > > > > an I > > > > frame is not necessarily a keyframe (See AV1). > > > > > > Yes, IDR frames exist. We're talking about intra-only though. > > > > > > I'll push this on Monday if there are no objections. We can adds > > > some > > > logic for always setting key_frame and/or pict_type in the > > > appropriate > > > place for intra-only codecs as a separate patch. That would allow > > > us to > > > simplify all intra-only codecs as well, which would be nice > > > > > > > Already done: > > https://ffmpeg.org/pipermail/ffmpeg-devel/2024-May/327065.html > > Cool. I'll not bother with this patch then. Pushed patches 1 and 2 /Tomas
From 894a0ff35e892f84b079bef62efa56250bb33e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= <git@haerdin.se> Date: Wed, 8 May 2024 14:18:10 +0200 Subject: [PATCH 3/3] lavc/speedhqdec: Set AV_PICTURE_TYPE_I --- libavcodec/speedhqdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/speedhqdec.c b/libavcodec/speedhqdec.c index d6b1fff7a5..2244d73c15 100644 --- a/libavcodec/speedhqdec.c +++ b/libavcodec/speedhqdec.c @@ -441,6 +441,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx, AVFrame *frame, return ret; } frame->flags |= AV_FRAME_FLAG_KEY; + frame->pict_type = AV_PICTURE_TYPE_I; if (second_field_offset == 4 || second_field_offset == (buf_size-4)) { /* -- 2.39.2