Re: [FFmpeg-devel] [PATCH 1/2] lavc/internal: add skip_samples2 field

2023-10-19 Thread Anton Khirnov
Quoting Lynne (2023-10-19 14:49:46)
> Oct 19, 2023, 10:39 by an...@khirnov.net:
> 
> > Current interaction between AV_FRAME_DATA_SKIP_SAMPLES and
> > AVCodecContext.skip_samples seems unncecessarily complicated to me and
> > you're just making it worse.
> >
> > Is there any reason we can't drop AVCodecContext.skip_samples entirely
> > and signal it purely through side data? Then decoders could fully
> > control everything they wish by modifying side data on output frames.
> >
> 
> You mean let the decoder parse skip samples side data,
> strip it from the packet, and attach a new side data to the frame?

Not from the packet - that should be const for decoders. The generic
code currently translates AV_PKT_DATA_SKIP_SAMPLES from the packet to
the frame in ff_get_buffer(). The decoder can then override that in the
frame.

-- 
Anton Khirnov
___
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 1/2] lavc/internal: add skip_samples2 field

2023-10-19 Thread James Almer

On 10/19/2023 5:39 AM, Anton Khirnov wrote:

Current interaction between AV_FRAME_DATA_SKIP_SAMPLES and
AVCodecContext.skip_samples seems unncecessarily complicated to me and
you're just making it worse.

Is there any reason we can't drop AVCodecContext.skip_samples entirely
and signal it purely through side data? Then decoders could fully
control everything they wish by modifying side data on output frames.


Given that now coded_side_data is fully implemented for decoding and 
encoding, including getting elements from the container, it's probably a 
good idea to do that.

___
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 1/2] lavc/internal: add skip_samples2 field

2023-10-19 Thread Lynne
Oct 19, 2023, 10:39 by an...@khirnov.net:

> Current interaction between AV_FRAME_DATA_SKIP_SAMPLES and
> AVCodecContext.skip_samples seems unncecessarily complicated to me and
> you're just making it worse.
>
> Is there any reason we can't drop AVCodecContext.skip_samples entirely
> and signal it purely through side data? Then decoders could fully
> control everything they wish by modifying side data on output frames.
>

You mean let the decoder parse skip samples side data,
strip it from the packet, and attach a new side data to the frame?
___
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 1/2] lavc/internal: add skip_samples2 field

2023-10-19 Thread Anton Khirnov
Current interaction between AV_FRAME_DATA_SKIP_SAMPLES and
AVCodecContext.skip_samples seems unncecessarily complicated to me and
you're just making it worse.

Is there any reason we can't drop AVCodecContext.skip_samples entirely
and signal it purely through side data? Then decoders could fully
control everything they wish by modifying side data on output frames.

-- 
Anton Khirnov
___
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".