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
955fa237
Commit
955fa237
authored
Apr 13, 2018
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvdec: correctly set intra_pic_flag for h264/hevc
parent
8df8a929
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
nvdec_h264.c
libavcodec/nvdec_h264.c
+7
-1
nvdec_hevc.c
libavcodec/nvdec_hevc.c
+1
-1
No files found.
libavcodec/nvdec_h264.c
View file @
955fa237
...
...
@@ -74,7 +74,7 @@ static int nvdec_h264_start_frame(AVCodecContext *avctx,
.
bottom_field_flag
=
h
->
picture_structure
==
PICT_BOTTOM_FIELD
,
.
second_field
=
FIELD_PICTURE
(
h
)
&&
!
h
->
first_field
,
.
ref_pic_flag
=
h
->
nal_ref_idc
!=
0
,
.
intra_pic_flag
=
0
,
.
intra_pic_flag
=
1
,
.
CodecSpecific
.
h264
=
{
.
log2_max_frame_num_minus4
=
sps
->
log2_max_frame_num
-
4
,
...
...
@@ -132,6 +132,9 @@ static int nvdec_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
uint32_t
size
)
{
NVDECContext
*
ctx
=
avctx
->
internal
->
hwaccel_priv_data
;
CUVIDPICPARAMS
*
pp
=
&
ctx
->
pic_params
;
const
H264Context
*
h
=
avctx
->
priv_data
;
const
H264SliceContext
*
sl
=
&
h
->
slice_ctx
[
0
];
void
*
tmp
;
tmp
=
av_fast_realloc
(
ctx
->
bitstream
,
&
ctx
->
bitstream_allocated
,
...
...
@@ -152,6 +155,9 @@ static int nvdec_h264_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
ctx
->
bitstream_len
+=
size
+
3
;
ctx
->
nb_slices
++
;
if
(
sl
->
slice_type
!=
AV_PICTURE_TYPE_I
&&
sl
->
slice_type
!=
AV_PICTURE_TYPE_SI
)
pp
->
intra_pic_flag
=
0
;
return
0
;
}
...
...
libavcodec/nvdec_hevc.c
View file @
955fa237
...
...
@@ -93,7 +93,7 @@ static int nvdec_hevc_start_frame(AVCodecContext *avctx,
.
FrameHeightInMbs
=
sps
->
height
/
16
,
.
CurrPicIdx
=
cf
->
idx
,
.
ref_pic_flag
=
1
,
.
intra_pic_flag
=
0
,
.
intra_pic_flag
=
IS_IRAP
(
s
)
,
.
CodecSpecific
.
hevc
=
{
.
pic_width_in_luma_samples
=
sps
->
width
,
...
...
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