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
6d2b6f21
Commit
6d2b6f21
authored
Mar 09, 2013
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: add a parameter to the CABAC macro.
This way it does not look like a constant.
parent
a6931d8e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
h264.c
libavcodec/h264.c
+1
-1
h264.h
libavcodec/h264.h
+3
-3
h264_cabac.c
libavcodec/h264_cabac.c
+2
-2
h264_cavlc.c
libavcodec/h264_cavlc.c
+1
-1
h264_loopfilter.c
libavcodec/h264_loopfilter.c
+1
-1
h264_mvpred.h
libavcodec/h264_mvpred.h
+4
-4
No files found.
libavcodec/h264.c
View file @
6d2b6f21
...
...
@@ -3932,7 +3932,7 @@ static int fill_filter_caches(H264Context *h, int mb_type)
/* CAVLC 8x8dct requires NNZ values for residual decoding that differ
* from what the loop filter needs */
if
(
!
CABAC
&&
h
->
pps
.
transform_8x8_mode
)
{
if
(
!
CABAC
(
h
)
&&
h
->
pps
.
transform_8x8_mode
)
{
if
(
IS_8x8DCT
(
top_type
))
{
nnz_cache
[
4
+
8
*
0
]
=
nnz_cache
[
5
+
8
*
0
]
=
(
h
->
cbp_table
[
top_xy
]
&
0x4000
)
>>
12
;
...
...
libavcodec/h264.h
View file @
6d2b6f21
...
...
@@ -82,7 +82,7 @@
#define FIELD_OR_MBAFF_PICTURE(h) (FRAME_MBAFF(h) || FIELD_PICTURE(h))
#ifndef CABAC
#define CABAC h->pps.cabac
#define CABAC
(h)
h->pps.cabac
#endif
#define CHROMA422 (h->sps.chroma_format_idc == 2)
...
...
@@ -884,7 +884,7 @@ static av_always_inline void write_back_motion_list(H264Context *h,
AV_COPY128
(
mv_dst
+
1
*
b_stride
,
mv_src
+
8
*
1
);
AV_COPY128
(
mv_dst
+
2
*
b_stride
,
mv_src
+
8
*
2
);
AV_COPY128
(
mv_dst
+
3
*
b_stride
,
mv_src
+
8
*
3
);
if
(
CABAC
)
{
if
(
CABAC
(
h
)
)
{
uint8_t
(
*
mvd_dst
)[
2
]
=
&
h
->
mvd_table
[
list
][
FMO
?
8
*
h
->
mb_xy
:
h
->
mb2br_xy
[
h
->
mb_xy
]];
uint8_t
(
*
mvd_src
)[
2
]
=
&
h
->
mvd_cache
[
list
][
scan8
[
0
]];
...
...
@@ -923,7 +923,7 @@ static av_always_inline void write_back_motion(H264Context *h, int mb_type)
if
(
USES_LIST
(
mb_type
,
1
))
write_back_motion_list
(
h
,
b_stride
,
b_xy
,
b8_xy
,
mb_type
,
1
);
if
(
h
->
slice_type_nos
==
AV_PICTURE_TYPE_B
&&
CABAC
)
{
if
(
h
->
slice_type_nos
==
AV_PICTURE_TYPE_B
&&
CABAC
(
h
)
)
{
if
(
IS_8X8
(
mb_type
))
{
uint8_t
*
direct_table
=
&
h
->
direct_table
[
4
*
h
->
mb_xy
];
direct_table
[
1
]
=
h
->
sub_mb_type
[
1
]
>>
1
;
...
...
libavcodec/h264_cabac.c
View file @
6d2b6f21
...
...
@@ -25,7 +25,7 @@
* @author Michael Niedermayer <michaelni@gmx.at>
*/
#define CABAC 1
#define CABAC
(h)
1
#include "config.h"
#include "cabac.h"
...
...
@@ -2303,7 +2303,7 @@ decode_intra_mb:
}
}
if
(
h
->
top_type
&&
!
IS_8x8DCT
(
h
->
top_type
)){
uint32_t
top_empty
=
CABAC
&&
!
IS_INTRA
(
mb_type
)
?
0
:
0x40404040
;
uint32_t
top_empty
=
CABAC
(
h
)
&&
!
IS_INTRA
(
mb_type
)
?
0
:
0x40404040
;
AV_WN32A
(
&
nnz_cache
[
4
+
8
*
0
],
top_empty
);
AV_WN32A
(
&
nnz_cache
[
4
+
8
*
5
],
top_empty
);
AV_WN32A
(
&
nnz_cache
[
4
+
8
*
10
],
top_empty
);
...
...
libavcodec/h264_cavlc.c
View file @
6d2b6f21
...
...
@@ -25,7 +25,7 @@
* @author Michael Niedermayer <michaelni@gmx.at>
*/
#define CABAC 0
#define CABAC
(h)
0
#include "internal.h"
#include "avcodec.h"
...
...
libavcodec/h264_loopfilter.c
View file @
6d2b6f21
...
...
@@ -500,7 +500,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
if
(
IS_INTRA
(
mb_type
|
h
->
cur_pic
.
mb_type
[
mbn_xy
]))
{
AV_WN64A
(
bS
,
0x0003000300030003ULL
);
}
else
{
if
(
!
CABAC
&&
IS_8x8DCT
(
h
->
cur_pic
.
mb_type
[
mbn_xy
]))
{
if
(
!
CABAC
(
h
)
&&
IS_8x8DCT
(
h
->
cur_pic
.
mb_type
[
mbn_xy
]))
{
bS
[
0
]
=
1
+
((
h
->
cbp_table
[
mbn_xy
]
&
0x4000
)
||
h
->
non_zero_count_cache
[
scan8
[
0
]
+
0
]);
bS
[
1
]
=
1
+
((
h
->
cbp_table
[
mbn_xy
]
&
0x4000
)
||
h
->
non_zero_count_cache
[
scan8
[
0
]
+
1
]);
bS
[
2
]
=
1
+
((
h
->
cbp_table
[
mbn_xy
]
&
0x8000
)
||
h
->
non_zero_count_cache
[
scan8
[
0
]
+
2
]);
...
...
libavcodec/h264_mvpred.h
View file @
6d2b6f21
...
...
@@ -545,7 +545,7 @@ static void fill_decode_caches(H264Context *h, int mb_type)
AV_COPY32
(
&
nnz_cache
[
4
+
8
*
10
],
&
nnz
[
4
*
9
]);
}
}
else
{
uint32_t
top_empty
=
CABAC
&&
!
IS_INTRA
(
mb_type
)
?
0
:
0x40404040
;
uint32_t
top_empty
=
CABAC
(
h
)
&&
!
IS_INTRA
(
mb_type
)
?
0
:
0x40404040
;
AV_WN32A
(
&
nnz_cache
[
4
+
8
*
0
],
top_empty
);
AV_WN32A
(
&
nnz_cache
[
4
+
8
*
5
],
top_empty
);
AV_WN32A
(
&
nnz_cache
[
4
+
8
*
10
],
top_empty
);
...
...
@@ -576,11 +576,11 @@ static void fill_decode_caches(H264Context *h, int mb_type)
nnz_cache
[
3
+
8
*
6
+
2
*
8
*
i
]
=
nnz_cache
[
3
+
8
*
7
+
2
*
8
*
i
]
=
nnz_cache
[
3
+
8
*
11
+
2
*
8
*
i
]
=
nnz_cache
[
3
+
8
*
12
+
2
*
8
*
i
]
=
CABAC
&&
!
IS_INTRA
(
mb_type
)
?
0
:
64
;
nnz_cache
[
3
+
8
*
12
+
2
*
8
*
i
]
=
CABAC
(
h
)
&&
!
IS_INTRA
(
mb_type
)
?
0
:
64
;
}
}
if
(
CABAC
)
{
if
(
CABAC
(
h
)
)
{
// top_cbp
if
(
top_type
)
h
->
top_cbp
=
h
->
cbp_table
[
top_xy
];
...
...
@@ -689,7 +689,7 @@ static void fill_decode_caches(H264Context *h, int mb_type)
AV_ZERO32
(
mv_cache
[
2
+
8
*
0
]);
AV_ZERO32
(
mv_cache
[
2
+
8
*
2
]);
if
(
CABAC
)
{
if
(
CABAC
(
h
)
)
{
if
(
USES_LIST
(
top_type
,
list
))
{
const
int
b_xy
=
h
->
mb2br_xy
[
top_xy
];
AV_COPY64
(
mvd_cache
[
0
-
1
*
8
],
mvd
[
b_xy
+
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