2013-11-20 08:20:15 +00:00
|
|
|
/*
|
|
|
|
* gstvaapiencoder_mpeg2_priv.h - MPEG-2 encoder (private definitions)
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Intel Corporation
|
|
|
|
*
|
|
|
|
* This library 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 library 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 library; if not, write to the Free
|
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GST_VAAPI_ENCODER_MPEG2_PRIV_H
|
|
|
|
#define GST_VAAPI_ENCODER_MPEG2_PRIV_H
|
|
|
|
|
2014-01-13 13:41:15 +00:00
|
|
|
#include "gstvaapiencoder_priv.h"
|
|
|
|
#include "gstvaapiutils_mpeg2.h"
|
2013-11-20 08:20:15 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GST_VAAPI_ENCODER_MPEG2_CAST(encoder) \
|
2014-01-13 13:41:15 +00:00
|
|
|
((GstVaapiEncoderMpeg2 *) (encoder))
|
2013-11-20 08:20:15 +00:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_ENCODER_MPEG2_PROFILE_SIMPLE,
|
|
|
|
GST_ENCODER_MPEG2_PROFILE_MAIN,
|
|
|
|
} GstEncoderMpeg2Level;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GST_VAAPI_ENCODER_MPEG2_LEVEL_LOW,
|
|
|
|
GST_VAAPI_ENCODER_MPEG2_LEVEL_MAIN,
|
|
|
|
GST_VAAPI_ENCODER_MPEG2_LEVEL_HIGH
|
|
|
|
} GstVaapiEncoderMpeg2Level;
|
|
|
|
|
|
|
|
#define START_CODE_PICUTRE 0x00000100
|
|
|
|
#define START_CODE_SLICE 0x00000101
|
|
|
|
#define START_CODE_USER 0x000001B2
|
|
|
|
#define START_CODE_SEQ 0x000001B3
|
|
|
|
#define START_CODE_EXT 0x000001B5
|
|
|
|
#define START_CODE_GOP 0x000001B8
|
|
|
|
|
|
|
|
struct _GstVaapiEncoderMpeg2
|
|
|
|
{
|
2014-01-13 13:41:15 +00:00
|
|
|
GstVaapiEncoder parent_instance;
|
2013-11-20 08:20:15 +00:00
|
|
|
|
|
|
|
guint32 profile;
|
|
|
|
guint32 level;
|
2014-01-13 13:41:15 +00:00
|
|
|
guint32 cqp; /* quantizer value for CQP mode */
|
2013-11-20 08:20:15 +00:00
|
|
|
guint32 ip_period;
|
|
|
|
|
|
|
|
/* re-ordering */
|
|
|
|
GQueue b_frames;
|
|
|
|
gboolean dump_frames;
|
|
|
|
gboolean new_gop;
|
|
|
|
|
|
|
|
/* reference list */
|
|
|
|
GstVaapiSurfaceProxy *forward;
|
|
|
|
GstVaapiSurfaceProxy *backward;
|
|
|
|
guint32 frame_num; /* same value picture header, but it's not mod by 1024 */
|
|
|
|
};
|
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* GST_VAAPI_ENCODER_MPEG2_PRIV_H */
|