FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
mediacodec_sw_buffer.c File Reference
#include <string.h>
#include <sys/types.h>
#include "libavutil/frame.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "mediacodecdec.h"
#include "mediacodec_wrapper.h"
#include "mediacodec_sw_buffer.h"

Go to the source code of this file.

Macros

#define QCOM_TILE_WIDTH   64
 
#define QCOM_TILE_HEIGHT   32
 
#define QCOM_TILE_SIZE   (QCOM_TILE_WIDTH * QCOM_TILE_HEIGHT)
 
#define QCOM_TILE_GROUP_SIZE   (4 * QCOM_TILE_SIZE)
 

Functions

void ff_mediacodec_sw_buffer_copy_yuv420_planar (AVCodecContext *avctx, MediaCodecDecContext *s, uint8_t *data, size_t size, FFAMediaCodecBufferInfo *info, AVFrame *frame)
 The code handling the various YUV color formats is taken from the GStreamer project. More...
 
void ff_mediacodec_sw_buffer_copy_yuv420_semi_planar (AVCodecContext *avctx, MediaCodecDecContext *s, uint8_t *data, size_t size, FFAMediaCodecBufferInfo *info, AVFrame *frame)
 
void ff_mediacodec_sw_buffer_copy_yuv420_packed_semi_planar (AVCodecContext *avctx, MediaCodecDecContext *s, uint8_t *data, size_t size, FFAMediaCodecBufferInfo *info, AVFrame *frame)
 
static size_t qcom_tile_pos (size_t x, size_t y, size_t w, size_t h)
 The code handling the QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka color format is taken from the VLC project. More...
 
void ff_mediacodec_sw_buffer_copy_yuv420_packed_semi_planar_64x32Tile2m8ka (AVCodecContext *avctx, MediaCodecDecContext *s, uint8_t *data, size_t size, FFAMediaCodecBufferInfo *info, AVFrame *frame)
 

Macro Definition Documentation

#define QCOM_TILE_WIDTH   64
#define QCOM_TILE_HEIGHT   32
#define QCOM_TILE_SIZE   (QCOM_TILE_WIDTH * QCOM_TILE_HEIGHT)
#define QCOM_TILE_GROUP_SIZE   (4 * QCOM_TILE_SIZE)

Function Documentation

void ff_mediacodec_sw_buffer_copy_yuv420_planar ( AVCodecContext avctx,
MediaCodecDecContext s,
uint8_t data,
size_t  size,
FFAMediaCodecBufferInfo info,
AVFrame frame 
)

The code handling the various YUV color formats is taken from the GStreamer project.

Gstreamer reference: https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/sys/androidmedia/

Copyright (C) 2012, Collabora Ltd. Author: Sebastian Dröge sebas.nosp@m.tian.nosp@m..droe.nosp@m.ge@c.nosp@m.ollab.nosp@m.ora..nosp@m.co.uk

Copyright (C) 2012, Rafaël Carré <funman>

Copyright (C) 2015, Sebastian Dröge sebas.nosp@m.tian.nosp@m.@cent.nosp@m.ricu.nosp@m.lar.c.nosp@m.om

Copyright (C) 2014-2015, Collabora Ltd. Author: Matthieu Bouron matth.nosp@m.ieu..nosp@m.bouro.nosp@m.n@gc.nosp@m.ollab.nosp@m.ora..nosp@m.com

Copyright (C) 2015, Edward Hervey Author: Edward Hervey bilbo.nosp@m.ed@g.nosp@m.mail..nosp@m.com

Copyright (C) 2015, Matthew Waters matth.nosp@m.ew@c.nosp@m.entri.nosp@m.cula.nosp@m.r.com

This library 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 version 2.1 of the License.

This library 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 this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Definition at line 76 of file mediacodec_sw_buffer.c.

Referenced by mediacodec_wrap_buffer().

void ff_mediacodec_sw_buffer_copy_yuv420_semi_planar ( AVCodecContext avctx,
MediaCodecDecContext s,
uint8_t data,
size_t  size,
FFAMediaCodecBufferInfo info,
AVFrame frame 
)

Definition at line 131 of file mediacodec_sw_buffer.c.

Referenced by mediacodec_wrap_buffer().

void ff_mediacodec_sw_buffer_copy_yuv420_packed_semi_planar ( AVCodecContext avctx,
MediaCodecDecContext s,
uint8_t data,
size_t  size,
FFAMediaCodecBufferInfo info,
AVFrame frame 
)

Definition at line 181 of file mediacodec_sw_buffer.c.

Referenced by mediacodec_wrap_buffer().

static size_t qcom_tile_pos ( size_t  x,
size_t  y,
size_t  w,
size_t  h 
)
static

The code handling the QCOM_FormatYUV420PackedSemiPlanar64x32Tile2m8ka color format is taken from the VLC project.

VLC reference: http://git.videolan.org/?p=vlc.git;a=blob;f=modules/codec/omxil/qcom.c;hb=HEAD

VLC copyright notice:

qcom.c : pixel format translation for Qualcomm tiled nv12

Copyright © 2012 Rafaël Carré

Authors: Rafaël Carré <funman>

This program 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.

This program 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 this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.

Definition at line 259 of file mediacodec_sw_buffer.c.

Referenced by ff_mediacodec_sw_buffer_copy_yuv420_packed_semi_planar_64x32Tile2m8ka().

void ff_mediacodec_sw_buffer_copy_yuv420_packed_semi_planar_64x32Tile2m8ka ( AVCodecContext avctx,
MediaCodecDecContext s,
uint8_t data,
size_t  size,
FFAMediaCodecBufferInfo info,
AVFrame frame 
)

Definition at line 272 of file mediacodec_sw_buffer.c.

Referenced by mediacodec_wrap_buffer().