mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-30 10:42:47 +01:00
Merge pull request #6838 from ameerj/sws-align
vic: Specify sws_scale height stride.
This commit is contained in:
commit
0509fe3377
1 changed files with 2 additions and 3 deletions
|
@ -96,12 +96,11 @@ void Vic::Execute() {
|
||||||
if (!converted_frame_buffer) {
|
if (!converted_frame_buffer) {
|
||||||
converted_frame_buffer = AVMallocPtr{static_cast<u8*>(av_malloc(linear_size)), av_free};
|
converted_frame_buffer = AVMallocPtr{static_cast<u8*>(av_malloc(linear_size)), av_free};
|
||||||
}
|
}
|
||||||
|
const std::array<int, 4> converted_stride{frame->width * 4, frame->height * 4, 0, 0};
|
||||||
const int converted_stride{frame->width * 4};
|
|
||||||
u8* const converted_frame_buf_addr{converted_frame_buffer.get()};
|
u8* const converted_frame_buf_addr{converted_frame_buffer.get()};
|
||||||
|
|
||||||
sws_scale(scaler_ctx, frame->data, frame->linesize, 0, frame->height,
|
sws_scale(scaler_ctx, frame->data, frame->linesize, 0, frame->height,
|
||||||
&converted_frame_buf_addr, &converted_stride);
|
&converted_frame_buf_addr, converted_stride.data());
|
||||||
|
|
||||||
const u32 blk_kind = static_cast<u32>(config.block_linear_kind);
|
const u32 blk_kind = static_cast<u32>(config.block_linear_kind);
|
||||||
if (blk_kind != 0) {
|
if (blk_kind != 0) {
|
||||||
|
|
Loading…
Reference in a new issue