Re: [FFmpeg-devel] [PATCH v4 3/7] avcodec/webp_parser: parse each frame into one packet

2023-07-27 Thread James Zern
On Wed, Jul 26, 2023 at 2:36 PM Tomas Härdin  wrote:
>
> tis 2023-07-25 klockan 16:18 +0200 skrev Thilo Borgmann:
> > Am 25.07.23 um 14:24 schrieb Tomas Härdin:
> > > > +// Extremely simplified key frame detection:
> > > > +// - the first frame (containing headers) is marked as a key
> > > > frame
> > > > +// - other frames are marked as non-key frames
> > >
> > > Is there a more proper way of doing this?
> >
> > All frames (except the ANMF chunks) are INTRA, and all of them have a
> > WEBP tag.
> > Whereas all ANMF chunks are in the same WEBP chunk as their reference
> > frame.
> > So it should really be as simple as it is to mark all WEBP frames as
> > key frames as the code does.
> > What more dedicated do you have in mind?
>
> Nah mostly just curious. It just feels so weird when VP8 intra already
> exists. Maybe I'm missing something. Browsers already support VP8 after
> all.
>

We wanted something lighter weight (memory, cpu) for an image format
rather than going full blown video. Lossless also factored into this.

> > The logic as-is works with all samples I have, animated and not.
> > Seems to also align well with their example file layouts.
> > You have a more weird one?
>
> Nope
___
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 3/7] avcodec/webp_parser: parse each frame into one packet

2023-07-26 Thread Tomas Härdin
tis 2023-07-25 klockan 16:18 +0200 skrev Thilo Borgmann:
> Am 25.07.23 um 14:24 schrieb Tomas Härdin:
> > > +    // Extremely simplified key frame detection:
> > > +    // - the first frame (containing headers) is marked as a key
> > > frame
> > > +    // - other frames are marked as non-key frames
> > 
> > Is there a more proper way of doing this? 
> 
> All frames (except the ANMF chunks) are INTRA, and all of them have a
> WEBP tag.
> Whereas all ANMF chunks are in the same WEBP chunk as their reference
> frame.
> So it should really be as simple as it is to mark all WEBP frames as
> key frames as the code does.
> What more dedicated do you have in mind?

Nah mostly just curious. It just feels so weird when VP8 intra already
exists. Maybe I'm missing something. Browsers already support VP8 after
all.

> The logic as-is works with all samples I have, animated and not.
> Seems to also align well with their example file layouts.
> You have a more weird one?

Nope

/Tomas
___
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 3/7] avcodec/webp_parser: parse each frame into one packet

2023-07-25 Thread James Zern
On Tue, Jul 25, 2023 at 7:18 AM Thilo Borgmann  wrote:
>
> Am 25.07.23 um 14:24 schrieb Tomas Härdin:
> >> +// Extremely simplified key frame detection:
> >> +// - the first frame (containing headers) is marked as a key
> >> frame
> >> +// - other frames are marked as non-key frames
> >
> > Is there a more proper way of doing this?
>
> All frames (except the ANMF chunks) are INTRA, and all of them have a WEBP 
> tag.
> Whereas all ANMF chunks are in the same WEBP chunk as their reference frame.
> So it should really be as simple as it is to mark all WEBP frames as key 
> frames as the code does.
> What more dedicated do you have in mind?
>
> The logic as-is works with all samples I have, animated and not.
> Seems to also align well with their example file layouts.
> You have a more weird one?
>
>
> > Looking briefly at the spec
> > one wonders why they didn't just use regular VP* inter frames..
>
> I assume the whole canvas idea could be more beneficial than vp8 inter - but 
> otoh I don't know about vp8 compositing capabilities, if any..
>

This was more in alignment with gif and allowed for a simpler
reference structure. WebP also supports lossless and mixing
lossy/lossless so this method makes the behavior consistent between
VP8 and VP8L.
___
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 3/7] avcodec/webp_parser: parse each frame into one packet

2023-07-25 Thread Thilo Borgmann

Am 25.07.23 um 14:24 schrieb Tomas Härdin:

+    // Extremely simplified key frame detection:
+    // - the first frame (containing headers) is marked as a key
frame
+    // - other frames are marked as non-key frames


Is there a more proper way of doing this? 


All frames (except the ANMF chunks) are INTRA, and all of them have a WEBP tag.
Whereas all ANMF chunks are in the same WEBP chunk as their reference frame.
So it should really be as simple as it is to mark all WEBP frames as key frames 
as the code does.
What more dedicated do you have in mind?

The logic as-is works with all samples I have, animated and not.
Seems to also align well with their example file layouts.
You have a more weird one?



Looking briefly at the spec
one wonders why they didn't just use regular VP* inter frames..


I assume the whole canvas idea could be more beneficial than vp8 inter - but 
otoh I don't know about vp8 compositing capabilities, if any..

-Thilo

___
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 3/7] avcodec/webp_parser: parse each frame into one packet

2023-07-25 Thread Tomas Härdin
> +    // Extremely simplified key frame detection:
> +    // - the first frame (containing headers) is marked as a key
> frame
> +    // - other frames are marked as non-key frames

Is there a more proper way of doing this? Looking briefly at the spec
one wonders why they didn't just use regular VP* inter frames..

/Tomas
___
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".