Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
magic-lantern
magic-lantern
Commits
665cd9858f59
Commit
64daf162
authored
Jan 31, 2010
by
hudson@kremvax.wan
Browse files
Fix err70 by not using memset()
parent
5d189a7e109a
Changes
1
Hide whitespace changes
Inline
Side-by-side
zebra.c
View file @
665cd985
...
...
@@ -218,8 +218,20 @@ hist_build( void )
hist_max
=
0
;
#if 0
memset( hist, 0, sizeof(hist) );
memset( waveform, 0, sizeof(waveform) );
#else
// memset() causes err70? Too much memory bandwidth?
for
(
x
=
0
;
x
<
hist_width
;
x
++
)
hist
[
x
]
=
0
;
for
(
y
=
0
;
y
<
waveform_width
;
y
++
)
for
(
x
=
0
;
x
<
waveform_height
;
x
++
)
{
waveform
[
y
][
x
]
=
0
;
asm
(
"nop
\n
nop
\n
nop
\n
nop
\n
"
);
}
#endif
for
(
y
=
vram_start_line
;
y
<
vram_end_line
;
y
++
,
v_row
+=
(
vram
->
pitch
/
2
)
)
{
...
...
@@ -258,6 +270,10 @@ hist_draw_image(
)
{
uint8_t
*
const
bvram
=
bmp_vram
();
// Align the x origin, just in case
x_origin
&=
~
3
;
uint8_t
*
row
=
bvram
+
x_origin
+
y_origin
*
bmp_pitch
();
if
(
hist_max
==
0
)
hist_max
=
1
;
...
...
@@ -345,7 +361,9 @@ waveform_draw_image(
if
(
(
i
&
3
)
!=
3
)
continue
;
*
(
uint32_t
*
)(
row
+
i
)
=
pixel
;
// Draw the pixel, rounding down to the nearest
// quad word write (and then nop to avoid err70).
*
(
uint32_t
*
)(
row
+
(
i
&
~
3
)
)
=
pixel
;
pixel
=
0
;
asm
(
"nop"
);
asm
(
"nop"
);
...
...
@@ -395,7 +413,6 @@ draw_zebra( void )
hist_build
();
#if 1
// skip the audio meter at the top and the bar at the bottom
// hardcoded; should use a constant based on the type of display
// 33 is the bottom of the meters; 55 is the crop mark
...
...
@@ -454,7 +471,6 @@ draw_zebra( void )
b_row
[
x
/
2
]
=
0
;
}
}
#endif
if
(
hist_draw
)
hist_draw_image
(
hist_x
,
hist_y
);
...
...
Write
Preview
Markdown
is supported
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