[FFmpeg-trac] #1140(FFmpeg:new): Enabling GMC warp points in demuxing.

FFmpeg trac at avcodec.org
Wed Mar 28 09:32:29 CEST 2012


#1140: Enabling GMC warp points in demuxing.
-----------------------------------+---------------------------------------
             Reporter:  chungshik  |                     Type:  enhancement
               Status:  new        |                 Priority:  normal
            Component:  FFmpeg     |                  Version:  unspecified
             Keywords:             |               Blocked By:
             Blocking:             |  Reproduced by developer:  0
Analyzed by developer:  0          |
-----------------------------------+---------------------------------------
 MPEG4 GMC warp points isn't included to AVCodecContext that it's not
 delivered to a client of a demuxer. But it's often needed before start
 decoding a video codec so that the decoder can decide if it can decode and
 render it or not. The following change (from v0.6.3) enables it, and I
 wonder if this can be included in the future release.


 --- a/ffmpeg/libavcodec/avcodec.h
 +++ b/ffmpeg/libavcodec/avcodec.h
 @@ -2652,6 +2652,17 @@ typedef struct AVCodecContext {
       * - decoding: unused
       */
      int rc_lookahead;
 +
 +    /**
 +     * MPEG-4 Warp Point
 +     *  - encoding: Set by user
 +     *  - decoding: Set by libavcodec
 +     */
 +    int warp_point;
  } AVCodecContext;

  /**

 --- a/ffmpeg/libavcodec/mpeg4video_parser.c
 +++ b/ffmpeg/libavcodec/mpeg4video_parser.c
 @@ -86,6 +86,15 @@ static int av_mpeg4_decode_header(AVCodecParserContext
 *s1,
      if (s->width && (!avctx->width || !avctx->height ||
 !avctx->coded_width || !avctx->coded_height)) {
          avcodec_set_dimensions(avctx, s->width, s->height);
      }
 +
 +    /* Get the warp point */
 +    avctx->warp_point = s->num_sprite_warping_points;
 +
      s1->pict_type= s->pict_type;
      pc->first_picture = 0;
      return ret;

 --- a/ffmpeg/libavformat/mov.c
 +++ b/ffmpeg/libavformat/mov.c
 @@ -1016,6 +1016,15 @@ static int mov_read_stsd(MOVContext *c,
 ByteIOContext *pb, MOVAtom atom)
              int color_greyscale;

              st->codec->codec_id = id;
 +
 +            if (id == CODEC_ID_MPEG4)
 +                st->need_parsing = AVSTREAM_PARSE_HEADERS;
 +
              get_be16(pb); /* version */
              get_be16(pb); /* revision level */
              get_be32(pb); /* vendor */

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


More information about the FFmpeg-trac mailing list