• Niklas Haas's avatar
    avcodec/mjpegenc: support writing ICC profiles · e254af31
    Niklas Haas authored
    This is mostly straightforward. The major complication is that, as a
    result of the 16-bit chunk size limitation, ICC profiles may need to be
    split up into multiple chunks.
    
    We also need to make sure to allocate enough extra space in the packet
    to fit the ICC profile, so modify both mpegvideo_enc.c and ljpegenc.c to
    take into account this extra overhead, failing cleanly if necessary.
    
    Also add a FATE transcode test to ensure that the ICC profile gets
    written (and read) correctly. Note that this ICC profile is smaller than
    64 kB, so this doesn't test the APP2 chunk re-arranging code at all.
    Signed-off-by: 's avatarNiklas Haas <git@haasn.dev>
    e254af31
mjpegenc_common.c 16.5 KB