1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge commit 'c68317ebbe4915035df0b08c23eea7a0b80ab881'

* commit 'c68317ebbe4915035df0b08c23eea7a0b80ab881':
  lavc: fix documentation for AVCodecContext.delay
  atrac3: return an error if extradata_size is not a specific known size
  lavc: use the correct API version guard macro for avcodec_encode_audio()
  Move Doxyfile into the doc/ subdirectory
  doxygen: Build Doxygen documentation in the doc/ subdirectory
  dfa: use av_memcpy_backptr() where previously impossible
  av_memcpy_backptr: Drop no longer necessary malloc padding

Conflicts:
	.gitignore
	libavcodec/avcodec.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-24 14:18:17 +02:00
commit 719fde47ca
8 changed files with 11 additions and 10 deletions

2
.gitignore vendored
View File

@ -38,8 +38,8 @@
/doc/examples/muxing /doc/examples/muxing
/doc/examples/scaling_video /doc/examples/scaling_video
/doc/fate.txt /doc/fate.txt
/doc/doxy/html/
/doc/print_options /doc/print_options
/doxy/
/libavcodec/*_tablegen /libavcodec/*_tablegen
/libavcodec/*_tables.c /libavcodec/*_tables.c
/libavcodec/*_tables.h /libavcodec/*_tables.h

View File

@ -44,7 +44,7 @@ PROJECT_LOGO =
# If a relative path is entered, it will be relative to the location # If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used. # where doxygen was started. If left blank the current directory will be used.
OUTPUT_DIRECTORY = doxy OUTPUT_DIRECTORY = doc/doxy
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output # 4096 sub-directories (in 2 levels) under the output directory of each output

View File

@ -913,6 +913,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)
} else { } else {
av_log(NULL, AV_LOG_ERROR, "Unknown extradata size %d.\n", av_log(NULL, AV_LOG_ERROR, "Unknown extradata size %d.\n",
avctx->extradata_size); avctx->extradata_size);
return AVERROR(EINVAL);
} }
/* Check the extradata */ /* Check the extradata */

View File

@ -1607,6 +1607,8 @@ typedef struct AVCodecContext {
int ticks_per_frame; int ticks_per_frame;
/** /**
* Codec delay.
*
* Encoding: Number of frames delay there will be from the encoder input to * Encoding: Number of frames delay there will be from the encoder input to
* the decoder output. (we assume the decoder matches the spec) * the decoder output. (we assume the decoder matches the spec)
* Decoding: Number of frames delay in addition to what a standard decoder * Decoding: Number of frames delay in addition to what a standard decoder

View File

@ -45,7 +45,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx)
av_assert0(av_image_check_size(avctx->width, avctx->height, 0, avctx) >= 0); av_assert0(av_image_check_size(avctx->width, avctx->height, 0, avctx) >= 0);
s->frame_buf = av_mallocz(avctx->width * avctx->height + AV_LZO_OUTPUT_PADDING); s->frame_buf = av_mallocz(avctx->width * avctx->height);
if (!s->frame_buf) if (!s->frame_buf)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
@ -126,9 +126,7 @@ static int decode_dsw1(GetByteContext *gb, uint8_t *frame, int width, int height
count = ((v >> 13) + 2) << 1; count = ((v >> 13) + 2) << 1;
if (frame - frame_start < offset || frame_end - frame < count) if (frame - frame_start < offset || frame_end - frame < count)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
// can't use av_memcpy_backptr() since it can overwrite following pixels av_memcpy_backptr(frame, offset, count);
for (v = 0; v < count; v++)
frame[v] = frame[v - offset];
frame += count; frame += count;
} else if (bitbuf & (mask << 1)) { } else if (bitbuf & (mask << 1)) {
frame += bytestream2_get_le16(gb); frame += bytestream2_get_le16(gb);

View File

@ -301,8 +301,7 @@ static int tgv_decode_frame(AVCodecContext *avctx,
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID; s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.linesize[0] = s->width; s->frame.linesize[0] = s->width;
/* allocate additional 12 bytes to accommodate av_memcpy_backptr() OUTBUF_PADDED optimisation */ s->frame.data[0] = av_malloc(s->width * s->height);
s->frame.data[0] = av_malloc(s->width*s->height + 12);
if (!s->frame.data[0]) if (!s->frame.data[0])
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
s->frame.data[1] = av_malloc(AVPALETTE_SIZE); s->frame.data[1] = av_malloc(AVPALETTE_SIZE);

View File

@ -482,7 +482,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
{ {
LclDecContext * const c = avctx->priv_data; LclDecContext * const c = avctx->priv_data;
unsigned int basesize = avctx->width * avctx->height; unsigned int basesize = avctx->width * avctx->height;
unsigned int max_basesize = FFALIGN(avctx->width, 4) * FFALIGN(avctx->height, 4) + AV_LZO_OUTPUT_PADDING; unsigned int max_basesize = FFALIGN(avctx->width, 4) *
FFALIGN(avctx->height, 4);
unsigned int max_decomp_size; unsigned int max_decomp_size;
avcodec_get_frame_defaults(&c->pic); avcodec_get_frame_defaults(&c->pic);

View File

@ -1328,7 +1328,7 @@ end:
return ret; return ret;
} }
#if FF_API_OLD_DECODE_AUDIO #if FF_API_OLD_ENCODE_AUDIO
int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx, int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx,
uint8_t *buf, int buf_size, uint8_t *buf, int buf_size,
const short *samples) const short *samples)