unsigned int i_nb_fields; /**< # of displayed fields */
int8_t *p_q; /**< quantification table */
int i_qstride; /**< quantification stride */
- int i_qtype; /**< quantification style */
/**@}*/
/** Private data - the video output plugin might want to put stuff here to
VLC_API void picture_BlendSubpicture( picture_t *, filter_t *p_blend, subpicture_t * );
-/*****************************************************************************
- * Flags used to describe the status of a picture
- *****************************************************************************/
-
-/* Quantification type */
-enum
-{
- QTYPE_NONE,
-
- QTYPE_MPEG1,
- QTYPE_MPEG2,
- QTYPE_H264,
-};
-
/*****************************************************************************
* Shortcuts to access image components
*****************************************************************************/
p_filter->fmt_in.video.i_width,
p_filter->fmt_in.video.i_height,
p_pic->p_q, p_pic->i_qstride,
- p_sys->pp_mode, p_sys->pp_context,
- p_pic->i_qtype == QTYPE_MPEG2 ? PP_PICT_TYPE_QP2 : 0 );
+ p_sys->pp_mode, p_sys->pp_context, 0 );
vlc_mutex_unlock( &p_sys->lock );
return CopyInfoAndRelease( p_outpic, p_pic );
video_output/snapshot.c \
video_output/snapshot.h \
video_output/statistic.h \
- video_output/postprocessing.c \
- video_output/postprocessing.h \
video_output/video_output.c \
video_output/video_text.c \
video_output/video_epg.c \
free( p_picture->p_q );
p_picture->p_q = NULL;
p_picture->i_qstride = 0;
- p_picture->i_qtype = 0;
}
/*****************************************************************************
p_picture->i_nb_fields = 2;
- p_picture->i_qtype = QTYPE_NONE;
p_picture->i_qstride = 0;
p_picture->p_q = NULL;
+++ /dev/null
-/*****************************************************************************
- * postprocessing.c
- *****************************************************************************
- * Copyright (C) 2010 Laurent Aimar
- * $Id$
- *
- * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-#include <assert.h>
-
-#include <vlc_common.h>
-#include <vlc_vout.h>
-
-#include "postprocessing.h"
-
-static bool PostProcessIsPresent(const char *filter)
-{
- const char *pp = "postproc";
- const size_t pp_length = strlen(pp);
- return filter &&
- !strncmp(filter, pp, pp_length) &&
- (filter[pp_length] == '\0' || filter[pp_length] == ':');
-}
-
-static int PostProcessCallback(vlc_object_t *object, char const *cmd,
- vlc_value_t oldval, vlc_value_t newval, void *data)
-{
- vout_thread_t *vout = (vout_thread_t *)object;
- VLC_UNUSED(cmd); VLC_UNUSED(oldval); VLC_UNUSED(data);
-
- static const char *pp = "postproc";
-
- char *filters = var_GetString(vout, "video-filter");
-
- if (newval.i_int <= 0) {
- if (PostProcessIsPresent(filters)) {
- strcpy(filters, &filters[strlen(pp)]);
- if (*filters == ':')
- strcpy(filters, &filters[1]);
- }
- } else {
- if (!PostProcessIsPresent(filters)) {
- if (filters) {
- char *tmp = filters;
- if (asprintf(&filters, "%s:%s", pp, tmp) < 0)
- filters = tmp;
- else
- free(tmp);
- } else {
- filters = strdup(pp);
- }
- }
- }
- if (newval.i_int > 0)
- var_SetInteger(vout, "postproc-q", newval.i_int);
- if (filters) {
- var_SetString(vout, "video-filter", filters);
- free(filters);
- } else if (newval.i_int > 0) {
- var_TriggerCallback(vout, "video-filter");
- }
- return VLC_SUCCESS;
-}
-static void PostProcessEnable(vout_thread_t *vout)
-{
- vlc_value_t text;
- msg_Dbg(vout, "Post-processing available");
- var_Create(vout, "postprocess", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE);
- text.psz_string = _("Post processing");
- var_Change(vout, "postprocess", VLC_VAR_SETTEXT, &text, NULL);
-
- for (int i = 0; i <= 6; i++) {
- vlc_value_t val;
- vlc_value_t text;
- char tmp[1+1];
-
- val.i_int = i;
- snprintf(tmp, sizeof(tmp), "%d", i);
- if (i == 0)
- text.psz_string = _("Disable");
- else
- text.psz_string = tmp;
- var_Change(vout, "postprocess", VLC_VAR_ADDCHOICE, &val, &text);
- }
- var_AddCallback(vout, "postprocess", PostProcessCallback, NULL);
-
- /* */
- char *filters = var_GetNonEmptyString(vout, "video-filter");
- int postproc_q = 0;
- if (PostProcessIsPresent(filters))
- postproc_q = var_CreateGetInteger(vout, "postproc-q");
-
- var_SetInteger(vout, "postprocess", postproc_q);
-
- free(filters);
-}
-static void PostProcessDisable(vout_thread_t *vout)
-{
- msg_Dbg(vout, "Post-processing no more available");
- var_Destroy(vout, "postprocess");
-}
-
-void vout_SetPostProcessingState(vout_thread_t *vout, vout_postprocessing_support_t *state, int qtype)
-{
- const int postproc_change = (qtype != QTYPE_NONE) - (state->qtype != QTYPE_NONE);
- if (postproc_change == 1)
- PostProcessEnable(vout);
- else if (postproc_change == -1)
- PostProcessDisable(vout);
- if (postproc_change)
- state->qtype = qtype;
-}
-
+++ /dev/null
-/*****************************************************************************
- * postprocessing.h: Post processing related helpers
- *****************************************************************************
- * Copyright (C) 2010 Laurent Aimar
- * $Id$
- *
- * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef LIBVLC_VOUT_POSTPROCESSING_H
-#define LIBVLC_VOUT_POSTPROCESSING_H
-
-typedef struct {
- int qtype;
-} vout_postprocessing_support_t;
-
-void vout_SetPostProcessingState(vout_thread_t *, vout_postprocessing_support_t *, int qtype);
-
-#endif
#include <libvlc.h>
#include "vout_internal.h"
#include "interlacing.h"
-#include "postprocessing.h"
#include "display.h"
/*****************************************************************************
vout->p->displayed.decoded = picture_Hold(decoded);
vout->p->displayed.timestamp = decoded->date;
vout->p->displayed.is_interlaced = !decoded->b_progressive;
- vout->p->displayed.qtype = decoded->i_qtype;
picture = filter_chain_VideoFilter(vout->p->filter.chain_static, decoded);
}
static void ThreadManage(vout_thread_t *vout,
mtime_t *deadline,
- vout_interlacing_support_t *interlacing,
- vout_postprocessing_support_t *postprocessing)
+ vout_interlacing_support_t *interlacing)
{
vlc_mutex_lock(&vout->p->picture_lock);
break;
}
- const int picture_qtype = vout->p->displayed.qtype;
const bool picture_interlaced = vout->p->displayed.is_interlaced;
vlc_mutex_unlock(&vout->p->picture_lock);
- /* Post processing */
- vout_SetPostProcessingState(vout, postprocessing, picture_qtype);
-
/* Deinterlacing */
vout_SetInterlacingState(vout, interlacing, picture_interlaced);
vout->p->displayed.decoded = NULL;
vout->p->displayed.date = VLC_TS_INVALID;
vout->p->displayed.timestamp = VLC_TS_INVALID;
- vout->p->displayed.qtype = QTYPE_NONE;
vout->p->displayed.is_interlaced = false;
vout->p->step.last = VLC_TS_INVALID;
.is_interlaced = false,
.date = mdate(),
};
- vout_postprocessing_support_t postprocessing = {
- .qtype = QTYPE_NONE,
- };
mtime_t deadline = VLC_TS_INVALID;
for (;;) {
vout_control_cmd_Clean(&cmd);
}
- ThreadManage(vout, &deadline, &interlacing, &postprocessing);
+ ThreadManage(vout, &deadline, &interlacing);
}
}
struct {
mtime_t date;
mtime_t timestamp;
- int qtype;
bool is_interlaced;
picture_t *decoded;
picture_t *current;