projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core/scale: fix flipping of packed 16- and 32-bit images
[nihav.git]
/
nihav-core
/
src
/
scale
/
mod.rs
diff --git
a/nihav-core/src/scale/mod.rs
b/nihav-core/src/scale/mod.rs
index 2192b187dfe14c1054baff8c412c1fb5889ea7af..f93b9d25afc32e574aa6e69bcaa8e7d7f2515c51 100644
(file)
--- a/
nihav-core/src/scale/mod.rs
+++ b/
nihav-core/src/scale/mod.rs
@@
-320,7
+320,7
@@
pub fn flip_picture(pic: &mut NABufferType) -> ScaleResult<()> {
}
},
NABufferType::Video16(ref mut vb) => {
}
},
NABufferType::Video16(ref mut vb) => {
- let ncomp = vb.get_num_components();
+ let ncomp = vb.get_num_components()
.max(1)
;
for comp in 0..ncomp {
let off = vb.get_offset(comp);
let stride = vb.get_stride(comp);
for comp in 0..ncomp {
let off = vb.get_offset(comp);
let stride = vb.get_stride(comp);
@@
-332,7
+332,7
@@
pub fn flip_picture(pic: &mut NABufferType) -> ScaleResult<()> {
}
},
NABufferType::Video32(ref mut vb) => {
}
},
NABufferType::Video32(ref mut vb) => {
- let ncomp = vb.get_num_components();
+ let ncomp = vb.get_num_components()
.max(1)
;
for comp in 0..ncomp {
let off = vb.get_offset(comp);
let stride = vb.get_stride(comp);
for comp in 0..ncomp {
let off = vb.get_offset(comp);
let stride = vb.get_stride(comp);