Skip to content

Commit

Permalink
update transient include definitions
Browse files Browse the repository at this point in the history
Signed-off-by: Ralf Zerres <[email protected]>
  • Loading branch information
rzerres committed Apr 16, 2019
1 parent 21cd2f3 commit f3a0ea3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include "config.h"
#include "request.h"

#include <assert.h>
#include <string.h>

#include <sys/ioctl.h>

#include <linux/videodev2.h>

#include "config.h"
#include "request.h"
#include "utils.h"
#include "v4l2.h"

Expand Down Expand Up @@ -122,9 +121,11 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context,
profiles[index++] = VAProfileMPEG2Main;
}

/*
found = v4l2_find_format(driver_data->video_fd,
V4L2_BUF_TYPE_VIDEO_OUTPUT,
V4L2_PIX_FMT_H264_SLICE);
*/
if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 5)) {
profiles[index++] = VAProfileH264Main;
profiles[index++] = VAProfileH264High;
Expand All @@ -133,9 +134,11 @@ VAStatus RequestQueryConfigProfiles(VADriverContextP context,
profiles[index++] = VAProfileH264StereoHigh;
}

/*
found = v4l2_find_format(driver_data->video_fd,
V4L2_BUF_TYPE_VIDEO_OUTPUT,
V4L2_PIX_FMT_HEVC_SLICE);
*/
if (found && index < (V4L2_REQUEST_MAX_CONFIG_ATTRIBUTES - 1))
profiles[index++] = VAProfileHEVCMain;

Expand Down
4 changes: 4 additions & 0 deletions src/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,21 @@ VAStatus RequestCreateContext(VADriverContextP context, VAConfigID config_id,
pixelformat = V4L2_PIX_FMT_MPEG2_SLICE;
break;

#ifdef V4L2_PIX_FMT_H264_SLICE
case VAProfileH264Main:
case VAProfileH264High:
case VAProfileH264ConstrainedBaseline:
case VAProfileH264MultiviewHigh:
case VAProfileH264StereoHigh:
pixelformat = V4L2_PIX_FMT_H264_SLICE;
break;
#endif

#ifdef V4L2_PIX_FMT_HEVC_SLICE
case VAProfileHEVCMain:
pixelformat = V4L2_PIX_FMT_HEVC_SLICE;
break;
#endif

default:
status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
Expand Down

0 comments on commit f3a0ea3

Please sign in to comment.