[Ffmpeg-cvslog] r6355 - in trunk: libavcodec/4xm.c libavcodec/cyuv.c libavcodec/error_resilience.c libavcodec/h263.c libavcodec/h264.c libavcodec/indeo3.c libavcodec/mjpeg.c libavcodec/mpeg12.c libavcodec/mpeg12data.h libavcodec/mpegaudiodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/msmpeg4.c libavcodec/parser.c libavcodec/svq1.c libavcodec/vc1.c libavcodec/vp3.c libavcodec/wmadec.c libavformat/amr.c libavformat/asf.c libavformat/avformat.h libavformat/avienc.c libavformat/matroska.c libavformat/mpeg.c libavformat/ogg2.c libavformat/ogg2.h libavformat/oggparsevorbis.c libavformat/rtp.c libavformat/rtpproto.c libavformat/udp.c

Kostya kostya.shishkov
Thu Sep 28 07:03:47 CEST 2006


On Wed, Sep 27, 2006 at 09:47:42PM +0200, mru wrote:
> Author: mru
> Date: Wed Sep 27 21:47:39 2006
> New Revision: 6355
> 
> Modified:
[...]
>    trunk/libavcodec/vc1.c
[...]
> 
> Log:
> fix some signedness warnings
> 
>
[...] 
> 
> Modified: trunk/libavcodec/vc1.c
> ==============================================================================
> --- trunk/libavcodec/vc1.c	(original)
> +++ trunk/libavcodec/vc1.c	Wed Sep 27 21:47:39 2006
> @@ -2341,10 +2341,10 @@
>   * @param dir_ptr Prediction direction for use in AC prediction
>   */
>  static inline int vc1_i_pred_dc(MpegEncContext *s, int overlap, int pq, int n,
> -                              int16_t **dc_val_ptr, int *dir_ptr)
> +                                uint16_t **dc_val_ptr, int *dir_ptr)
>  {
>      int a, b, c, wrap, pred, scale;
> -    int16_t *dc_val;
> +    uint16_t *dc_val;
>      static const uint16_t dcpred[32] = {
>      -1, 1024,  512,  341,  256,  205,  171,  146,  128,
>           114,  102,   93,   85,   79,   73,   68,   64,
> @@ -2402,10 +2402,10 @@
>   */
>  static inline int vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n,
>                                int a_avail, int c_avail,
> -                              int16_t **dc_val_ptr, int *dir_ptr)
> +                              uint16_t **dc_val_ptr, int *dir_ptr)
>  {
>      int a, b, c, wrap, pred, scale;
> -    int16_t *dc_val;
> +    uint16_t *dc_val;
>      int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
>      int q1, q2 = 0;
>  
> @@ -2578,7 +2578,7 @@
>      MpegEncContext *s = &v->s;
>      int dc_pred_dir = 0; /* Direction of the DC prediction used */
>      int run_diff, i;
> -    int16_t *dc_val;
> +    uint16_t *dc_val;
>      int16_t *ac_val, *ac_val2;
>      int dcdiff;
>  
> @@ -2743,7 +2743,7 @@
>      MpegEncContext *s = &v->s;
>      int dc_pred_dir = 0; /* Direction of the DC prediction used */
>      int run_diff, i;
> -    int16_t *dc_val;
> +    uint16_t *dc_val;
>      int16_t *ac_val, *ac_val2;
>      int dcdiff;
>      int a_avail = v->a_avail, c_avail = v->c_avail;
> @@ -2940,7 +2940,7 @@
>      MpegEncContext *s = &v->s;
>      int dc_pred_dir = 0; /* Direction of the DC prediction used */
>      int run_diff, i;
> -    int16_t *dc_val;
> +    uint16_t *dc_val;
>      int16_t *ac_val, *ac_val2;
>      int dcdiff;
>      int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
> 

I missed patch which changes this but I must say for VC-1 it's totally unacceptable:
here DC value goes below zero in cases of overlap and for Advanced Profile.
Both known WVC1 samples and many WMV3 samples show huge distortions with this patch.




More information about the ffmpeg-cvslog mailing list