[FFmpeg-devel] [PATCH] lavfi/overlay: yuv444p & yuva444p support
Paul B Mahol
onemda at gmail.com
Sun Feb 17 20:12:58 CET 2013
On 2/15/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Monday 2013-02-11 17:17:47 +0000, Paul B Mahol encoded:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>>
>
>> ffplay output is broken, because it inserts yuv420p conversion
>> somewhere in middle of chain.
>
> Mentioning an ffplay bug in an overlay commit is a bit weird.
>
> And yes ffplay seems broken with images containing alpha, e.g.:
> ffplay http://ffmpeg.org/ffmpeg-logo.png
You sure this is ffplay issue and not png decoder/libswscale one?
>
>>
>> ---
>> libavfilter/vf_overlay.c | 14 +++++++++++---
>> 1 file changed, 11 insertions(+), 3 deletions(-)
>>
>> diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
>> index d44677f..7c615b4 100644
>> --- a/libavfilter/vf_overlay.c
>> +++ b/libavfilter/vf_overlay.c
>> @@ -134,8 +134,15 @@ static int query_formats(AVFilterContext *ctx)
>> OverlayContext *over = ctx->priv;
>>
>> /* overlay formats contains alpha, for avoiding conversion with alpha
>> information loss */
>> - static const enum AVPixelFormat main_pix_fmts_yuv[] = {
>> AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE };
>> - static const enum AVPixelFormat overlay_pix_fmts_yuv[] = {
>> AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE };
>> + static const enum AVPixelFormat main_pix_fmts_yuv[] = {
>> + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVA420P,
>> + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVA444P,
>> + AV_PIX_FMT_NONE
>> + };
>> + static const enum AVPixelFormat overlay_pix_fmts_yuv[] = {
>> + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA444P,
>> + AV_PIX_FMT_NONE
>> + };
>> static const enum AVPixelFormat main_pix_fmts_rgb[] = {
>> AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA,
>> AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA,
>> @@ -167,7 +174,8 @@ static int query_formats(AVFilterContext *ctx)
>> }
>>
>> static const enum AVPixelFormat alpha_pix_fmts[] = {
>> - AV_PIX_FMT_YUVA420P, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR,
>> AV_PIX_FMT_RGBA,
>> + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA444P,
>> + AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, AV_PIX_FMT_RGBA,
>> AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE
>> };
>
> LGTM if tested, thanks.
>
> Note: an overlay test would be nice at some point.
> --
> FFmpeg = Formidable and Foolish Meaningful Purposeless Ecstatic Gymnast
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list