VideoHelp Forum

+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member
    Join Date
    May 2023
    Location
    Calne, Wilts, UK
    Search Comp PM
    Hi I have written a GUI to help in the process of making DCP's I use openjpeg the jpeg2000 encoder to generate J2C frames. i have previously been using the 1.3 version of openjpeg from 2007, Iím switching to the lates version 2.5 as it appears to offer a 25% increase in encoding speed which is quite significant. However when i use it i get the following error i have included the command line to operate it:-

    D:\dennervision\opj\bin>opj_compress -cinema2K 24 -i d:\tif\a00001.tif -o d:\j2c\a00001.j2c -OutFor j2c
    CINEMA 2K profile activated
    Other options specified could be overridden

    [WARNING] The desired maximum codestream size has limited
    at least one of the desired quality layers
    [INFO] tile number 1 / 1
    [INFO] Generated outfile d:\j2c\a00001.j2c
    encode time: 1847 ms

    D:\dennervision\opj\bin>

    Does anyone know if this is an important error, and if so how do i fix it.
    Quote Quote  
  2. Looking at https://github.com/uclouvain/openjpeg/blob/master/src/lib/openjp2/j2k.c#L7829 it seems like you are violating some restriction profile restictions.
    cinema2K only allows 24 and 48 fps, but also is limited by the allowed resolution.
    see: https://github.com/uclouvain/openjpeg/blob/master/src/bin/jp2/opj_compress.c#L197
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  3. Member
    Join Date
    May 2023
    Location
    Calne, Wilts, UK
    Search Comp PM
    Hi Selur,

    My program re-sizes any in coming image size to fit onto a 2048x1080 container which is the size of the DMD on a 2K cinema projector, i also tried resizing it to a standard flat frame size of 1998x1080 made no difference to the error message. The frame rate defines the compression ratio thus lowering the bit rate for the higher frame rate (3D standard). So the jpeg 2000 decoder in the server doesn't get over loaded with too high bit rate, leading to projection artifacts.

    Also the 1.3 version of open jpeg ran ok without error messages using cinema2K 24 profile.
    Quote Quote  
  4. What is the calculation precision of those tiffs?
    looking at:
    Code:
            OPJ_FLOAT32 temp_rate;
            OPJ_BOOL cap = OPJ_FALSE;
    
            if (OPJ_IS_IMF(parameters->rsiz) && parameters->max_cs_size > 0 &&
                    parameters->tcp_numlayers == 1 && parameters->tcp_rates[0] == 0) {
                parameters->tcp_rates[0] = (OPJ_FLOAT32)(image->numcomps * image->comps[0].w *
                                           image->comps[0].h * image->comps[0].prec) /
                                           (OPJ_FLOAT32)(((OPJ_UINT32)parameters->max_cs_size) * 8 * image->comps[0].dx *
                                                   image->comps[0].dy);
            }
    
            temp_rate = (OPJ_FLOAT32)(((double)image->numcomps * image->comps[0].w *
                                       image->comps[0].h * image->comps[0].prec) /
                                      (((double)parameters->max_cs_size) * 8 * image->comps[0].dx *
                                       image->comps[0].dy));
            for (i = 0; i < (OPJ_UINT32) parameters->tcp_numlayers; i++) {
                if (parameters->tcp_rates[i] < temp_rate) {
                    parameters->tcp_rates[i] = temp_rate;
                    cap = OPJ_TRUE;
                }
            }
            if (cap) {
                opj_event_msg(p_manager, EVT_WARNING,
                              "The desired maximum codestream size has limited\n"
                              "at least one of the desired quality layers\n");
            }
        }}
    source: https://github.com/uclouvain/openjpeg/blob/master/src/lib/openjp2/j2k.c#L7829
    it seems like they caclulate a limit for all layers (temp_rate) and then check whether, for each layer of the input, whether one of the layers is less than the limit.
    In case it is, the above 'warning' is shown.

    What confuses me is that the warning is only shown when the layer is below the limit and not above.
    -> could be bug, since I assume that this error should be shown if a layer is above the limit not below.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  5. Member
    Join Date
    May 2023
    Location
    Calne, Wilts, UK
    Search Comp PM
    Hi Selur,

    The incoming tif's are created using imagemagick they are using 12 bit colour rather than the usual 8bits per colour. When i resized a tiff as an experiment i used paintshop pro which also reduced the colour to 8bit. When openjpeg imported the tiff it converted the colour back to 12bit to comply with the dci standard, but produced the usual error message about degraded layer.

    So, you think this may be nothing more than a bug in error reporting, and really nothing is wrong? I'll try processing a highly complex image in RGB colour space and examine it closely on a hi rez monitor and see if i can faint any encoding artifacts, and if it looks ok start using it. Would be nice to get to the bottom of this, i also fired off an email to openjpegs bug reporting forum, but not head from any one, from the age of the posts it doesn't look like thereís much activity on that site. Thank you for your help on this.
    Quote Quote  
  6. So, you think this may be nothing more than a bug in error reporting, and really nothing is wrong?
    That's what it looks like to me.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  



Similar Threads