On 04/12/2011 4:45 PM, Diego Biurrun wrote:
Port the ProRes encoder by "Anatoliy Wasserman", and include
the fixes by Michael Niedermayer and Reimar Döffinger.
Just use "Apple ProRes encoder" or something similar as log message.

The first (gist) like is changed to reflect this.

---
  Changelog              |    1 +
  doc/general.texi       |    2 +-
  libavcodec/Makefile    |    1 +
  libavcodec/allcodecs.c |    2 +-
  libavcodec/proresenc.c |  599 ++++++++++++++++++++++++++++++++++++++++++++++++
  5 files changed, 603 insertions(+), 2 deletions(-)
  create mode 100644 libavcodec/proresenc.c
libavcodec version bump is missing; please see the new formats checklist
in the developer docs and make sure you address all points.

I was mistaken about what changes needed version dumps. This
has been rectified.

--- a/Changelog
+++ b/Changelog
@@ -105,6 +105,7 @@ easier to use. The changes are:
  - Playstation Portable PMP format demuxer
  - PCM format support in OMA demuxer
+- Prores encoder
ProRes

Got it from Kostya's email already :P

--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -298,6 +298,7 @@ OBJS-$(CONFIG_PNG_ENCODER)             += png.o pngenc.o
  OBJS-$(CONFIG_PPM_ENCODER)             += pnmenc.o pnm.o
  OBJS-$(CONFIG_PRORES_DECODER)          += proresdec.o proresdsp.o
+OBJS-$(CONFIG_PRORES_ENCODER)          += proresenc.o
  OBJS-$(CONFIG_PTX_DECODER)             += ptx.o
Did you make sure it compiles standalone?

I hadn't, but I have now. Compiles and works fine.

--- /dev/null
+++ b/libavcodec/proresenc.c
@@ -0,0 +1,599 @@
+/**
+ * @file libavcodec/proresenc.c
Drop the filename.

Okay.

+    if (avctx->pix_fmt != PIX_FMT_YUV422P10) {
+        av_log(avctx, AV_LOG_ERROR, "need YUV422P10\n");
+        return -1;
+    }
The message is a tad terse; you could return a more sensible value
here I think.

Agreed.

+AVCodec ff_prores_encoder = {
+    .name           = "prores",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_PRORES,
+    .priv_data_size = sizeof(ProresContext),
+    .init           = prores_encode_init,
+    .close          = prores_encode_close,
+    .encode         = prores_encode_frame,
+    .pix_fmts       = (const enum PixelFormat[]){PIX_FMT_YUV422P10, 
PIX_FMT_NONE},
+    .long_name      = NULL_IF_CONFIG_SMALL("Apple ProRes"),
+    .capabilities   = 0,
+    .profiles       = profiles
Drop the 0 initialization.

Okay.

I've not replied to all the formatting remarks, and will make sure
the v2 match meets the formatting rules/guidelines in developer.texi.
I'm also going to make the av_log messages a tad more verbose.

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

Reply via email to