Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
bb65be98
Commit
bb65be98
authored
Feb 27, 2014
by
Dmitry Kovalev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reusing existing mem_{get, put}_be32() functions.
Change-Id: Iba128039534e16a6e0a8cfe7e58306c4655e9f0d
parent
3bb2ae5c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
13 deletions
+6
-13
libs.mk
libs.mk
+2
-0
vp9/decoder/vp9_decodeframe.c
vp9/decoder/vp9_decodeframe.c
+2
-5
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_bitstream.c
+2
-8
No files found.
libs.mk
View file @
bb65be98
...
...
@@ -164,6 +164,8 @@ endif
CODEC_SRCS-$(BUILD_LIBVPX)
+=
build/make/version.sh
CODEC_SRCS-$(BUILD_LIBVPX)
+=
build/make/rtcd.sh
CODEC_SRCS-$(BUILD_LIBVPX)
+=
vpx_ports/emmintrin_compat.h
CODEC_SRCS-$(BUILD_LIBVPX)
+=
vpx_ports/mem_ops.h
CODEC_SRCS-$(BUILD_LIBVPX)
+=
vpx_ports/mem_ops_aligned.h
CODEC_SRCS-$(BUILD_LIBVPX)
+=
vpx_ports/vpx_once.h
CODEC_SRCS-$(BUILD_LIBVPX)
+=
$(BUILD_PFX)
vpx_config.c
INSTALL-SRCS-no
+=
$(BUILD_PFX)
vpx_config.c
...
...
vp9/decoder/vp9_decodeframe.c
View file @
bb65be98
...
...
@@ -15,6 +15,7 @@
#include "./vpx_scale_rtcd.h"
#include "vpx_mem/vpx_mem.h"
#include "vpx_ports/mem_ops.h"
#include "vpx_scale/vpx_scale.h"
#include "vp9/common/vp9_alloccommon.h"
...
...
@@ -39,10 +40,6 @@
#include "vp9/decoder/vp9_reader.h"
#include "vp9/decoder/vp9_thread.h"
static
int
read_be32
(
const
uint8_t
*
p
)
{
return
(
p
[
0
]
<<
24
)
|
(
p
[
1
]
<<
16
)
|
(
p
[
2
]
<<
8
)
|
p
[
3
];
}
static
int
is_compound_reference_allowed
(
const
VP9_COMMON
*
cm
)
{
int
i
;
for
(
i
=
1
;
i
<
REFS_PER_FRAME
;
++
i
)
...
...
@@ -837,7 +834,7 @@ static size_t get_tile(const uint8_t *const data_end,
vpx_internal_error
(
error_info
,
VPX_CODEC_CORRUPT_FRAME
,
"Truncated packet or corrupt tile length"
);
size
=
read
_be32
(
*
data
);
size
=
mem_get
_be32
(
*
data
);
*
data
+=
4
;
if
(
size
>
(
size_t
)(
data_end
-
*
data
))
...
...
vp9/encoder/vp9_bitstream.c
View file @
bb65be98
...
...
@@ -14,6 +14,7 @@
#include "vpx/vpx_encoder.h"
#include "vpx_mem/vpx_mem.h"
#include "vpx_ports/mem_ops.h"
#include "vp9/common/vp9_entropymode.h"
#include "vp9/common/vp9_entropymv.h"
...
...
@@ -61,13 +62,6 @@ static void write_inter_mode(vp9_writer *w, MB_PREDICTION_MODE mode,
&
inter_mode_encodings
[
INTER_OFFSET
(
mode
)]);
}
static
INLINE
void
write_be32
(
uint8_t
*
p
,
int
value
)
{
p
[
0
]
=
value
>>
24
;
p
[
1
]
=
value
>>
16
;
p
[
2
]
=
value
>>
8
;
p
[
3
]
=
value
;
}
void
vp9_encode_unsigned_max
(
struct
vp9_write_bit_buffer
*
wb
,
int
data
,
int
max
)
{
vp9_wb_write_literal
(
wb
,
data
,
get_unsigned_bits
(
max
));
...
...
@@ -1007,7 +1001,7 @@ static size_t encode_tiles(VP9_COMP *cpi, uint8_t *data_ptr) {
vp9_stop_encode
(
&
residual_bc
);
if
(
tile_col
<
tile_cols
-
1
||
tile_row
<
tile_rows
-
1
)
{
// size of this tile
write
_be32
(
data_ptr
+
total_size
,
residual_bc
.
pos
);
mem_put
_be32
(
data_ptr
+
total_size
,
residual_bc
.
pos
);
total_size
+=
4
;
}
...
...
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