Skip to content

Possible bug in ubuf_pic_blit/ubuf_pic_blit_alpha #1195

Description

@JDarnley

if (in_planes == 1)
memcpy(dest_buffer, in[0], plane_hsize);
else {
for (int j = 0; j < plane_hsize; j++) {
for (int p = 0; p < in_planes; p++)
dest_buffer[j * in_planes + p] =
(dest_buffer[j * in_planes + p] *
(0xff - alpha) +
in[p][j] * alpha) /
0xff;
}
}

Simply put the planar-to-semi-packed do not match the behavior of the planar code just above which uses memcpy. If you call the function without alpha plane, alpha=128 and threshold=0 you can encounter the difference in behavior. In fact for an nv12 (two planes: "y8" "u8v8") frame you will get different behavior between the luma and the chroma.

Please tell me what the correct behavior is so I can get it correct in a test program I am writing.

@quarium You added the semi-planar code in commit 21ec357

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions