-
Notifications
You must be signed in to change notification settings - Fork 0
Support raw YUVA / YUV pixel data #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
} | ||
REJECT_STATUS; | ||
|
||
c->status = napi_create_external_buffer(env, c->readLen, c->readBuf, readFinalizer, (void*)(uint64_t)c->readLen, &result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, DONT LOOK AT THIS CHANGE
status = napi_get_null(env, &result); | ||
} else { | ||
hintRef = av_buffer_ref(p->packet->buf); | ||
status = napi_create_external_buffer(env, hintRef->size, hintRef->data, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, DONT LOOK AT THIS CHANGE
status = napi_create_external_buffer(env, size, data, frameBufferFinalizer, ref, &element); | ||
// For other planar formats, adjust with chroma subsampling if needed | ||
else if (desc->log2_chroma_h && x > 0) { | ||
plane_h = (frame->height + (1 << desc->log2_chroma_h) - 1) >> desc->log2_chroma_h; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
absolutely wild bitwise operation
Currently beamcoder crashes when we try to access frame.data for videos with YUVA format.
Didn't really noticed this issue because we use filter https://github.com/Lumen5/framefusion/blob/main/src/backends/beamcoder.ts#L95
This filter helps because it always makes buffers squential
This requires additional time on CPU. This happens always even if input pixel format is equa output pixel format.
Ideally, we don't need to use those filters. we could get raw pixels data instead.
Lumen5/framefusion#73
https://github.com/Lumen5/luminary/pull/7748