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
47b27a1e
Commit
47b27a1e
authored
May 30, 2012
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed DV audio using 12 bits quantization.
It close #4828 and #3685.
parent
6a24a618
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
modules/demux/rawdv.h
modules/demux/rawdv.h
+15
-9
No files found.
modules/demux/rawdv.h
View file @
47b27a1e
...
...
@@ -105,7 +105,6 @@ static block_t *dv_extract_audio( block_t *p_frame_block )
int
i_audio_quant
,
i_samples
,
i_size
,
i_half_ch
;
const
uint16_t
(
*
audio_shuffle
)[
9
];
int
i
,
j
,
d
,
of
;
uint16_t
lc
;
if
(
p_frame_block
->
i_buffer
<
4
)
return
NULL
;
...
...
@@ -173,17 +172,24 @@ static block_t *dv_extract_audio( block_t *p_frame_block )
else
{
/* 12bit quantization */
lc
=
((
uint16_t
)
p_frame
[
d
]
<<
4
)
|
((
uint16_t
)
p_frame
[
d
+
2
]
>>
4
);
lc
=
(
lc
==
0x800
?
0
:
dv_audio_12to16
(
lc
));
uint16_t
lc
=
(
p_frame
[
d
+
0
]
<<
4
)
|
(
p_frame
[
d
+
2
]
>>
4
);
uint16_t
rc
=
(
p_frame
[
d
+
1
]
<<
4
)
|
(
p_frame
[
d
+
2
]
&
0x0f
);
of
=
audio_shuffle
[
i
][
j
]
+
(
d
-
8
)
/
3
*
(
i_dsf
?
108
:
90
);
if
(
of
*
2
>=
i_size
)
continue
;
lc
=
lc
==
0x800
?
0
:
dv_audio_12to16
(
lc
);
rc
=
rc
==
0x800
?
0
:
dv_audio_12to16
(
rc
);
/* big endian */
p_block
->
p_buffer
[
of
*
2
]
=
lc
&
0xff
;
of
=
audio_shuffle
[
i
][
j
]
+
(
d
-
8
)
/
3
*
(
i_dsf
?
108
:
90
);
if
(
of
*
2
>=
i_size
)
continue
;
p_block
->
p_buffer
[
of
*
2
+
0
]
=
lc
&
0xff
;
p_block
->
p_buffer
[
of
*
2
+
1
]
=
lc
>>
8
;
of
=
audio_shuffle
[
i
+
i_half_ch
][
j
]
+
(
d
-
8
)
/
3
*
(
i_dsf
?
108
:
90
);
if
(
of
*
2
>=
i_size
)
continue
;
p_block
->
p_buffer
[
of
*
2
+
0
]
=
rc
&
0xff
;
p_block
->
p_buffer
[
of
*
2
+
1
]
=
rc
>>
8
;
++
d
;
}
}
...
...
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