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
0ed714a7
Commit
0ed714a7
authored
Dec 09, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slice structured fixes
Originally committed as revision 2581 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5ea4b18d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
3 deletions
+29
-3
h263.c
libavcodec/h263.c
+29
-3
No files found.
libavcodec/h263.c
View file @
0ed714a7
...
...
@@ -288,6 +288,15 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number)
put_bits
(
&
s
->
pb
,
1
,
0
);
/* no PEI */
if
(
s
->
h263_slice_structured
){
put_bits
(
&
s
->
pb
,
1
,
1
);
assert
(
s
->
mb_x
==
0
&&
s
->
mb_y
==
0
);
ff_h263_encode_mba
(
s
);
put_bits
(
&
s
->
pb
,
1
,
1
);
}
if
(
s
->
h263_aic
){
s
->
y_dc_scale_table
=
s
->
c_dc_scale_table
=
ff_aic_dc_scale_table
;
...
...
@@ -2814,7 +2823,7 @@ int ff_h263_decode_mba(MpegEncContext *s)
int
i
,
mb_pos
;
for
(
i
=
0
;
i
<
6
;
i
++
){
if
(
s
->
mb_num
<
ff_mba_max
[
i
])
break
;
if
(
s
->
mb_num
-
1
<=
ff_mba_max
[
i
])
break
;
}
mb_pos
=
get_bits
(
&
s
->
gb
,
ff_mba_length
[
i
]);
s
->
mb_x
=
mb_pos
%
s
->
mb_width
;
...
...
@@ -2828,7 +2837,7 @@ void ff_h263_encode_mba(MpegEncContext *s)
int
i
,
mb_pos
;
for
(
i
=
0
;
i
<
6
;
i
++
){
if
(
s
->
mb_num
<
ff_mba_max
[
i
])
break
;
if
(
s
->
mb_num
-
1
<=
ff_mba_max
[
i
])
break
;
}
mb_pos
=
s
->
mb_x
+
s
->
mb_width
*
s
->
mb_y
;
put_bits
(
&
s
->
pb
,
ff_mba_length
[
i
],
mb_pos
);
...
...
@@ -3135,6 +3144,7 @@ int ff_h263_resync(MpegEncContext *s){
align_get_bits
(
&
s
->
gb
);
}
//printf("checking next 16 %X\n", show_bits(&s->gb, 24));
if
(
show_bits
(
&
s
->
gb
,
16
)
==
0
){
if
(
s
->
codec_id
==
CODEC_ID_MPEG4
)
ret
=
mpeg4_decode_video_packet_header
(
s
);
...
...
@@ -3146,6 +3156,7 @@ int ff_h263_resync(MpegEncContext *s){
//ok, its not where its supposed to be ...
s
->
gb
=
s
->
last_resync_gb
;
align_get_bits
(
&
s
->
gb
);
printf
(
"align %X
\n
"
,
show_bits
(
&
s
->
gb
,
24
));
left
=
s
->
gb
.
size_in_bits
-
get_bits_count
(
&
s
->
gb
);
for
(;
left
>
16
+
1
+
5
+
5
;
left
-=
8
){
...
...
@@ -3163,7 +3174,7 @@ int ff_h263_resync(MpegEncContext *s){
}
skip_bits
(
&
s
->
gb
,
8
);
}
printf
(
"no resync
\n
"
);
return
-
1
;
}
...
...
@@ -4962,10 +4973,25 @@ int h263_decode_picture_header(MpegEncContext *s)
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
}
/* PEI */
while
(
get_bits1
(
&
s
->
gb
)
!=
0
)
{
skip_bits
(
&
s
->
gb
,
8
);
}
if
(
s
->
h263_slice_structured
){
if
(
get_bits1
(
&
s
->
gb
)
!=
1
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"SEPB1 marker missing
\n
"
);
return
-
1
;
}
ff_h263_decode_mba
(
s
);
if
(
get_bits1
(
&
s
->
gb
)
!=
1
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"SEPB2 marker missing
\n
"
);
return
-
1
;
}
}
s
->
f_code
=
1
;
if
(
s
->
h263_aic
){
...
...
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