Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-04 Thread Michael Niedermayer
On Wed, Mar 04, 2015 at 05:07:17PM +0200, Vilius Grigaliūnas wrote: > On Wed, Mar 4, 2015 at 4:48 PM, Michael Niedermayer wrote: > > i did not mean to suggest to leave libopenjpeg broken. > > It is not technically broken, it just relies on guessing in some cases > which might not always be correc

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-04 Thread Vilius Grigaliūnas
On Wed, Mar 4, 2015 at 4:48 PM, Michael Niedermayer wrote: > i did not mean to suggest to leave libopenjpeg broken. It is not technically broken, it just relies on guessing in some cases which might not always be correct. It think there should be a warning that this is happening and a way to over

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-04 Thread Michael Niedermayer
On Wed, Mar 04, 2015 at 04:10:39PM +0200, Vilius Grigaliūnas wrote: > On Wed, Mar 4, 2015 at 10:08 AM, Vilius Grigaliūnas > wrote: > > On Wed, Mar 4, 2015 at 1:03 AM, Michael Niedermayer > > wrote: > >> this detects codestreams_profile0/p0_08.j2k as xyz, is this intended? > > > > No, this seems

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-04 Thread Vilius Grigaliūnas
On Wed, Mar 4, 2015 at 10:08 AM, Vilius Grigaliūnas wrote: > On Wed, Mar 4, 2015 at 1:03 AM, Michael Niedermayer wrote: >> this detects codestreams_profile0/p0_08.j2k as xyz, is this intended? > > No, this seems to be a regression. At the moment there is not enough > information in openjpeg data

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-04 Thread Michael Niedermayer
On Wed, Mar 04, 2015 at 10:08:56AM +0200, Vilius Grigaliūnas wrote: > On Wed, Mar 4, 2015 at 1:03 AM, Michael Niedermayer wrote: > > this detects codestreams_profile0/p0_08.j2k as xyz, is this intended? > > No, this seems to be a regression. At the moment there is not enough > information in open

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-04 Thread Vilius Grigaliūnas
On Wed, Mar 4, 2015 at 1:03 AM, Michael Niedermayer wrote: > this detects codestreams_profile0/p0_08.j2k as xyz, is this intended? No, this seems to be a regression. At the moment there is not enough information in openjpeg data structures (opj_image_t specifically) to reliably determine whether

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Michael Niedermayer
On Tue, Mar 03, 2015 at 10:19:48AM +0200, Vilius Grigaliūnas wrote: > Input files in XYZ color space are incorrecly detected as RGB which results > in incorrect output colors. > > This fixes pixel format detection order (in increasing bit depth to > match libopenjpeg_matches_pix_fmt) when color sp

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Vilius Grigaliūnas
On Tue, Mar 3, 2015 at 9:49 PM, Michael Bradshaw wrote: > That seems like the least intrusive fix, and the logic looks right to me. I > don't know if 8-bit per component XYZ will ever be supported in ffmpeg, but > if so then deciding between rgb24 and xyz8 will need a different method. The > mixin

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Michael Bradshaw
On Tue, Mar 3, 2015 at 1:19 AM, Vilius Grigaliūnas < vilius.grigaliu...@gmail.com> wrote: > Input files in XYZ color space are incorrecly detected as RGB which results > in incorrect output colors. > > This fixes pixel format detection order (in increasing bit depth to > match libopenjpeg_matches_

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Michael Bradshaw
On Tue, Mar 3, 2015 at 3:04 AM, Vilius Grigaliūnas < vilius.grigaliu...@gmail.com> wrote: > On Tue, Mar 3, 2015 at 11:40 AM, Carl Eugen Hoyos > wrote: > > Doesn't this break rgb48 images? > > No, it does not break rgb48. They are not affected by this change. Due > to the way libopenjpeg_matches_p

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Vilius Grigaliūnas
On Tue, Mar 3, 2015 at 2:05 PM, Carl Eugen Hoyos wrote: > Why don't you just move XYZ_PIXEL_FORMATS in front > of the list? Then the rgb24/rgba would not be detected correctly. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mail

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Carl Eugen Hoyos
Vilius Grigaliūnas gmail.com> writes: > static const enum AVPixelFormat libopenjpeg_all_pix_fmts[] = { > -RGB_PIXEL_FORMATS, GRAY_PIXEL_FORMATS, > YUV_PIXEL_FORMATS, XYZ_PIXEL_FORMATS > +AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, XYZ_PIXEL_FORMATS, > AV_PIX_FMT_RGB48, AV_PIX_FMT_RGBA64, > GRA

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Vilius Grigaliūnas
On Tue, Mar 3, 2015 at 11:40 AM, Carl Eugen Hoyos wrote: > Doesn't this break rgb48 images? No, it does not break rgb48. They are not affected by this change. Due to the way libopenjpeg_matches_pix_fmt is implemented, rgb48 can match xyz12, but xyz12 can not match rgb48. So the order of formats m

Re: [FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Carl Eugen Hoyos
Vilius Grigaliūnas gmail.com> writes: > Input files in XYZ color space are incorrecly detected > as RGB which results in incorrect output colors. Doesn't this break rgb48 images? Could you explain how I can reproduce your issue? Carl Eugen ___ ffmpe

[FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Vilius Grigaliūnas
Input files in XYZ color space are incorrecly detected as RGB which results in incorrect output colors. This fixes pixel format detection order (in increasing bit depth to match libopenjpeg_matches_pix_fmt) when color space provided by libopenjepg is unknown. --- libavcodec/libopenjpegdec.c |

[FFmpeg-devel] [PATCH 2/2] acvodec/lipopenjpeg: Improve XYZ color space detection

2015-03-03 Thread Vilius Grigaliūnas
Input files in XYZ color space are incorrecly detected as RGB which results in incorrect output colors. This fixes pixel format detection order (in increasing bit depth to match libopenjpeg_matches_pix_fmt) when color space provided by libopenjepg is unknown. --- libavcodec/libopenjpegdec.c |