Skip to content

Instantly share code, notes, and snippets.

@mac-l1
mac-l1 / ffmpeg_play_rga_x11.c
Last active February 1, 2017 20:22
sample test code for simple ffmpeg player using rockchips drm rga api to directly convert nv12 frames from vpu buf to rgb X11 window buffers; needs rockchip drm rga kernel driver and user lib, probably also armsoc (for dri2); ran on rk3288/firefly 3.14 kernel and ubuntu 16.04
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libswscale/swscale.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <time.h>
@mac-l1
mac-l1 / rockchip_rga_test.c
Last active September 15, 2023 10:31
sample code to use rockchip drm api; based on rockchip rga test code, modified for yuvrgb conversion for FB display and for X11); needs rockhip drm rga support in kernel and user lib, and probably armsoc X11 display driver; ran on firefly with 3.14 kernel and ubuntu 16.04
/*
* Copyright (C) 2013 Samsung Electronics Co.Ltd
* Authors:
* Yakir Yang <ykk@rock-chips.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*