[FFmpeg-devel] [PATCH] swscale: implement YA8 output

Paul B Mahol onemda at gmail.com
Thu Jul 2 23:16:48 CEST 2015


On 7/2/15, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Jul 01, 2015 at 07:41:33PM +0000, Paul B Mahol wrote:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>>
>> Are _1_c and _2_c actually needed?
>
> I think they are not needed (they are just optimizations), you can
> try by just scalig horizontally and bilinearly upscaling if it works
> either way patch LGTM

There is off by one somewhere in alpha scaling. How to reproduce:

ffmpeg -f lavfi -i smptehdbars -f lavfi -i smptehdbars -lavfi
alphamerge -c:v rawvideo -frames 1 yuva420p.nut
ffmpeg -i yuva420p.nut -vf format=ya8 ya8.png

ffmpeg -i ya8.png -vf extractplanes=a aya8.yuv
ffmpeg -i yuva420p.nut -vf extractplanes=a ayuva420p.yuv

Above two should be same, but they are not.

Compare last two yuvs with hex editor like dhex:

dhex aya8.yuv ayuva420p.yuv

I will push patch anyway as this seems to be unrelated to ya8 output.


More information about the ffmpeg-devel mailing list