mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-12-11 13:16:26 +00:00
1ef7752d64
This patchset enhances Alexis Ballier's original patch and validates it using Qualcomm's Venus hardware (driver recently landed upstream [1]). This has been tested on Qualcomm's DragonBoard 410c and 820c Configure/make scripts have been validated on Ubuntu 10.04 and 16.04. Tested decoders: - h264 - h263 - mpeg4 - vp8 - vp9 - hevc Tested encoders: - h264 - h263 - mpeg4 Tested transcoding (concurrent encoding/decoding) Some of the changes introduced: - v4l2: code cleanup and abstractions added - v4l2: follow the new encode/decode api. - v4l2: fix display size for NV12 output pool. - v4l2: handle EOS (EPIPE and draining) - v4l2: vp8 and mpeg4 decoding and encoding. - v4l2: hevc and vp9 support. - v4l2: generate EOF on dequeue errors. - v4l2: h264_mp4toannexb filtering. - v4l2: fixed make install and fate issues. - v4l2: codecs enabled/disabled depending on pixfmt defined - v4l2: pass timebase/framerate to the context - v4l2: runtime decoder reconfiguration. - v4l2: add more frame information - v4l2: free hardware resources on last reference being released - v4l2: encoding: disable b-frames for upstreaming (patch required) [1] https://lwn.net/Articles/697956/ System Level view: v42l_m2m_enc/dec --> v4l2_m2m --> v4l2_context --> v4l2_buffers Reviewed-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org> Reviewed-by: Alexis Ballier <aballier@gentoo.org> Tested-by: Jorge Ramirez <jorge.ramirez-ortiz@linaro.org> Signed-off-by: wm4 <nfxjfg@googlemail.com>
35 lines
1.3 KiB
C
35 lines
1.3 KiB
C
/*
|
|
* V4L2 format helper functions
|
|
*
|
|
* Copyright (C) 2017 Alexis Ballier <aballier@gentoo.org>
|
|
* Copyright (C) 2017 Jorge Ramirez <jorge.ramirez-ortiz@linaro.org>
|
|
*
|
|
* This file is part of FFmpeg.
|
|
*
|
|
* FFmpeg is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* FFmpeg is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with FFmpeg; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#ifndef AVCODEC_V4L2_FMT_H
|
|
#define AVCODEC_V4L2_FMT_H
|
|
|
|
#include "libavcodec/avcodec.h"
|
|
#include "libavutil/pixfmt.h"
|
|
|
|
enum AVPixelFormat ff_v4l2_format_v4l2_to_avfmt(uint32_t v4l2_fmt, enum AVCodecID avcodec);
|
|
uint32_t ff_v4l2_format_avcodec_to_v4l2(enum AVCodecID avcodec);
|
|
uint32_t ff_v4l2_format_avfmt_to_v4l2(enum AVPixelFormat avfmt);
|
|
|
|
#endif /* AVCODEC_V4L2_FMT_H*/
|