File tree Expand file tree Collapse file tree
drivers/video/msm/vidc/common/enc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /* Copyright (c) 2010-2012, Code Aurora Forum . All rights reserved.
1+ /* Copyright (c) 2010-2012, The Linux Foundation . All rights reserved.
22 *
33 * This program is free software; you can redistribute it and/or modify
44 * it under the terms of the GNU General Public License version 2 and
@@ -1646,6 +1646,31 @@ static long vid_enc_ioctl(struct file *file,
16461646 }
16471647 break ;
16481648 }
1649+ case VEN_IOCTL_SET_SPS_PPS_FOR_IDR :
1650+ {
1651+ struct vcd_property_hdr vcd_property_hdr ;
1652+ struct vcd_property_sps_pps_for_idr_enable idr_enable ;
1653+ u32 vcd_status = VCD_ERR_FAIL ;
1654+ u32 enabled = 1 ;
1655+
1656+ if (copy_from_user (& venc_msg , arg , sizeof (venc_msg )))
1657+ return - EFAULT ;
1658+
1659+ vcd_property_hdr .prop_id = VCD_I_ENABLE_SPS_PPS_FOR_IDR ;
1660+ vcd_property_hdr .sz = sizeof (idr_enable );
1661+
1662+ if (copy_from_user (& enabled , venc_msg .in , sizeof (u32 )))
1663+ return - EFAULT ;
1664+
1665+ idr_enable .sps_pps_for_idr_enable_flag = enabled ;
1666+ vcd_status = vcd_set_property (client_ctx -> vcd_handle ,
1667+ & vcd_property_hdr , & idr_enable );
1668+ if (vcd_status ) {
1669+ pr_err ("Setting sps/pps per IDR failed" );
1670+ return - EIO ;
1671+ }
1672+ break ;
1673+ }
16491674 case VEN_IOCTL_SET_AC_PREDICTION :
16501675 case VEN_IOCTL_GET_AC_PREDICTION :
16511676 case VEN_IOCTL_SET_RVLC :
Original file line number Diff line number Diff line change @@ -456,6 +456,10 @@ struct venc_ioctl_msg{
456456#define VEN_IOCTL_SET_SLICE_DELIVERY_MODE \
457457 _IO(VEN_IOCTLBASE_ENC, 50)
458458
459+ /*IOCTL params:SET: InputData - unsigned int, OutputData - NULL*/
460+ #define VEN_IOCTL_SET_SPS_PPS_FOR_IDR \
461+ _IOW(VEN_IOCTLBASE_ENC, 51, struct venc_ioctl_msg)
462+
459463struct venc_switch {
460464 unsigned char status ;
461465};
You can’t perform that action at this time.
0 commit comments