Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-31 Thread Paul B Mahol
Gonna push soon. ___ 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] OSQ lossless audio format support

2023-08-29 Thread Andreas Rheinhardt
Paul B Mahol: > +st->codecpar->sample_rate = AV_RL32(st->codecpar->extradata + 4); > +if (st->codecpar->sample_rate <= 0) > +return AVERROR_INVALIDDATA; > +av_channel_layout_uninit(&st->codecpar->ch_layout); Unnecessary: This channel layout belongs to an AVCodecParameters from

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-29 Thread Paul B Mahol
Now with always bitexact output and other improvements and fixes. From 208265707d57dbc14fec886629307c239f01090b Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 27 Jun 2023 19:51:54 +0200 Subject: [PATCH 2/2] avformat: add OSQ demuxer Signed-off-by: Paul B Mahol --- libavformat/Makefile

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-25 Thread Paul B Mahol
On Fri, Aug 25, 2023 at 6:42 PM James Almer wrote: > On 8/25/2023 1:28 PM, Paul B Mahol wrote: > > On Fri, Aug 25, 2023 at 5:57 PM James Almer wrote: > > > >> On 8/24/2023 7:06 PM, Paul B Mahol wrote: > >>> On Thu, Aug 24, 2023 at 11:51 PM James Almer > wrote: > >>> > On 8/24/2023 6:11 PM,

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-25 Thread James Almer
On 8/25/2023 1:28 PM, Paul B Mahol wrote: On Fri, Aug 25, 2023 at 5:57 PM James Almer wrote: On 8/24/2023 7:06 PM, Paul B Mahol wrote: On Thu, Aug 24, 2023 at 11:51 PM James Almer wrote: On 8/24/2023 6:11 PM, Paul B Mahol wrote: On Thu, Aug 24, 2023 at 11:00 PM James Almer wrote: On

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-25 Thread Paul B Mahol
On Fri, Aug 25, 2023 at 5:57 PM James Almer wrote: > On 8/24/2023 7:06 PM, Paul B Mahol wrote: > > On Thu, Aug 24, 2023 at 11:51 PM James Almer wrote: > > > >> On 8/24/2023 6:11 PM, Paul B Mahol wrote: > >>> On Thu, Aug 24, 2023 at 11:00 PM James Almer > wrote: > >>> > On 8/24/2023 6:52 AM

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-25 Thread James Almer
On 8/24/2023 7:06 PM, Paul B Mahol wrote: On Thu, Aug 24, 2023 at 11:51 PM James Almer wrote: On 8/24/2023 6:11 PM, Paul B Mahol wrote: On Thu, Aug 24, 2023 at 11:00 PM James Almer wrote: On 8/24/2023 6:52 AM, Paul B Mahol wrote: +static int osq_receive_frame(AVCodecContext *avctx, AVFram

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread Paul B Mahol
On Thu, Aug 24, 2023 at 11:51 PM James Almer wrote: > On 8/24/2023 6:11 PM, Paul B Mahol wrote: > > On Thu, Aug 24, 2023 at 11:00 PM James Almer wrote: > > > >> On 8/24/2023 6:52 AM, Paul B Mahol wrote: > >>> +static int osq_receive_frame(AVCodecContext *avctx, AVFrame *frame) > >>> +{ > >>> +

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread James Almer
On 8/24/2023 6:11 PM, Paul B Mahol wrote: On Thu, Aug 24, 2023 at 11:00 PM James Almer wrote: On 8/24/2023 6:52 AM, Paul B Mahol wrote: +static int osq_receive_frame(AVCodecContext *avctx, AVFrame *frame) +{ +OSQContext *s = avctx->priv_data; +GetBitContext *gb = &s->gb; +int ret,

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread Paul B Mahol
On Thu, Aug 24, 2023 at 11:00 PM James Almer wrote: > On 8/24/2023 6:52 AM, Paul B Mahol wrote: > > +static int osq_receive_frame(AVCodecContext *avctx, AVFrame *frame) > > +{ > > +OSQContext *s = avctx->priv_data; > > +GetBitContext *gb = &s->gb; > > +int ret, n; > > + > > +while

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread James Almer
On 8/24/2023 6:52 AM, Paul B Mahol wrote: +static int osq_receive_frame(AVCodecContext *avctx, AVFrame *frame) +{ +OSQContext *s = avctx->priv_data; +GetBitContext *gb = &s->gb; +int ret, n; + +while (s->bitstream_size < s->max_framesize) { +int size; + +if (!s->pk

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread Paul B Mahol
On Thu, Aug 24, 2023 at 9:54 PM James Almer wrote: > On 8/24/2023 6:52 AM, Paul B Mahol wrote: > > Patches attached. > > > > Stereo decoding have some issues with some predictors so not yet > bitexact. > > > > Please comment. > > > +static av_cold int osq_close(AVCodecContext *avctx) > > +{ > > +

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread Andreas Rheinhardt
James Almer: > On 8/24/2023 6:52 AM, Paul B Mahol wrote: >> Patches attached. >> >> Stereo decoding have some issues with some predictors so not yet >> bitexact. >> >> Please comment. > >> +static av_cold int osq_close(AVCodecContext *avctx) >> +{ >> +    OSQContext *s = avctx->priv_data; >> + >>

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread James Almer
On 8/24/2023 6:52 AM, Paul B Mahol wrote: Patches attached. Stereo decoding have some issues with some predictors so not yet bitexact. Please comment. +static av_cold int osq_close(AVCodecContext *avctx) +{ +OSQContext *s = avctx->priv_data; + +av_freep(&s->bitstream); +s->bitstr

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread Paul B Mahol
On Thu, Aug 24, 2023 at 8:06 PM Michael Niedermayer wrote: > On Thu, Aug 24, 2023 at 11:52:45AM +0200, Paul B Mahol wrote: > > Patches attached. > > > > Stereo decoding have some issues with some predictors so not yet > bitexact. > > > > Please comment. > > > [...] > > diff --git a/libavformat/os

Re: [FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread Michael Niedermayer
On Thu, Aug 24, 2023 at 11:52:45AM +0200, Paul B Mahol wrote: > Patches attached. > > Stereo decoding have some issues with some predictors so not yet bitexact. > > Please comment. [...] > diff --git a/libavformat/osq.c b/libavformat/osq.c > new file mode 100644 > index 00..36ce25313f >

[FFmpeg-devel] [PATCH] OSQ lossless audio format support

2023-08-24 Thread Paul B Mahol
Patches attached. Stereo decoding have some issues with some predictors so not yet bitexact. Please comment. From a90b4fbd4178d4ef434e1255ed20dddebde0ddb8 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 27 Jun 2023 19:51:54 +0200 Subject: [PATCH 2/2] avformat: add OSQ demuxer Signed-off-