On Tue, Feb 28, 2012 at 02:08:23PM -0000, Phil Barrett wrote:
> Hi Kostya
>
> >There are two problems with it. First, it's called simply
> >proresenc.c here, and second, it's not a good idea to mix several
> >things in the patch.
>
> I was just doing what I was advised to do - I made the patch against
> libavcodec, I'm just passing it back here to help. Sorry if that's
> not what you want.
We always welcome the patches but sometimes they're not in the best shape.
> >>1. Fixes chroma block ordering for 4:4:4
> >
> >That one should be tested and maybe we need to fix our decoder as well.
>
> Luma blocks are
>
> A B
> C D
>
> Chroma blocks for 4:4:4 are
>
> A C
> B D
>
> The errors in the current version are clearly visible when encoding
> 444 and viewing in QuickTime.
Okay.
> >>3. Fixes plane_factor calculation for 4:4:4 chroma planes
> >
> >I doubt it, your change does not change anything in behaviour.
> >
> >before:
> > if (chroma)
> > plane_factor += chroma_factor - 3;
> >
> >your change:
> >
> > if (!chroma || chroma_factor == 3){
> > //do nothing
> > }else{
> > plane_factor += chroma_factor - 3;
> > }
> >
> >Result is the same.
>
> Fair enough, but only because CFACTOR_Y444 - 3 == 0 :-)
And it's because it was chosen this way :P
I tried to make sure it encodes into 444 more or less properly (even if with
wrong chroma block order).
> >>4. Adds a "4444" profile (min_quant and max_quant may still be wrong
> >>though, verification welcome)
> >
> >It's kinda pointless without proper pixel format with alpha.
> >Hopefully Ronald can add it.
>
> It is useful because it sets the quant values to 4 throughout, which
> is necessary for the maximum quality required for "444".
Okay
> >>5. Sets the colour primaries, transfer function and matrix from the
> >>context options into the ProRes header
> >
> >Are you sure our enum values correspond to what Apple decoder
> >expects to see there?
>
> Yes, the values in avcodec.h match those in the Apple headers
> exactly. When encoding NTSC, PAL or HD it's necessary to put the
> correct values in there to get correct results in decode.
Nice.
Then I'll try tonight to produce proper patches (that fix decoder counterpart
as well). Thank you for your work.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel