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
99a35d1c
Commit
99a35d1c
authored
Jan 17, 2015
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: move neighbor_transform_size into the per-slice context
parent
e6287f07
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
h264.h
libavcodec/h264.h
+5
-5
h264_cabac.c
libavcodec/h264_cabac.c
+2
-2
h264_mvpred.h
libavcodec/h264_mvpred.h
+1
-1
No files found.
libavcodec/h264.h
View file @
99a35d1c
...
...
@@ -342,6 +342,11 @@ typedef struct H264SliceContext {
unsigned
int
topright_samples_available
;
unsigned
int
left_samples_available
;
/**
* number of neighbors (top and/or left) that used 8x8 dct
*/
int
neighbor_transform_size
;
/**
* non zero coeff count cache.
* is 64 if not available.
...
...
@@ -398,11 +403,6 @@ typedef struct H264Context {
#define LIST_NOT_USED -1 // FIXME rename?
#define PART_NOT_AVAILABLE -2
/**
* number of neighbors (top and/or left) that used 8x8 dct
*/
int
neighbor_transform_size
;
/**
* block_offset[ 0..23] for frame macroblocks
* block_offset[24..47] for field macroblocks
...
...
libavcodec/h264_cabac.c
View file @
99a35d1c
...
...
@@ -2050,7 +2050,7 @@ decode_intra_mb:
if
(
IS_INTRA
(
mb_type
)
)
{
int
i
,
pred_mode
;
if
(
IS_INTRA4x4
(
mb_type
)
)
{
if
(
dct8x8_allowed
&&
get_cabac_noinline
(
&
h
->
cabac
,
&
h
->
cabac_state
[
399
+
h
->
neighbor_transform_size
]
)
)
{
if
(
dct8x8_allowed
&&
get_cabac_noinline
(
&
h
->
cabac
,
&
h
->
cabac_state
[
399
+
sl
->
neighbor_transform_size
])
)
{
mb_type
|=
MB_TYPE_8x8DCT
;
for
(
i
=
0
;
i
<
16
;
i
+=
4
)
{
int
pred
=
pred_intra_mode
(
h
,
sl
,
i
);
...
...
@@ -2309,7 +2309,7 @@ decode_intra_mb:
h
->
cbp_table
[
mb_xy
]
=
h
->
cbp
=
cbp
;
if
(
dct8x8_allowed
&&
(
cbp
&
15
)
&&
!
IS_INTRA
(
mb_type
)
)
{
mb_type
|=
MB_TYPE_8x8DCT
*
get_cabac_noinline
(
&
h
->
cabac
,
&
h
->
cabac_state
[
399
+
h
->
neighbor_transform_size
]
);
mb_type
|=
MB_TYPE_8x8DCT
*
get_cabac_noinline
(
&
h
->
cabac
,
&
h
->
cabac_state
[
399
+
sl
->
neighbor_transform_size
]
);
}
/* It would be better to do this in fill_decode_caches, but we don't know
...
...
libavcodec/h264_mvpred.h
View file @
99a35d1c
...
...
@@ -794,7 +794,7 @@ static void fill_decode_caches(H264Context *h, H264SliceContext *sl, int mb_type
}
}
h
->
neighbor_transform_size
=
!!
IS_8x8DCT
(
top_type
)
+
!!
IS_8x8DCT
(
left_type
[
LTOP
]);
sl
->
neighbor_transform_size
=
!!
IS_8x8DCT
(
top_type
)
+
!!
IS_8x8DCT
(
left_type
[
LTOP
]);
}
/**
...
...
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