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
52889b54
Commit
52889b54
authored
Jan 13, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12dec: BW10 support
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
0d5c810b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
mpeg12.c
libavcodec/mpeg12.c
+12
-5
riff.c
libavformat/riff.c
+1
-0
No files found.
libavcodec/mpeg12.c
View file @
52889b54
...
...
@@ -2075,8 +2075,6 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
if
(
MPV_common_init
(
s
)
<
0
)
return
-
1
;
exchange_uv
(
s
);
// common init reset pblocks, so we swap them here
s
->
swap_uv
=
1
;
// in case of xvmc we need to swap uv for each MB
s1
->
mpeg_enc_ctx_allocated
=
1
;
for
(
i
=
0
;
i
<
64
;
i
++
)
{
...
...
@@ -2096,8 +2094,15 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
s
->
first_field
=
0
;
s
->
frame_pred_frame_dct
=
1
;
s
->
chroma_format
=
1
;
s
->
codec_id
=
s
->
avctx
->
codec_id
=
CODEC_ID_MPEG2VIDEO
;
avctx
->
sub_id
=
2
;
/* indicates MPEG-2 */
if
(
s
->
codec_tag
==
AV_RL32
(
"BW10"
))
{
s
->
codec_id
=
s
->
avctx
->
codec_id
=
CODEC_ID_MPEG1VIDEO
;
avctx
->
sub_id
=
1
;
/* indicates MPEG-1 */
}
else
{
exchange_uv
(
s
);
// common init reset pblocks, so we swap them here
s
->
swap_uv
=
1
;
// in case of xvmc we need to swap uv for each MB
s
->
codec_id
=
s
->
avctx
->
codec_id
=
CODEC_ID_MPEG2VIDEO
;
avctx
->
sub_id
=
2
;
/* indicates MPEG-2 */
}
s1
->
save_width
=
s
->
width
;
s1
->
save_height
=
s
->
height
;
s1
->
save_progressive_seq
=
s
->
progressive_sequence
;
...
...
@@ -2269,7 +2274,9 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
}
s2
->
codec_tag
=
avpriv_toupper4
(
avctx
->
codec_tag
);
if
(
s
->
mpeg_enc_ctx_allocated
==
0
&&
s2
->
codec_tag
==
AV_RL32
(
"VCR2"
))
if
(
s
->
mpeg_enc_ctx_allocated
==
0
&&
(
s2
->
codec_tag
==
AV_RL32
(
"VCR2"
)
||
s2
->
codec_tag
==
AV_RL32
(
"BW10"
)
))
vcr2_init_sequence
(
avctx
);
s
->
slice_count
=
0
;
...
...
libavformat/riff.c
View file @
52889b54
...
...
@@ -135,6 +135,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
{
CODEC_ID_MPEG2VIDEO
,
MKTAG
(
'E'
,
'M'
,
'2'
,
'V'
)
},
{
CODEC_ID_MPEG2VIDEO
,
MKTAG
(
'M'
,
'7'
,
'0'
,
'1'
)
},
/* Matrox MPEG2 intra-only */
{
CODEC_ID_MPEG2VIDEO
,
MKTAG
(
'm'
,
'p'
,
'g'
,
'v'
)
},
{
CODEC_ID_MPEG1VIDEO
,
MKTAG
(
'B'
,
'W'
,
'1'
,
'0'
)
},
{
CODEC_ID_MPEG1VIDEO
,
MKTAG
(
'X'
,
'M'
,
'P'
,
'G'
)
},
/* Xing MPEG intra only */
{
CODEC_ID_MJPEG
,
MKTAG
(
'M'
,
'J'
,
'P'
,
'G'
)
},
{
CODEC_ID_MJPEG
,
MKTAG
(
'L'
,
'J'
,
'P'
,
'G'
)
},
...
...
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