Skip to content

Commit

Permalink
Merge pull request #36 from hrydgard/bb
Browse files Browse the repository at this point in the history
Update Symbian and Blackberry ffmpeg binaries
  • Loading branch information
hrydgard committed Oct 30, 2015
2 parents 2dadf61 + 68874f8 commit b6fd704
Show file tree
Hide file tree
Showing 105 changed files with 5,825 additions and 1,610 deletions.
642 changes: 444 additions & 198 deletions blackberry/armv7/include/libavcodec/avcodec.h

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions blackberry/armv7/include/libavcodec/avfft.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ enum DCTTransformType {

/**
* Set up DCT.
*
* @param nbits size of the input array:
* (1 << nbits) for DCT-II, DCT-III and DST-I
* (1 << nbits) + 1 for DCT-I
* @param type the type of transform
*
* @note the first element of the input of DST-I is ignored
*/
Expand Down
6 changes: 2 additions & 4 deletions blackberry/armv7/include/libavcodec/dxva2.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,8 @@
* Public libavcodec DXVA2 header.
*/

#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0600
#undef _WIN32_WINNT
#endif

#if !defined(_WIN32_WINNT)
#define _WIN32_WINNT 0x0600
#endif

Expand All @@ -49,6 +46,7 @@
*/

#define FF_DXVA2_WORKAROUND_SCALING_LIST_ZIGZAG 1 ///< Work around for DXVA2 and old UVD/UVD+ ATI video cards
#define FF_DXVA2_WORKAROUND_INTEL_CLEARVIDEO 2 ///< Work around for DXVA2 and old Intel GPUs with ClearVideo interface

/**
* This structure is used to provides the necessary configurations and data
Expand Down
2 changes: 0 additions & 2 deletions blackberry/armv7/include/libavcodec/old_codec_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#ifndef AVCODEC_OLD_CODEC_IDS_H
#define AVCODEC_OLD_CODEC_IDS_H

#include "libavutil/common.h"

/*
* This header exists to prevent new codec IDs from being accidentally added to
* the deprecated list.
Expand Down
92 changes: 80 additions & 12 deletions blackberry/armv7/include/libavcodec/vda.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
* Public libavcodec VDA header.
*/

#include "libavcodec/avcodec.h"

#include <stdint.h>

// emmintrin.h is unable to compile with -std=c99 -Werror=missing-prototypes
Expand All @@ -41,6 +43,12 @@

#include "libavcodec/version.h"

// extra flags not defined in VDADecoder.h
enum {
kVDADecodeInfo_Asynchronous = 1UL << 0,
kVDADecodeInfo_FrameDropped = 1UL << 1
};

/**
* @defgroup lavc_codec_hwaccel_vda VDA
* @ingroup lavc_codec_hwaccel
Expand Down Expand Up @@ -112,26 +120,17 @@ struct vda_context {
OSType cv_pix_fmt_type;

/**
* The current bitstream buffer.
*
* - encoding: unused
* - decoding: Set/Unset by libavcodec.
* unused
*/
uint8_t *priv_bitstream;

/**
* The current size of the bitstream.
*
* - encoding: unused
* - decoding: Set/Unset by libavcodec.
* unused
*/
int priv_bitstream_size;

/**
* The reference size used for fast reallocation.
*
* - encoding: unused
* - decoding: Set/Unset by libavcodec.
* unused
*/
int priv_allocated_size;

Expand All @@ -155,6 +154,75 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
/** Destroy the video decoder. */
int ff_vda_destroy_decoder(struct vda_context *vda_ctx);

/**
* This struct holds all the information that needs to be passed
* between the caller and libavcodec for initializing VDA decoding.
* Its size is not a part of the public ABI, it must be allocated with
* av_vda_alloc_context() and freed with av_free().
*/
typedef struct AVVDAContext {
/**
* VDA decoder object. Created and freed by the caller.
*/
VDADecoder decoder;

/**
* The output callback that must be passed to VDADecoderCreate.
* Set by av_vda_alloc_context().
*/
VDADecoderOutputCallback output_callback;

/**
* CVPixelBuffer Format Type that VDA will use for decoded frames; set by
* the caller.
*/
OSType cv_pix_fmt_type;
} AVVDAContext;

/**
* Allocate and initialize a VDA context.
*
* This function should be called from the get_format() callback when the caller
* selects the AV_PIX_FMT_VDA format. The caller must then create the decoder
* object (using the output callback provided by libavcodec) that will be used
* for VDA-accelerated decoding.
*
* When decoding with VDA is finished, the caller must destroy the decoder
* object and free the VDA context using av_free().
*
* @return the newly allocated context or NULL on failure
*/
AVVDAContext *av_vda_alloc_context(void);

/**
* This is a convenience function that creates and sets up the VDA context using
* an internal implementation.
*
* @param avctx the corresponding codec context
*
* @return >= 0 on success, a negative AVERROR code on failure
*/
int av_vda_default_init(AVCodecContext *avctx);

/**
* This is a convenience function that creates and sets up the VDA context using
* an internal implementation.
*
* @param avctx the corresponding codec context
* @param vdactx the VDA context to use
*
* @return >= 0 on success, a negative AVERROR code on failure
*/
int av_vda_default_init2(AVCodecContext *avctx, AVVDAContext *vdactx);

/**
* This function must be called to free the VDA context initialized with
* av_vda_default_init().
*
* @param avctx the corresponding codec context
*/
void av_vda_default_free(AVCodecContext *avctx);

/**
* @}
*/
Expand Down
40 changes: 40 additions & 0 deletions blackberry/armv7/include/libavcodec/vdpau.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,46 @@ AVVDPAUContext *av_alloc_vdpaucontext(void);
AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *);
void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);

/**
* Associate a VDPAU device with a codec context for hardware acceleration.
* This function is meant to be called from the get_format() codec callback,
* or earlier. It can also be called after avcodec_flush_buffers() to change
* the underlying VDPAU device mid-stream (e.g. to recover from non-transparent
* display preemption).
*
* @note get_format() must return AV_PIX_FMT_VDPAU if this function completes
* successfully.
*
* @param avctx decoding context whose get_format() callback is invoked
* @param device VDPAU device handle to use for hardware acceleration
* @param get_proc_address VDPAU device driver
* @param flags zero of more OR'd AV_HWACCEL_FLAG_* flags
*
* @return 0 on success, an AVERROR code on failure.
*/
int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
VdpGetProcAddress *get_proc_address, unsigned flags);

/**
* Gets the parameters to create an adequate VDPAU video surface for the codec
* context using VDPAU hardware decoding acceleration.
*
* @note Behavior is undefined if the context was not successfully bound to a
* VDPAU device using av_vdpau_bind_context().
*
* @param avctx the codec context being used for decoding the stream
* @param type storage space for the VDPAU video surface chroma type
* (or NULL to ignore)
* @param width storage space for the VDPAU video surface pixel width
* (or NULL to ignore)
* @param height storage space for the VDPAU video surface pixel height
* (or NULL to ignore)
*
* @return 0 on success, a negative AVERROR code on failure.
*/
int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
uint32_t *width, uint32_t *height);

/**
* Allocate an AVVDPAUContext.
*
Expand Down
Loading

0 comments on commit b6fd704

Please sign in to comment.