[FFmpeg-devel] [PATCH] lavf: Add DICOM demuxer, lavc: Add DICOM decoder

Moritz Barsnick barsnick at gmx.net
Wed Aug 21 22:21:28 EEST 2019


On Thu, Aug 22, 2019 at 00:28:28 +0530, Shivam wrote:
> >> + dicom->height = *(uint16_t *)bytes;
> > does this work on big endian ?
> > maybe you where looking for AV_RL16()
>
> Big endian DICOM files are retired and no longer supported by the standard.

What Michael means: What happens if you use this to decode a (little
endian) DICOM file on big endian hardware?

In other words: "dicom->height = *(uint16_t *)bytes" will map the bytes
into the big endian int in the wrong order, resulting in an incorrect
integer value. AV_RL16() (e.g.) handles this properly for you.

@Michael, do you have some short instructions on how to set up a big
endian system like your MIPS+qemu? Thanks.

Moritz


More information about the ffmpeg-devel mailing list