On 27/01/15 21:56, Vittorio Giovara wrote:
Signed-off-by: Vittorio Giovara <[email protected]>
---
Using the av_reduce approach.
Vittorio

+    // make sure profile size constraints are respected
+    // DNx100 allows 1920->1440 and 1280->960 subsampling
+    if (ctx->width != ctx->cid_table->width) {
+        av_reduce(&ctx->avctx->sample_aspect_ratio.num,
+                  &ctx->avctx->sample_aspect_ratio.den,
+                  ctx->width, ctx->cid_table->width, 255);
+        ctx->width = ctx->cid_table->width;
+    }
+
      if (buf_size < ctx->cid_table->coding_unit_size) {
          av_log(ctx->avctx, AV_LOG_ERROR, "incorrect frame size (%d < %d).\n",
                 buf_size, ctx->cid_table->coding_unit_size);




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

Reply via email to