<commit_before>#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sxplayer.h>

#include <va/va_x11.h>
#include <va/va_drmcommon.h>

#include "egl.h"
#include "glincludes.h"
#include "hwconv.h"
#include "hwupload.h"
#include "image.h"
#include "log.h"
#include "nodegl.h"
#include "nodes.h"

struct hwupload_vaapi {
    struct sxplayer_frame *frame;
    struct hwconv hwconv;
    struct texture planes[2];

    EGLImageKHR egl_images[2];

    VADRMPRIMESurfaceDescriptor surface_descriptor;
    int surface_acquired;
};

static int vaapi_common_init(struct ngl_node *node, struct sxplayer_frame *frame)
{
    struct ngl_ctx *ctx = node->ctx;
    struct glcontext *gl = ctx->glcontext;
    struct texture_priv *s = node->priv_data;
    struct hwupload_vaapi *vaapi = s->hwupload_priv_data;

    if (!(gl->features & (NGLI_FEATURE_OES_EGL_IMAGE |
                          NGLI_FEATURE_EGL_IMAGE_BASE_KHR |
                          NGLI_FEATURE_EGL_EXT_IMAGE_DMA_BUF_IMPORT))) {
        LOG(ERROR, "context does not support required extensions for vaapi");
        return -1;<commit_msg>hwupload_vaapi: add missing utils.h include<commit_after>#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <sxplayer.h>

#include <va/va_x11.h>
#include <va/va_drmcommon.h>

#include "egl.h"
#include "glincludes.h"
#include "hwconv.h"
#include "hwupload.h"
#include "image.h"
#include "log.h"
#include "nodegl.h"
#include "nodes.h"
#include "utils.h"

struct hwupload_vaapi {
    struct sxplayer_frame *frame;
    struct hwconv hwconv;
    struct texture planes[2];

    EGLImageKHR egl_images[2];

    VADRMPRIMESurfaceDescriptor surface_descriptor;
    int surface_acquired;
};

static int vaapi_common_init(struct ngl_node *node, struct sxplayer_frame *frame)
{
    struct ngl_ctx *ctx = node->ctx;
    struct glcontext *gl = ctx->glcontext;
    struct texture_priv *s = node->priv_data;
    struct hwupload_vaapi *vaapi = s->hwupload_priv_data;

    if (!(gl->features & (NGLI_FEATURE_OES_EGL_IMAGE |
                          NGLI_FEATURE_EGL_IMAGE_BASE_KHR |
                          NGLI_FEATURE_EGL_EXT_IMAGE_DMA_BUF_IMPORT))) {
        LOG(ERROR, "context does not support required extensions for vaapi");
        return -1;
{'fraction_non_alphanumeric': 0.11241830065359477, 'fraction_numerical': 0.004357298474945534, 'mean_word_length': 3.7145790554414786, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '328273', 'n_tokens_mistral': 842, 'n_tokens_neox': 833, 'n_words': 179}