Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
ee906129
Commit
ee906129
authored
Aug 06, 2016
by
Mark Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi_mpeg2: Constify pointers
parent
03adfe91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vaapi_mpeg2.c
libavcodec/vaapi_mpeg2.c
+4
-4
No files found.
libavcodec/vaapi_mpeg2.c
View file @
ee906129
...
@@ -26,21 +26,21 @@
...
@@ -26,21 +26,21 @@
#include "internal.h"
#include "internal.h"
/** Reconstruct bitstream f_code */
/** Reconstruct bitstream f_code */
static
inline
int
mpeg2_get_f_code
(
MpegEncContext
*
s
)
static
inline
int
mpeg2_get_f_code
(
const
MpegEncContext
*
s
)
{
{
return
(
s
->
mpeg_f_code
[
0
][
0
]
<<
12
)
|
(
s
->
mpeg_f_code
[
0
][
1
]
<<
8
)
|
return
(
s
->
mpeg_f_code
[
0
][
0
]
<<
12
)
|
(
s
->
mpeg_f_code
[
0
][
1
]
<<
8
)
|
(
s
->
mpeg_f_code
[
1
][
0
]
<<
4
)
|
s
->
mpeg_f_code
[
1
][
1
];
(
s
->
mpeg_f_code
[
1
][
0
]
<<
4
)
|
s
->
mpeg_f_code
[
1
][
1
];
}
}
/** Determine frame start: first field for field picture or frame picture */
/** Determine frame start: first field for field picture or frame picture */
static
inline
int
mpeg2_get_is_frame_start
(
MpegEncContext
*
s
)
static
inline
int
mpeg2_get_is_frame_start
(
const
MpegEncContext
*
s
)
{
{
return
s
->
first_field
||
s
->
picture_structure
==
PICT_FRAME
;
return
s
->
first_field
||
s
->
picture_structure
==
PICT_FRAME
;
}
}
static
int
vaapi_mpeg2_start_frame
(
AVCodecContext
*
avctx
,
av_unused
const
uint8_t
*
buffer
,
av_unused
uint32_t
size
)
static
int
vaapi_mpeg2_start_frame
(
AVCodecContext
*
avctx
,
av_unused
const
uint8_t
*
buffer
,
av_unused
uint32_t
size
)
{
{
struct
MpegEncContext
*
const
s
=
avctx
->
priv_data
;
const
MpegEncContext
*
s
=
avctx
->
priv_data
;
struct
vaapi_context
*
const
vactx
=
avctx
->
hwaccel_context
;
struct
vaapi_context
*
const
vactx
=
avctx
->
hwaccel_context
;
VAPictureParameterBufferMPEG2
*
pic_param
;
VAPictureParameterBufferMPEG2
*
pic_param
;
VAIQMatrixBufferMPEG2
*
iq_matrix
;
VAIQMatrixBufferMPEG2
*
iq_matrix
;
...
@@ -101,7 +101,7 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_
...
@@ -101,7 +101,7 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_
static
int
vaapi_mpeg2_decode_slice
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buffer
,
uint32_t
size
)
static
int
vaapi_mpeg2_decode_slice
(
AVCodecContext
*
avctx
,
const
uint8_t
*
buffer
,
uint32_t
size
)
{
{
MpegEncContext
*
const
s
=
avctx
->
priv_data
;
const
MpegEncContext
*
s
=
avctx
->
priv_data
;
VASliceParameterBufferMPEG2
*
slice_param
;
VASliceParameterBufferMPEG2
*
slice_param
;
GetBitContext
gb
;
GetBitContext
gb
;
uint32_t
quantiser_scale_code
,
intra_slice_flag
,
macroblock_offset
;
uint32_t
quantiser_scale_code
,
intra_slice_flag
,
macroblock_offset
;
...
...
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