diff options
author | Christian König <[email protected]> | 2013-10-17 06:21:40 -0600 |
---|---|---|
committer | Christian König <[email protected]> | 2014-02-13 11:11:24 +0100 |
commit | 9ff0cf903dc4ed806961d1e099d1308322092892 (patch) | |
tree | 59cff4466766af7c363d261a6eae3d040fc62211 /src/gallium/drivers/radeon/radeon_video.c | |
parent | cbdd052577e798e0cd7b39eb75cfebee406f8410 (diff) |
radeon/vce: initial VCE support v8
v2 (chk): revert feedback buffer hack
v3 (slava): fixed bitstream size calculation
v4 (chk): always create buffers in the right domain
v5 (chk): flush async
v6 (chk): rework fw interface add version check
v7 (leo): implement cropping support
v8 (chk): add hw checks
Signed-off-by: Christian König <[email protected]>
Signed-off-by: Leo Liu <[email protected]>
Signed-off-by: Slava Grigorev <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_video.c')
-rw-r--r-- | src/gallium/drivers/radeon/radeon_video.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index 173fd6874ec..63bd805be34 100644 --- a/src/gallium/drivers/radeon/radeon_video.c +++ b/src/gallium/drivers/radeon/radeon_video.c @@ -42,6 +42,7 @@ #include "../../winsys/radeon/drm/radeon_winsys.h" #include "r600_pipe_common.h" #include "radeon_video.h" +#include "radeon_vce.h" /* generate an stream handle */ unsigned rvid_alloc_stream_handle() @@ -211,6 +212,30 @@ int rvid_get_video_param(struct pipe_screen *screen, { struct r600_common_screen *rscreen = (struct r600_common_screen *)screen; + if (entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) { + switch (param) { + case PIPE_VIDEO_CAP_SUPPORTED: + return u_reduce_video_profile(profile) == PIPE_VIDEO_FORMAT_MPEG4_AVC && + rvce_is_fw_version_supported(rscreen); + case PIPE_VIDEO_CAP_NPOT_TEXTURES: + return 1; + case PIPE_VIDEO_CAP_MAX_WIDTH: + return 2048; + case PIPE_VIDEO_CAP_MAX_HEIGHT: + return 1152; + case PIPE_VIDEO_CAP_PREFERED_FORMAT: + return PIPE_FORMAT_NV12; + case PIPE_VIDEO_CAP_PREFERS_INTERLACED: + return false; + case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED: + return false; + case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE: + return true; + default: + return 0; + } + } + /* UVD 2.x limits */ if (rscreen->family < CHIP_PALM) { enum pipe_video_format codec = u_reduce_video_profile(profile); |