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
4fd7cfef
Commit
4fd7cfef
authored
Feb 19, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
roqvideoenc: add const qualifier to the input frame.
parent
1ea57550
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
roqvideo.h
libavcodec/roqvideo.h
+1
-1
roqvideoenc.c
libavcodec/roqvideoenc.c
+8
-8
No files found.
libavcodec/roqvideo.h
View file @
4fd7cfef
...
...
@@ -69,7 +69,7 @@ typedef struct RoqContext {
unsigned
int
framesSinceKeyframe
;
AVFrame
*
frame_to_enc
;
const
AVFrame
*
frame_to_enc
;
uint8_t
*
out_buf
;
struct
RoqTempData
*
tmpData
;
}
RoqContext
;
...
...
libavcodec/roqvideoenc.c
View file @
4fd7cfef
...
...
@@ -112,7 +112,7 @@ static inline int square(int x)
return
x
*
x
;
}
static
inline
int
eval_sse
(
uint8_t
*
a
,
uint8_t
*
b
,
int
count
)
static
inline
int
eval_sse
(
const
uint8_t
*
a
,
const
uint8_t
*
b
,
int
count
)
{
int
diff
=
0
;
...
...
@@ -124,8 +124,8 @@ static inline int eval_sse(uint8_t *a, uint8_t *b, int count)
// FIXME Could use DSPContext.sse, but it is not so speed critical (used
// just for motion estimation).
static
int
block_sse
(
uint8_t
*
*
buf1
,
uint8_t
**
buf2
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
int
*
stride1
,
int
*
stride2
,
int
size
)
static
int
block_sse
(
uint8_t
*
const
*
buf1
,
uint8_t
*
const
*
buf2
,
int
x1
,
int
y1
,
int
x2
,
int
y2
,
const
int
*
stride1
,
const
int
*
stride2
,
int
size
)
{
int
i
,
k
;
int
sse
=
0
;
...
...
@@ -260,7 +260,7 @@ static void create_cel_evals(RoqContext *enc, RoqTempdata *tempData)
/**
* Get macroblocks from parts of the image
*/
static
void
get_frame_mb
(
AVFrame
*
frame
,
int
x
,
int
y
,
uint8_t
mb
[],
int
dim
)
static
void
get_frame_mb
(
const
AVFrame
*
frame
,
int
x
,
int
y
,
uint8_t
mb
[],
int
dim
)
{
int
i
,
j
,
cp
;
...
...
@@ -754,8 +754,8 @@ static void reconstruct_and_encode_image(RoqContext *enc, RoqTempdata *tempData,
/**
* Create a single YUV cell from a 2x2 section of the image
*/
static
inline
void
frame_block_to_cell
(
uint8_t
*
block
,
uint8_t
**
data
,
int
top
,
int
left
,
int
*
stride
)
static
inline
void
frame_block_to_cell
(
uint8_t
*
block
,
uint8_t
*
const
*
data
,
int
top
,
int
left
,
const
int
*
stride
)
{
int
i
,
j
,
u
=
0
,
v
=
0
;
...
...
@@ -775,7 +775,7 @@ static inline void frame_block_to_cell(uint8_t *block, uint8_t **data,
/**
* Create YUV clusters for the entire image
*/
static
void
create_clusters
(
AVFrame
*
frame
,
int
w
,
int
h
,
uint8_t
*
yuvClusters
)
static
void
create_clusters
(
const
AVFrame
*
frame
,
int
w
,
int
h
,
uint8_t
*
yuvClusters
)
{
int
i
,
j
,
k
,
l
;
...
...
@@ -1004,7 +1004,7 @@ static void roq_write_video_info_chunk(RoqContext *enc)
static
int
roq_encode_frame
(
AVCodecContext
*
avctx
,
unsigned
char
*
buf
,
int
buf_size
,
void
*
data
)
{
RoqContext
*
enc
=
avctx
->
priv_data
;
AVFrame
*
frame
=
data
;
const
AVFrame
*
frame
=
data
;
uint8_t
*
buf_start
=
buf
;
enc
->
out_buf
=
buf
;
...
...
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