feat(linux): Add hardware yuv444 chromasubsampling support on nvidia cards (cuda/cuda gl) (#4965)

This commit is contained in:
Sheynar
2026-06-16 18:30:54 +03:00
committed by GitHub
parent 2b440bccb9
commit 39c9e845fe
14 changed files with 826 additions and 221 deletions

View File

@@ -369,7 +369,7 @@ namespace va {
return -1;
}
auto sws_opt = egl::sws_t::make(width, height, frame->width, frame->height, hw_frames_ctx->sw_format);
auto sws_opt = egl::sws_t::make(width, height, frame->width, frame->height, hw_frames_ctx->sw_format, false);
if (!sws_opt) {
return -1;
}
@@ -407,7 +407,7 @@ namespace va {
int convert(platf::img_t &img) override {
sws.load_ram(img);
sws.convert(nv12->buf);
sws.convert_nv12(nv12->buf);
return 0;
}
};
@@ -434,9 +434,9 @@ namespace va {
rgb = std::move(*rgb_opt);
}
sws.load_vram(descriptor, offset_x, offset_y, rgb->tex[0]);
sws.load_vram(descriptor, offset_x, offset_y, rgb->tex[0], false);
sws.convert(nv12->buf);
sws.convert_nv12(nv12->buf);
return 0;
}