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
188694b2
Commit
188694b2
authored
Jul 05, 2011
by
Jeff Downs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264 - Fix PCM intra coded blocks in monochrome case
parent
956c901c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
h264.c
libavcodec/h264.c
+18
-1
No files found.
libavcodec/h264.c
View file @
188694b2
...
...
@@ -1809,8 +1809,8 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i
}
if
(
!
simple
&&
IS_INTRA_PCM
(
mb_type
))
{
const
int
bit_depth
=
h
->
sps
.
bit_depth_luma
;
if
(
pixel_shift
)
{
const
int
bit_depth
=
h
->
sps
.
bit_depth_luma
;
int
j
;
GetBitContext
gb
;
init_get_bits
(
&
gb
,
(
uint8_t
*
)
h
->
mb
,
384
*
bit_depth
);
...
...
@@ -1821,6 +1821,15 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i
tmp_y
[
j
]
=
get_bits
(
&
gb
,
bit_depth
);
}
if
(
simple
||
!
CONFIG_GRAY
||
!
(
s
->
flags
&
CODEC_FLAG_GRAY
)){
if
(
!
h
->
sps
.
chroma_format_idc
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
uint16_t
*
tmp_cb
=
(
uint16_t
*
)(
dest_cb
+
i
*
uvlinesize
);
uint16_t
*
tmp_cr
=
(
uint16_t
*
)(
dest_cr
+
i
*
uvlinesize
);
for
(
j
=
0
;
j
<
8
;
j
++
)
{
tmp_cb
[
j
]
=
tmp_cr
[
j
]
=
1
<<
(
bit_depth
-
1
);
}
}
}
else
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
uint16_t
*
tmp_cb
=
(
uint16_t
*
)(
dest_cb
+
i
*
uvlinesize
);
for
(
j
=
0
;
j
<
8
;
j
++
)
...
...
@@ -1831,16 +1840,24 @@ static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, i
for
(
j
=
0
;
j
<
8
;
j
++
)
tmp_cr
[
j
]
=
get_bits
(
&
gb
,
bit_depth
);
}
}
}
}
else
{
for
(
i
=
0
;
i
<
16
;
i
++
)
{
memcpy
(
dest_y
+
i
*
linesize
,
h
->
mb
+
i
*
8
,
16
);
}
if
(
simple
||
!
CONFIG_GRAY
||
!
(
s
->
flags
&
CODEC_FLAG_GRAY
)){
if
(
!
h
->
sps
.
chroma_format_idc
)
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
memset
(
dest_cb
+
i
*
uvlinesize
,
1
<<
(
bit_depth
-
1
),
8
);
memset
(
dest_cr
+
i
*
uvlinesize
,
1
<<
(
bit_depth
-
1
),
8
);
}
}
else
{
for
(
i
=
0
;
i
<
8
;
i
++
)
{
memcpy
(
dest_cb
+
i
*
uvlinesize
,
h
->
mb
+
128
+
i
*
4
,
8
);
memcpy
(
dest_cr
+
i
*
uvlinesize
,
h
->
mb
+
160
+
i
*
4
,
8
);
}
}
}
}
}
else
{
...
...
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