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
d9d0c1cc
Commit
d9d0c1cc
authored
Aug 10, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mjpegdec: support AVRn interlaced
Fixes Ticket1527 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
633b90ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
mjpegdec.c
libavcodec/mjpegdec.c
+16
-3
No files found.
libavcodec/mjpegdec.c
View file @
d9d0c1cc
...
@@ -1209,9 +1209,6 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
...
@@ -1209,9 +1209,6 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
}
else
}
else
prev_shift
=
point_transform
=
0
;
prev_shift
=
point_transform
=
0
;
for
(
i
=
0
;
i
<
nb_components
;
i
++
)
s
->
last_dc
[
i
]
=
1024
;
if
(
nb_components
>
1
)
{
if
(
nb_components
>
1
)
{
/* interleaved stream */
/* interleaved stream */
s
->
mb_width
=
(
s
->
width
+
s
->
h_max
*
block_size
-
1
)
/
(
s
->
h_max
*
block_size
);
s
->
mb_width
=
(
s
->
width
+
s
->
h_max
*
block_size
-
1
)
/
(
s
->
h_max
*
block_size
);
...
@@ -1236,6 +1233,9 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
...
@@ -1236,6 +1233,9 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
/* mjpeg-b can have padding bytes between sos and image data, skip them */
/* mjpeg-b can have padding bytes between sos and image data, skip them */
for
(
i
=
s
->
mjpb_skiptosod
;
i
>
0
;
i
--
)
for
(
i
=
s
->
mjpb_skiptosod
;
i
>
0
;
i
--
)
skip_bits
(
&
s
->
gb
,
8
);
skip_bits
(
&
s
->
gb
,
8
);
next_field:
for
(
i
=
0
;
i
<
nb_components
;
i
++
)
s
->
last_dc
[
i
]
=
1024
;
if
(
s
->
lossless
)
{
if
(
s
->
lossless
)
{
av_assert0
(
s
->
picture_ptr
==
&
s
->
picture
);
av_assert0
(
s
->
picture_ptr
==
&
s
->
picture
);
...
@@ -1266,6 +1266,19 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
...
@@ -1266,6 +1266,19 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
return
-
1
;
return
-
1
;
}
}
}
}
if
(
s
->
interlaced
&&
get_bits_left
(
&
s
->
gb
)
>
32
&&
show_bits
(
&
s
->
gb
,
8
)
==
0xFF
)
{
GetBitContext
bak
=
s
->
gb
;
align_get_bits
(
&
bak
);
if
(
show_bits
(
&
bak
,
16
)
==
0xFFD1
)
{
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"AVRn ingterlaced picture
\n
"
);
s
->
gb
=
bak
;
skip_bits
(
&
s
->
gb
,
16
);
s
->
bottom_field
^=
1
;
goto
next_field
;
}
}
emms_c
();
emms_c
();
return
0
;
return
0
;
out_of_range:
out_of_range:
...
...
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