summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaojie Yuan <Xiaojie.Yuan@amd.com>2017-08-21 16:57:15 +0800
committerXiaojie Yuan <Xiaojie.Yuan@amd.com>2017-08-21 16:57:15 +0800
commitf84325e0e622c3573ef7f212e1d79836079d81d7 (patch)
tree27a3b5dc3e34294a6043e97c9b673ed70a7a4321
parent141f26f27c2b087527f3ee2e1db65abe78de932b (diff)
parentfed0155303c17ce94e5ef017c02fc1646b01174a (diff)
Merge branch 'amd-staging-hybrid-master20170517' into amd-mainline-hybrid-master20170517amd-mainline-hybrid-master20170517
-rw-r--r--.version.hybrid3
-rw-r--r--amdgpu/amdgpu_bo.c62
-rw-r--r--amdgpu/amdgpu_internal.h24
-rw-r--r--amdgpu/amdgpu_vamgr.c2
-rw-r--r--tests/amdgpu/uvd_enc_tests.c138
-rw-r--r--tests/amdgpu/uve_ib.h378
6 files changed, 394 insertions, 213 deletions
diff --git a/.version.hybrid b/.version.hybrid
index 7dc9b690..55780abb 100644
--- a/.version.hybrid
+++ b/.version.hybrid
@@ -1,3 +1,4 @@
HYBRID_VERSION_MAJOR = 17
HYBRID_VERSION_MINOR = 40
-HYBRID_VERSION_PATCH = 2
+HYBRID_VERSION_PATCH = 3
+HYBRID_VERSION_KERNEL = 12
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index 9534c404..57aaf97a 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -54,29 +54,6 @@ static void amdgpu_close_kms_handle(amdgpu_device_handle dev,
drmIoctl(dev->fd, DRM_IOCTL_GEM_CLOSE, &args);
}
-drm_private void amdgpu_bo_free_internal(amdgpu_bo_handle bo)
-{
- /* Remove the buffer from the hash tables. */
- pthread_mutex_lock(&bo->dev->bo_table_mutex);
- util_hash_table_remove(bo->dev->bo_handles,
- (void*)(uintptr_t)bo->handle);
- if (bo->flink_name) {
- util_hash_table_remove(bo->dev->bo_flink_names,
- (void*)(uintptr_t)bo->flink_name);
- }
- pthread_mutex_unlock(&bo->dev->bo_table_mutex);
-
- /* Release CPU access. */
- if (bo->cpu_map_count > 0) {
- bo->cpu_map_count = 1;
- amdgpu_bo_cpu_unmap(bo);
- }
-
- amdgpu_close_kms_handle(bo->dev, bo->handle);
- pthread_mutex_destroy(&bo->cpu_access_mutex);
- free(bo);
-}
-
int amdgpu_bo_alloc(amdgpu_device_handle dev,
struct amdgpu_bo_alloc_request *alloc_buffer,
amdgpu_bo_handle *buf_handle)
@@ -304,6 +281,7 @@ int amdgpu_bo_import(amdgpu_device_handle dev,
/* Get a KMS handle. */
r = drmPrimeFDToHandle(dev->fd, shared_handle, &handle);
if (r) {
+ pthread_mutex_unlock(&dev->bo_table_mutex);
return r;
}
@@ -343,10 +321,9 @@ int amdgpu_bo_import(amdgpu_device_handle dev,
}
if (bo) {
- pthread_mutex_unlock(&dev->bo_table_mutex);
-
/* The buffer already exists, just bump the refcount. */
atomic_inc(&bo->refcount);
+ pthread_mutex_unlock(&dev->bo_table_mutex);
output->buf_handle = bo;
output->alloc_size = bo->alloc_size;
@@ -625,8 +602,35 @@ int amdgpu_bo_get_phys_address(amdgpu_bo_handle buf_handle,
int amdgpu_bo_free(amdgpu_bo_handle buf_handle)
{
- /* Just drop the reference. */
- amdgpu_bo_reference(&buf_handle, NULL);
+ struct amdgpu_device *dev;
+ struct amdgpu_bo *bo = buf_handle;
+
+ assert(bo != NULL);
+ dev = bo->dev;
+ pthread_mutex_lock(&dev->bo_table_mutex);
+
+ if (update_references(&bo->refcount, NULL)) {
+ /* Remove the buffer from the hash tables. */
+ util_hash_table_remove(dev->bo_handles,
+ (void*)(uintptr_t)bo->handle);
+
+ if (bo->flink_name) {
+ util_hash_table_remove(dev->bo_flink_names,
+ (void*)(uintptr_t)bo->flink_name);
+ }
+
+ /* Release CPU access. */
+ if (bo->cpu_map_count > 0) {
+ bo->cpu_map_count = 1;
+ amdgpu_bo_cpu_unmap(bo);
+ }
+
+ amdgpu_close_kms_handle(dev, bo->handle);
+ pthread_mutex_destroy(&bo->cpu_access_mutex);
+ free(bo);
+ }
+
+ pthread_mutex_unlock(&dev->bo_table_mutex);
return 0;
}
@@ -1006,7 +1010,7 @@ int amdgpu_bo_va_op_refcounted(amdgpu_device_handle dev,
}
/* Just drop the reference. */
- amdgpu_bo_reference(&vao->bo, NULL);
+ amdgpu_bo_free(&vao->bo);
/* remove the remap from list */
list_del(&vao->list);
free(vao);
@@ -1045,7 +1049,7 @@ int amdgpu_bo_va_op_refcounted(amdgpu_device_handle dev,
/* unref the bo right after the unmap call */
if (ops == AMDGPU_VA_OP_UNMAP) {
/* Just drop the reference. */
- amdgpu_bo_reference(&bo, NULL);
+ amdgpu_bo_free(&bo);
/* remove the remap from list */
list_del(&vao->list);
free(vao);
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index d99e4c0d..dc05f1b9 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -162,8 +162,6 @@ struct amdgpu_semaphore {
* Functions.
*/
-drm_private void amdgpu_bo_free_internal(amdgpu_bo_handle bo);
-
drm_private void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, uint64_t start,
uint64_t max, uint64_t alignment);
@@ -222,26 +220,4 @@ static inline bool update_references(atomic_t *dst, atomic_t *src)
return false;
}
-/**
- * Assignment between two amdgpu_bo pointers with reference counting.
- *
- * Usage:
- * struct amdgpu_bo *dst = ... , *src = ...;
- *
- * dst = src;
- * // No reference counting. Only use this when you need to move
- * // a reference from one pointer to another.
- *
- * amdgpu_bo_reference(&dst, src);
- * // Reference counters are updated. dst is decremented and src is
- * // incremented. dst is freed if its reference counter is 0.
- */
-static inline void amdgpu_bo_reference(struct amdgpu_bo **dst,
- struct amdgpu_bo *src)
-{
- if (update_references(&(*dst)->refcount, &src->refcount))
- amdgpu_bo_free_internal(*dst);
- *dst = src;
-}
-
#endif
diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c
index 5c91d58f..6e0d7e37 100644
--- a/amdgpu/amdgpu_vamgr.c
+++ b/amdgpu/amdgpu_vamgr.c
@@ -499,7 +499,7 @@ int amdgpu_va_range_free(amdgpu_va_handle va_range_handle)
if (r)
return -EINVAL;
/* Just drop the reference. */
- amdgpu_bo_reference(&vahandle->bo, NULL);
+ amdgpu_bo_free(&vahandle->bo);
/* remove the remap from list */
list_del(&vahandle->list);
free(vahandle);
diff --git a/tests/amdgpu/uvd_enc_tests.c b/tests/amdgpu/uvd_enc_tests.c
index f9764434..6c19f7b6 100644
--- a/tests/amdgpu/uvd_enc_tests.c
+++ b/tests/amdgpu/uvd_enc_tests.c
@@ -252,30 +252,12 @@ static void amdgpu_cs_uvd_enc_create(void)
alloc_resource(&enc.session, 128 * 1024, AMDGPU_GEM_DOMAIN_GTT);
resources[num_resources++] = enc.session.handle;
resources[num_resources++] = ib_handle;
-
- len = 0;
- memcpy((ib_cpu + len), uve_session_info, sizeof(uve_session_info));
- len += sizeof(uve_session_info) / 4;
- ib_cpu[len++] = enc.session.addr >> 32;
- ib_cpu[len++] = enc.session.addr;
-
- memcpy((ib_cpu + len), uve_task_info, sizeof(uve_task_info));
- len += sizeof(uve_task_info) / 4;
- ib_cpu[len++] = 0x0000001c;
- ib_cpu[len++] = 0x00000000;
- ib_cpu[len++] = 0x00000000;
-
- memcpy((ib_cpu + len), uve_op_init, sizeof(uve_op_init));
- len += sizeof(uve_op_init) / 4;
-
- r = submit(len, AMDGPU_HW_IP_UVD_ENC);
- CU_ASSERT_EQUAL(r, 0);
}
static void check_result(struct amdgpu_uvd_enc *enc)
{
uint64_t sum;
- uint32_t s = 20626;
+ uint32_t s = 26382;
uint32_t *ptr, size;
int i, j, r;
@@ -302,11 +284,6 @@ static void amdgpu_cs_uvd_enc_session_init(void)
if (family_id < AMDGPU_FAMILY_AI || family_id >= AMDGPU_FAMILY_RV)
return;
- num_resources = 0;
- alloc_resource(&enc.fb, 4096, AMDGPU_GEM_DOMAIN_GTT);
- resources[num_resources++] = enc.fb.handle;
- resources[num_resources++] = ib_handle;
-
len = 0;
memcpy((ib_cpu + len), uve_session_info, sizeof(uve_session_info));
len += sizeof(uve_session_info) / 4;
@@ -315,9 +292,12 @@ static void amdgpu_cs_uvd_enc_session_init(void)
memcpy((ib_cpu + len), uve_task_info, sizeof(uve_task_info));
len += sizeof(uve_task_info) / 4;
- ib_cpu[len++] = 0x000001c0;
- ib_cpu[len++] = 0x00000001;
- ib_cpu[len++] = 0x00000001;
+ ib_cpu[len++] = 0x000000d8;
+ ib_cpu[len++] = 0x00000000;
+ ib_cpu[len++] = 0x00000000;
+
+ memcpy((ib_cpu + len), uve_op_init, sizeof(uve_op_init));
+ len += sizeof(uve_op_init) / 4;
memcpy((ib_cpu + len), uve_session_init, sizeof(uve_session_init));
len += sizeof(uve_session_init) / 4;
@@ -325,9 +305,6 @@ static void amdgpu_cs_uvd_enc_session_init(void)
memcpy((ib_cpu + len), uve_layer_ctrl, sizeof(uve_layer_ctrl));
len += sizeof(uve_layer_ctrl) / 4;
- memcpy((ib_cpu + len), uve_layer_select, sizeof(uve_layer_select));
- len += sizeof(uve_layer_select) / 4;
-
memcpy((ib_cpu + len), uve_slice_ctrl, sizeof(uve_slice_ctrl));
len += sizeof(uve_slice_ctrl) / 4;
@@ -337,35 +314,27 @@ static void amdgpu_cs_uvd_enc_session_init(void)
memcpy((ib_cpu + len), uve_rc_session_init, sizeof(uve_rc_session_init));
len += sizeof(uve_rc_session_init) / 4;
- memcpy((ib_cpu + len), uve_rc_layer_init, sizeof(uve_rc_layer_init));
- len += sizeof(uve_rc_layer_init) / 4;
-
- memcpy((ib_cpu + len), uve_hw_spec, sizeof(uve_hw_spec));
- len += sizeof(uve_hw_spec) / 4;
-
memcpy((ib_cpu + len), uve_deblocking_filter, sizeof(uve_deblocking_filter));
len += sizeof(uve_deblocking_filter) / 4;
- memcpy((ib_cpu + len), uve_feedback_buffer, sizeof(uve_feedback_buffer));
- len += sizeof(uve_feedback_buffer) / 4;
- ib_cpu[len++] = enc.fb.addr >> 32;
- ib_cpu[len++] = enc.fb.addr;
- ib_cpu[len++] = 0x00000003;
+ memcpy((ib_cpu + len), uve_quality_params, sizeof(uve_quality_params));
+ len += sizeof(uve_quality_params) / 4;
memcpy((ib_cpu + len), uve_op_init_rc, sizeof(uve_op_init_rc));
len += sizeof(uve_op_init_rc) / 4;
+ memcpy((ib_cpu + len), uve_op_init_rc_vbv_level, sizeof(uve_op_init_rc_vbv_level));
+ len += sizeof(uve_op_init_rc_vbv_level) / 4;
+
r = submit(len, AMDGPU_HW_IP_UVD_ENC);
CU_ASSERT_EQUAL(r, 0);
-
- free_resource(&enc.fb);
}
static void amdgpu_cs_uvd_enc_encode(void)
{
int len, r, i;
uint64_t luma_offset, chroma_offset;
- uint32_t vbuf_size, bs_size = 0x154000, cpb_size;
+ uint32_t vbuf_size, bs_size = 0x003f4800, cpb_size;
unsigned align = (family_id >= AMDGPU_FAMILY_AI) ? 256 : 16;
vbuf_size = ALIGN(enc.width, align) * ALIGN(enc.height, 16) * 1.5;
cpb_size = vbuf_size * 10;
@@ -408,55 +377,82 @@ static void amdgpu_cs_uvd_enc_encode(void)
memcpy((ib_cpu + len), uve_task_info, sizeof(uve_task_info));
len += sizeof(uve_task_info) / 4;
- ib_cpu[len++] = 0x00000210;
- ib_cpu[len++] = 0x00000002;
+ ib_cpu[len++] = 0x000005e0;
+ ib_cpu[len++] = 0x00000001;
ib_cpu[len++] = 0x00000001;
- memcpy((ib_cpu + len), uve_slice_header, sizeof(uve_slice_header));
- len += sizeof(uve_slice_header) / 4;
+ memcpy((ib_cpu + len), uve_nalu_buffer_1, sizeof(uve_nalu_buffer_1));
+ len += sizeof(uve_nalu_buffer_1) / 4;
- unsigned luma_size = ALIGN(enc.width, align) * ALIGN(enc.height, 16);
- luma_offset = enc.vbuf.addr;
- chroma_offset = luma_offset + luma_size;
- ib_cpu[len++] = 0x00000088;
- ib_cpu[len++] = 0x0000000d;
- ib_cpu[len++] = 0x00018000;
- ib_cpu[len++] = luma_offset >> 32;
- ib_cpu[len++] = luma_offset;
- ib_cpu[len++] = chroma_offset >> 32;
- ib_cpu[len++] = chroma_offset;
- memcpy((ib_cpu + len), uve_encode_param, sizeof(uve_encode_param));
- len += sizeof(uve_encode_param) / 4;
+ memcpy((ib_cpu + len), uve_nalu_buffer_2, sizeof(uve_nalu_buffer_2));
+ len += sizeof(uve_nalu_buffer_2) / 4;
- memcpy((ib_cpu + len), uve_quality_param, sizeof(uve_quality_param));
- len += sizeof(uve_quality_param) / 4;
+ memcpy((ib_cpu + len), uve_nalu_buffer_3, sizeof(uve_nalu_buffer_3));
+ len += sizeof(uve_nalu_buffer_3) / 4;
- memcpy((ib_cpu + len), uve_intra_refresh, sizeof(uve_intra_refresh));
- len += sizeof(uve_intra_refresh) / 4;
+ memcpy((ib_cpu + len), uve_nalu_buffer_4, sizeof(uve_nalu_buffer_4));
+ len += sizeof(uve_nalu_buffer_4) / 4;
- memcpy((ib_cpu + len), uve_reconstructed_pic_output, sizeof(uve_reconstructed_pic_output));
- len += sizeof(uve_reconstructed_pic_output) / 4;
+ memcpy((ib_cpu + len), uve_slice_header, sizeof(uve_slice_header));
+ len += sizeof(uve_slice_header) / 4;
- memcpy((ib_cpu + len), uve_ctx_buffer, sizeof(uve_ctx_buffer));
- len += sizeof(uve_ctx_buffer) / 4;
+ ib_cpu[len++] = 0x00000254;
+ ib_cpu[len++] = 0x00000010;
ib_cpu[len++] = enc.cpb.addr >> 32;
ib_cpu[len++] = enc.cpb.addr;
+ memcpy((ib_cpu + len), uve_ctx_buffer, sizeof(uve_ctx_buffer));
+ len += sizeof(uve_ctx_buffer) / 4;
memcpy((ib_cpu + len), uve_bitstream_buffer, sizeof(uve_bitstream_buffer));
len += sizeof(uve_bitstream_buffer) / 4;
+ ib_cpu[len++] = 0x00000000;
ib_cpu[len++] = enc.bs.addr >> 32;
ib_cpu[len++] = enc.bs.addr;
- ib_cpu[len++] = 0x00030000;
+ ib_cpu[len++] = 0x003f4800;
+ ib_cpu[len++] = 0x00000000;
memcpy((ib_cpu + len), uve_feedback_buffer, sizeof(uve_feedback_buffer));
len += sizeof(uve_feedback_buffer) / 4;
ib_cpu[len++] = enc.fb.addr >> 32;
ib_cpu[len++] = enc.fb.addr;
- ib_cpu[len++] = 0x00000003;
+ ib_cpu[len++] = 0x00000010;
+ ib_cpu[len++] = 0x00000028;
+
+ memcpy((ib_cpu + len), uve_feedback_buffer_additional, sizeof(uve_feedback_buffer_additional));
+ len += sizeof(uve_feedback_buffer_additional) / 4;
+
+ memcpy((ib_cpu + len), uve_intra_refresh, sizeof(uve_intra_refresh));
+ len += sizeof(uve_intra_refresh) / 4;
+
+ memcpy((ib_cpu + len), uve_layer_select, sizeof(uve_layer_select));
+ len += sizeof(uve_layer_select) / 4;
+
+ memcpy((ib_cpu + len), uve_rc_layer_init, sizeof(uve_rc_layer_init));
+ len += sizeof(uve_rc_layer_init) / 4;
+
+ memcpy((ib_cpu + len), uve_layer_select, sizeof(uve_layer_select));
+ len += sizeof(uve_layer_select) / 4;
memcpy((ib_cpu + len), uve_rc_per_pic, sizeof(uve_rc_per_pic));
len += sizeof(uve_rc_per_pic) / 4;
+ unsigned luma_size = ALIGN(enc.width, align) * ALIGN(enc.height, 16);
+ luma_offset = enc.vbuf.addr;
+ chroma_offset = luma_offset + luma_size;
+ ib_cpu[len++] = 0x00000054;
+ ib_cpu[len++] = 0x0000000c;
+ ib_cpu[len++] = 0x00000002;
+ ib_cpu[len++] = 0x003f4800;
+ ib_cpu[len++] = luma_offset >> 32;
+ ib_cpu[len++] = luma_offset;
+ ib_cpu[len++] = chroma_offset >> 32;
+ ib_cpu[len++] = chroma_offset;
+ memcpy((ib_cpu + len), uve_encode_param, sizeof(uve_encode_param));
+ len += sizeof(uve_encode_param) / 4;
+
+ memcpy((ib_cpu + len), uve_op_speed_enc_mode, sizeof(uve_op_speed_enc_mode));
+ len += sizeof(uve_op_speed_enc_mode) / 4;
+
memcpy((ib_cpu + len), uve_op_encode, sizeof(uve_op_encode));
len += sizeof(uve_op_encode) / 4;
@@ -491,7 +487,7 @@ static void amdgpu_cs_uvd_enc_destroy(void)
memcpy((ib_cpu + len), uve_task_info, sizeof(uve_task_info));
len += sizeof(uve_task_info) / 4;
ib_cpu[len++] = 0xffffffff;
- ib_cpu[len++] = 0x00000004;
+ ib_cpu[len++] = 0x00000002;
ib_cpu[len++] = 0x00000000;
memcpy((ib_cpu + len), uve_op_close, sizeof(uve_op_close));
diff --git a/tests/amdgpu/uve_ib.h b/tests/amdgpu/uve_ib.h
index c24b9e8a..9abd4066 100644
--- a/tests/amdgpu/uve_ib.h
+++ b/tests/amdgpu/uve_ib.h
@@ -27,8 +27,8 @@
static const uint32_t uve_session_info[] = {
0x00000018,
0x00000001,
- 0x00000001,
0x00000000,
+ 0x00010000,
};
static const uint32_t uve_task_info[] = {
@@ -37,29 +37,11 @@ static const uint32_t uve_task_info[] = {
};
static const uint32_t uve_session_init[] = {
- 0x00000068,
+ 0x00000020,
0x00000003,
- 0x00000000,
- 0x000000c0,
- 0x00000080,
- 0x00000000,
- 0x00000000,
- 0x00000001,
- 0x00000002,
0x000000c0,
0x00000080,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
- 0x00000000,
+ 0x00000020,
0x00000000,
0x00000000,
0x00000000,
@@ -82,8 +64,8 @@ static const uint32_t uve_slice_ctrl[] = {
0x00000014,
0x00000006,
0x00000000,
- 0x00000008,
- 0x00000008,
+ 0x00000006,
+ 0x00000006,
};
static const uint32_t uve_spec_misc[] = {
@@ -93,9 +75,9 @@ static const uint32_t uve_spec_misc[] = {
0x00000000,
0x00000000,
0x00000000,
- 0x00000004,
0x00000000,
- 0x00000005,
+ 0x00000001,
+ 0x00000001,
};
static const uint32_t uve_rc_session_init[] = {
@@ -108,54 +90,103 @@ static const uint32_t uve_rc_session_init[] = {
static const uint32_t uve_rc_layer_init[] = {
0x00000028,
0x00000009,
+ 0x001e8480,
+ 0x001e8480,
+ 0x0000001e,
+ 0x00000001,
+ 0x0001046a,
+ 0x0001046a,
+ 0x0001046a,
+ 0xaaaaaaaa,
+};
+
+static const uint32_t uve_deblocking_filter[] = {
+ 0x00000020,
+ 0x0000000e,
+ 0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
+};
+
+static const uint32_t uve_quality_params[] = {
+ 0x00000014,
+ 0x0000000d,
0x00000000,
0x00000000,
0x00000000,
};
-static const uint32_t uve_hw_spec[] = {
- 0x0000007c,
- 0x0000000b,
- 0x00000002,
+static const uint32_t uve_feedback_buffer[] = {
+ 0x0000001c,
+ 0x00000012,
0x00000000,
+};
+
+static const uint32_t uve_feedback_buffer_additional[] = {
+ 0x00000108,
+ 0x00000014,
0x00000001,
- 0x00000001,
- 0x00000001,
- 0x00000001,
- 0x00000001,
- 0x00000010,
- 0x00000010,
- 0x00000010,
- 0x00000010,
- 0x00000008,
- 0x00000008,
- 0x00000010,
0x00000010,
0x00000000,
- 0x00000002,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
- 0x00000001,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
- 0x00000001,
- 0x00000001,
-};
-
-static const uint32_t uve_deblocking_filter[] = {
- 0x00000020,
- 0x0000000f,
- 0x00000001,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
0x00000000,
0x00000000,
0x00000000,
@@ -163,19 +194,62 @@ static const uint32_t uve_deblocking_filter[] = {
0x00000000,
};
-static const uint32_t uve_feedback_buffer[] = {
- 0x00000014,
- 0x00000014,
+static const uint32_t uve_nalu_buffer_1[] = {
+ 0x00000018,
+ 0x00000013,
+ 0x00000001,
+ 0x00000007,
+ 0x00000001,
+ 0x46011000,
+};
+
+static const uint32_t uve_nalu_buffer_2[] = {
+ 0x0000002c,
+ 0x00000013,
+ 0x00000002,
+ 0x0000001b,
+ 0x00000001,
+ 0x40010c01,
+ 0xffff0160,
+ 0x00000300,
+ 0xb0000003,
+ 0x00000300,
+ 0x962c0900,
+};
+
+static const uint32_t uve_nalu_buffer_3[] = {
+ 0x00000034,
+ 0x00000013,
+ 0x00000003,
+ 0x00000023,
+ 0x00000001,
+ 0x42010101,
+ 0x60000003,
+ 0x00b00000,
+ 0x03000003,
+ 0x0096a018,
+ 0x2020708f,
+ 0xcb924295,
+ 0x12e08000,
+};
+
+static const uint32_t uve_nalu_buffer_4[] = {
+ 0x0000001c,
+ 0x00000013,
+ 0x00000004,
+ 0x0000000b,
+ 0x00000001,
+ 0x4401e0f1,
+ 0x80992000,
};
-/* TODO - Slice Header*/
static const uint32_t uve_slice_header[] = {
0x000000c8,
- 0x0000000c,
- 0x26010000,
+ 0x0000000b,
+ 0x28010000,
0x40000000,
0x60000000,
- 0x80000000,
+ 0x00000000,
0x00000000,
0x00000000,
0x00000000,
@@ -203,7 +277,7 @@ static const uint32_t uve_slice_header[] = {
0x00000005,
0x00000000,
0x00000002,
- 0x00000001,
+ 0x00000000,
0x00000000,
0x00000000,
0x00000000,
@@ -223,15 +297,146 @@ static const uint32_t uve_slice_header[] = {
};
static const uint32_t uve_encode_param[] = {
- 0x00000000,
- 0x00000000,
0x000000a0,
0x00000080,
0x00000000,
0x00000000,
- 0x00000002,
- 0xffffffff,
0xffffffff,
+ 0x00000001,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+};
+
+static const uint32_t uve_intra_refresh[] = {
+ 0x00000014,
+ 0x0000000f,
+ 0x00000000,
+ 0x00000000,
+ 0x00000001,
+};
+
+static const uint32_t uve_ctx_buffer[] = {
+ 0x00000000,
+ 0x00000000,
+ 0x000000a0,
+ 0x000000a0,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
+ 0x00000000,
0x00000000,
0x00000000,
0x00000000,
@@ -250,55 +455,34 @@ static const uint32_t uve_encode_param[] = {
0x00000000,
0x00000000,
0x00000000,
-};
-
-static const uint32_t uve_quality_param[] = {
- 0x00000014,
- 0x0000000e,
0x00000000,
0x00000000,
0x00000000,
-};
-
-static const uint32_t uve_intra_refresh[] = {
- 0x00000014,
- 0x00000010,
0x00000000,
0x00000000,
- 0x00000004,
-};
-
-static const uint32_t uve_reconstructed_pic_output[] = {
- 0x00000020,
- 0x00000011,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
0x00000000,
-};
-
-static const uint32_t uve_ctx_buffer[] = {
- 0x00000010,
- 0x00000012,
};
static const uint32_t uve_bitstream_buffer[] = {
- 0x00000014,
- 0x00000013,
+ 0x0000001c,
+ 0x00000011,
};
static const uint32_t uve_rc_per_pic[] = {
0x00000024,
0x0000000a,
0x0000001a,
- 0x00000014,
- 0x0000002D,
0x00000000,
+ 0x00000033,
0x00000000,
0x00000000,
0x00000000,
+ 0x00000001,
};
static const uint32_t uve_op_init[] = {
@@ -320,4 +504,24 @@ static const uint32_t uve_op_init_rc[] = {
0x00000008,
0x08000004,
};
+
+static const uint32_t uve_op_init_rc_vbv_level[] = {
+ 0x00000008,
+ 0x08000005,
+};
+
+static const uint32_t uve_op_speed_enc_mode[] = {
+ 0x00000008,
+ 0x08000006,
+};
+
+static const uint32_t uve_op_balance_enc_mode[] = {
+ 0x00000008,
+ 0x08000007,
+};
+
+static const uint32_t uve_op_quality_enc_mode[] = {
+ 0x00000008,
+ 0x08000008,
+};
#endif /*_uve_ib_h*/