esp32p4/h264/
a_rc_conf1.rs1#[doc = "Register `A_RC_CONF1` reader"]
2pub type R = crate::R<A_RC_CONF1_SPEC>;
3#[doc = "Register `A_RC_CONF1` writer"]
4pub type W = crate::W<A_RC_CONF1_SPEC>;
5#[doc = "Field `A_CHROMA_DC_QP_DELTA` reader - Configures video A chroma DC QP offset based on Chroma QP. Chroma DC QP = Chroma QP(after map) + reg_chroma_dc_qp_delta."]
6pub type A_CHROMA_DC_QP_DELTA_R = crate::FieldReader;
7#[doc = "Field `A_CHROMA_DC_QP_DELTA` writer - Configures video A chroma DC QP offset based on Chroma QP. Chroma DC QP = Chroma QP(after map) + reg_chroma_dc_qp_delta."]
8pub type A_CHROMA_DC_QP_DELTA_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
9#[doc = "Field `A_CHROMA_QP_DELTA` reader - Configures video A chroma QP offset based on luma QP. Chroma QP(before map) = Luma QP + reg_chroma_qp_delta."]
10pub type A_CHROMA_QP_DELTA_R = crate::FieldReader;
11#[doc = "Field `A_CHROMA_QP_DELTA` writer - Configures video A chroma QP offset based on luma QP. Chroma QP(before map) = Luma QP + reg_chroma_qp_delta."]
12pub type A_CHROMA_QP_DELTA_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13#[doc = "Field `A_QP_MIN` reader - Configures video A allowed luma QP min value."]
14pub type A_QP_MIN_R = crate::FieldReader;
15#[doc = "Field `A_QP_MIN` writer - Configures video A allowed luma QP min value."]
16pub type A_QP_MIN_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
17#[doc = "Field `A_QP_MAX` reader - Configures video A allowed luma QP max value."]
18pub type A_QP_MAX_R = crate::FieldReader;
19#[doc = "Field `A_QP_MAX` writer - Configures video A allowed luma QP max value."]
20pub type A_QP_MAX_W<'a, REG> = crate::FieldWriter<'a, REG, 6>;
21#[doc = "Field `A_MAD_FRAME_PRED` reader - Configures vdieo A frame level predicted MB MAD value."]
22pub type A_MAD_FRAME_PRED_R = crate::FieldReader<u16>;
23#[doc = "Field `A_MAD_FRAME_PRED` writer - Configures vdieo A frame level predicted MB MAD value."]
24pub type A_MAD_FRAME_PRED_W<'a, REG> = crate::FieldWriter<'a, REG, 12, u16>;
25impl R {
26 #[doc = "Bits 0:2 - Configures video A chroma DC QP offset based on Chroma QP. Chroma DC QP = Chroma QP(after map) + reg_chroma_dc_qp_delta."]
27 #[inline(always)]
28 pub fn a_chroma_dc_qp_delta(&self) -> A_CHROMA_DC_QP_DELTA_R {
29 A_CHROMA_DC_QP_DELTA_R::new((self.bits & 7) as u8)
30 }
31 #[doc = "Bits 3:6 - Configures video A chroma QP offset based on luma QP. Chroma QP(before map) = Luma QP + reg_chroma_qp_delta."]
32 #[inline(always)]
33 pub fn a_chroma_qp_delta(&self) -> A_CHROMA_QP_DELTA_R {
34 A_CHROMA_QP_DELTA_R::new(((self.bits >> 3) & 0x0f) as u8)
35 }
36 #[doc = "Bits 7:12 - Configures video A allowed luma QP min value."]
37 #[inline(always)]
38 pub fn a_qp_min(&self) -> A_QP_MIN_R {
39 A_QP_MIN_R::new(((self.bits >> 7) & 0x3f) as u8)
40 }
41 #[doc = "Bits 13:18 - Configures video A allowed luma QP max value."]
42 #[inline(always)]
43 pub fn a_qp_max(&self) -> A_QP_MAX_R {
44 A_QP_MAX_R::new(((self.bits >> 13) & 0x3f) as u8)
45 }
46 #[doc = "Bits 19:30 - Configures vdieo A frame level predicted MB MAD value."]
47 #[inline(always)]
48 pub fn a_mad_frame_pred(&self) -> A_MAD_FRAME_PRED_R {
49 A_MAD_FRAME_PRED_R::new(((self.bits >> 19) & 0x0fff) as u16)
50 }
51}
52#[cfg(feature = "impl-register-debug")]
53impl core::fmt::Debug for R {
54 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
55 f.debug_struct("A_RC_CONF1")
56 .field(
57 "a_chroma_dc_qp_delta",
58 &format_args!("{}", self.a_chroma_dc_qp_delta().bits()),
59 )
60 .field(
61 "a_chroma_qp_delta",
62 &format_args!("{}", self.a_chroma_qp_delta().bits()),
63 )
64 .field("a_qp_min", &format_args!("{}", self.a_qp_min().bits()))
65 .field("a_qp_max", &format_args!("{}", self.a_qp_max().bits()))
66 .field(
67 "a_mad_frame_pred",
68 &format_args!("{}", self.a_mad_frame_pred().bits()),
69 )
70 .finish()
71 }
72}
73#[cfg(feature = "impl-register-debug")]
74impl core::fmt::Debug for crate::generic::Reg<A_RC_CONF1_SPEC> {
75 fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
76 core::fmt::Debug::fmt(&self.read(), f)
77 }
78}
79impl W {
80 #[doc = "Bits 0:2 - Configures video A chroma DC QP offset based on Chroma QP. Chroma DC QP = Chroma QP(after map) + reg_chroma_dc_qp_delta."]
81 #[inline(always)]
82 #[must_use]
83 pub fn a_chroma_dc_qp_delta(&mut self) -> A_CHROMA_DC_QP_DELTA_W<A_RC_CONF1_SPEC> {
84 A_CHROMA_DC_QP_DELTA_W::new(self, 0)
85 }
86 #[doc = "Bits 3:6 - Configures video A chroma QP offset based on luma QP. Chroma QP(before map) = Luma QP + reg_chroma_qp_delta."]
87 #[inline(always)]
88 #[must_use]
89 pub fn a_chroma_qp_delta(&mut self) -> A_CHROMA_QP_DELTA_W<A_RC_CONF1_SPEC> {
90 A_CHROMA_QP_DELTA_W::new(self, 3)
91 }
92 #[doc = "Bits 7:12 - Configures video A allowed luma QP min value."]
93 #[inline(always)]
94 #[must_use]
95 pub fn a_qp_min(&mut self) -> A_QP_MIN_W<A_RC_CONF1_SPEC> {
96 A_QP_MIN_W::new(self, 7)
97 }
98 #[doc = "Bits 13:18 - Configures video A allowed luma QP max value."]
99 #[inline(always)]
100 #[must_use]
101 pub fn a_qp_max(&mut self) -> A_QP_MAX_W<A_RC_CONF1_SPEC> {
102 A_QP_MAX_W::new(self, 13)
103 }
104 #[doc = "Bits 19:30 - Configures vdieo A frame level predicted MB MAD value."]
105 #[inline(always)]
106 #[must_use]
107 pub fn a_mad_frame_pred(&mut self) -> A_MAD_FRAME_PRED_W<A_RC_CONF1_SPEC> {
108 A_MAD_FRAME_PRED_W::new(self, 19)
109 }
110}
111#[doc = "Video A rate control configuration register1.\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`a_rc_conf1::R`](R). You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`a_rc_conf1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
112pub struct A_RC_CONF1_SPEC;
113impl crate::RegisterSpec for A_RC_CONF1_SPEC {
114 type Ux = u32;
115}
116#[doc = "`read()` method returns [`a_rc_conf1::R`](R) reader structure"]
117impl crate::Readable for A_RC_CONF1_SPEC {}
118#[doc = "`write(|w| ..)` method takes [`a_rc_conf1::W`](W) writer structure"]
119impl crate::Writable for A_RC_CONF1_SPEC {
120 type Safety = crate::Unsafe;
121 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
122 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
123}
124#[doc = "`reset()` method sets A_RC_CONF1 to value 0"]
125impl crate::Resettable for A_RC_CONF1_SPEC {
126 const RESET_VALUE: u32 = 0;
127}