mirror of https://github.com/FFmpeg/FFmpeg.git
* qatar/master: libschroedinger: Switch to function names more in line with Libav style. Move code shared between libdirac and libschroedinger to libschroedinger. lavfi: uninline avfilter_copy_buffer_ref_props(). lavf: add missing '*' in a doxy. h264: Remove a commented-out function pointer typedef. txd: Remove write-only variable in txd_decode_frame(). mmvideo.c: Remove unused variable in mm_decode_pal(). build: cosmetics: Add missing end-of-line backslashes to item lists. build: cosmetics: Split HEADERS/OBJS/PROGS lists into one entry per line. libschroedinger: Move a function to avoid a forward declaration. pthread: warn on high thread counts vf_yadif: fix missing error handling for avfilter_poll_frame() avprobe: allow showing only one container/stream property. lavfi: support audio in avfilter_copy_frame_props(). lavfi: avfilter_merge_formats: handle case where inputs are same lavc: add sample rate and channel layout to AVFrame. zerocodec: check if the previous frame is missing doc: clarify check for NULL pointer style Conflicts: doc/APIchanges doc/developer.texi ffprobe.c libavcodec/Makefile libavcodec/avcodec.h libavcodec/libdirac_libschro.c libavcodec/libdirac_libschro.h libavcodec/mmvideo.c libavcodec/txd.c libavcodec/version.h libavcodec/zerocodec.c libavfilter/Makefile libavfilter/avfilter.c libavfilter/version.h libavformat/Makefile libavutil/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>pull/30/merge
commit
653d117c29
31 changed files with 374 additions and 340 deletions
@ -1,113 +0,0 @@ |
||||
/*
|
||||
* Copyright (c) 2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com > |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
/**
|
||||
* @file |
||||
* functions common to libdirac and libschroedinger |
||||
*/ |
||||
|
||||
#include "libdirac_libschro.h" |
||||
|
||||
static const DiracSchroVideoFormatInfo ff_dirac_schro_video_format_info[] = { |
||||
{ 640, 480, 24000, 1001}, |
||||
{ 176, 120, 15000, 1001}, |
||||
{ 176, 144, 25, 2 }, |
||||
{ 352, 240, 15000, 1001}, |
||||
{ 352, 288, 25, 2 }, |
||||
{ 704, 480, 15000, 1001}, |
||||
{ 704, 576, 25, 2 }, |
||||
{ 720, 480, 30000, 1001}, |
||||
{ 720, 576, 25, 1 }, |
||||
{ 1280, 720, 60000, 1001}, |
||||
{ 1280, 720, 50, 1 }, |
||||
{ 1920, 1080, 30000, 1001}, |
||||
{ 1920, 1080, 25, 1 }, |
||||
{ 1920, 1080, 60000, 1001}, |
||||
{ 1920, 1080, 50, 1 }, |
||||
{ 2048, 1080, 24, 1 }, |
||||
{ 4096, 2160, 24, 1 }, |
||||
}; |
||||
|
||||
unsigned int ff_dirac_schro_get_video_format_idx(AVCodecContext *avccontext) |
||||
{ |
||||
unsigned int ret_idx = 0; |
||||
unsigned int idx; |
||||
unsigned int num_formats = sizeof(ff_dirac_schro_video_format_info) / |
||||
sizeof(ff_dirac_schro_video_format_info[0]); |
||||
|
||||
for (idx = 1; idx < num_formats; ++idx) { |
||||
const DiracSchroVideoFormatInfo *vf = &ff_dirac_schro_video_format_info[idx]; |
||||
if (avccontext->width == vf->width && |
||||
avccontext->height == vf->height) { |
||||
ret_idx = idx; |
||||
if (avccontext->time_base.den == vf->frame_rate_num && |
||||
avccontext->time_base.num == vf->frame_rate_denom) |
||||
return idx; |
||||
} |
||||
} |
||||
return ret_idx; |
||||
} |
||||
|
||||
void ff_dirac_schro_queue_init(DiracSchroQueue *queue) |
||||
{ |
||||
queue->p_head = queue->p_tail = NULL; |
||||
queue->size = 0; |
||||
} |
||||
|
||||
void ff_dirac_schro_queue_free(DiracSchroQueue *queue, |
||||
void (*free_func)(void *)) |
||||
{ |
||||
while (queue->p_head) |
||||
free_func(ff_dirac_schro_queue_pop(queue)); |
||||
} |
||||
|
||||
int ff_dirac_schro_queue_push_back(DiracSchroQueue *queue, void *p_data) |
||||
{ |
||||
DiracSchroQueueElement *p_new = av_mallocz(sizeof(DiracSchroQueueElement)); |
||||
|
||||
if (!p_new) |
||||
return -1; |
||||
|
||||
p_new->data = p_data; |
||||
|
||||
if (!queue->p_head) |
||||
queue->p_head = p_new; |
||||
else |
||||
queue->p_tail->next = p_new; |
||||
queue->p_tail = p_new; |
||||
|
||||
++queue->size; |
||||
return 0; |
||||
} |
||||
|
||||
void *ff_dirac_schro_queue_pop(DiracSchroQueue *queue) |
||||
{ |
||||
DiracSchroQueueElement *top = queue->p_head; |
||||
|
||||
if (top) { |
||||
void *data = top->data; |
||||
queue->p_head = queue->p_head->next; |
||||
--queue->size; |
||||
av_freep(&top); |
||||
return data; |
||||
} |
||||
|
||||
return NULL; |
||||
} |
@ -1,105 +0,0 @@ |
||||
/*
|
||||
* Copyright (c) 2008 BBC, Anuradha Suraparaju <asuraparaju at gmail dot com > |
||||
* |
||||
* 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 |
||||
*/ |
||||
|
||||
/**
|
||||
* @file |
||||
* data structures common to libdirac and libschroedinger |
||||
*/ |
||||
|
||||
#ifndef AVCODEC_LIBDIRAC_LIBSCHRO_H |
||||
#define AVCODEC_LIBDIRAC_LIBSCHRO_H |
||||
|
||||
#include "avcodec.h" |
||||
|
||||
typedef struct { |
||||
uint16_t width; |
||||
uint16_t height; |
||||
uint16_t frame_rate_num; |
||||
uint16_t frame_rate_denom; |
||||
} DiracSchroVideoFormatInfo; |
||||
|
||||
/**
|
||||
* Returns the index into the Dirac Schro common video format info table |
||||
*/ |
||||
unsigned int ff_dirac_schro_get_video_format_idx(AVCodecContext *avccontext); |
||||
|
||||
/**
|
||||
* contains a single encoded frame returned from Dirac or Schroedinger |
||||
*/ |
||||
typedef struct DiracSchroEncodedFrame { |
||||
/** encoded frame data */ |
||||
uint8_t *p_encbuf; |
||||
|
||||
/** encoded frame size */ |
||||
uint32_t size; |
||||
|
||||
/** encoded frame number. Will be used as pts */ |
||||
uint32_t frame_num; |
||||
|
||||
/** key frame flag. 1 : is key frame , 0 : in not key frame */ |
||||
uint16_t key_frame; |
||||
} DiracSchroEncodedFrame; |
||||
|
||||
/**
|
||||
* queue element |
||||
*/ |
||||
typedef struct DiracSchroQueueElement { |
||||
/** Data to be stored in queue*/ |
||||
void *data; |
||||
/** Pointer to next element queue */ |
||||
struct DiracSchroQueueElement *next; |
||||
} DiracSchroQueueElement; |
||||
|
||||
|
||||
/**
|
||||
* A simple queue implementation used in libdirac and libschroedinger |
||||
*/ |
||||
typedef struct DiracSchroQueue { |
||||
/** Pointer to head of queue */ |
||||
DiracSchroQueueElement *p_head; |
||||
/** Pointer to tail of queue */ |
||||
DiracSchroQueueElement *p_tail; |
||||
/** Queue size*/ |
||||
int size; |
||||
} DiracSchroQueue; |
||||
|
||||
/**
|
||||
* Initialise the queue |
||||
*/ |
||||
void ff_dirac_schro_queue_init(DiracSchroQueue *queue); |
||||
|
||||
/**
|
||||
* Add an element to the end of the queue |
||||
*/ |
||||
int ff_dirac_schro_queue_push_back(DiracSchroQueue *queue, void *p_data); |
||||
|
||||
/**
|
||||
* Return the first element in the queue |
||||
*/ |
||||
void *ff_dirac_schro_queue_pop(DiracSchroQueue *queue); |
||||
|
||||
/**
|
||||
* Free the queue resources. free_func is a function supplied by the caller to |
||||
* free any resources allocated by the caller. The data field of the queue |
||||
* element is passed to it. |
||||
*/ |
||||
void ff_dirac_schro_queue_free(DiracSchroQueue *queue, |
||||
void (*free_func)(void *)); |
||||
#endif /* AVCODEC_LIBDIRAC_LIBSCHRO_H */ |
@ -1,5 +1,5 @@ |
||||
OBJS += x86/audio_convert_init.o \
|
||||
x86/audio_mix_init.o
|
||||
x86/audio_mix_init.o \
|
||||
|
||||
YASM-OBJS += x86/audio_convert.o \
|
||||
x86/audio_mix.o
|
||||
x86/audio_mix.o \
|
||||
|
@ -1 +1 @@ |
||||
OBJS += arm/cpu.o
|
||||
OBJS += arm/cpu.o \
|
||||
|
Loading…
Reference in new issue