Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
790c5845
Commit
790c5845
authored
Apr 28, 2011
by
Rémi Denis-Courmont
Browse files
S/PDIF: use SetWBE/SetWLE
parent
812905a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/audio_filter/converter/a52tospdif.c
View file @
790c5845
...
...
@@ -96,16 +96,14 @@ static block_t *DoWork( filter_t * p_filter, block_t *p_in_buf )
{
vlc_memcpy
(
p_out
,
p_sync_be
,
6
);
p_out
[
4
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
p_out
[
6
]
=
(
i_frame_size
>>
4
)
&
0xff
;
p_out
[
7
]
=
(
i_frame_size
<<
4
)
&
0xff
;
SetWBE
(
p_out
+
6
,
i_frame_size
<<
4
);
vlc_memcpy
(
&
p_out
[
8
],
p_in
,
i_frame_size
*
2
);
}
else
{
vlc_memcpy
(
p_out
,
p_sync_le
,
6
);
p_out
[
5
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
p_out
[
6
]
=
(
i_frame_size
<<
4
)
&
0xff
;
p_out
[
7
]
=
(
i_frame_size
>>
4
)
&
0xff
;
SetWLE
(
p_out
+
6
,
i_frame_size
<<
4
);
swab
(
p_in
,
&
p_out
[
8
],
i_frame_size
*
2
);
}
vlc_memset
(
p_out
+
8
+
i_frame_size
*
2
,
0
,
...
...
modules/audio_filter/converter/dtstospdif.c
View file @
790c5845
...
...
@@ -173,15 +173,13 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
{
vlc_memcpy
(
p_out
,
p_sync_be
,
6
);
p_out
[
5
]
=
i_ac5_spdif_type
;
p_out
[
6
]
=
((
i_length
)
>>
5
)
&
0xFF
;
p_out
[
7
]
=
(
i_length
<<
3
)
&
0xFF
;
SetWBE
(
p_out
+
6
,
i_length
<<
3
);
}
else
{
vlc_memcpy
(
p_out
,
p_sync_le
,
6
);
p_out
[
4
]
=
i_ac5_spdif_type
;
p_out
[
6
]
=
(
i_length
<<
3
)
&
0xFF
;
p_out
[
7
]
=
((
i_length
)
>>
5
)
&
0xFF
;
SetWLE
(
p_out
+
6
,
i_length
<<
3
);
}
if
(
(
(
p_in
[
0
]
==
0x1F
||
p_in
[
0
]
==
0x7F
)
&&
p_filter
->
fmt_out
.
audio
.
i_format
==
VLC_CODEC_SPDIFL
)
||
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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