[FFmpeg-devel] [PATCH] libopenjpegenc: make dci compliant j2c

Michaël Cinquin mc at michaelcinquin.com
Sat Feb 2 14:17:21 CET 2013


On 1 févr. 2013, at 18:11, Michael Bradshaw wrote:
> Please remove the changes from the shr patch. That is, please change
> this patch to only be the if statement below (which I'm about to
> review)

done. It's true that now that libswscale supports 12 bpc, it's unnecessary.

On 1 févr. 2013, at 18:11, Michael Bradshaw wrote:
> I see this pretty much came from cinema_parameters() in image_to_j2k.
> Is there anything in cinema_setup_encoder() that should also be
> included? Particularly, setting parameters->max_comp_size (we may want
> to set it to COMP_24_CS/
> COMP_48_CS depending on CINEMA2K_24/CINEMA2K_48/CINEMA4K_24 to force
> openjpeg to respect the limitation; it defaults to 0 so openjpeg
> ignores it) or parameters->numpocs (they seem to set this and
> parameters->POC for CINEMA4K_24)? I'm assuming since the user can set
> parameters->tcp_rates we don't have to force it to be something
> specific.

Indeed, image_to_j2k does quite a bit of computation to limit the bitrate in cinema_mode, it might be a good idea to make the same ones. Anyway, they should be updated because image_to_j2K only cares about 24p and 48p, 2K and 4K, but lots of new framerates have been specified by smpte.  Then this could conflict with the "compression_level" option.
All this seemed a little involved for my first patch, so I just left the    " ctx->enc_params.tcp_rates[0] = FFMAX(avctx->compression_level, 0) * 2;" line, and anyway use a high compression level on the command-line.


I fixed spaces and indentation issues

Here is the new patch, computed against the latest version of libopenjpegenc.c, on the master branch

Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libopenjpegenc-make_dci_compliant_j2c-4.patch
Type: application/octet-stream
Size: 1639 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130202/ceb66fd3/attachment.obj>


More information about the ffmpeg-devel mailing list