aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dpxenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-05-02 03:37:36 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-05-02 03:45:58 +0200
commitc3f5b8112573245fc5056a49477749df4ed1d0ea (patch)
treed55921b265eca41f50c2dac5b317844d7ad7170d /libavcodec/dpxenc.c
parent3862ebba23cc9a76a004edd4c12d0b853a0426cd (diff)
parentad1862d64ae28251e2740e437bbc639492a374a0 (diff)
downloadffmpeg-c3f5b8112573245fc5056a49477749df4ed1d0ea.tar.gz
Merge remote branch 'qatar/master'
* qatar/master: ALPHA: Replace sized int_fast integer types with plain int/unsigned. Duplicate DPX image encoder Duplicate DPX decoder: read sample aspect ratio Duplciate DPX decoder: add buffer size checks. ac3enc: clip large coefficient values and negative exponents rather than using av_assert2(). ac3enc: do not store a bandwidth code for each channel. ac3enc: remove bandwidth reduction as fallback for bit allocation failure. ac3enc: merge compute_exp_strategy_ch() into compute_exp_strategy() ac3enc: return error if frame+exponent bits are too large instead of using av_assert2(). ac3enc: differentiate between current block and reference block in bit_alloc() ac3enc: simplify exponent_init() by calculating exponent_group_tab[] based on exponent group sizes. ac3enc: simplify stereo rematrixing decision options Include both URLs: Update URL to fate samples Conflicts: Changelog doc/fate.txt libavcodec/ac3enc.c libavcodec/dpxenc.c libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dpxenc.c')
-rw-r--r--libavcodec/dpxenc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index 1d637b4e81..7cf9d50835 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -136,7 +136,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
switch(s->bits_per_component) {
case 8:
case 16:
- size = avpicture_layout((AVPicture*)data, avctx->pix_fmt,
+ size = avpicture_layout(data, avctx->pix_fmt,
avctx->width, avctx->height,
buf + HEADER_SIZE, buf_size - HEADER_SIZE);
if (size < 0)
@@ -146,7 +146,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
size = avctx->height * avctx->width * 4;
if (buf_size < HEADER_SIZE + size)
return -1;
- encode_rgb48_10bit(avctx, (AVPicture*)data, buf + HEADER_SIZE);
+ encode_rgb48_10bit(avctx, data, buf + HEADER_SIZE);
break;
default:
av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n", s->bits_per_component);
@@ -160,13 +160,13 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
}
AVCodec ff_dpx_encoder = {
- "dpx",
- AVMEDIA_TYPE_VIDEO,
- CODEC_ID_DPX,
- sizeof(DPXContext),
- encode_init,
- encode_frame,
- .pix_fmts= (const enum PixelFormat[]){
+ .name = "dpx",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = CODEC_ID_DPX,
+ .priv_data_size = sizeof(DPXContext),
+ .init = encode_init,
+ .encode = encode_frame,
+ .pix_fmts = (const enum PixelFormat[]){
PIX_FMT_RGB24,
PIX_FMT_RGBA,
PIX_FMT_RGB48LE,