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
cbe28bc0
Commit
cbe28bc0
authored
Jan 08, 2018
by
Maxym Dmytrychenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qsv: better to use alignment by 16 and HEVC 10b requires alignment by 32
parent
34c11333
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
qsvdec.c
libavcodec/qsvdec.c
+14
-4
No files found.
libavcodec/qsvdec.c
View file @
cbe28bc0
...
...
@@ -475,6 +475,7 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
uint8_t
*
dummy_data
;
int
dummy_size
;
int
ret
;
const
AVPixFmtDescriptor
*
desc
;
if
(
!
q
->
avctx_internal
)
{
q
->
avctx_internal
=
avcodec_alloc_context3
(
NULL
);
...
...
@@ -511,8 +512,8 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
/* TODO: flush delayed frames on reinit */
if
(
q
->
parser
->
format
!=
q
->
orig_pix_fmt
||
q
->
parser
->
coded_width
!=
avctx
->
coded_width
||
q
->
parser
->
coded_height
!=
avctx
->
coded_height
)
{
FFALIGN
(
q
->
parser
->
coded_width
,
16
)
!=
FFALIGN
(
avctx
->
coded_width
,
16
)
||
FFALIGN
(
q
->
parser
->
coded_height
,
16
)
!=
FFALIGN
(
avctx
->
coded_height
,
16
)
)
{
enum
AVPixelFormat
pix_fmts
[
3
]
=
{
AV_PIX_FMT_QSV
,
AV_PIX_FMT_NONE
,
AV_PIX_FMT_NONE
};
...
...
@@ -531,8 +532,8 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
avctx
->
pix_fmt
=
pix_fmts
[
1
]
=
qsv_format
;
avctx
->
width
=
q
->
parser
->
width
;
avctx
->
height
=
q
->
parser
->
height
;
avctx
->
coded_width
=
q
->
parser
->
coded_width
;
avctx
->
coded_height
=
q
->
parser
->
coded_height
;
avctx
->
coded_width
=
FFALIGN
(
q
->
parser
->
coded_width
,
16
)
;
avctx
->
coded_height
=
FFALIGN
(
q
->
parser
->
coded_height
,
16
)
;
avctx
->
field_order
=
q
->
parser
->
field_order
;
avctx
->
level
=
q
->
avctx_internal
->
level
;
avctx
->
profile
=
q
->
avctx_internal
->
profile
;
...
...
@@ -543,6 +544,15 @@ int ff_qsv_process_data(AVCodecContext *avctx, QSVContext *q,
avctx
->
pix_fmt
=
ret
;
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
if
(
!
desc
)
goto
reinit_fail
;
if
(
desc
->
comp
[
0
].
depth
>
8
)
{
avctx
->
coded_width
=
FFALIGN
(
q
->
parser
->
coded_width
,
32
);
avctx
->
coded_height
=
FFALIGN
(
q
->
parser
->
coded_height
,
32
);
}
ret
=
qsv_decode_init
(
avctx
,
q
);
if
(
ret
<
0
)
goto
reinit_fail
;
...
...
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