Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
89c9a8d3
Commit
89c9a8d3
authored
Feb 10, 2012
by
Alex Converse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dv: Move functions used only by the encoder out of a shared header.
parent
37460727
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
35 deletions
+35
-35
dv.c
libavcodec/dv.c
+35
-0
dvdata.h
libavcodec/dvdata.h
+0
-35
No files found.
libavcodec/dv.c
View file @
89c9a8d3
...
@@ -1190,6 +1190,41 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c,
...
@@ -1190,6 +1190,41 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c,
}
}
#if CONFIG_DVVIDEO_ENCODER
#if CONFIG_DVVIDEO_ENCODER
static
inline
int
dv_write_dif_id
(
enum
dv_section_type
t
,
uint8_t
chan_num
,
uint8_t
seq_num
,
uint8_t
dif_num
,
uint8_t
*
buf
)
{
buf
[
0
]
=
(
uint8_t
)
t
;
/* Section type */
buf
[
1
]
=
(
seq_num
<<
4
)
|
/* DIF seq number 0-9 for 525/60; 0-11 for 625/50 */
(
chan_num
<<
3
)
|
/* FSC: for 50Mb/s 0 - first channel; 1 - second */
7
;
/* reserved -- always 1 */
buf
[
2
]
=
dif_num
;
/* DIF block number Video: 0-134, Audio: 0-8 */
return
3
;
}
static
inline
int
dv_write_ssyb_id
(
uint8_t
syb_num
,
uint8_t
fr
,
uint8_t
*
buf
)
{
if
(
syb_num
==
0
||
syb_num
==
6
)
{
buf
[
0
]
=
(
fr
<<
7
)
|
/* FR ID 1 - first half of each channel; 0 - second */
(
0
<<
4
)
|
/* AP3 (Subcode application ID) */
0x0f
;
/* reserved -- always 1 */
}
else
if
(
syb_num
==
11
)
{
buf
[
0
]
=
(
fr
<<
7
)
|
/* FR ID 1 - first half of each channel; 0 - second */
0x7f
;
/* reserved -- always 1 */
}
else
{
buf
[
0
]
=
(
fr
<<
7
)
|
/* FR ID 1 - first half of each channel; 0 - second */
(
0
<<
4
)
|
/* APT (Track application ID) */
0x0f
;
/* reserved -- always 1 */
}
buf
[
1
]
=
0xf0
|
/* reserved -- always 1 */
(
syb_num
&
0x0f
);
/* SSYB number 0 - 11 */
buf
[
2
]
=
0xff
;
/* reserved -- always 1 */
return
3
;
}
static
void
dv_format_frame
(
DVVideoContext
*
c
,
uint8_t
*
buf
)
static
void
dv_format_frame
(
DVVideoContext
*
c
,
uint8_t
*
buf
)
{
{
int
chan
,
i
,
j
,
k
;
int
chan
,
i
,
j
,
k
;
...
...
libavcodec/dvdata.h
View file @
89c9a8d3
...
@@ -153,39 +153,4 @@ const DVprofile* avpriv_dv_frame_profile(const DVprofile *sys,
...
@@ -153,39 +153,4 @@ const DVprofile* avpriv_dv_frame_profile(const DVprofile *sys,
const
uint8_t
*
frame
,
unsigned
buf_size
);
const
uint8_t
*
frame
,
unsigned
buf_size
);
const
DVprofile
*
avpriv_dv_codec_profile
(
AVCodecContext
*
codec
);
const
DVprofile
*
avpriv_dv_codec_profile
(
AVCodecContext
*
codec
);
static
inline
int
dv_write_dif_id
(
enum
dv_section_type
t
,
uint8_t
chan_num
,
uint8_t
seq_num
,
uint8_t
dif_num
,
uint8_t
*
buf
)
{
buf
[
0
]
=
(
uint8_t
)
t
;
/* Section type */
buf
[
1
]
=
(
seq_num
<<
4
)
|
/* DIF seq number 0-9 for 525/60; 0-11 for 625/50 */
(
chan_num
<<
3
)
|
/* FSC: for 50Mb/s 0 - first channel; 1 - second */
7
;
/* reserved -- always 1 */
buf
[
2
]
=
dif_num
;
/* DIF block number Video: 0-134, Audio: 0-8 */
return
3
;
}
static
inline
int
dv_write_ssyb_id
(
uint8_t
syb_num
,
uint8_t
fr
,
uint8_t
*
buf
)
{
if
(
syb_num
==
0
||
syb_num
==
6
)
{
buf
[
0
]
=
(
fr
<<
7
)
|
/* FR ID 1 - first half of each channel; 0 - second */
(
0
<<
4
)
|
/* AP3 (Subcode application ID) */
0x0f
;
/* reserved -- always 1 */
}
else
if
(
syb_num
==
11
)
{
buf
[
0
]
=
(
fr
<<
7
)
|
/* FR ID 1 - first half of each channel; 0 - second */
0x7f
;
/* reserved -- always 1 */
}
else
{
buf
[
0
]
=
(
fr
<<
7
)
|
/* FR ID 1 - first half of each channel; 0 - second */
(
0
<<
4
)
|
/* APT (Track application ID) */
0x0f
;
/* reserved -- always 1 */
}
buf
[
1
]
=
0xf0
|
/* reserved -- always 1 */
(
syb_num
&
0x0f
);
/* SSYB number 0 - 11 */
buf
[
2
]
=
0xff
;
/* reserved -- always 1 */
return
3
;
}
#endif
/* AVCODEC_DVDATA_H */
#endif
/* AVCODEC_DVDATA_H */
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