On Mon, Feb 27, 2012 at 10:46:40PM +0200, Felipe Contreras wrote:
> Notice the library is called libtidsp, and the name libtidspbridge is
> abusrdly long, inconvenient, and inconsistent with the actual library
> name, but that's what was requested on the mailing list.
> 
> Signed-off-by: Felipe Contreras <[email protected]>
> ---
>  configure                      |    5 ++
>  libavcodec/Makefile            |    1 +
>  libavcodec/allcodecs.c         |    1 +
>  libavcodec/tidspbridge_mpeg4.c |  173 
> ++++++++++++++++++++++++++++++++++++++++
>  4 files changed, 180 insertions(+)
>  create mode 100644 libavcodec/tidspbridge_mpeg4.c

Please add a Changelog entry.

> --- /dev/null
> +++ b/libavcodec/tidspbridge_mpeg4.c
> @@ -0,0 +1,173 @@
> +static av_cold int init(AVCodecContext *avctx)
> +{
> +    struct td_av_context *ctx;
> +    struct td_context *td_ctx;
> +
> +    avctx->internal->hwaccel_private = ctx = av_mallocz(sizeof(*ctx));
> +    if (!ctx)
> +        return -1;

return AVERROR(ENOMEM);

> +static int start_frame(AVCodecContext *avctx, const uint8_t *buffer,
> +        uint32_t size)

  static int start_frame(AVCodecContext *avctx, const uint8_t *buffer,
                         uint32_t size)

> +    for (i = 0; i < avctx->height; i++)
> +        memcpy(f->data[0] + i * f->linesize[0], p1 + i * avctx->width,
> +                avctx->width);
> +    for (i = 0; i < avctx->height / 2; i++)
> +        memcpy(f->data[1] + i * f->linesize[1], p2 + i * avctx->width / 2,
> +                avctx->width / 2);
> +    for (i = 0; i < avctx->height / 2; i++)
> +        memcpy(f->data[2] + i * f->linesize[2], p3 + i * avctx->width / 2,
> +                avctx->width / 2);

Indentation is off by one space in the memcpy calls.

> +static int decode_slice(av_unused AVCodecContext *avctx,
> +        av_unused const uint8_t *buffer,
> +        av_unused uint32_t size)

Indent as I showed above.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to