BMDDisplayModeSupport support;
IDeckLinkDisplayMode *display_mode;
- BMDPixelFormat pixel_format = global_flags.ten_bit_output ? bmdFormat10BitYUV : bmdFormat8BitYUV;
+ BMDPixelFormat pixel_format = global_flags.bit_depth > 8 ? bmdFormat10BitYUV : bmdFormat8BitYUV;
if (output->DoesSupportVideoMode(mode, pixel_format, bmdVideoOutputFlagDefault,
&support, &display_mode) != S_OK) {
fprintf(stderr, "Couldn't ask for format support\n");
}
unique_ptr<Frame> frame = get_frame();
- if (global_flags.ten_bit_output) {
+ if (global_flags.bit_depth > 8) {
chroma_subsampler->create_v210(y_tex, cbcr_tex, width, height, frame->uyvy_tex);
} else {
chroma_subsampler->create_uyvy(y_tex, cbcr_tex, width, height, frame->uyvy_tex);
glBindBuffer(GL_PIXEL_PACK_BUFFER, frame->pbo);
check_error();
- if (global_flags.ten_bit_output) {
+ if (global_flags.bit_depth > 8) {
glBindTexture(GL_TEXTURE_2D, frame->uyvy_tex);
check_error();
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, BUFFER_OFFSET(0));
unique_ptr<Frame> frame(new Frame);
size_t stride;
- if (global_flags.ten_bit_output) {
+ if (global_flags.bit_depth > 8) {
stride = v210Converter::get_v210_stride(width);
GLint v210_width = stride / sizeof(uint32_t);
frame->uyvy_tex = resource_pool->create_2d_texture(GL_RGB10_A2, v210_width, height);
check_error();
frame->fence.reset();
- if (global_flags.ten_bit_output) {
+ if (global_flags.bit_depth > 8) {
memcpy(frame->uyvy_ptr_local.get(), frame->uyvy_ptr, v210Converter::get_v210_stride(width) * height);
} else {
memcpy(frame->uyvy_ptr_local.get(), frame->uyvy_ptr, width * height * 2);
long DeckLinkOutput::Frame::GetRowBytes()
{
- if (global_flags.ten_bit_output) {
+ if (global_flags.bit_depth > 8) {
return v210Converter::get_v210_stride(global_flags.width);
} else {
return global_flags.width * 2;
BMDPixelFormat DeckLinkOutput::Frame::GetPixelFormat()
{
- if (global_flags.ten_bit_output) {
+ if (global_flags.bit_depth > 8) {
return bmdFormat10BitYUV;
} else {
return bmdFormat8BitYUV;