Should sws_getCachedContext have parameters for srcRange and dstRange? Does handle_jpeg return the correct range values?
|Reported by:||mantler||Owned by:|
|Cc:||mantler, firstname.lastname@example.org||Blocked By:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
sws_getCachedContext calls sws_init_context, which calls handle_jpeg and prints out the warning "deprecated pixel format used, make sure you did set range correctly" if either the srcFormat or dstFormat are one of the YUVJ pixel formats. However, not using a YUVJ format means that the appropriate change to the range doesn't happen if we use the corresponding YUV format but want the range for YUVJ. Adding srcRange and dstRange as parameters to sws_getCachedContext would allow us to avoid the deprecation warning message.
On a related note, in handle_jpeg, are the returned range values for the YUVJ formats correct? Currently it's returning 1 (which is AVCOL_RANGE_MPEG), I'm wondering if it should be AVCOL_RANGE_JPEG?