Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
b9fce052
Commit
b9fce052
authored
16 years ago
by
Stefan Gehrer
Browse files
Options
Downloads
Patches
Plain Diff
fix multiple slices per frame
Originally committed as revision 17137 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
4ca6f4b2
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/cavs.c
+0
-2
0 additions, 2 deletions
libavcodec/cavs.c
libavcodec/cavsdec.c
+11
-1
11 additions, 1 deletion
libavcodec/cavsdec.c
with
11 additions
and
3 deletions
libavcodec/cavs.c
+
0
−
2
View file @
b9fce052
...
@@ -608,8 +608,6 @@ int ff_cavs_next_mb(AVSContext *h) {
...
@@ -608,8 +608,6 @@ int ff_cavs_next_mb(AVSContext *h) {
h
->
cv
=
h
->
picture
.
data
[
2
]
+
h
->
mby
*
8
*
h
->
c_stride
;
h
->
cv
=
h
->
picture
.
data
[
2
]
+
h
->
mby
*
8
*
h
->
c_stride
;
if
(
h
->
mby
==
h
->
mb_height
)
{
//frame end
if
(
h
->
mby
==
h
->
mb_height
)
{
//frame end
return
0
;
return
0
;
}
else
{
//check_for_slice(h);
}
}
}
}
return
1
;
return
1
;
...
...
This diff is collapsed.
Click to expand it.
libavcodec/cavsdec.c
+
11
−
1
View file @
b9fce052
...
@@ -415,6 +415,9 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb) {
...
@@ -415,6 +415,9 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb) {
if
(
h
->
stc
>
0xAF
)
if
(
h
->
stc
>
0xAF
)
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"unexpected start code 0x%02x
\n
"
,
h
->
stc
);
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"unexpected start code 0x%02x
\n
"
,
h
->
stc
);
h
->
mby
=
h
->
stc
;
h
->
mby
=
h
->
stc
;
/* mark top macroblocks as unavailable */
h
->
flags
&=
~
(
B_AVAIL
|
C_AVAIL
);
if
((
h
->
mby
==
0
)
&&
(
!
h
->
qp_fixed
)){
if
((
h
->
mby
==
0
)
&&
(
!
h
->
qp_fixed
)){
h
->
qp_fixed
=
get_bits1
(
gb
);
h
->
qp_fixed
=
get_bits1
(
gb
);
h
->
qp
=
get_bits
(
gb
,
6
);
h
->
qp
=
get_bits
(
gb
,
6
);
...
@@ -431,6 +434,9 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb) {
...
@@ -431,6 +434,9 @@ static inline int decode_slice_header(AVSContext *h, GetBitContext *gb) {
static
inline
void
check_for_slice
(
AVSContext
*
h
)
{
static
inline
void
check_for_slice
(
AVSContext
*
h
)
{
GetBitContext
*
gb
=
&
h
->
s
.
gb
;
GetBitContext
*
gb
=
&
h
->
s
.
gb
;
int
align
;
int
align
;
if
(
h
->
mbx
)
return
;
align
=
(
-
get_bits_count
(
gb
))
&
7
;
align
=
(
-
get_bits_count
(
gb
))
&
7
;
if
((
show_bits_long
(
gb
,
24
+
align
)
&
0xFFFFFF
)
==
0x000001
)
{
if
((
show_bits_long
(
gb
,
24
+
align
)
&
0xFFFFFF
)
==
0x000001
)
{
skip_bits_long
(
gb
,
24
+
align
);
skip_bits_long
(
gb
,
24
+
align
);
...
@@ -525,13 +531,14 @@ static int decode_pic(AVSContext *h) {
...
@@ -525,13 +531,14 @@ static int decode_pic(AVSContext *h) {
}
else
{
}
else
{
h
->
alpha_offset
=
h
->
beta_offset
=
0
;
h
->
alpha_offset
=
h
->
beta_offset
=
0
;
}
}
check_for_slice
(
h
);
if
(
h
->
pic_type
==
FF_I_TYPE
)
{
if
(
h
->
pic_type
==
FF_I_TYPE
)
{
do
{
do
{
check_for_slice
(
h
);
decode_mb_i
(
h
,
0
);
decode_mb_i
(
h
,
0
);
}
while
(
ff_cavs_next_mb
(
h
));
}
while
(
ff_cavs_next_mb
(
h
));
}
else
if
(
h
->
pic_type
==
FF_P_TYPE
)
{
}
else
if
(
h
->
pic_type
==
FF_P_TYPE
)
{
do
{
do
{
check_for_slice
(
h
);
if
(
h
->
skip_mode_flag
)
{
if
(
h
->
skip_mode_flag
)
{
skip_count
=
get_ue_golomb
(
&
s
->
gb
);
skip_count
=
get_ue_golomb
(
&
s
->
gb
);
while
(
skip_count
--
)
{
while
(
skip_count
--
)
{
...
@@ -539,6 +546,7 @@ static int decode_pic(AVSContext *h) {
...
@@ -539,6 +546,7 @@ static int decode_pic(AVSContext *h) {
if
(
!
ff_cavs_next_mb
(
h
))
if
(
!
ff_cavs_next_mb
(
h
))
goto
done
;
goto
done
;
}
}
check_for_slice
(
h
);
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
P_16X16
;
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
P_16X16
;
}
else
}
else
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
P_SKIP
;
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
P_SKIP
;
...
@@ -549,6 +557,7 @@ static int decode_pic(AVSContext *h) {
...
@@ -549,6 +557,7 @@ static int decode_pic(AVSContext *h) {
}
while
(
ff_cavs_next_mb
(
h
));
}
while
(
ff_cavs_next_mb
(
h
));
}
else
{
/* FF_B_TYPE */
}
else
{
/* FF_B_TYPE */
do
{
do
{
check_for_slice
(
h
);
if
(
h
->
skip_mode_flag
)
{
if
(
h
->
skip_mode_flag
)
{
skip_count
=
get_ue_golomb
(
&
s
->
gb
);
skip_count
=
get_ue_golomb
(
&
s
->
gb
);
while
(
skip_count
--
)
{
while
(
skip_count
--
)
{
...
@@ -556,6 +565,7 @@ static int decode_pic(AVSContext *h) {
...
@@ -556,6 +565,7 @@ static int decode_pic(AVSContext *h) {
if
(
!
ff_cavs_next_mb
(
h
))
if
(
!
ff_cavs_next_mb
(
h
))
goto
done
;
goto
done
;
}
}
check_for_slice
(
h
);
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
B_DIRECT
;
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
B_DIRECT
;
}
else
}
else
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
B_SKIP
;
mb_type
=
get_ue_golomb
(
&
s
->
gb
)
+
B_SKIP
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment