[FFmpeg-trac] #635(avcodec:new): Incorrect Memory Layout when using avpicture_layout with PIX_FMT_NV12

FFmpeg trac at avcodec.org
Thu Nov 10 14:32:20 CET 2011


#635: Incorrect Memory Layout when using avpicture_layout with PIX_FMT_NV12
-------------------------------------+-------------------------------------
             Reporter:  jkersch      |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avcodec      |                  Version:
             Keywords:               |  unspecified
  PIX_FMT_NV12 layout NV12           |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 when decoding (e.g. a h264 stream) with output format PIX_FMT_NV12, the
 AVFrame contains 3 data buffers with Luma and Cb and Cr planes.

 when using avpicture_layout to copythe AVPicture to a previously allocated
 memory buffer, the bytes are layouted incorrectly.
 NV12 is all Luma bytes first, and after that the Cb and Cr bytes
 interleaved (see http://msdn.microsoft.com/en-
 us/library/windows/desktop/dd206750(v=vs.85).aspx#nv12)

 i´ve worked around this manually, but it would be great if this incorrect
 behavior could be fixed within libavcodec itself.

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/635>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list