On Sun, May 01, 2011 at 19:00:36 (CEST), Diego Biurrun wrote: > On Sun, May 01, 2011 at 03:03:34PM +0200, Reinhard Tartler wrote: >> From: Peter Ross <[email protected]> >> >> Note: I have squashed the relevant dpxenc.c commits from FFmpeg into this one >> >> --- a/Changelog >> +++ b/Changelog >> @@ -6,6 +6,7 @@ version <next>: >> >> - Lots of deprecated API cruft removed >> - fft and imdct optimizations for AVX (Sandy Bridge) processors >> +- DPX image encoder >> >> version 0.7_beta1: > > Add an extra empty line. > >> --- /dev/null >> +++ b/libavcodec/dpxenc.c >> @@ -0,0 +1,176 @@ >> +static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, >> uint8_t *dst) > > nit: long line, more below > >> +static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int >> buf_size, void *data) >> +{ >> + >> + switch(s->bits_per_component) { > > switch ( > >> + case 8: >> + case 16: >> + size = avpicture_layout((AVPicture*)data, avctx->pix_fmt, > > pointless void* cast > >> + avctx->width, avctx->height, >> + case 10: >> + size = avctx->height * avctx->width * 4; >> + if (buf_size < HEADER_SIZE + size) >> + return -1; >> + encode_rgb48_10bit(avctx, (AVPicture*)data, buf + HEADER_SIZE); > > again > >> +AVCodec ff_dpx_encoder = { >> + "dpx", >> + AVMEDIA_TYPE_VIDEO, >> + CODEC_ID_DPX, >> + sizeof(DPXContext), >> + encode_init, >> + encode_frame, >> + .pix_fmts= (const enum PixelFormat[]){ >> + PIX_FMT_RGB24, >> + PIX_FMT_RGBA, >> + PIX_FMT_RGB48LE, >> + PIX_FMT_RGB48BE, >> + PIX_FMT_NONE}, >> + .long_name = NULL_IF_CONFIG_SMALL("DPX image"), > > Use explicit initializations in this block.
thanks for the nits, pushed with these squashed. -- Gruesse/greetings, Reinhard Tartler, KeyID 945348A4 _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
