Hi,

On Tue, Jan 31, 2012 at 5:42 AM, Paul B Mahol <[email protected]> wrote:
> On 1/31/12, Ronald S. Bultje <[email protected]> wrote:
>> On Mon, Jan 30, 2012 at 9:58 AM, Paul B Mahol <[email protected]> wrote:
>>> On 1/30/12, Ronald S. Bultje <[email protected]> wrote:
>>>> On Mon, Jan 30, 2012 at 8:12 AM, Paul B Mahol <[email protected]> wrote:
>>>>> On 1/30/12, Ronald S. Bultje <[email protected]> wrote:
>>>>>> On Mon, Jan 30, 2012 at 5:58 AM, Paul B Mahol <[email protected]> wrote:
>>>>>>>
>>>>>>> Signed-off-by: Paul B Mahol <[email protected]>
>>>>>>> ---
>>>>>>>  libswscale/yuv2rgb.c |    4 ++--
>>>>>>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>>>>>>
>>>>>>> diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
>>>>>>> index 39c8b9c..1927cd5 100644
>>>>>>> --- a/libswscale/yuv2rgb.c
>>>>>>> +++ b/libswscale/yuv2rgb.c
>>>>>>> @@ -529,9 +529,9 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c)
>>>>>>>     case PIX_FMT_RGB48BE:
>>>>>>>     case PIX_FMT_RGB48LE:    return yuv2rgb_c_48;
>>>>>>>     case PIX_FMT_ARGB:
>>>>>>> -    case PIX_FMT_ABGR:       if (CONFIG_SWSCALE_ALPHA && c->srcFormat
>>>>>>> ==
>>>>>>> PIX_FMT_YUVA420P) return yuva2argb_c;
>>>>>>> +    case PIX_FMT_ABGR:       if (CONFIG_SWSCALE_ALPHA &&
>>>>>>> isALPHA(c->srcFormat)) return yuva2argb_c;
>>>>>>>     case PIX_FMT_RGBA:
>>>>>>> -    case PIX_FMT_BGRA:       return (CONFIG_SWSCALE_ALPHA &&
>>>>>>> c->srcFormat
>>>>>>> == PIX_FMT_YUVA420P) ? yuva2rgba_c : yuv2rgb_c_32;
>>>>>>> +    case PIX_FMT_BGRA:       return (CONFIG_SWSCALE_ALPHA &&
>>>>>>> isALPHA(c->srcFormat)) ? yuva2rgba_c : yuv2rgb_c_32;
>>>>>>>     case PIX_FMT_RGB24:      return yuv2rgb_c_24_rgb;
>>>>>>>     case PIX_FMT_BGR24:      return yuv2rgb_c_24_bgr;
>>>>>>>     case PIX_FMT_RGB565:
>>>>>>
>>>>>> That doesn't do anything, see this code in swscale_unscaled.c:
>>>
>>> How that function have anything to do with above code?
>>>
>>> Above code deal with unaccelerated colorspace conversion.
>>>>>>
>>>>>>     /* yuv2bgr */
>>>>>>     if ((srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUV422P
>>>>>> ||
>>>>>>          srcFormat == PIX_FMT_YUVA420P) && isAnyRGB(dstFormat) &&
>>>>>>         !(flags & SWS_ACCURATE_RND) && !(dstH & 1)) {
>>>>>>         c->swScale = ff_yuv2rgb_get_func_ptr(c);
>>
>> Above code calls ff_yuv2rgb_get_func_ptr(), of which the code touched
>> by your patch is a part.
>
> Than what actually handles yuv2rgb in YUVA444 case?

The generic (scaled) case, but it uses simple 1<<14 and 1<<12 scaling
coefficients (that's basically 1.0 in fixed-point). We can add special
unscaled case code for it later also.

Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to