Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
790c5845
Commit
790c5845
authored
Apr 28, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S/PDIF: use SetWBE/SetWLE
parent
812905a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
modules/audio_filter/converter/a52tospdif.c
modules/audio_filter/converter/a52tospdif.c
+2
-4
modules/audio_filter/converter/dtstospdif.c
modules/audio_filter/converter/dtstospdif.c
+2
-4
No files found.
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 )
...
@@ -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
);
vlc_memcpy
(
p_out
,
p_sync_be
,
6
);
p_out
[
4
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
p_out
[
4
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
p_out
[
6
]
=
(
i_frame_size
>>
4
)
&
0xff
;
SetWBE
(
p_out
+
6
,
i_frame_size
<<
4
);
p_out
[
7
]
=
(
i_frame_size
<<
4
)
&
0xff
;
vlc_memcpy
(
&
p_out
[
8
],
p_in
,
i_frame_size
*
2
);
vlc_memcpy
(
&
p_out
[
8
],
p_in
,
i_frame_size
*
2
);
}
}
else
else
{
{
vlc_memcpy
(
p_out
,
p_sync_le
,
6
);
vlc_memcpy
(
p_out
,
p_sync_le
,
6
);
p_out
[
5
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
p_out
[
5
]
=
p_in
[
5
]
&
0x7
;
/* bsmod */
p_out
[
6
]
=
(
i_frame_size
<<
4
)
&
0xff
;
SetWLE
(
p_out
+
6
,
i_frame_size
<<
4
);
p_out
[
7
]
=
(
i_frame_size
>>
4
)
&
0xff
;
swab
(
p_in
,
&
p_out
[
8
],
i_frame_size
*
2
);
swab
(
p_in
,
&
p_out
[
8
],
i_frame_size
*
2
);
}
}
vlc_memset
(
p_out
+
8
+
i_frame_size
*
2
,
0
,
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 )
...
@@ -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
);
vlc_memcpy
(
p_out
,
p_sync_be
,
6
);
p_out
[
5
]
=
i_ac5_spdif_type
;
p_out
[
5
]
=
i_ac5_spdif_type
;
p_out
[
6
]
=
((
i_length
)
>>
5
)
&
0xFF
;
SetWBE
(
p_out
+
6
,
i_length
<<
3
);
p_out
[
7
]
=
(
i_length
<<
3
)
&
0xFF
;
}
}
else
else
{
{
vlc_memcpy
(
p_out
,
p_sync_le
,
6
);
vlc_memcpy
(
p_out
,
p_sync_le
,
6
);
p_out
[
4
]
=
i_ac5_spdif_type
;
p_out
[
4
]
=
i_ac5_spdif_type
;
p_out
[
6
]
=
(
i_length
<<
3
)
&
0xFF
;
SetWLE
(
p_out
+
6
,
i_length
<<
3
);
p_out
[
7
]
=
((
i_length
)
>>
5
)
&
0xFF
;
}
}
if
(
(
(
p_in
[
0
]
==
0x1F
||
p_in
[
0
]
==
0x7F
)
&&
p_filter
->
fmt_out
.
audio
.
i_format
==
VLC_CODEC_SPDIFL
)
||
if
(
(
(
p_in
[
0
]
==
0x1F
||
p_in
[
0
]
==
0x7F
)
&&
p_filter
->
fmt_out
.
audio
.
i_format
==
VLC_CODEC_SPDIFL
)
||
...
...
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