lavfi/drawutils: reject shift-packed formats

Disables x2bgr10/x2rgb10 (which did not behave correctly before).
This commit is contained in:
rcombs 2021-12-23 15:12:44 -06:00
parent 186e931f74
commit 5018103fa3
2 changed files with 3 additions and 2 deletions

View File

@ -105,6 +105,9 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags)
return AVERROR(ENOSYS);
if (c->plane >= MAX_PLANES)
return AVERROR(ENOSYS);
/* data must either be in the high or low bits, never middle */
if (c->shift && ((c->shift + c->depth) & 0x7))
return AVERROR(ENOSYS);
/* strange interleaving */
if (pixelstep[c->plane] != 0 &&
pixelstep[c->plane] != c->step)

View File

@ -32,8 +32,6 @@ p416le 6db094f8d7d27d7299bf9496ad66e2e0
rgb0 78d500c8361ab6423a4826a00268c908
rgb24 17f9e2e0c609009acaf2175c42d4a2a5
rgba b157c90191463d34fb3ce77b36c96386
x2bgr10le d4aff89f5e15ccbb1812f319874ed444
x2rgb10le a0c5925bd56b6f85f918c4e9fb93e90e
xyz12le 85abf80b77a9236a76ba0b00fcbdea2d
ya16le 940fafa240b9916de5f73cb20a552f24
ya8 5fc0f471207ddf7aa01b07027d56b672