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
525de956
Commit
525de956
authored
Sep 19, 2019
by
Zhong Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/qsv: add memory type message
Signed-off-by:
Zhong Li
<
zhong.li@intel.com
>
parent
74007dd8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
qsv.c
libavcodec/qsv.c
+29
-0
qsv_internal.h
libavcodec/qsv_internal.h
+3
-0
qsvdec.c
libavcodec/qsvdec.c
+2
-0
No files found.
libavcodec/qsv.c
View file @
525de956
...
...
@@ -137,6 +137,35 @@ int ff_qsv_level_to_mfx(enum AVCodecID codec_id, int level)
}
}
static
const
struct
{
int
mfx_iopattern
;
const
char
*
desc
;
}
qsv_iopatterns
[]
=
{
{
MFX_IOPATTERN_IN_VIDEO_MEMORY
,
"input is video memory surface"
},
{
MFX_IOPATTERN_IN_SYSTEM_MEMORY
,
"input is system memory surface"
},
{
MFX_IOPATTERN_IN_OPAQUE_MEMORY
,
"input is opaque memory surface"
},
{
MFX_IOPATTERN_OUT_VIDEO_MEMORY
,
"output is video memory surface"
},
{
MFX_IOPATTERN_OUT_SYSTEM_MEMORY
,
"output is system memory surface"
},
{
MFX_IOPATTERN_OUT_OPAQUE_MEMORY
,
"output is opaque memory surface"
},
};
int
ff_qsv_print_iopattern
(
void
*
log_ctx
,
int
mfx_iopattern
,
const
char
*
extra_string
)
{
const
char
*
desc
=
NULL
;
for
(
int
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
qsv_iopatterns
);
i
++
)
{
if
(
qsv_iopatterns
[
i
].
mfx_iopattern
==
mfx_iopattern
)
{
desc
=
qsv_iopatterns
[
i
].
desc
;
}
}
if
(
!
desc
)
desc
=
"unknown iopattern"
;
av_log
(
log_ctx
,
AV_LOG_VERBOSE
,
"%s: %s
\n
"
,
extra_string
,
desc
);
return
0
;
}
static
const
struct
{
mfxStatus
mfxerr
;
int
averr
;
...
...
libavcodec/qsv_internal.h
View file @
525de956
...
...
@@ -101,6 +101,9 @@ typedef struct QSVFramesContext {
int
nb_mids
;
}
QSVFramesContext
;
int
ff_qsv_print_iopattern
(
void
*
log_ctx
,
int
mfx_iopattern
,
const
char
*
extra_string
);
/**
* Convert a libmfx error code into an ffmpeg error code.
*/
...
...
libavcodec/qsvdec.c
View file @
525de956
...
...
@@ -193,6 +193,8 @@ static int qsv_decode_preinit(AVCodecContext *avctx, QSVContext *q, enum AVPixel
iopattern
=
MFX_IOPATTERN_OUT_SYSTEM_MEMORY
;
q
->
iopattern
=
iopattern
;
ff_qsv_print_iopattern
(
avctx
,
q
->
iopattern
,
"Decoder"
);
ret
=
qsv_init_session
(
avctx
,
q
,
session
,
avctx
->
hw_frames_ctx
,
avctx
->
hw_device_ctx
);
if
(
ret
<
0
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error initializing an MFX session
\n
"
);
...
...
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