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
77742c75
Commit
77742c75
authored
Jan 13, 2017
by
Steve Lhomme
Committed by
Michael Niedermayer
Jan 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva2: use a single macro to test if the DXVA context is valid
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
367cac78
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
15 deletions
+10
-15
dxva2_h264.c
libavcodec/dxva2_h264.c
+1
-3
dxva2_hevc.c
libavcodec/dxva2_hevc.c
+1
-3
dxva2_internal.h
libavcodec/dxva2_internal.h
+5
-0
dxva2_mpeg2.c
libavcodec/dxva2_mpeg2.c
+1
-3
dxva2_vc1.c
libavcodec/dxva2_vc1.c
+1
-3
dxva2_vp9.c
libavcodec/dxva2_vp9.c
+1
-3
No files found.
libavcodec/dxva2_h264.c
View file @
77742c75
...
...
@@ -450,9 +450,7 @@ static int dxva2_h264_start_frame(AVCodecContext *avctx,
AVDXVAContext
*
ctx
=
avctx
->
hwaccel_context
;
struct
dxva2_picture_context
*
ctx_pic
=
h
->
cur_pic_ptr
->
hwaccel_picture_private
;
if
(
DXVA_CONTEXT_DECODER
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_CFG
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_COUNT
(
avctx
,
ctx
)
<=
0
)
if
(
!
DXVA_CONTEXT_VALID
(
avctx
,
ctx
))
return
-
1
;
assert
(
ctx_pic
);
...
...
libavcodec/dxva2_hevc.c
View file @
77742c75
...
...
@@ -364,9 +364,7 @@ static int dxva2_hevc_start_frame(AVCodecContext *avctx,
AVDXVAContext
*
ctx
=
avctx
->
hwaccel_context
;
struct
hevc_dxva2_picture_context
*
ctx_pic
=
h
->
ref
->
hwaccel_picture_private
;
if
(
DXVA_CONTEXT_DECODER
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_CFG
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_COUNT
(
avctx
,
ctx
)
<=
0
)
if
(
!
DXVA_CONTEXT_VALID
(
avctx
,
ctx
))
return
-
1
;
av_assert0
(
ctx_pic
);
...
...
libavcodec/dxva2_internal.h
View file @
77742c75
...
...
@@ -76,6 +76,9 @@ typedef union {
#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD ? ctx->d3d11va.cfg->ConfigBitstreamRaw : ctx->dxva2.cfg->ConfigBitstreamRaw)
#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD ? ctx->d3d11va.cfg->ConfigIntraResidUnsigned : ctx->dxva2.cfg->ConfigIntraResidUnsigned)
#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD ? ctx->d3d11va.cfg->ConfigResidDiffAccelerator : ctx->dxva2.cfg->ConfigResidDiffAccelerator)
#define DXVA_CONTEXT_VALID(avctx, ctx) (DXVA_CONTEXT_DECODER(avctx, ctx) && \
DXVA_CONTEXT_CFG(avctx, ctx) && \
DXVA_CONTEXT_COUNT(avctx, ctx))
#elif CONFIG_DXVA2
#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->dxva2.workaround)
#define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->dxva2.surface_count)
...
...
@@ -85,6 +88,7 @@ typedef union {
#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ctx->dxva2.cfg->ConfigBitstreamRaw)
#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ctx->dxva2.cfg->ConfigIntraResidUnsigned)
#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->dxva2.cfg->ConfigResidDiffAccelerator)
#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->dxva2.decoder && ctx->dxva2.cfg && ctx->dxva2.surface_count)
#elif CONFIG_D3D11VA
#define DXVA_CONTEXT_WORKAROUND(avctx, ctx) (ctx->d3d11va.workaround)
#define DXVA_CONTEXT_COUNT(avctx, ctx) (ctx->d3d11va.surface_count)
...
...
@@ -94,6 +98,7 @@ typedef union {
#define DXVA_CONTEXT_CFG_BITSTREAM(avctx, ctx) (ctx->d3d11va.cfg->ConfigBitstreamRaw)
#define DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) (ctx->d3d11va.cfg->ConfigIntraResidUnsigned)
#define DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) (ctx->d3d11va.cfg->ConfigResidDiffAccelerator)
#define DXVA_CONTEXT_VALID(avctx, ctx) (ctx->d3d11va.decoder && ctx->d3d11va.cfg && ctx->d3d11va.surface_count)
#endif
unsigned
ff_dxva2_get_surface_index
(
const
AVCodecContext
*
avctx
,
...
...
libavcodec/dxva2_mpeg2.c
View file @
77742c75
...
...
@@ -262,9 +262,7 @@ static int dxva2_mpeg2_start_frame(AVCodecContext *avctx,
struct
dxva2_picture_context
*
ctx_pic
=
s
->
current_picture_ptr
->
hwaccel_picture_private
;
if
(
DXVA_CONTEXT_DECODER
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_CFG
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_COUNT
(
avctx
,
ctx
)
<=
0
)
if
(
!
DXVA_CONTEXT_VALID
(
avctx
,
ctx
))
return
-
1
;
assert
(
ctx_pic
);
...
...
libavcodec/dxva2_vc1.c
View file @
77742c75
...
...
@@ -317,9 +317,7 @@ static int dxva2_vc1_start_frame(AVCodecContext *avctx,
AVDXVAContext
*
ctx
=
avctx
->
hwaccel_context
;
struct
dxva2_picture_context
*
ctx_pic
=
v
->
s
.
current_picture_ptr
->
hwaccel_picture_private
;
if
(
DXVA_CONTEXT_DECODER
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_CFG
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_COUNT
(
avctx
,
ctx
)
<=
0
)
if
(
!
DXVA_CONTEXT_VALID
(
avctx
,
ctx
))
return
-
1
;
assert
(
ctx_pic
);
...
...
libavcodec/dxva2_vp9.c
View file @
77742c75
...
...
@@ -261,9 +261,7 @@ static int dxva2_vp9_start_frame(AVCodecContext *avctx,
AVDXVAContext
*
ctx
=
avctx
->
hwaccel_context
;
struct
vp9_dxva2_picture_context
*
ctx_pic
=
h
->
frames
[
CUR_FRAME
].
hwaccel_picture_private
;
if
(
DXVA_CONTEXT_DECODER
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_CFG
(
avctx
,
ctx
)
==
NULL
||
DXVA_CONTEXT_COUNT
(
avctx
,
ctx
)
<=
0
)
if
(
!
DXVA_CONTEXT_VALID
(
avctx
,
ctx
))
return
-
1
;
av_assert0
(
ctx_pic
);
...
...
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