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
bacc2869
Commit
bacc2869
authored
Jul 31, 2013
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12dec: parse frame packing arrangement user_data and save relevant stereo3d information
parent
09cb75cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
mpeg12dec.c
libavcodec/mpeg12dec.c
+32
-0
No files found.
libavcodec/mpeg12dec.c
View file @
bacc2869
...
...
@@ -27,6 +27,7 @@
#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/stereo3d.h"
#include "internal.h"
#include "avcodec.h"
#include "dsputil.h"
...
...
@@ -2122,6 +2123,37 @@ static void mpeg_decode_user_data(AVCodecContext *avctx,
return
;
avctx
->
dtg_active_format
=
p
[
0
]
&
0x0f
;
}
}
else
if
(
buf_end
-
p
>=
6
&&
p
[
0
]
==
'J'
&&
p
[
1
]
==
'P'
&&
p
[
2
]
==
'3'
&&
p
[
3
]
==
'D'
&&
p
[
4
]
==
0x03
)
{
// S3D_video_format_length
// the 0x7F mask ignores the reserved_bit value
const
uint8_t
S3D_video_format_type
=
p
[
5
]
&
0x7F
;
if
(
S3D_video_format_type
==
0x03
||
S3D_video_format_type
==
0x04
||
S3D_video_format_type
==
0x08
||
S3D_video_format_type
==
0x23
)
{
Mpeg1Context
*
s1
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
&
s1
->
mpeg_enc_ctx
;
AVStereo3D
*
stereo
=
av_stereo3d_create_side_data
(
&
s
->
current_picture_ptr
->
f
);
if
(
!
stereo
)
return
;
switch
(
S3D_video_format_type
)
{
case
0x03
:
stereo
->
type
=
AV_STEREO3D_SIDEBYSIDE
;
break
;
case
0x04
:
stereo
->
type
=
AV_STEREO3D_TOPBOTTOM
;
break
;
case
0x08
:
stereo
->
type
=
AV_STEREO3D_2D
;
break
;
case
0x23
:
stereo
->
type
=
AV_STEREO3D_SIDEBYSIDE_QUINCUNX
;
break
;
}
}
}
else
if
(
mpeg_decode_a53_cc
(
avctx
,
p
,
buf_size
))
{
return
;
}
...
...
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