Y4M loader: Fix frame size calculation for 10-bit 4:2:0 format
Seems to fix multiframe images (animation) for this format.
This commit is contained in:
parent
cf926c746c
commit
d4648ae527
|
@ -338,11 +338,15 @@ y4m_parse_frame(Y4mParse *res)
|
||||||
case Y4M_PARSE_CS_420MPEG2:
|
case Y4M_PARSE_CS_420MPEG2:
|
||||||
case Y4M_PARSE_CS_420PALDV:
|
case Y4M_PARSE_CS_420PALDV:
|
||||||
case Y4M_PARSE_CS_420:
|
case Y4M_PARSE_CS_420:
|
||||||
case Y4M_PARSE_CS_420P10:
|
|
||||||
res->frame_data_len = npixels * 3 / 2;
|
res->frame_data_len = npixels * 3 / 2;
|
||||||
sdiv = 2;
|
sdiv = 2;
|
||||||
voff = (npixels * 5) / 4;
|
voff = (npixels * 5) / 4;
|
||||||
break;
|
break;
|
||||||
|
case Y4M_PARSE_CS_420P10:
|
||||||
|
res->frame_data_len = npixels * 3;
|
||||||
|
sdiv = 2;
|
||||||
|
voff = (npixels * 5) / 4;
|
||||||
|
break;
|
||||||
case Y4M_PARSE_CS_422:
|
case Y4M_PARSE_CS_422:
|
||||||
res->frame_data_len = npixels * 2;
|
res->frame_data_len = npixels * 2;
|
||||||
sdiv = 2;
|
sdiv = 2;
|
||||||
|
|
Loading…
Reference in New Issue