Revision cd840656

View differences:

libavcodec/libopenjpeg.c
89 89
    }
90 90
    opj_set_event_mgr((opj_common_ptr)dec, NULL, NULL);
91 91

  
92
    ctx->dec_params.cp_reduce = avctx->lowres;
92 93
    // Tie decoder with decoding parameters
93 94
    opj_setup_decoder(dec, &ctx->dec_params);
94 95
    stream = opj_cio_open((opj_common_ptr)dec, buf, buf_size);
......
106 107
        opj_destroy_decompress(dec);
107 108
        return -1;
108 109
    }
109
    width  = image->comps[0].w;
110
    height = image->comps[0].h;
110
    width  = image->comps[0].w << avctx->lowres;
111
    height = image->comps[0].h << avctx->lowres;
111 112
    if(avcodec_check_dimensions(avctx, width, height) < 0) {
112 113
        av_log(avctx, AV_LOG_ERROR, "%dx%d dimension invalid.\n", width, height);
113 114
        goto done;

Also available in: Unified diff