Commit 4579b28b authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove picture quantization table (same reason as qtype)

parent 5c5683e7
...@@ -91,8 +91,6 @@ struct picture_t ...@@ -91,8 +91,6 @@ struct picture_t
bool b_progressive; /**< is it a progressive frame ? */ bool b_progressive; /**< is it a progressive frame ? */
bool b_top_field_first; /**< which field is first */ bool b_top_field_first; /**< which field is first */
unsigned int i_nb_fields; /**< # of displayed fields */ unsigned int i_nb_fields; /**< # of displayed fields */
int8_t *p_q; /**< quantification table */
int i_qstride; /**< quantification stride */
/**@}*/ /**@}*/
/** Private data - the video output plugin might want to put stuff here to /** Private data - the video output plugin might want to put stuff here to
...@@ -115,7 +113,7 @@ struct picture_t ...@@ -115,7 +113,7 @@ struct picture_t
* This function will create a new picture. * This function will create a new picture.
* The picture created will implement a default release management compatible * The picture created will implement a default release management compatible
* with picture_Hold and picture_Release. This default management will release * with picture_Hold and picture_Release. This default management will release
* p_sys, p_q, gc.p_sys fields if non NULL. * p_sys, gc.p_sys fields if non NULL.
*/ */
VLC_API picture_t * picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) VLC_USED; VLC_API picture_t * picture_New( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_sar_num, int i_sar_den ) VLC_USED;
......
...@@ -113,10 +113,6 @@ struct filter_sys_t ...@@ -113,10 +113,6 @@ struct filter_sys_t
/* Set to NULL if post processing is disabled */ /* Set to NULL if post processing is disabled */
pp_mode *pp_mode; pp_mode *pp_mode;
/* Set to true if previous pic had a quant matrix
(used to prevent spamming warning messages) */
bool b_had_matrix;
/* Lock when using or changing pp_mode */ /* Lock when using or changing pp_mode */
vlc_mutex_t lock; vlc_mutex_t lock;
}; };
...@@ -258,8 +254,9 @@ static int OpenPostproc( vlc_object_t *p_this ) ...@@ -258,8 +254,9 @@ static int OpenPostproc( vlc_object_t *p_this )
var_AddCallback( p_filter, FILTER_PREFIX "name", PPNameCallback, NULL ); var_AddCallback( p_filter, FILTER_PREFIX "name", PPNameCallback, NULL );
p_filter->pf_video_filter = PostprocPict; p_filter->pf_video_filter = PostprocPict;
p_sys->b_had_matrix = true;
msg_Warn( p_filter, "Quantification table was not set by video decoder. "
"Postprocessing won't look good." );
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -322,20 +319,9 @@ static picture_t *PostprocPict( filter_t *p_filter, picture_t *p_pic ) ...@@ -322,20 +319,9 @@ static picture_t *PostprocPict( filter_t *p_filter, picture_t *p_pic )
i_dst_stride[i_plane] = p_outpic->p[i_plane].i_pitch; i_dst_stride[i_plane] = p_outpic->p[i_plane].i_pitch;
} }
if( !p_pic->p_q && p_sys->b_had_matrix )
{
msg_Warn( p_filter, "Quantification table was not set by video decoder. Postprocessing won't look good." );
p_sys->b_had_matrix = false;
}
else if( p_pic->p_q )
{
p_sys->b_had_matrix = true;
}
pp_postprocess( src, i_src_stride, dst, i_dst_stride, pp_postprocess( src, i_src_stride, dst, i_dst_stride,
p_filter->fmt_in.video.i_width, p_filter->fmt_in.video.i_width,
p_filter->fmt_in.video.i_height, p_filter->fmt_in.video.i_height, NULL, 0,
p_pic->p_q, p_pic->i_qstride,
p_sys->pp_mode, p_sys->pp_context, 0 ); p_sys->pp_mode, p_sys->pp_context, 0 );
vlc_mutex_unlock( &p_sys->lock ); vlc_mutex_unlock( &p_sys->lock );
......
...@@ -98,7 +98,6 @@ static void PictureDestroy( picture_t *p_picture ) ...@@ -98,7 +98,6 @@ static void PictureDestroy( picture_t *p_picture )
assert( p_picture && assert( p_picture &&
vlc_atomic_get( &p_picture->gc.refcount ) == 0 ); vlc_atomic_get( &p_picture->gc.refcount ) == 0 );
free( p_picture->p_q );
vlc_free( p_picture->gc.p_sys ); vlc_free( p_picture->gc.p_sys );
free( p_picture->p_sys ); free( p_picture->p_sys );
free( p_picture ); free( p_picture );
...@@ -115,10 +114,6 @@ void picture_Reset( picture_t *p_picture ) ...@@ -115,10 +114,6 @@ void picture_Reset( picture_t *p_picture )
p_picture->b_progressive = false; p_picture->b_progressive = false;
p_picture->i_nb_fields = 2; p_picture->i_nb_fields = 2;
p_picture->b_top_field_first = false; p_picture->b_top_field_first = false;
free( p_picture->p_q );
p_picture->p_q = NULL;
p_picture->i_qstride = 0;
} }
/***************************************************************************** /*****************************************************************************
...@@ -147,9 +142,6 @@ int picture_Setup( picture_t *p_picture, vlc_fourcc_t i_chroma, ...@@ -147,9 +142,6 @@ int picture_Setup( picture_t *p_picture, vlc_fourcc_t i_chroma,
p_picture->i_nb_fields = 2; p_picture->i_nb_fields = 2;
p_picture->i_qstride = 0;
p_picture->p_q = NULL;
video_format_Setup( &p_picture->format, i_chroma, i_width, i_height, video_format_Setup( &p_picture->format, i_chroma, i_width, i_height,
i_sar_num, i_sar_den ); i_sar_num, i_sar_den );
...@@ -340,8 +332,6 @@ void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src ) ...@@ -340,8 +332,6 @@ void picture_CopyProperties( picture_t *p_dst, const picture_t *p_src )
p_dst->b_progressive = p_src->b_progressive; p_dst->b_progressive = p_src->b_progressive;
p_dst->i_nb_fields = p_src->i_nb_fields; p_dst->i_nb_fields = p_src->i_nb_fields;
p_dst->b_top_field_first = p_src->b_top_field_first; p_dst->b_top_field_first = p_src->b_top_field_first;
/* FIXME: copy ->p_q and ->p_qstride */
} }
void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src ) void picture_CopyPixels( picture_t *p_dst, const picture_t *p_src )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment