Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
0becb078
Commit
0becb078
authored
Apr 04, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: Factorize declaration of mb_sizes array.
parent
a03f8ea0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
6 deletions
+8
-6
h264.c
libavcodec/h264.c
+3
-2
h264.h
libavcodec/h264.h
+1
-0
h264_cabac.c
libavcodec/h264_cabac.c
+2
-2
h264_cavlc.c
libavcodec/h264_cavlc.c
+2
-2
No files found.
libavcodec/h264.c
View file @
0becb078
...
...
@@ -45,6 +45,8 @@
// #undef NDEBUG
#include <assert.h>
const
uint16_t
ff_h264_mb_sizes
[
4
]
=
{
256
,
384
,
512
,
768
};
static
const
uint8_t
rem6
[
QP_MAX_NUM
+
1
]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
0
,
1
,
2
,
3
,
4
,
5
,
0
,
1
,
2
,
3
,
4
,
5
,
0
,
1
,
2
,
3
,
4
,
5
,
0
,
1
,
2
,
3
,
4
,
5
,
0
,
1
,
2
,
3
,
4
,
5
,
0
,
1
,
2
,
3
,
4
,
5
,
...
...
@@ -2138,12 +2140,11 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple,
if
(
!
simple
&&
IS_INTRA_PCM
(
mb_type
))
{
if
(
pixel_shift
)
{
static
const
uint16_t
mb_sizes
[
4
]
=
{
256
,
384
,
512
,
768
};
const
int
bit_depth
=
h
->
sps
.
bit_depth_luma
;
int
j
;
GetBitContext
gb
;
init_get_bits
(
&
gb
,
(
uint8_t
*
)
h
->
mb
,
mb_sizes
[
h
->
sps
.
chroma_format_idc
]
*
bit_depth
);
ff_h264_
mb_sizes
[
h
->
sps
.
chroma_format_idc
]
*
bit_depth
);
for
(
i
=
0
;
i
<
16
;
i
++
)
{
uint16_t
*
tmp_y
=
(
uint16_t
*
)(
dest_y
+
i
*
linesize
);
...
...
libavcodec/h264.h
View file @
0becb078
...
...
@@ -584,6 +584,7 @@ typedef struct H264Context{
extern
const
uint8_t
ff_h264_chroma_qp
[
3
][
QP_MAX_NUM
+
1
];
///< One chroma qp table for each supported bit depth (8, 9, 10).
extern
const
uint16_t
ff_h264_mb_sizes
[
4
];
/**
* Decode SEI
...
...
libavcodec/h264_cabac.c
View file @
0becb078
...
...
@@ -1983,8 +1983,8 @@ decode_intra_mb:
h
->
slice_table
[
mb_xy
]
=
h
->
slice_num
;
if
(
IS_INTRA_PCM
(
mb_type
))
{
static
const
uint16_t
mb_sizes
[
4
]
=
{
256
,
384
,
512
,
768
};
const
int
mb_size
=
mb_sizes
[
h
->
sps
.
chroma_format_idc
]
*
h
->
sps
.
bit_depth_luma
>>
3
;
const
int
mb_size
=
ff_h264_mb_sizes
[
h
->
sps
.
chroma_format_idc
]
*
h
->
sps
.
bit_depth_luma
>>
3
;
const
uint8_t
*
ptr
;
// We assume these blocks are very rare so we do not optimize it.
...
...
libavcodec/h264_cavlc.c
View file @
0becb078
...
...
@@ -764,8 +764,8 @@ decode_intra_mb:
if
(
IS_INTRA_PCM
(
mb_type
)){
unsigned
int
x
;
static
const
uint16_t
mb_sizes
[
4
]
=
{
256
,
384
,
512
,
768
};
const
int
mb_size
=
mb_sizes
[
h
->
sps
.
chroma_format_idc
]
*
h
->
sps
.
bit_depth_luma
>>
3
;
const
int
mb_size
=
ff_h264_mb_sizes
[
h
->
sps
.
chroma_format_idc
]
*
h
->
sps
.
bit_depth_luma
>>
3
;
// We assume these blocks are very rare so we do not optimize it.
align_get_bits
(
&
s
->
gb
);
...
...
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