Skip to content

Commit

Permalink
rc3
Browse files Browse the repository at this point in the history
  • Loading branch information
l1npengtul committed Dec 18, 2022
1 parent 4efd0b0 commit fa85725
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified examples/decoder_test/cchlop_out_nv12.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions nokhwa-core/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1787,12 +1787,12 @@ pub fn buf_nv12_to_rgb(
let y_section = (resolution.width() * resolution.height()) as usize;

let width_usize = resolution.width() as usize;
let height_usize = resolution.height() as usize;
// let height_usize = resolution.height() as usize;

for (hidx, horizontal_row) in data[0..y_section].chunks_exact(width_usize).enumerate() {
for (cidx, column) in horizontal_row.chunks_exact(2).enumerate() {
let v = data[(y_section - 1) + ((hidx / 2) * width_usize) + (cidx * 2)];
let u = data[(y_section - 1) + ((hidx / 2) * width_usize) + (cidx * 2) + 1];
let u = data[(y_section) + ((hidx / 2) * width_usize) + (cidx * 2)];
let v = data[(y_section) + ((hidx / 2) * width_usize) + (cidx * 2) + 1];

let y0 = column[0];
let y1 = column[1];
Expand Down

0 comments on commit fa85725

Please sign in to comment.