The present study is based on a generalized form of Brans-Dicke (BD) theory where, the dimensionless BD parameter is regarded as a function of the scalar field, which is reciprocal of the gravitational constant. The field equations have been solved by incorporating an empirical function f(t) in the expression representing the conservation of matter. This function f(t) has been chosen to account for a conversion of matter (both dark and baryonic) into some other form, possibly dark energy, which is known to be responsible for the accelerated expansion of universe. The requirement of a signature flip of the deceleration parameter (q), which is evident from other studies, sets the boundary conditions to be satisfied by the function f(t), leading to the formulation of its time dependence. A simple empirical relation was initially assumed to represent the time dependence of f(t), and the constants in this expression have been determined from these boundary conditions. The BD parameter has been found to have a negative value throughout the range of study. The dependence of BD parameter upon the scalar field has been depicted graphically. A smooth transition of the universe, from a decelerated to an accelerated phase of expansion, is found to occur due to a conversion of matter into dark energy. The gravitational constant is found to be increasing with time.