Opened 7 years ago
Last modified 2 years ago
#7280 new enhancement
dnxhdenc.c forces DNxHR HQX to 10-bit, but it should allow 12-bit
Reported by: | electron.rotoscope | Owned by: | |
---|---|---|---|
Priority: | wish | Component: | avcodec |
Version: | git-master | Keywords: | dnxhd |
Cc: | Francesco Bucciantini | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
According to the Avid specifications for the DNxHR HQX and DNxHR 444 formats, they should always be 12-bit as shown on http://avid.force.com/pkb/articles/en_US/White_Paper/DNxHR-Codec-Bandwidth-Specifications in the section "DNxHR Key"
The current version of ffmpeg forces the output to 10-bit. This is referenced (as far as I can tell) in lines 385 to 398 of libavcodec\dnxhdenc.c
if ((ctx->profile == FF_PROFILE_DNXHR_444 && (avctx->pix_fmt != AV_PIX_FMT_YUV444P10 && avctx->pix_fmt != AV_PIX_FMT_GBRP10)) || (ctx->profile != FF_PROFILE_DNXHR_444 && (avctx->pix_fmt == AV_PIX_FMT_YUV444P10 || avctx->pix_fmt == AV_PIX_FMT_GBRP10))) { av_log(avctx, AV_LOG_ERROR, "pixel format is incompatible with DNxHD profile\n"); return AVERROR(EINVAL); } if (ctx->profile == FF_PROFILE_DNXHR_HQX && avctx->pix_fmt != AV_PIX_FMT_YUV422P10) { av_log(avctx, AV_LOG_ERROR, "pixel format is incompatible with DNxHR HQX profile\n"); return AVERROR(EINVAL); }
It looks like this may have been discussed in 2016 but maybe never implemented, not sure https://ffmpeg.org/pipermail/ffmpeg-devel/2016-August/197897.html
Attachments (1)
Change History (9)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
I should note the confusion is probably related to the DNxHD Codec 175X/185X/220X, which also has a name ending in X but should always be 10-bit, as can be seen on page 9 of http://www.avid.com/static/resources/US/documents/DNxHD.pdf
comment:3 by , 7 years ago
Keywords: | dnxhd added; DNxHR HQX depth yuv422p12le removed |
---|---|
Priority: | important → wish |
Type: | defect → enhancement |
Version: | unspecified → git-master |
comment:5 by , 7 years ago
Replying to richardpl:
This is just not correct.
As in dnxhdenc.c is coded incorrectly? Because I agree! I honestly don't see this as an enhancement. As the current version is, it will only create out-of-spec files when using DNxHR HQX profile
by , 7 years ago
comment:6 by , 7 years ago
Priority: | wish → minor |
---|---|
Summary: | dnxhdenc.c forces DNxHR HQX to 10-bit, but it should be 12-bit → dnxhdenc.c forces DNxHR HQX to 10-bit, but it should allow 12-bit |
durandal_1707 provided a screenshot of a spec for the format (attached)
Looks like that spec allows both 10 bit and 12 bit, so ffmpeg should allow both
comment:7 by , 7 years ago
Priority: | minor → wish |
---|
FFmpeg correctly reports that libavcodec does not support encoding 12bit dnxhd, so this is a wish for an enhancement.
comment:8 by , 2 years ago
Cc: | added |
---|
Has there been any improvement in libavcodec over the last 4 years regarding 12bit encoding support for DNxHQX? If not, is there any plan to implement this?
How to reproduce (using an Avid-generated HQX file as an input)