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
87b9e6b2
Commit
87b9e6b2
authored
Oct 28, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify ff_h261_reorder_mb_index
Originally committed as revision 3649 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
1499a1f7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
27 deletions
+10
-27
h261.c
libavcodec/h261.c
+10
-27
No files found.
libavcodec/h261.c
View file @
87b9e6b2
...
...
@@ -150,38 +150,21 @@ static void h261_encode_gob_header(MpegEncContext * s, int mb_line){
}
void
ff_h261_reorder_mb_index
(
MpegEncContext
*
s
){
int
index
=
s
->
mb_x
+
s
->
mb_y
*
s
->
mb_width
;
if
(
index
%
33
==
0
)
h261_encode_gob_header
(
s
,
0
);
/* for CIF the GOB's are fragmented in the middle of a scanline
that's why we need to adjust the x and y index of the macroblocks */
if
(
ff_h261_get_picture_format
(
s
->
width
,
s
->
height
)
==
1
){
// CIF
if
((
s
->
mb_x
==
0
&&
(
s
->
mb_y
%
3
==
0
)
)
||
(
s
->
mb_x
==
11
&&
((
s
->
mb_y
-
1
)
%
3
==
0
)
))
h261_encode_gob_header
(
s
,
0
);
if
(
s
->
mb_x
<
11
){
if
((
s
->
mb_y
%
3
)
==
1
){
s
->
mb_x
+=
0
;
s
->
mb_y
+=
1
;
}
else
if
(
(
s
->
mb_y
%
3
)
==
2
){
s
->
mb_x
+=
11
;
s
->
mb_y
-=
1
;
}
}
else
{
if
((
s
->
mb_y
%
3
)
==
1
){
s
->
mb_x
+=
0
;
s
->
mb_y
-=
1
;
}
else
if
(
(
s
->
mb_y
%
3
)
==
0
){
s
->
mb_x
-=
11
;
s
->
mb_y
+=
1
;
}
}
s
->
mb_x
=
index
%
11
;
index
/=
11
;
s
->
mb_y
=
index
%
3
;
index
/=
3
;
s
->
mb_x
+=
11
*
(
index
%
2
);
index
/=
2
;
s
->
mb_y
+=
3
*
index
;
ff_init_block_index
(
s
);
ff_update_block_index
(
s
);
/* for QCIF we don't need to reorder MB's
there the GOB's aren't fragmented in the middle of a scanline */
}
else
if
(
ff_h261_get_picture_format
(
s
->
width
,
s
->
height
)
==
0
){
// QCIF
if
(
s
->
mb_y
%
3
==
0
&&
s
->
mb_x
==
0
)
h261_encode_gob_header
(
s
,
0
);
}
}
...
...
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