struct pipe_video_buffer templat = {};
struct vl_screen *omx_screen;
struct pipe_screen *pscreen;
- omx_base_video_PortType *port;
omx_screen = priv->screen;
- port = (omx_base_video_PortType *)priv->ports[OMX_BASE_FILTER_INPUTPORT_INDEX];
-
assert(omx_screen);
- assert(port);
pscreen = omx_screen->pscreen;
-
assert(pscreen);
if (!priv->target) {
memset(&templat, 0, sizeof(templat));
templat.chroma_format = PIPE_VIDEO_CHROMA_FORMAT_420;
- templat.width = port->sPortParam.format.video.nFrameWidth;
- templat.height = port->sPortParam.format.video.nFrameHeight;
+ templat.width = priv->codec->width;
+ templat.height = priv->codec->height;
templat.buffer_format = pscreen->get_video_param(
pscreen,
PIPE_VIDEO_PROFILE_UNKNOWN,
if (priv->frame_started)
return;
- vid_dec_NeedTarget(priv);
- if (priv->first_buf_in_frame)
- priv->timestamp = priv->timestamps[0];
- priv->first_buf_in_frame = false;
-
- priv->picture.h264.num_ref_frames = priv->picture.h264.pps->sps->max_num_ref_frames;
-
if (!priv->codec) {
struct pipe_video_codec templat = {};
omx_base_video_PortType *port;
priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat);
}
+
+ vid_dec_NeedTarget(priv);
+
+ if (priv->first_buf_in_frame)
+ priv->timestamp = priv->timestamps[0];
+ priv->first_buf_in_frame = false;
+
+ priv->picture.h264.num_ref_frames = priv->picture.h264.pps->sps->max_num_ref_frames;
+
priv->picture.h264.slice_count = 0;
priv->codec->begin_frame(priv->codec, priv->target, &priv->picture.base);
priv->frame_started = true;
if (priv->frame_started)
return;
- vid_dec_NeedTarget(priv);
- if (priv->first_buf_in_frame)
- priv->timestamp = priv->timestamps[0];
- priv->first_buf_in_frame = false;
-
if (!priv->codec) {
struct pipe_video_codec templat = {};
templat.level = priv->codec_data.h265.level_idc;
priv->codec = priv->pipe->create_video_codec(priv->pipe, &templat);
}
+
+ vid_dec_NeedTarget(priv);
+
+ if (priv->first_buf_in_frame)
+ priv->timestamp = priv->timestamps[0];
+ priv->first_buf_in_frame = false;
+
priv->codec->begin_frame(priv->codec, priv->target, &priv->picture.base);
priv->frame_started = true;
}