[FFmpeg-trac] #4876(avcodec:open): DNx100 (DNxHD CID 1260) decode produces partially corrupted picture

FFmpeg trac at avcodec.org
Thu Sep 24 11:57:15 CEST 2015


#4876: DNx100 (DNxHD CID 1260) decode produces partially corrupted picture
------------------------------------+-----------------------------------
             Reporter:  jeremy      |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:  dnxhd       |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+-----------------------------------
Changes (by cehoyos):

 * cc: kurosu (added)


Comment:

 Replying to [comment:2 kurosu]:
 > Does anyone have the specs? qscale on 11 bits for 8 bits content is
 overkill. I bet some of those bits are not what they are used for.

 But it would not be overkill for 10bit iiuc?
 {{{
 diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
 index 1034d89..cb4a7db 100644
 --- a/libavcodec/dnxhddec.c
 +++ b/libavcodec/dnxhddec.c
 @@ -350,7 +350,12 @@ static int dnxhd_decode_macroblock(DNXHDContext *ctx,
 AVFrame *frame,
      int dct_y_offset, dct_x_offset;
      int qscale, i;

 +    if (ctx->bit_depth == 8) {
 +        skip_bits1(&ctx->gb);
 +        qscale = get_bits(&ctx->gb, 10);
 +    } else {
      qscale = get_bits(&ctx->gb, 11);
 +    }
      skip_bits1(&ctx->gb);

      if (qscale != ctx->last_qscale) {
 }}}
 > EDIT: attached a patch that seems to fix the issue, but this can break
 something else.
 After some testing, we will only find out if you push;-)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/4876#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list