Commit bb5e27fa authored by Gurkirpal Singh's avatar Gurkirpal Singh Committed by Julien Isorce

st/omx/bellagio: Rename st and target directories

v2: Refactor out screen functions to st/omx

Allows to keep all the code under st/omx (st/omx/tizonia and
st/omx/bellagio).
Reverts targets/omx_bellagio to omx as additions to existing files
is enough to compile for both bellagio and tizonia.

* autotools changes:
  --enable-omx -> --enable-omx-bellagio

* meson changes:
  -Dgallium-omx=false -> -Dgallium-omx=disabled
  -Dgallium-omx=true  -> -Dgallium-omx=bellagio
Acked-by: Leo Liu's avatarLeo Liu <leo.liu@amd.com>
Reviewed-by: Julien Isorce's avatarJulien Isorce <julien.isorce@gmail.com>
parent e96e6f60
......@@ -2975,7 +2975,8 @@ AC_CONFIG_FILES([Makefile
src/gallium/state_trackers/dri/Makefile
src/gallium/state_trackers/glx/xlib/Makefile
src/gallium/state_trackers/nine/Makefile
src/gallium/state_trackers/omx_bellagio/Makefile
src/gallium/state_trackers/omx/Makefile
src/gallium/state_trackers/omx/bellagio/Makefile
src/gallium/state_trackers/osmesa/Makefile
src/gallium/state_trackers/va/Makefile
src/gallium/state_trackers/vdpau/Makefile
......@@ -2986,7 +2987,7 @@ AC_CONFIG_FILES([Makefile
src/gallium/targets/d3dadapter9/d3d.pc
src/gallium/targets/dri/Makefile
src/gallium/targets/libgl-xlib/Makefile
src/gallium/targets/omx-bellagio/Makefile
src/gallium/targets/omx/Makefile
src/gallium/targets/opencl/Makefile
src/gallium/targets/opencl/mesa.icd
src/gallium/targets/osmesa/Makefile
......
......@@ -464,29 +464,28 @@ endif
_omx = get_option('gallium-omx')
if not system_has_kms_drm
if _omx == 'true'
if _omx != 'disabled'
error('OMX state tracker can only be built on unix-like OSes.')
else
_omx = 'false'
_omx = 'disabled'
endif
elif not (with_platform_x11 or with_platform_drm)
if _omx == 'true'
if _omx != 'disabled'
error('OMX state tracker requires X11 or drm platform support.')
else
_omx = 'false'
_omx = 'disabled'
endif
elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
if _omx == 'true'
if _omx != 'disabled'
error('OMX state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.')
else
_omx = 'false'
_omx = 'disabled'
endif
elif _omx == 'auto'
_omx = 'true'
endif
with_gallium_omx = _omx == 'true'
with_gallium_omx = _omx != 'disabled'
gallium_omx = _omx
dep_omx = []
if with_gallium_omx
if gallium_omx == 'bellagio'
dep_omx = dependency('libomxil-bellagio')
endif
......
......@@ -90,9 +90,9 @@ option(
option(
'gallium-omx',
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false'],
description : 'enable gallium omx bellagio state tracker.',
value : 'bellagio',
choices : ['disabled', 'bellagio'],
description : 'enable gallium omx state tracker.',
)
option(
'omx-libs-path',
......
......@@ -155,7 +155,7 @@ SUBDIRS += state_trackers/glx/xlib targets/libgl-xlib
endif
if HAVE_ST_OMX_BELLAGIO
SUBDIRS += state_trackers/omx_bellagio targets/omx-bellagio
SUBDIRS += state_trackers/omx targets/omx
endif
if HAVE_GALLIUM_OSMESA
......
......@@ -145,7 +145,7 @@ if with_gallium_xvmc
subdir('state_trackers/xvmc')
endif
if with_gallium_omx
subdir('state_trackers/omx_bellagio')
subdir('state_trackers/omx')
endif
if with_gallium_va
subdir('state_trackers/va')
......@@ -190,7 +190,7 @@ if with_gallium_xvmc
subdir('targets/xvmc')
endif
if with_gallium_omx
subdir('targets/omx-bellagio')
subdir('targets/omx')
endif
if with_gallium_va
subdir('targets/va')
......
# Copyright © 2012 Intel Corporation
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
SUBDIRS = bellagio
AM_CFLAGS = \
$(GALLIUM_CFLAGS) \
$(VISIBILITY_CFLAGS) \
$(VL_CFLAGS) \
$(XCB_DRI3_CFLAGS) \
$(OMX_BELLAGIO_CFLAGS)
noinst_LTLIBRARIES = libomxtracker_common.la
libomxtracker_common_la_SOURCES = $(C_SOURCES)
EXTRA_DIST = meson.build
......@@ -24,6 +24,7 @@ include Makefile.sources
include $(top_srcdir)/src/gallium/Automake.inc
AM_CFLAGS = \
-I$(top_srcdir)/src/gallium/state_trackers/omx \
$(GALLIUM_CFLAGS) \
$(VISIBILITY_CFLAGS) \
$(VL_CFLAGS) \
......@@ -33,5 +34,3 @@ AM_CFLAGS = \
noinst_LTLIBRARIES = libomxtracker.la
libomxtracker_la_SOURCES = $(C_SOURCES)
EXTRA_DIST = meson.build
......@@ -159,7 +159,7 @@ static OMX_ERRORTYPE vid_enc_Constructor(OMX_COMPONENTTYPE *comp, OMX_STRING nam
r = omx_base_filter_Constructor(comp, name);
if (r)
return r;
return r;
priv->BufferMgmtCallback = vid_enc_BufferEncoded;
priv->messageHandler = vid_enc_MessageHandler;
......
......@@ -66,29 +66,29 @@
DERIVEDCLASS(vid_enc_PrivateType, omx_base_filter_PrivateType)
#define vid_enc_PrivateType_FIELDS omx_base_filter_PrivateType_FIELDS \
struct vl_screen *screen; \
struct pipe_context *s_pipe; \
struct pipe_context *t_pipe; \
struct pipe_video_codec *codec; \
struct list_head free_tasks; \
struct list_head used_tasks; \
struct list_head b_frames; \
struct list_head stacked_tasks; \
OMX_U32 frame_rate; \
OMX_U32 frame_num; \
OMX_U32 pic_order_cnt; \
OMX_U32 ref_idx_l0, ref_idx_l1; \
OMX_BOOL restricted_b_frames; \
OMX_VIDEO_PARAM_BITRATETYPE bitrate; \
OMX_VIDEO_PARAM_QUANTIZATIONTYPE quant; \
OMX_VIDEO_PARAM_PROFILELEVELTYPE profile_level; \
OMX_CONFIG_INTRAREFRESHVOPTYPE force_pic_type; \
struct vl_compositor compositor; \
struct vl_compositor_state cstate; \
struct pipe_video_buffer *scale_buffer[OMX_VID_ENC_NUM_SCALING_BUFFERS]; \
OMX_CONFIG_SCALEFACTORTYPE scale; \
OMX_U32 current_scale_buffer; \
OMX_U32 stacked_frames_num;
struct vl_screen *screen; \
struct pipe_context *s_pipe; \
struct pipe_context *t_pipe; \
struct pipe_video_codec *codec; \
struct list_head free_tasks; \
struct list_head used_tasks; \
struct list_head b_frames; \
struct list_head stacked_tasks; \
OMX_U32 frame_rate; \
OMX_U32 frame_num; \
OMX_U32 pic_order_cnt; \
OMX_U32 ref_idx_l0, ref_idx_l1; \
OMX_BOOL restricted_b_frames; \
OMX_VIDEO_PARAM_BITRATETYPE bitrate; \
OMX_VIDEO_PARAM_QUANTIZATIONTYPE quant; \
OMX_VIDEO_PARAM_PROFILELEVELTYPE profile_level; \
OMX_CONFIG_INTRAREFRESHVOPTYPE force_pic_type; \
struct vl_compositor compositor; \
struct vl_compositor_state cstate; \
struct pipe_video_buffer *scale_buffer[OMX_VID_ENC_NUM_SCALING_BUFFERS]; \
OMX_CONFIG_SCALEFACTORTYPE scale; \
OMX_U32 current_scale_buffer; \
OMX_U32 stacked_frames_num;
ENDCLASS(vid_enc_PrivateType)
OMX_ERRORTYPE vid_enc_LoaderComponent(stLoaderComponentType *comp);
......
......@@ -18,12 +18,20 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
if gallium_omx == 'bellagio'
files_omx = files(
'bellagio/entrypoint.c',
'bellagio/vid_dec.c',
'bellagio/vid_dec_mpeg12.c',
'bellagio/vid_dec_h264.c',
'bellagio/vid_dec_h265.c',
'bellagio/vid_enc.c'
)
endif
libomx_st = static_library(
'omx_st',
files(
'entrypoint.c', 'vid_dec.c', 'vid_dec_mpeg12.c', 'vid_dec_h264.c',
'vid_dec_h265.c', 'vid_enc.c',
),
files_omx,
c_args : [c_vis_args],
include_directories : [inc_common],
dependencies : [dep_omx, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3],
......
......@@ -19,11 +19,12 @@ libomx_mesa_la_LDFLAGS = \
if HAVE_LD_VERSION_SCRIPT
libomx_mesa_la_LDFLAGS += \
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx-bellagio/omx.sym
-Wl,--version-script=$(top_srcdir)/src/gallium/targets/omx/omx.sym
endif # HAVE_LD_VERSION_SCRIPT
libomx_mesa_la_LIBADD = \
$(top_builddir)/src/gallium/state_trackers/omx_bellagio/libomxtracker.la \
$(top_builddir)/src/gallium/state_trackers/omx/libomxtracker_common.la \
$(top_builddir)/src/gallium/state_trackers/omx/bellagio/libomxtracker.la \
$(top_builddir)/src/gallium/auxiliary/libgalliumvlwinsys.la \
$(top_builddir)/src/gallium/auxiliary/libgalliumvl.la \
$(top_builddir)/src/gallium/auxiliary/libgallium.la \
......
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