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
845c2c14
Commit
845c2c14
authored
Aug 06, 2016
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi_vc1: Constify pointers
(cherry picked from commit
01d6f84f
)
parent
6bc2808c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
vaapi_vc1.c
libavcodec/vaapi_vc1.c
+16
-16
No files found.
libavcodec/vaapi_vc1.c
View file @
845c2c14
...
@@ -39,7 +39,7 @@ static int get_VAMvModeVC1(enum MVModes mv_mode)
...
@@ -39,7 +39,7 @@ static int get_VAMvModeVC1(enum MVModes mv_mode)
}
}
/** Check whether the MVTYPEMB bitplane is present */
/** Check whether the MVTYPEMB bitplane is present */
static
inline
int
vc1_has_MVTYPEMB_bitplane
(
VC1Context
*
v
)
static
inline
int
vc1_has_MVTYPEMB_bitplane
(
const
VC1Context
*
v
)
{
{
if
(
v
->
mv_type_is_raw
)
if
(
v
->
mv_type_is_raw
)
return
0
;
return
0
;
...
@@ -50,7 +50,7 @@ static inline int vc1_has_MVTYPEMB_bitplane(VC1Context *v)
...
@@ -50,7 +50,7 @@ static inline int vc1_has_MVTYPEMB_bitplane(VC1Context *v)
}
}
/** Check whether the SKIPMB bitplane is present */
/** Check whether the SKIPMB bitplane is present */
static
inline
int
vc1_has_SKIPMB_bitplane
(
VC1Context
*
v
)
static
inline
int
vc1_has_SKIPMB_bitplane
(
const
VC1Context
*
v
)
{
{
if
(
v
->
skip_is_raw
)
if
(
v
->
skip_is_raw
)
return
0
;
return
0
;
...
@@ -59,7 +59,7 @@ static inline int vc1_has_SKIPMB_bitplane(VC1Context *v)
...
@@ -59,7 +59,7 @@ static inline int vc1_has_SKIPMB_bitplane(VC1Context *v)
}
}
/** Check whether the DIRECTMB bitplane is present */
/** Check whether the DIRECTMB bitplane is present */
static
inline
int
vc1_has_DIRECTMB_bitplane
(
VC1Context
*
v
)
static
inline
int
vc1_has_DIRECTMB_bitplane
(
const
VC1Context
*
v
)
{
{
if
(
v
->
dmb_is_raw
)
if
(
v
->
dmb_is_raw
)
return
0
;
return
0
;
...
@@ -67,7 +67,7 @@ static inline int vc1_has_DIRECTMB_bitplane(VC1Context *v)
...
@@ -67,7 +67,7 @@ static inline int vc1_has_DIRECTMB_bitplane(VC1Context *v)
}
}
/** Check whether the ACPRED bitplane is present */
/** Check whether the ACPRED bitplane is present */
static
inline
int
vc1_has_ACPRED_bitplane
(
VC1Context
*
v
)
static
inline
int
vc1_has_ACPRED_bitplane
(
const
VC1Context
*
v
)
{
{
if
(
v
->
acpred_is_raw
)
if
(
v
->
acpred_is_raw
)
return
0
;
return
0
;
...
@@ -77,7 +77,7 @@ static inline int vc1_has_ACPRED_bitplane(VC1Context *v)
...
@@ -77,7 +77,7 @@ static inline int vc1_has_ACPRED_bitplane(VC1Context *v)
}
}
/** Check whether the OVERFLAGS bitplane is present */
/** Check whether the OVERFLAGS bitplane is present */
static
inline
int
vc1_has_OVERFLAGS_bitplane
(
VC1Context
*
v
)
static
inline
int
vc1_has_OVERFLAGS_bitplane
(
const
VC1Context
*
v
)
{
{
if
(
v
->
overflg_is_raw
)
if
(
v
->
overflg_is_raw
)
return
0
;
return
0
;
...
@@ -89,9 +89,9 @@ static inline int vc1_has_OVERFLAGS_bitplane(VC1Context *v)
...
@@ -89,9 +89,9 @@ static inline int vc1_has_OVERFLAGS_bitplane(VC1Context *v)
}
}
/** Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35) */
/** Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35) */
static
int
vc1_get_PTYPE
(
VC1Context
*
v
)
static
int
vc1_get_PTYPE
(
const
VC1Context
*
v
)
{
{
MpegEncContext
*
const
s
=
&
v
->
s
;
const
MpegEncContext
*
s
=
&
v
->
s
;
switch
(
s
->
pict_type
)
{
switch
(
s
->
pict_type
)
{
case
AV_PICTURE_TYPE_I
:
return
0
;
case
AV_PICTURE_TYPE_I
:
return
0
;
case
AV_PICTURE_TYPE_P
:
return
v
->
p_frame_skipped
?
4
:
1
;
case
AV_PICTURE_TYPE_P
:
return
v
->
p_frame_skipped
?
4
:
1
;
...
@@ -101,7 +101,7 @@ static int vc1_get_PTYPE(VC1Context *v)
...
@@ -101,7 +101,7 @@ static int vc1_get_PTYPE(VC1Context *v)
}
}
/** Reconstruct bitstream MVMODE (7.1.1.32) */
/** Reconstruct bitstream MVMODE (7.1.1.32) */
static
inline
VAMvModeVC1
vc1_get_MVMODE
(
VC1Context
*
v
)
static
inline
VAMvModeVC1
vc1_get_MVMODE
(
const
VC1Context
*
v
)
{
{
if
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
||
if
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
||
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
!
v
->
bi_type
))
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_B
&&
!
v
->
bi_type
))
...
@@ -110,7 +110,7 @@ static inline VAMvModeVC1 vc1_get_MVMODE(VC1Context *v)
...
@@ -110,7 +110,7 @@ static inline VAMvModeVC1 vc1_get_MVMODE(VC1Context *v)
}
}
/** Reconstruct bitstream MVMODE2 (7.1.1.33) */
/** Reconstruct bitstream MVMODE2 (7.1.1.33) */
static
inline
VAMvModeVC1
vc1_get_MVMODE2
(
VC1Context
*
v
)
static
inline
VAMvModeVC1
vc1_get_MVMODE2
(
const
VC1Context
*
v
)
{
{
if
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
&&
v
->
mv_mode
==
MV_PMODE_INTENSITY_COMP
)
if
(
v
->
s
.
pict_type
==
AV_PICTURE_TYPE_P
&&
v
->
mv_mode
==
MV_PMODE_INTENSITY_COMP
)
return
get_VAMvModeVC1
(
v
->
mv_mode2
);
return
get_VAMvModeVC1
(
v
->
mv_mode2
);
...
@@ -118,7 +118,7 @@ static inline VAMvModeVC1 vc1_get_MVMODE2(VC1Context *v)
...
@@ -118,7 +118,7 @@ static inline VAMvModeVC1 vc1_get_MVMODE2(VC1Context *v)
}
}
/** Reconstruct bitstream TTFRM (7.1.1.41, Table-53) */
/** Reconstruct bitstream TTFRM (7.1.1.41, Table-53) */
static
inline
int
vc1_get_TTFRM
(
VC1Context
*
v
)
static
inline
int
vc1_get_TTFRM
(
const
VC1Context
*
v
)
{
{
switch
(
v
->
ttfrm
)
{
switch
(
v
->
ttfrm
)
{
case
TT_8X8
:
return
0
;
case
TT_8X8
:
return
0
;
...
@@ -146,9 +146,9 @@ static inline void vc1_pack_bitplanes(uint8_t *bitplane, int n, const uint8_t *f
...
@@ -146,9 +146,9 @@ static inline void vc1_pack_bitplanes(uint8_t *bitplane, int n, const uint8_t *f
static
int
vaapi_vc1_start_frame
(
AVCodecContext
*
avctx
,
av_unused
const
uint8_t
*
buffer
,
av_unused
uint32_t
size
)
static
int
vaapi_vc1_start_frame
(
AVCodecContext
*
avctx
,
av_unused
const
uint8_t
*
buffer
,
av_unused
uint32_t
size
)
{
{
VC1Context
*
const
v
=
avctx
->
priv_data
;
const
VC1Context
*
v
=
avctx
->
priv_data
;
MpegEncContext
*
const
s
=
&
v
->
s
;
const
MpegEncContext
*
s
=
&
v
->
s
;
FFVAContext
*
const
vactx
=
ff_vaapi_get_context
(
avctx
);
FFVAContext
*
vactx
=
ff_vaapi_get_context
(
avctx
);
VAPictureParameterBufferVC1
*
pic_param
;
VAPictureParameterBufferVC1
*
pic_param
;
vactx
->
slice_param_size
=
sizeof
(
VASliceParameterBufferVC1
);
vactx
->
slice_param_size
=
sizeof
(
VASliceParameterBufferVC1
);
...
@@ -311,9 +311,9 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
...
@@ -311,9 +311,9 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
static
int
vaapi_vc1_decode_slice
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buffer
,
uint32_t
size
)
static
int
vaapi_vc1_decode_slice
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buffer
,
uint32_t
size
)
{
{
VC1Context
*
const
v
=
avctx
->
priv_data
;
const
VC1Context
*
v
=
avctx
->
priv_data
;
MpegEncContext
*
const
s
=
&
v
->
s
;
const
MpegEncContext
*
s
=
&
v
->
s
;
FFVAContext
*
const
vactx
=
ff_vaapi_get_context
(
avctx
);
FFVAContext
*
vactx
=
ff_vaapi_get_context
(
avctx
);
VASliceParameterBufferVC1
*
slice_param
;
VASliceParameterBufferVC1
*
slice_param
;
/* Current bit buffer is beyond any marker for VC-1, so skip it */
/* Current bit buffer is beyond any marker for VC-1, so skip it */
...
...
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