From: Paul B Mahol <onemda@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] avformat/avcodec: Add DTS-UHD demuxer and parser, movenc support.
Date: Wed, 14 Jun 2023 07:37:09 +0200
Message-ID: <CAPYw7P4D1RMvaC-7gWKbq-qh826CZz8e4z9g9dFVfaAf-mDSqQ@mail.gmail.com> (raw)
In-Reply-To: <350070db-4c19-f733-63b1-bcc460852c24@funderburk.us>
On Wed, Jun 14, 2023 at 2:00 AM Roy Funderburk <royffmpeg@funderburk.us>
wrote:
>
> On 6/13/23 11:35 AM, Paul B Mahol wrote:
> > Doing allocation in probe?
> > Probing should be very fast.
>
> In line 143 of the avformat patch, memory allocation is removed from the
> probe
>
> >>+int dtsuhd_frame(DTSUHD *h, const uint8_t *data, size_t data_bytes,
> >>+ DTSUHDFrameInfo *fi, DTSUHDDescriptorInfo *di)
> >>+{
> >>+ gb = &h->gb;
> >>+ init_get_bits(gb, data, data_bytes * 8);
> > init_get_bits8, and check return code.
>
> In line 986 of the avcodec patch, changed to using init_get_bits8 and
> added return code check.
>
> >>+ fi->sync = h->is_sync_frame;
> >>+ fi->frame_bytes = h->frame_bytes;
> >>+ fi->sample_rate = h->sample_rate;
> >>+ fi->sample_count = (h->frame_duration * fi->sample_rate)
> /(h->clock_rate * fraction);
> >>+ fi->duration = (double)fi->sample_count / fi->sample_rate;
> >Please no double type.
> >Also make use of av_rescale.
>
> Around line 1108 of the avcodec patch, I found the duration was not needed
> and removed it.
>
>
> On 6/13/23 12:04 PM, Anton Khirnov wrote:
> > Also do note that sharing structs across libraries opens you to various
> > compatibility questions [2]. It might be easier to sidestep them by
> > having a function in libavcodec that accepts AVCodecParameters and fills
> > them according to the data, rather than pass codec-specific structs
> > between libavformat and libavcodec.
>
> In line 1061 of the avcodec patch, changed the function to:
> int av_dtsuhd_frame(DTSUHD *h, const uint8_t *data, size_t data_bytes,
> AVCodecParameters *codecpar, uint8_t **udts, int *udts_size)
>
>
>
Usually libavcodec code does use get_vlc2() for variable length codes,
instead of
usage of show_bits/skip_bits/get_bits.
>
> Thank you for reviewing this,
> -Roy_______________________________________________
> 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".
>
_______________________________________________
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-06-14 5:37 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 15:39 Roy Funderburk
2023-04-14 16:40 ` Hendrik Leppkes
2023-04-14 16:48 ` Roy Funderburk
2023-04-15 14:56 ` Michael Niedermayer
2023-04-15 20:04 ` [FFmpeg-devel] [PATCH v2] " Roy Funderburk
2023-04-16 19:55 ` Michael Niedermayer
2023-04-16 21:52 ` Roy Funderburk
2023-04-17 4:12 ` [FFmpeg-devel] [PATCH v3 1/2] " Roy Funderburk
2023-05-08 17:49 ` Roy Funderburk
2023-05-13 7:28 ` Paul B Mahol
2023-05-15 14:50 ` Roy Funderburk
2023-05-15 20:35 ` Michael Niedermayer
2023-05-15 21:14 ` Roy Funderburk
2023-06-13 14:26 ` Paul B Mahol
2023-06-13 17:43 ` Roy Funderburk
2023-06-13 18:09 ` Paul B Mahol
2023-06-13 18:20 ` Roy Funderburk
2023-06-13 19:04 ` Anton Khirnov
2023-04-17 4:13 ` [FFmpeg-devel] [PATCH v3 2/2] " Roy Funderburk
2023-06-13 18:32 ` Paul B Mahol
2023-04-15 20:20 ` [FFmpeg-devel] [PATCH] " Roy Funderburk
2023-06-13 18:35 ` Paul B Mahol
2023-06-14 0:00 ` Roy Funderburk
2023-06-14 5:37 ` Paul B Mahol [this message]
2023-06-14 6:01 ` Paul B Mahol
2023-06-14 6:06 ` Paul B Mahol
2023-06-14 6:11 ` Paul B Mahol
2023-06-14 18:24 ` Roy Funderburk
2023-06-14 20:01 ` Roy Funderburk
2023-06-15 15:46 ` Paul B Mahol
2023-06-15 18:44 ` Roy Funderburk
2023-06-18 12:18 ` Paul B Mahol
2023-06-20 17:05 ` Roy Funderburk
2023-08-17 21:47 ` Roy Funderburk
2023-08-17 22:31 ` Paul B Mahol
2023-08-17 22:51 ` Roy Funderburk
2024-01-16 21:02 ` Roy Funderburk
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=CAPYw7P4D1RMvaC-7gWKbq-qh826CZz8e4z9g9dFVfaAf-mDSqQ@mail.gmail.com \
--to=onemda@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