[FFmpeg-devel] [PATCH] MXF - Add jpeg2000 subdescriptor - Sponsored by INA

Cédric Le Barz clebarz at ektacom.com
Tue May 2 18:43:02 EEST 2023


Le 27/04/2023 à 14:45, Tomas Hardin a écrit :
>>   static inline uint16_t rescale_mastering_chroma(AVRational q)
>>   {
>> @@ -1260,7 +1305,6 @@ static int64_t
>> mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID
>>           f1 *= 2;
>>       }
>>   
>> -
> Stray deleted line
>
>> +    /* Image components number */
>> +    mxf_write_local_tag(s, 2, 0x840A);
>> +    avio_wb16(pb, component_count);
>> +   /* Array of picture components where each component comprises 3
> Looks like you missed a space there (:
>
>> +    /* Extract usefull size infromation from the SIZ marker */
>> +    if (bytestream2_get_be16u(&g) != JPEG2000_SIZ) {
>> +        av_log(s, AV_LOG_ERROR, "SIZ marker not present\n");
>> +        return 0;
>> +    }
>> +    bytestream2_skip(&g, 2); // Skip Lsiz
>> +    sc->j2k_cap = bytestream2_get_be16u(&g);
>> +    sc->j2k_xsiz = bytestream2_get_be32u(&g);
>> +    sc->j2k_ysiz = bytestream2_get_be32u(&g);
>> +    sc->j2k_x0siz = bytestream2_get_be32u(&g);
>> +    sc->j2k_y0siz = bytestream2_get_be32u(&g);
>> +    sc->j2k_xtsiz = bytestream2_get_be32u(&g);
>> +    sc->j2k_ytsiz = bytestream2_get_be32u(&g);
>> +    sc->j2k_xt0siz = bytestream2_get_be32u(&g);
>> +    sc->j2k_yt0siz = bytestream2_get_be32u(&g);
>> +    j2k_ncomponents = bytestream2_get_be16u(&g);
>> +    if (j2k_ncomponents != component_count) {
>> +        av_log(s, AV_LOG_WARNING, "Incoherence about components
>> image number.\n");
> Erroring out here seems more appropriate.
>
> /Tomas
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".

I've attached to this mail the new patch taking into account the 3 
remarks above.

Regards

Cédric
-------------- next part --------------
An embedded message was scrubbed...
From: Cedric Le Barz <clebarz at ektacom.com>
Subject: [PATCH] Add jpeg2000 subdescriptor.
Date: Wed, 5 Apr 2023 11:59:18 +0200
Size: 13905
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230502/e4662f15/attachment.eml>


More information about the ffmpeg-devel mailing list