Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
4fd7cfef
Commit
4fd7cfef
authored
13 years ago
by
Anton Khirnov
Browse files
Options
Downloads
Patches
Plain Diff
roqvideoenc: add const qualifier to the input frame.
parent
1ea57550
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavcodec/roqvideo.h
+1
-1
1 addition, 1 deletion
libavcodec/roqvideo.h
libavcodec/roqvideoenc.c
+8
-8
8 additions, 8 deletions
libavcodec/roqvideoenc.c
with
9 additions
and
9 deletions
libavcodec/roqvideo.h
+
1
−
1
View file @
4fd7cfef
...
@@ -69,7 +69,7 @@ typedef struct RoqContext {
...
@@ -69,7 +69,7 @@ typedef struct RoqContext {
unsigned
int
framesSinceKeyframe
;
unsigned
int
framesSinceKeyframe
;
AVFrame
*
frame_to_enc
;
const
AVFrame
*
frame_to_enc
;
uint8_t
*
out_buf
;
uint8_t
*
out_buf
;
struct
RoqTempData
*
tmpData
;
struct
RoqTempData
*
tmpData
;
}
RoqContext
;
}
RoqContext
;
...
...
This diff is collapsed.
Click to expand it.
libavcodec/roqvideoenc.c
+
8
−
8
View file @
4fd7cfef
...
@@ -112,7 +112,7 @@ static inline int square(int x)
...
@@ -112,7 +112,7 @@ static inline int square(int x)
return
x
*
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
;
int
diff
=
0
;
...
@@ -124,8 +124,8 @@ static inline int eval_sse(uint8_t *a, uint8_t *b, int count)
...
@@ -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
// FIXME Could use DSPContext.sse, but it is not so speed critical (used
// just for motion estimation).
// just for motion estimation).
static
int
block_sse
(
uint8_t
**
buf1
,
uint8_t
**
buf2
,
int
x1
,
int
y1
,
int
x2
,
static
int
block_sse
(
uint8_t
*
const
*
buf1
,
uint8_t
*
const
*
buf2
,
int
x1
,
int
y1
,
int
y2
,
int
*
stride1
,
int
*
stride2
,
int
size
)
int
x2
,
int
y2
,
const
int
*
stride1
,
const
int
*
stride2
,
int
size
)
{
{
int
i
,
k
;
int
i
,
k
;
int
sse
=
0
;
int
sse
=
0
;
...
@@ -260,7 +260,7 @@ static void create_cel_evals(RoqContext *enc, RoqTempdata *tempData)
...
@@ -260,7 +260,7 @@ static void create_cel_evals(RoqContext *enc, RoqTempdata *tempData)
/**
/**
* Get macroblocks from parts of the image
* 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
;
int
i
,
j
,
cp
;
...
@@ -754,8 +754,8 @@ static void reconstruct_and_encode_image(RoqContext *enc, RoqTempdata *tempData,
...
@@ -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
* 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
,
static
inline
void
frame_block_to_cell
(
uint8_t
*
block
,
uint8_t
*
const
*
data
,
int
top
,
int
left
,
int
*
stride
)
int
top
,
int
left
,
const
int
*
stride
)
{
{
int
i
,
j
,
u
=
0
,
v
=
0
;
int
i
,
j
,
u
=
0
,
v
=
0
;
...
@@ -775,7 +775,7 @@ static inline void frame_block_to_cell(uint8_t *block, uint8_t **data,
...
@@ -775,7 +775,7 @@ static inline void frame_block_to_cell(uint8_t *block, uint8_t **data,
/**
/**
* Create YUV clusters for the entire image
* 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
;
int
i
,
j
,
k
,
l
;
...
@@ -1004,7 +1004,7 @@ static void roq_write_video_info_chunk(RoqContext *enc)
...
@@ -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
)
static
int
roq_encode_frame
(
AVCodecContext
*
avctx
,
unsigned
char
*
buf
,
int
buf_size
,
void
*
data
)
{
{
RoqContext
*
enc
=
avctx
->
priv_data
;
RoqContext
*
enc
=
avctx
->
priv_data
;
AVFrame
*
frame
=
data
;
const
AVFrame
*
frame
=
data
;
uint8_t
*
buf_start
=
buf
;
uint8_t
*
buf_start
=
buf
;
enc
->
out_buf
=
buf
;
enc
->
out_buf
=
buf
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment