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
a881b9aa
Commit
a881b9aa
authored
Jan 04, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/rv30: cleanup rpr handling
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
958e3119
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
rv30.c
libavcodec/rv30.c
+3
-3
rv34.h
libavcodec/rv34.h
+1
-1
No files found.
libavcodec/rv30.c
View file @
a881b9aa
...
@@ -50,7 +50,7 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
...
@@ -50,7 +50,7 @@ static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceIn
si
->
quant
=
get_bits
(
gb
,
5
);
si
->
quant
=
get_bits
(
gb
,
5
);
skip_bits1
(
gb
);
skip_bits1
(
gb
);
si
->
pts
=
get_bits
(
gb
,
13
);
si
->
pts
=
get_bits
(
gb
,
13
);
rpr
=
get_bits
(
gb
,
r
->
rpr
);
rpr
=
get_bits
(
gb
,
av_log2
(
r
->
max_rpr
)
+
1
);
if
(
rpr
){
if
(
rpr
){
if
(
avctx
->
extradata_size
<
rpr
*
2
+
8
)
{
if
(
avctx
->
extradata_size
<
rpr
*
2
+
8
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
avctx
,
AV_LOG_ERROR
,
...
@@ -260,8 +260,8 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx)
...
@@ -260,8 +260,8 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx)
av_log
(
avctx
,
AV_LOG_ERROR
,
"Extradata is too small.
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"Extradata is too small.
\n
"
);
return
-
1
;
return
-
1
;
}
}
r
->
rpr
=
(
avctx
->
extradata
[
1
]
&
7
)
>>
1
;
r
->
rpr
=
FFMIN
(
r
->
rpr
+
1
,
3
)
;
r
->
max_rpr
=
avctx
->
extradata
[
1
]
&
7
;
r
->
parse_slice_header
=
rv30_parse_slice_header
;
r
->
parse_slice_header
=
rv30_parse_slice_header
;
r
->
decode_intra_types
=
rv30_decode_intra_types
;
r
->
decode_intra_types
=
rv30_decode_intra_types
;
...
...
libavcodec/rv34.h
View file @
a881b9aa
...
@@ -102,7 +102,7 @@ typedef struct RV34DecContext{
...
@@ -102,7 +102,7 @@ typedef struct RV34DecContext{
int
dmv
[
4
][
2
];
///< differential motion vectors for the current macroblock
int
dmv
[
4
][
2
];
///< differential motion vectors for the current macroblock
int
rv30
;
///< indicates which RV variasnt is currently decoded
int
rv30
;
///< indicates which RV variasnt is currently decoded
int
rpr
;
///< one field size in RV30 slice header
int
max_rpr
;
int
cur_pts
,
last_pts
,
next_pts
;
int
cur_pts
,
last_pts
,
next_pts
;
int
scaled_weight
;
int
scaled_weight
;
...
...
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