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

FFmpeg trac at avcodec.org
Thu Nov 10 17:09:56 CET 2011


#635: Incorrect Memory Layout when using avpicture_layout with PIX_FMT_NV12
-------------------------------------+-----------------------------------
             Reporter:  jkersch      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avcodec
              Version:  unspecified  |               Resolution:
             Keywords:  NV12         |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-----------------------------------

Comment (by cehoyos):

 Replying to [comment:2 jkersch]:
 > the Luma plane is correct, however, for Cb and Cr there are two
 different buffers instead of an interleaved one where the byte are merged
 in the form (Cb)(Cr)(Cb)(Cr).

 That is because libavcodec's H.264 decoder can only output to yuv420p (if
 the original sample is 8bit yuv420 which I assume). It cannot output to
 nv12, no matter what the input is.

 libswscale can convert yuv420p to nv12.

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


More information about the FFmpeg-trac mailing list