Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
e47306eb
Commit
e47306eb
authored
Sep 14, 2011
by
John Koleszar
Committed by
Gerrit Code Review
Sep 14, 2011
Browse files
Merge "Fix odd-sized image support in decoder examples"
parents
5bc7b3a6
6aea309a
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/decode_to_md5.txt
View file @
e47306eb
...
...
@@ -34,8 +34,8 @@ MD5Init(&md5);
for(plane=0; plane < 3; plane++) {
unsigned char *buf =img->planes[plane];
for(y=0; y
<img->d_h >> (plane?1:0
); y++) {
MD5Update(&md5, buf,
img->d_w >> (plane?1:0
));
for(y=0; y
< (plane ? (img->d_h + 1) >> 1 : img->d_h
); y++) {
MD5Update(&md5, buf,
(plane ? (img->d_w + 1) >> 1 : img->d_w
));
buf += img->stride[plane];
}
}
...
...
examples/decoder_tmpl.txt
View file @
e47306eb
...
...
@@ -47,8 +47,9 @@ while((img = vpx_codec_get_frame(&codec, &iter))) {
for(plane=0; plane < 3; plane++) {
unsigned char *buf =img->planes[plane];
for(y=0; y<img->d_h >> (plane?1:0); y++) {
if(fwrite(buf, 1, img->d_w >> (plane?1:0), outfile));
for(y=0; y < (plane ? (img->d_h + 1) >> 1 : img->d_h); y++) {
if(fwrite(buf, 1, (plane ? (img->d_w + 1) >> 1 : img->d_w),
outfile));
buf += img->stride[plane];
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment