Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yushin Cho
aom-rav1e
Commits
6f0cc9f5
Commit
6f0cc9f5
authored
Aug 13, 2015
by
Yaowu Xu
Committed by
Gerrit Code Review
Aug 13, 2015
Browse files
Merge "VP9Decoder -> VP10Decoder"
parents
706b0ad6
cf9366e5
Changes
9
Hide whitespace changes
Inline
Side-by-side
vp10/decoder/decodeframe.c
View file @
6f0cc9f5
...
...
@@ -551,7 +551,7 @@ static void extend_and_predict(const uint8_t *buf_ptr1, int pre_buf_stride,
}
#endif // CONFIG_VP9_HIGHBITDEPTH
static
void
dec_build_inter_predictors
(
VP
9
Decoder
*
const
pbi
,
MACROBLOCKD
*
xd
,
static
void
dec_build_inter_predictors
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
xd
,
int
plane
,
int
bw
,
int
bh
,
int
x
,
int
y
,
int
w
,
int
h
,
int
mi_x
,
int
mi_y
,
const
InterpKernel
*
kernel
,
...
...
@@ -703,7 +703,7 @@ static void dec_build_inter_predictors(VP9Decoder *const pbi, MACROBLOCKD *xd,
#endif // CONFIG_VP9_HIGHBITDEPTH
}
static
void
dec_build_inter_predictors_sb
(
VP
9
Decoder
*
const
pbi
,
static
void
dec_build_inter_predictors_sb
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
xd
,
int
mi_row
,
int
mi_col
)
{
int
plane
;
...
...
@@ -811,7 +811,7 @@ static MB_MODE_INFO *set_offsets(VP10_COMMON *const cm, MACROBLOCKD *const xd,
return
&
xd
->
mi
[
0
]
->
mbmi
;
}
static
void
decode_block
(
VP
9
Decoder
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
static
void
decode_block
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
int
mi_row
,
int
mi_col
,
vpx_reader
*
r
,
BLOCK_SIZE
bsize
,
int
bwl
,
int
bhl
)
{
...
...
@@ -947,7 +947,7 @@ static PARTITION_TYPE read_partition(MACROBLOCKD *xd, int mi_row, int mi_col,
}
// TODO(slavarnway): eliminate bsize and subsize in future commits
static
void
decode_partition
(
VP
9
Decoder
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
static
void
decode_partition
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
int
mi_row
,
int
mi_col
,
vpx_reader
*
r
,
BLOCK_SIZE
bsize
,
int
n4x4_l2
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
...
...
@@ -1402,7 +1402,7 @@ static void get_tile_buffer(const uint8_t *const data_end,
*
data
+=
size
;
}
static
void
get_tile_buffers
(
VP
9
Decoder
*
pbi
,
static
void
get_tile_buffers
(
VP
10
Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
int
tile_cols
,
int
tile_rows
,
TileBuffer
(
*
tile_buffers
)[
1
<<
6
])
{
...
...
@@ -1419,7 +1419,7 @@ static void get_tile_buffers(VP9Decoder *pbi,
}
}
static
const
uint8_t
*
decode_tiles
(
VP
9
Decoder
*
pbi
,
static
const
uint8_t
*
decode_tiles
(
VP
10
Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
...
...
@@ -1595,7 +1595,7 @@ static int compare_tile_buffers(const void *a, const void *b) {
return
(
int
)(
buf2
->
size
-
buf1
->
size
);
}
static
const
uint8_t
*
decode_tiles_mt
(
VP
9
Decoder
*
pbi
,
static
const
uint8_t
*
decode_tiles_mt
(
VP
10
Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
...
...
@@ -1802,7 +1802,7 @@ static void read_bitdepth_colorspace_sampling(
}
}
static
size_t
read_uncompressed_header
(
VP
9
Decoder
*
pbi
,
static
size_t
read_uncompressed_header
(
VP
10
Decoder
*
pbi
,
struct
vpx_read_bit_buffer
*
rb
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
BufferPool
*
const
pool
=
cm
->
buffer_pool
;
...
...
@@ -2004,7 +2004,7 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
return
sz
;
}
static
int
read_compressed_header
(
VP
9
Decoder
*
pbi
,
const
uint8_t
*
data
,
static
int
read_compressed_header
(
VP
10
Decoder
*
pbi
,
const
uint8_t
*
data
,
size_t
partition_size
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
MACROBLOCKD
*
const
xd
=
&
pbi
->
mb
;
...
...
@@ -2094,7 +2094,7 @@ static void debug_check_frame_counts(const VP10_COMMON *const cm) {
#endif // NDEBUG
static
struct
vpx_read_bit_buffer
*
init_read_bit_buffer
(
VP
9
Decoder
*
pbi
,
VP
10
Decoder
*
pbi
,
struct
vpx_read_bit_buffer
*
rb
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
...
...
@@ -2136,7 +2136,7 @@ BITSTREAM_PROFILE vp10_read_profile(struct vpx_read_bit_buffer *rb) {
return
(
BITSTREAM_PROFILE
)
profile
;
}
void
vp10_decode_frame
(
VP
9
Decoder
*
pbi
,
void
vp10_decode_frame
(
VP
10
Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
const
uint8_t
**
p_data_end
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
...
...
vp10/decoder/decodeframe.h
View file @
6f0cc9f5
...
...
@@ -16,7 +16,7 @@
extern
"C"
{
#endif
struct
VP
9
Decoder
;
struct
VP
10
Decoder
;
struct
vpx_read_bit_buffer
;
int
vp10_read_sync_code
(
struct
vpx_read_bit_buffer
*
const
rb
);
...
...
@@ -24,7 +24,7 @@ void vp10_read_frame_size(struct vpx_read_bit_buffer *rb,
int
*
width
,
int
*
height
);
BITSTREAM_PROFILE
vp10_read_profile
(
struct
vpx_read_bit_buffer
*
rb
);
void
vp10_decode_frame
(
struct
VP
9
Decoder
*
pbi
,
void
vp10_decode_frame
(
struct
VP
10
Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
const
uint8_t
**
p_data_end
);
...
...
vp10/decoder/decodemv.c
View file @
6f0cc9f5
...
...
@@ -475,12 +475,12 @@ static int read_is_inter_block(VP10_COMMON *const cm, MACROBLOCKD *const xd,
}
static
void
fpm_sync
(
void
*
const
data
,
int
mi_row
)
{
VP
9
Decoder
*
const
pbi
=
(
VP
9
Decoder
*
)
data
;
VP
10
Decoder
*
const
pbi
=
(
VP
10
Decoder
*
)
data
;
vp10_frameworker_wait
(
pbi
->
frame_worker_owner
,
pbi
->
common
.
prev_frame
,
mi_row
<<
MI_BLOCK_SIZE_LOG2
);
}
static
void
read_inter_block_mode_info
(
VP
9
Decoder
*
const
pbi
,
static
void
read_inter_block_mode_info
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
MODE_INFO
*
const
mi
,
int
mi_row
,
int
mi_col
,
vpx_reader
*
r
)
{
...
...
@@ -583,7 +583,7 @@ static void read_inter_block_mode_info(VP9Decoder *const pbi,
}
}
static
void
read_inter_frame_mode_info
(
VP
9
Decoder
*
const
pbi
,
static
void
read_inter_frame_mode_info
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
const
xd
,
int
mi_row
,
int
mi_col
,
vpx_reader
*
r
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
...
...
@@ -604,7 +604,7 @@ static void read_inter_frame_mode_info(VP9Decoder *const pbi,
read_intra_block_mode_info
(
cm
,
xd
,
mi
,
r
);
}
void
vp10_read_mode_info
(
VP
9
Decoder
*
const
pbi
,
MACROBLOCKD
*
xd
,
void
vp10_read_mode_info
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
xd
,
int
mi_row
,
int
mi_col
,
vpx_reader
*
r
,
int
x_mis
,
int
y_mis
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
...
...
vp10/decoder/decodemv.h
View file @
6f0cc9f5
...
...
@@ -19,7 +19,7 @@
extern
"C"
{
#endif
void
vp10_read_mode_info
(
VP
9
Decoder
*
const
pbi
,
MACROBLOCKD
*
xd
,
void
vp10_read_mode_info
(
VP
10
Decoder
*
const
pbi
,
MACROBLOCKD
*
xd
,
int
mi_row
,
int
mi_col
,
vpx_reader
*
r
,
int
x_mis
,
int
y_mis
);
...
...
vp10/decoder/decoder.c
View file @
6f0cc9f5
...
...
@@ -73,8 +73,8 @@ static void vp10_dec_free_mi(VP10_COMMON *cm) {
cm
->
mi_grid_base
=
NULL
;
}
VP
9
Decoder
*
vp10_decoder_create
(
BufferPool
*
const
pool
)
{
VP
9
Decoder
*
volatile
const
pbi
=
vpx_memalign
(
32
,
sizeof
(
*
pbi
));
VP
10
Decoder
*
vp10_decoder_create
(
BufferPool
*
const
pool
)
{
VP
10
Decoder
*
volatile
const
pbi
=
vpx_memalign
(
32
,
sizeof
(
*
pbi
));
VP10_COMMON
*
volatile
const
cm
=
pbi
?
&
pbi
->
common
:
NULL
;
if
(
!
cm
)
...
...
@@ -123,7 +123,7 @@ VP9Decoder *vp10_decoder_create(BufferPool *const pool) {
return
pbi
;
}
void
vp10_decoder_remove
(
VP
9
Decoder
*
pbi
)
{
void
vp10_decoder_remove
(
VP
10
Decoder
*
pbi
)
{
int
i
;
vpx_get_worker_interface
()
->
end
(
&
pbi
->
lf_worker
);
...
...
@@ -150,7 +150,7 @@ static int equal_dimensions(const YV12_BUFFER_CONFIG *a,
a
->
uv_height
==
b
->
uv_height
&&
a
->
uv_width
==
b
->
uv_width
;
}
vpx_codec_err_t
vp10_copy_reference_dec
(
VP
9
Decoder
*
pbi
,
vpx_codec_err_t
vp10_copy_reference_dec
(
VP
10
Decoder
*
pbi
,
VP9_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
)
{
VP10_COMMON
*
cm
=
&
pbi
->
common
;
...
...
@@ -228,7 +228,7 @@ vpx_codec_err_t vp10_set_reference_dec(VP10_COMMON *cm,
}
/* If any buffer updating is signaled it should be done here. */
static
void
swap_frame_buffers
(
VP
9
Decoder
*
pbi
)
{
static
void
swap_frame_buffers
(
VP
10
Decoder
*
pbi
)
{
int
ref_index
=
0
,
mask
;
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
BufferPool
*
const
pool
=
cm
->
buffer_pool
;
...
...
@@ -269,7 +269,7 @@ static void swap_frame_buffers(VP9Decoder *pbi) {
cm
->
frame_refs
[
ref_index
].
idx
=
-
1
;
}
int
vp10_receive_compressed_data
(
VP
9
Decoder
*
pbi
,
int
vp10_receive_compressed_data
(
VP
10
Decoder
*
pbi
,
size_t
size
,
const
uint8_t
**
psource
)
{
VP10_COMMON
*
volatile
const
cm
=
&
pbi
->
common
;
BufferPool
*
volatile
const
pool
=
cm
->
buffer_pool
;
...
...
@@ -410,7 +410,7 @@ int vp10_receive_compressed_data(VP9Decoder *pbi,
return
retcode
;
}
int
vp10_get_raw_frame
(
VP
9
Decoder
*
pbi
,
YV12_BUFFER_CONFIG
*
sd
,
int
vp10_get_raw_frame
(
VP
10
Decoder
*
pbi
,
YV12_BUFFER_CONFIG
*
sd
,
vp10_ppflags_t
*
flags
)
{
VP10_COMMON
*
const
cm
=
&
pbi
->
common
;
int
ret
=
-
1
;
...
...
vp10/decoder/decoder.h
View file @
6f0cc9f5
...
...
@@ -37,7 +37,7 @@ typedef struct TileData {
}
TileData
;
typedef
struct
TileWorkerData
{
struct
VP
9
Decoder
*
pbi
;
struct
VP
10
Decoder
*
pbi
;
vpx_reader
bit_reader
;
FRAME_COUNTS
counts
;
DECLARE_ALIGNED
(
16
,
MACROBLOCKD
,
xd
);
...
...
@@ -46,7 +46,7 @@ typedef struct TileWorkerData {
struct
vpx_internal_error_info
error_info
;
}
TileWorkerData
;
typedef
struct
VP
9
Decoder
{
typedef
struct
VP
10
Decoder
{
DECLARE_ALIGNED
(
16
,
MACROBLOCKD
,
mb
);
DECLARE_ALIGNED
(
16
,
VP10_COMMON
,
common
);
...
...
@@ -80,15 +80,15 @@ typedef struct VP9Decoder {
int
inv_tile_order
;
int
need_resync
;
// wait for key/intra-only frame.
int
hold_ref_buf
;
// hold the reference buffer.
}
VP
9
Decoder
;
}
VP
10
Decoder
;
int
vp10_receive_compressed_data
(
struct
VP
9
Decoder
*
pbi
,
int
vp10_receive_compressed_data
(
struct
VP
10
Decoder
*
pbi
,
size_t
size
,
const
uint8_t
**
dest
);
int
vp10_get_raw_frame
(
struct
VP
9
Decoder
*
pbi
,
YV12_BUFFER_CONFIG
*
sd
,
int
vp10_get_raw_frame
(
struct
VP
10
Decoder
*
pbi
,
YV12_BUFFER_CONFIG
*
sd
,
vp10_ppflags_t
*
flags
);
vpx_codec_err_t
vp10_copy_reference_dec
(
struct
VP
9
Decoder
*
pbi
,
vpx_codec_err_t
vp10_copy_reference_dec
(
struct
VP
10
Decoder
*
pbi
,
VP9_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
);
...
...
@@ -115,9 +115,9 @@ vpx_codec_err_t vp10_parse_superframe_index(const uint8_t *data,
vpx_decrypt_cb
decrypt_cb
,
void
*
decrypt_state
);
struct
VP
9
Decoder
*
vp10_decoder_create
(
BufferPool
*
const
pool
);
struct
VP
10
Decoder
*
vp10_decoder_create
(
BufferPool
*
const
pool
);
void
vp10_decoder_remove
(
struct
VP
9
Decoder
*
pbi
);
void
vp10_decoder_remove
(
struct
VP
10
Decoder
*
pbi
);
static
INLINE
void
decrease_ref_count
(
int
idx
,
RefCntBuffer
*
const
frame_bufs
,
BufferPool
*
const
pool
)
{
...
...
vp10/decoder/dthread.c
View file @
6f0cc9f5
...
...
@@ -77,7 +77,7 @@ void vp10_frameworker_wait(VPxWorker *const worker, RefCntBuffer *const ref_buf,
VPxWorker
*
const
ref_worker
=
ref_buf
->
frame_worker_owner
;
FrameWorkerData
*
const
ref_worker_data
=
(
FrameWorkerData
*
)
ref_worker
->
data1
;
const
VP
9
Decoder
*
const
pbi
=
ref_worker_data
->
pbi
;
const
VP
10
Decoder
*
const
pbi
=
ref_worker_data
->
pbi
;
#ifdef DEBUG_THREAD
{
...
...
vp10/decoder/dthread.h
View file @
6f0cc9f5
...
...
@@ -16,12 +16,12 @@
#include
"vpx/internal/vpx_codec_internal.h"
struct
VP9Common
;
struct
VP
9
Decoder
;
struct
VP
10
Decoder
;
// WorkerData for the FrameWorker thread. It contains all the information of
// the worker and decode structures for decoding a frame.
typedef
struct
FrameWorkerData
{
struct
VP
9
Decoder
*
pbi
;
struct
VP
10
Decoder
*
pbi
;
const
uint8_t
*
data
;
const
uint8_t
*
data_end
;
size_t
data_size
;
...
...
vp10/vp10_dx_iface.c
View file @
6f0cc9f5
...
...
@@ -454,7 +454,7 @@ static vpx_codec_err_t init_decoder(vpx_codec_alg_priv_t *ctx) {
}
static
INLINE
void
check_resync
(
vpx_codec_alg_priv_t
*
const
ctx
,
const
VP
9
Decoder
*
const
pbi
)
{
const
VP
10
Decoder
*
const
pbi
)
{
// Clear resync flag if worker got a key frame or intra only frame.
if
(
ctx
->
need_resync
==
1
&&
pbi
->
need_resync
==
0
&&
(
pbi
->
common
.
intra_only
||
pbi
->
common
.
frame_type
==
KEY_FRAME
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment