Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
ec25f83b
Commit
ec25f83b
authored
Feb 13, 2011
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spdifenc: update
482d98f6
to the latest patch
"spdifenc: IEC 61937 encapsulation of DTS-HD for HDMI"
parent
50d71404
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
spdifenc.c
libavformat/spdifenc.c
+9
-18
No files found.
libavformat/spdifenc.c
View file @
ec25f83b
...
@@ -142,24 +142,15 @@ static int spdif_header_eac3(AVFormatContext *s, AVPacket *pkt)
...
@@ -142,24 +142,15 @@ static int spdif_header_eac3(AVFormatContext *s, AVPacket *pkt)
* the outputted IEC 61937 stream is higher.
* the outputted IEC 61937 stream is higher.
* The repetition period is measured in IEC 60958 frames (4 bytes).
* The repetition period is measured in IEC 60958 frames (4 bytes).
*/
*/
enum
{
DTS4_REP_PER_512
=
0x0
,
DTS4_REP_PER_1024
=
0x1
,
DTS4_REP_PER_2048
=
0x2
,
DTS4_REP_PER_4096
=
0x3
,
DTS4_REP_PER_8192
=
0x4
,
DTS4_REP_PER_16384
=
0x5
,
};
static
int
spdif_dts4_subtype
(
int
period
)
static
int
spdif_dts4_subtype
(
int
period
)
{
{
switch
(
period
)
{
switch
(
period
)
{
case
512
:
return
DTS4_REP_PER_512
;
case
512
:
return
0x0
;
case
1024
:
return
DTS4_REP_PER_1024
;
case
1024
:
return
0x1
;
case
2048
:
return
DTS4_REP_PER_2048
;
case
2048
:
return
0x2
;
case
4096
:
return
DTS4_REP_PER_4096
;
case
4096
:
return
0x3
;
case
8192
:
return
DTS4_REP_PER_8192
;
case
8192
:
return
0x4
;
case
16384
:
return
DTS4_REP_PER_16384
;
case
16384
:
return
0x5
;
}
}
return
-
1
;
return
-
1
;
}
}
...
@@ -212,7 +203,8 @@ static int spdif_header_dts4(AVFormatContext *s, AVPacket *pkt, int core_size,
...
@@ -212,7 +203,8 @@ static int spdif_header_dts4(AVFormatContext *s, AVPacket *pkt, int core_size,
if
(
ctx
->
dtshd_fallback
>
0
)
if
(
ctx
->
dtshd_fallback
>
0
)
ctx
->
dtshd_skip
=
sample_rate
*
ctx
->
dtshd_fallback
/
(
blocks
<<
5
);
ctx
->
dtshd_skip
=
sample_rate
*
ctx
->
dtshd_fallback
/
(
blocks
<<
5
);
else
else
/* skip permanently (-1) or just once (0) */
/* skip permanently (dtshd_fallback == -1) or just once
* (dtshd_fallback == 0) */
ctx
->
dtshd_skip
=
1
;
ctx
->
dtshd_skip
=
1
;
}
}
if
(
ctx
->
dtshd_skip
&&
core_size
)
{
if
(
ctx
->
dtshd_skip
&&
core_size
)
{
...
@@ -224,8 +216,7 @@ static int spdif_header_dts4(AVFormatContext *s, AVPacket *pkt, int core_size,
...
@@ -224,8 +216,7 @@ static int spdif_header_dts4(AVFormatContext *s, AVPacket *pkt, int core_size,
ctx
->
out_bytes
=
sizeof
(
dtshd_start_code
)
+
2
+
pkt_size
;
ctx
->
out_bytes
=
sizeof
(
dtshd_start_code
)
+
2
+
pkt_size
;
ctx
->
length_code
=
ctx
->
out_bytes
;
ctx
->
length_code
=
ctx
->
out_bytes
;
ctx
->
hd_buf
=
av_fast_realloc
(
ctx
->
hd_buf
,
&
ctx
->
hd_buf_size
,
av_fast_malloc
(
&
ctx
->
hd_buf
,
&
ctx
->
hd_buf_size
,
ctx
->
out_bytes
);
ctx
->
out_bytes
);
if
(
!
ctx
->
hd_buf
)
if
(
!
ctx
->
hd_buf
)
return
AVERROR
(
ENOMEM
);
return
AVERROR
(
ENOMEM
);
...
...
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