mirror of
https://github.com/mpv-player/mpv
synced 2025-01-14 02:51:26 +00:00
video: fix AV_PIX_FMT_UYYVYY411 allocation
My previous commit added support for this format, but it was still broken, and prevented the allocation code from working. It's unknown whether it's correct now (because this pixfmt is so obscure and useless, there are no known samples around), but who cares.
This commit is contained in:
parent
55f6ba62be
commit
2256a9e42b
@ -1198,11 +1198,10 @@ uyvy422: ctype=uint
|
|||||||
2: p=0 st=4 o=2 sh=0 d=8
|
2: p=0 st=4 o=2 sh=0 d=8
|
||||||
uyyvyy411: [GENERIC] ctype=uint
|
uyyvyy411: [GENERIC] ctype=uint
|
||||||
Basic desc: [yuv][le][be]
|
Basic desc: [yuv][le][be]
|
||||||
planes=1, chroma=2:0 align=0:1
|
planes=1, chroma=2:0 align=4:1
|
||||||
{12/[0:0] }
|
{12/[0:0] }
|
||||||
0: 48bits w=4 {8:8} {0:8} {24:8} {}
|
0: 48bits w=4 {8:8} {0:8} {24:8} {}
|
||||||
extra_luma_offsets=[ 16 32 40]
|
extra_luma_offsets=[ 16 32 40]
|
||||||
[NOALLOC]
|
|
||||||
AVD: name=uyyvyy411 chroma=2:0 flags=0x0
|
AVD: name=uyyvyy411 chroma=2:0 flags=0x0
|
||||||
0: p=0 st=4 o=1 sh=0 d=8
|
0: p=0 st=4 o=1 sh=0 d=8
|
||||||
1: p=0 st=6 o=0 sh=0 d=8
|
1: p=0 st=6 o=0 sh=0 d=8
|
||||||
|
@ -573,7 +573,7 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt)
|
|||||||
desc.align_x = 1 << desc.chroma_xs;
|
desc.align_x = 1 << desc.chroma_xs;
|
||||||
desc.align_y = 1 << desc.chroma_ys;
|
desc.align_y = 1 << desc.chroma_ys;
|
||||||
|
|
||||||
if ((desc.bpp[0] % 8) != 0)
|
if ((desc.bpp[0] * (layout.extra_w + 1) % 8) != 0)
|
||||||
desc.align_x = 8 / desc.bpp[0]; // expect power of 2
|
desc.align_x = 8 / desc.bpp[0]; // expect power of 2
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
|
Loading…
Reference in New Issue
Block a user