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
3d1d1753
Commit
3d1d1753
authored
Aug 01, 2013
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12enc: set frame packing information when relevant metadata is found
parent
bacc2869
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
0 deletions
+41
-0
mpeg12enc.c
libavcodec/mpeg12enc.c
+41
-0
No files found.
libavcodec/mpeg12enc.c
View file @
3d1d1753
...
...
@@ -30,6 +30,8 @@
#include "libavutil/attributes.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
#include "libavutil/stereo3d.h"
#include "avcodec.h"
#include "bytestream.h"
#include "mathops.h"
...
...
@@ -350,6 +352,7 @@ void ff_mpeg1_encode_slice_header(MpegEncContext *s)
void
ff_mpeg1_encode_picture_header
(
MpegEncContext
*
s
,
int
picture_number
)
{
AVFrameSideData
*
side_data
;
mpeg1_encode_sequence_header
(
s
);
/* mpeg1 picture header */
...
...
@@ -433,6 +436,44 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
for
(
i
=
0
;
i
<
sizeof
(
svcd_scan_offset_placeholder
);
i
++
)
put_bits
(
&
s
->
pb
,
8
,
svcd_scan_offset_placeholder
[
i
]);
}
side_data
=
av_frame_get_side_data
(
&
s
->
current_picture_ptr
->
f
,
AV_FRAME_DATA_STEREO3D
);
if
(
side_data
)
{
AVStereo3D
*
stereo
=
(
AVStereo3D
*
)
side_data
->
data
;
uint8_t
fpa_type
;
switch
(
stereo
->
type
)
{
case
AV_STEREO3D_SIDEBYSIDE
:
fpa_type
=
0x03
;
break
;
case
AV_STEREO3D_TOPBOTTOM
:
fpa_type
=
0x04
;
break
;
case
AV_STEREO3D_2D
:
fpa_type
=
0x08
;
break
;
case
AV_STEREO3D_SIDEBYSIDE_QUINCUNX
:
fpa_type
=
0x23
;
break
;
default:
fpa_type
=
0
;
break
;
}
if
(
fpa_type
!=
0
)
{
put_header
(
s
,
USER_START_CODE
);
put_bits
(
&
s
->
pb
,
8
,
'J'
);
// S3D_video_format_signaling_identifier
put_bits
(
&
s
->
pb
,
8
,
'P'
);
put_bits
(
&
s
->
pb
,
8
,
'3'
);
put_bits
(
&
s
->
pb
,
8
,
'D'
);
put_bits
(
&
s
->
pb
,
8
,
0x03
);
// S3D_video_format_length
put_bits
(
&
s
->
pb
,
1
,
1
);
// reserved_bit
put_bits
(
&
s
->
pb
,
7
,
fpa_type
);
// S3D_video_format_type
put_bits
(
&
s
->
pb
,
8
,
0x04
);
// reserved_data[0]
put_bits
(
&
s
->
pb
,
8
,
0xFF
);
// reserved_data[1]
}
}
s
->
mb_y
=
0
;
ff_mpeg1_encode_slice_header
(
s
);
...
...
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