[FFmpeg-devel] [PATCH 5/7] avformat/mpegts: add s337m support

Michael Niedermayer michael at niedermayer.cc
Mon Dec 9 05:55:15 EET 2024


On Wed, Dec 04, 2024 at 03:14:07PM +0100, ffnicolasg at sfr.fr wrote:
> From: Nicolas Gaullier <nicolas.gaullier at cji.paris>
> 
> Move s302m decoder from avcodec to avformat.
> Set AVSTREAM_PARSE_FULL for s337m support.
> 
> Signed-off-by: Nicolas Gaullier <nicolas.gaullier at cji.paris>
> ---
>  libavformat/mpegts.c  | 138 +++++++++++++++++++++++++++++++++++++++++-
>  tests/fate/acodec.mak |   3 +-
>  2 files changed, 139 insertions(+), 2 deletions(-)
> 
> diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
> index 177e610e53..fd649751fc 100644
> --- a/libavformat/mpegts.c
> +++ b/libavformat/mpegts.c
> @@ -31,6 +31,7 @@
>  #include "libavutil/opt.h"
>  #include "libavutil/avassert.h"
>  #include "libavutil/dovi_meta.h"
> +#include "libavutil/reverse.h"
>  #include "libavcodec/bytestream.h"
>  #include "libavcodec/defs.h"
>  #include "libavcodec/get_bits.h"
[...]
> +static int s302m_demux(AVCodecParameters *par, AVPacket *pkt)
> +{
> +    int ret = av_packet_make_writable(pkt);
> +    if (ret < 0)
> +        return ret;
> +    pkt->data += AES3_HEADER_LEN;
> +    av_shrink_packet(pkt, pkt->size - AES3_HEADER_LEN);
> +
> +    if (par->bits_per_raw_sample == 24) {
> +        uint8_t *buf = pkt->data;
> +        uint8_t *buf_out = buf;
> +        for (; buf + 6 < pkt->data + pkt->size; buf+=7, buf_out+=6)
> +            AV_WL48(buf_out,
> +                ((uint64_t)ff_reverse[buf[2]] << 16) |
> +                ((uint64_t)ff_reverse[buf[1]] <<  8) |
> +                ((uint64_t)ff_reverse[buf[0]])       |
> +                ((uint64_t)ff_reverse[buf[6] & 0xf0] << 44) |
> +                ((uint64_t)ff_reverse[buf[5]]        << 36) |
> +                ((uint64_t)ff_reverse[buf[4]]        << 28) |
> +                ((uint64_t)ff_reverse[buf[3] & 0x0f] << 20));
> +        av_shrink_packet(pkt, buf_out - pkt->data);

/usr/bin/ld: libavformat/libavformat.so: undefined reference to `ff_reverse'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:142: ffprobe_g] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/ld: libavformat/libavformat.so: undefined reference to `ff_reverse'
/usr/bin/ld: libavformat/libavformat.so: undefined reference to `ff_reverse'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:142: ffplay_g] Error 1
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:142: ffmpeg_g] Error 1

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241209/bf6c228b/attachment.sig>


More information about the ffmpeg-devel mailing list