#11317: Can AVCodec provide more crop information when decoding via MediaCodec?
-------------------------------------+-------------------------------------
             Reporter:  lanczos-     |                     Type:  defect
  algorithm                          |
               Status:  new          |                 Priority:  normal
            Component:  avcodec      |                  Version:
             Keywords:  mediacodec   |  unspecified
  crop                               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 I'm using an Android single-board computer based on Allwinner H618 to
 decode RTP stream and display it. When decoding a video stream using
 FFMPEG with HW MediaCodec, the frame parameters change from **1280x720**
 to **1280x736** at startup without any action on my part:

 {{{
 07-06 09:59:28.814  2158  2199 D SurfaceUtils: disconnecting from surface
 0xee2fac08, reason setNativeWindowSizeFormatAndUsage
 07-06 09:59:28.815  2158  2199 D SurfaceUtils: connecting to surface
 0xee2fac08, reason setNativeWindowSizeFormatAndUsage
 07-06 09:59:28.815  2158  2199 D SurfaceUtils: set up nativeWindow
 0xee2fac08 for 1280x736, color 0x32315659, rotation 0, usage 0x402d00

 07-06 09:59:28.876  2158  2204 D MyApp: FFmpeg: [h264_mediacodec @
 0xc7962500] Output MediaFormat changed to {crop-right=1279, color-
 format=842094169, slice-height=720, mime=video/raw, hdr-static-
 info=java.nio.HeapByteBuffer[pos=0 lim=25 cap=25], stride=1280, color-
 standard=1, color-transfer=3, crop-bottom=719, crop-left=0, width=1280,
 color-range=2, crop-top=0, height=736}
 07-06 09:59:28.876  2158  2204 D MyApp:
 07-06 09:59:28.877  2158  2204 D MyApp: FFmpeg: [h264_mediacodec @
 0xc7962500] Output crop parameters top=0 bottom=719 left=0 right=1279,
 resulting dimensions width=1280 height=720
 07-06 09:59:28.877  2158  2204 D MyApp:
 }}}

 Apparently, to align the dimensions to 32 pixels. The
 `avcodec_receive_frame` writes width, height = **1280x720** to `AVFrame`
 and as a result, libraries that use AVCodec incorrectly determine the
 correct texture size, because in the frame itself there is no information
 about **736** anywhere. Without any additional workarounds I get a green
 line at the bottom
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/11317>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to