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
038eb59b
Commit
038eb59b
authored
May 13, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg2dec: support slice_vertical_position_extension
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
6b0a0dc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
mpeg12.c
libavcodec/mpeg12.c
+10
-2
No files found.
libavcodec/mpeg12.c
View file @
038eb59b
...
...
@@ -1684,6 +1684,8 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
assert
(
mb_y
<
s
->
mb_height
);
init_get_bits
(
&
s
->
gb
,
*
buf
,
buf_size
*
8
);
if
(
s
->
codec_id
!=
CODEC_ID_MPEG1VIDEO
&&
s
->
mb_height
>
2800
/
16
)
skip_bits
(
&
s
->
gb
,
3
);
ff_mpeg1_clean_buffers
(
s
);
s
->
interlaced_dct
=
0
;
...
...
@@ -1923,7 +1925,10 @@ static int slice_decode_thread(AVCodecContext *c, void *arg)
start_code
=
-
1
;
buf
=
avpriv_mpv_find_start_code
(
buf
,
s
->
gb
.
buffer_end
,
&
start_code
);
mb_y
=
(
start_code
-
SLICE_MIN_START_CODE
)
<<
field_pic
;
mb_y
=
start_code
-
SLICE_MIN_START_CODE
;
if
(
s
->
codec_id
!=
CODEC_ID_MPEG1VIDEO
&&
s
->
mb_height
>
2800
/
16
)
mb_y
+=
(
*
buf
&
0xE0
)
<<
2
;
mb_y
<<=
field_pic
;
if
(
s
->
picture_structure
==
PICT_BOTTOM_FIELD
)
mb_y
++
;
if
(
mb_y
<
0
||
mb_y
>=
s
->
end_mb_y
)
...
...
@@ -2443,9 +2448,12 @@ static int decode_chunks(AVCodecContext *avctx,
if
(
start_code
>=
SLICE_MIN_START_CODE
&&
start_code
<=
SLICE_MAX_START_CODE
&&
last_code
!=
0
)
{
const
int
field_pic
=
s2
->
picture_structure
!=
PICT_FRAME
;
int
mb_y
=
(
start_code
-
SLICE_MIN_START_CODE
)
<<
field_pic
;
int
mb_y
=
start_code
-
SLICE_MIN_START_CODE
;
last_code
=
SLICE_MIN_START_CODE
;
if
(
s2
->
codec_id
!=
CODEC_ID_MPEG1VIDEO
&&
s2
->
mb_height
>
2800
/
16
)
mb_y
+=
(
*
buf_ptr
&
0xE0
)
<<
2
;
mb_y
<<=
field_pic
;
if
(
s2
->
picture_structure
==
PICT_BOTTOM_FIELD
)
mb_y
++
;
...
...
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