mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Fix when using --source-scan-type=bff, offset was used for output lines
This commit is contained in:
parent
0128ee26e7
commit
198204a20a
|
@ -225,20 +225,20 @@ int yuv_io_extract_field(const kvz_picture *frame_in, unsigned source_scan_type,
|
|||
//Luma
|
||||
for (int i = 0; i < field_out->height; ++i){
|
||||
kvz_pixel *row_in = frame_in->y + CLIP(0, frame_in->height - 1, 2 * i) * frame_in->stride + offset;
|
||||
kvz_pixel *row_out = field_out->y + i * field_out->stride + offset;
|
||||
kvz_pixel *row_out = field_out->y + i * field_out->stride;
|
||||
memcpy(row_out, row_in, sizeof(kvz_pixel) * frame_in->width);
|
||||
}
|
||||
|
||||
//Chroma
|
||||
for (int i = 0; i < field_out->height / 2; ++i){
|
||||
kvz_pixel *row_in = frame_in->u + CLIP(0, frame_in->height / 2 - 1, 2 * i) * frame_in->stride / 2 + offset / 2;
|
||||
kvz_pixel *row_out = field_out->u + i * field_out->stride / 2 + offset / 2;
|
||||
kvz_pixel *row_out = field_out->u + i * field_out->stride / 2;
|
||||
memcpy(row_out, row_in, sizeof(kvz_pixel) * frame_in->width / 2);
|
||||
}
|
||||
|
||||
for (int i = 0; i < field_out->height / 2; ++i){
|
||||
kvz_pixel *row_in = frame_in->v + CLIP(0, frame_in->height / 2 - 1, 2 * i) * frame_in->stride / 2 + offset / 2;
|
||||
kvz_pixel *row_out = field_out->v + i * field_out->stride / 2 + offset / 2;
|
||||
kvz_pixel *row_out = field_out->v + i * field_out->stride / 2;
|
||||
memcpy(row_out, row_in, sizeof(kvz_pixel) * frame_in->width / 2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue