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
028216b2
Commit
028216b2
authored
Jul 12, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: move decode_mb_skip() from h264.h to h.264_mvpred.h
This resolves a circular dependency between the headers.
parent
98704131
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
41 deletions
+39
-41
h264.h
libavcodec/h264.h
+0
-41
h264_mvpred.h
libavcodec/h264_mvpred.h
+39
-0
No files found.
libavcodec/h264.h
View file @
028216b2
...
...
@@ -770,8 +770,6 @@ static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale){
return
h
->
pps
.
chroma_qp_table
[
t
][
qscale
];
}
#include "h264_mvpred.h" //For pred_pskip_motion()
static
void
fill_decode_neighbors
(
H264Context
*
h
,
int
mb_type
){
MpegEncContext
*
const
s
=
&
h
->
s
;
const
int
mb_xy
=
h
->
mb_xy
;
...
...
@@ -1302,43 +1300,4 @@ static av_always_inline int get_dct8x8_allowed(H264Context *h){
return
!
(
AV_RN64A
(
h
->
sub_mb_type
)
&
((
MB_TYPE_16x8
|
MB_TYPE_8x16
|
MB_TYPE_8x8
|
MB_TYPE_DIRECT2
)
*
0x0001000100010001ULL
));
}
/**
* decodes a P_SKIP or B_SKIP macroblock
*/
static
void
av_unused
decode_mb_skip
(
H264Context
*
h
){
MpegEncContext
*
const
s
=
&
h
->
s
;
const
int
mb_xy
=
h
->
mb_xy
;
int
mb_type
=
0
;
memset
(
h
->
non_zero_count
[
mb_xy
],
0
,
48
);
if
(
MB_FIELD
)
mb_type
|=
MB_TYPE_INTERLACED
;
if
(
h
->
slice_type_nos
==
AV_PICTURE_TYPE_B
)
{
// just for fill_caches. pred_direct_motion will set the real mb_type
mb_type
|=
MB_TYPE_L0L1
|
MB_TYPE_DIRECT2
|
MB_TYPE_SKIP
;
if
(
h
->
direct_spatial_mv_pred
){
fill_decode_neighbors
(
h
,
mb_type
);
fill_decode_caches
(
h
,
mb_type
);
//FIXME check what is needed and what not ...
}
ff_h264_pred_direct_motion
(
h
,
&
mb_type
);
mb_type
|=
MB_TYPE_SKIP
;
}
else
{
mb_type
|=
MB_TYPE_16x16
|
MB_TYPE_P0L0
|
MB_TYPE_P1L0
|
MB_TYPE_SKIP
;
fill_decode_neighbors
(
h
,
mb_type
);
pred_pskip_motion
(
h
);
}
write_back_motion
(
h
,
mb_type
);
s
->
current_picture
.
f
.
mb_type
[
mb_xy
]
=
mb_type
;
s
->
current_picture
.
f
.
qscale_table
[
mb_xy
]
=
s
->
qscale
;
h
->
slice_table
[
mb_xy
]
=
h
->
slice_num
;
h
->
prev_mb_skipped
=
1
;
}
#endif
/* AVCODEC_H264_H */
libavcodec/h264_mvpred.h
View file @
028216b2
...
...
@@ -327,4 +327,43 @@ zeromv:
return
;
}
/**
* decodes a P_SKIP or B_SKIP macroblock
*/
static
void
av_unused
decode_mb_skip
(
H264Context
*
h
){
MpegEncContext
*
const
s
=
&
h
->
s
;
const
int
mb_xy
=
h
->
mb_xy
;
int
mb_type
=
0
;
memset
(
h
->
non_zero_count
[
mb_xy
],
0
,
48
);
if
(
MB_FIELD
)
mb_type
|=
MB_TYPE_INTERLACED
;
if
(
h
->
slice_type_nos
==
AV_PICTURE_TYPE_B
)
{
// just for fill_caches. pred_direct_motion will set the real mb_type
mb_type
|=
MB_TYPE_L0L1
|
MB_TYPE_DIRECT2
|
MB_TYPE_SKIP
;
if
(
h
->
direct_spatial_mv_pred
){
fill_decode_neighbors
(
h
,
mb_type
);
fill_decode_caches
(
h
,
mb_type
);
//FIXME check what is needed and what not ...
}
ff_h264_pred_direct_motion
(
h
,
&
mb_type
);
mb_type
|=
MB_TYPE_SKIP
;
}
else
{
mb_type
|=
MB_TYPE_16x16
|
MB_TYPE_P0L0
|
MB_TYPE_P1L0
|
MB_TYPE_SKIP
;
fill_decode_neighbors
(
h
,
mb_type
);
pred_pskip_motion
(
h
);
}
write_back_motion
(
h
,
mb_type
);
s
->
current_picture
.
f
.
mb_type
[
mb_xy
]
=
mb_type
;
s
->
current_picture
.
f
.
qscale_table
[
mb_xy
]
=
s
->
qscale
;
h
->
slice_table
[
mb_xy
]
=
h
->
slice_num
;
h
->
prev_mb_skipped
=
1
;
}
#endif
/* AVCODEC_H264_MVPRED_H */
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