Ë
    Aôj9E  ã            	       ó  — d dl Z d dlmc mZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d dlmZ d dlmZ d d	lmZmZmZ d d
lmZmZ d dlmZ d dlmZ e j<                  e j>                   e j@                  d¬«      de jB                  ejD                     de jB                  e jF                  ejH                        dejH                  fd„«       «       «       Z%e jL                  e jN                   G d„ de«      «       «       Z(y)é    N)ÚCodecContext)ÚHWAccel)Ú	err_check)ÚFrame)ÚPacket)Úfrom_avrational)Úto_avrational)ÚVideoFormatÚget_pix_fmtÚget_video_format)Ú
VideoFrameÚalloc_video_frame)ÚVideoReformatter)Úint64_tF)ÚcheckÚctxÚpix_fmtsÚreturnc                 ó  — t        j                  t         j                  t           | j                  «      }d}||   dk7  r%||   |j
                  k(  r||   S |dz  }||   dk7  rŒ%|j                  r| j                  S t        j                  S )Nr   éÿÿÿÿé   )
ÚcythonÚcastÚpointerÚAVCodecPrivateDataÚopaqueÚhardware_pix_fmtÚallow_software_fallbackÚ
sw_pix_fmtÚlibÚAV_PIX_FMT_NONE)r   r   Úprivate_dataÚis       úf/var/www/html/academy/tools/voices/clone/fw-venv/lib/python3.12/site-packages/av/video/codeccontext.pyÚ_get_hw_formatr%      s�   € ô 8>·{±{Ü�‰Ô)Ñ*¨C¯J©Jó8€Lð €AØ
�1‰+˜Ò
Ø�A‰;˜,×7Ñ7Ò7Ø˜A‘;ÐØ	ˆQ‰ˆð �1‰+˜Ó
ð
 '×>Ò>ˆ�‰ðÜDG×DWÑDWðó    c            	       ó‚  — e Zd Zej                  dej
                  ej                     dej
                  ej                  ej                        de
dz  dej                  fd„«       Zej                  dedefd„«       Zej                  d	edz  deedz     fd
„«       Zej                  defd„«       Zej                  dededej                  fd„«       Zej                  defd„«       Zed„ «       Zej0                  defd„«       Zed„ «       Zej0                  dej6                  fd„«       Zed„ «       Zej0                  dej6                  fd„«       Zed„ «       Zej0                  dej<                  fd„«       Zed„ «       Zej0                  d„ «       Zed„ «       Z e j0                  d„ «       Z ed„ «       Z!e!j0                  d„ «       Z!ed „ «       Z"e"j0                  d!„ «       Z"ed"„ «       Z#e#j0                  dej<                  fd#„«       Z#ed$„ «       Z$e$j0                  d%„ «       Z$ed&„ «       Z%ed'„ «       Z&ed(„ «       Z'e'j0                  dej<                  fd)„«       Z'ed*„ «       Z(ed+„ «       Z)ed,„ «       Z*e*j0                  d-„ «       Z*ed.„ «       Z+e+j0                  d/„ «       Z+ed0„ «       Z,e,j0                  d1„ «       Z,ed2„ «       Z-e-j0                  d3„ «       Z-ed4„ «       Z.e.j0                  dej<                  fd5„«       Z.ed6„ «       Z/e/j0                  d7„ «       Z/ed8„ «       Z0e0j0                  d9„ «       Z0ed:„ «       Z1e1j0                  d;„ «       Z1ed<„ «       Z2e2j0                  dej<                  fd=„«       Z2ed>„ «       Z3e3j0                  dej<                  fd?„«       Z3ed@„ «       Z4e4j0                  dej<                  fdA„«       Z4y)BÚVideoCodecContextÚptrÚcodecÚhwaccelNr   c                 óš  — t        j                  | |||«       |€y | j                  r[|j                  | j                  d¬«      | _        t        j                  | j
                  j                  «      | j                  _	        y 	 |j                  | j                  «      | _        t        j                  | j
                  j                  «      | j                  _	        | j
                  j                  j                  j                  | j                  _        t        | j                  _        | j
                  j                  j                  j                  | j                  _        | j
                  j                   | j                  _        t#        j$                  | j                  «      | j                  _        y # t(        $ r
 d | _        Y y w xY w)NT)Úfor_encoding)r   Ú_initÚ
is_encoderÚcreater*   Úhwaccel_ctxr    Úav_buffer_refr)   Úhw_device_ctxÚconfigÚpix_fmtr%   Ú
get_formatÚ_private_datar   r   r   Úaddressr   ÚNotImplementedError)Úselfr)   r*   r+   s       r$   r.   zVideoCodecContext._init-   sM  € ô 	×Ñ˜4  e¨WÔ5àˆ?Øà�?Š?ð
  'Ÿ~™~¨d¯j©jÀt˜~ÓLˆDÔÜ%(×%6Ñ%6°t×7GÑ7G×7KÑ7KÓ%LˆD�H‰HÔ"Øð	$Ø&Ÿ~™~¨d¯j©jÓ9ˆDÔÜ%(×%6Ñ%6°t×7GÑ7G×7KÑ7KÓ%LˆD�H‰HÔ"Ø#×/Ñ/×6Ñ6×:Ñ:×BÑBˆD�H‰HÔÜ"0ˆD�H‰HÔØ26×2BÑ2B×2IÑ2I×2MÑ2M×2UÑ2UˆD×ÑÔ/à× Ñ ×8Ñ8ð ×ÑÔ6ô %Ÿn™n¨T×-?Ñ-?Ó@ˆD�H‰H�OøÜ"ò 		$ð  $ˆDÖð		$ús   ÂD2F7 Æ7G
Ç	G
Úvframec           
      ó  — t        j                  t         j                  t        j                     | j
                  j                  j                  «      }|j
                  j                  |j                  k(  r|S |j
                  j                  |j                  k7  sF|j
                  j                  |j                  k7  s#|j
                  j                  |j                  k7  rŒ| j                  st        «       | _        | j                  j                  ||j                  |j                  t        |j                  |j                  |j                  «      | j
                  j                   ¬«      }t#        «       }d}t         j$                  5  t        j&                  | j
                  j                  |j
                  d«      }|dk(  r+t        j(                  |j
                  |j
                  d«      }d d d «       t+        «       t+        |«       |j-                  |d¬«       |j/                  «        |j
                  j0                  t        j2                  k(  r%| j
                  j4                  |j
                  _        |S # 1 sw Y   Œ�xY w)N©Úthreadsr   F©Údata_layout)r   r   r   r    ÚAVHWFramesContextr)   Úhw_frames_ctxÚdataÚformatÚ	sw_formatÚwidthÚheightÚreformatterr   Úreformatr   Úthread_countr   ÚnogilÚav_hwframe_get_bufferÚav_hwframe_transfer_datar   Ú_copy_internal_attributesÚ_init_user_attributesÚptsÚAV_NOPTS_VALUEÚ	frame_num)r:   r;   Ú
frames_ctxÚhwframeÚtransfer_resÚress         r$   Ú_encode_upload_framez&VideoCodecContext._encode_upload_frameW   sì  € ô =C¿K¹KÜ�N‰Nœ3×0Ñ0Ñ1°4·8±8×3IÑ3I×3NÑ3Nó=
ˆ
ð
 �:‰:×Ñ 
× 1Ñ 1Ò1ØˆMð
 �J‰J×Ñ ×!5Ñ!5Ò5Ø�z‰z×Ñ :×#3Ñ#3Ò3Ø�z‰z× Ñ  J×$5Ñ$5Ò5à×#Ò#Ü#3Ó#5�Ô Ø×%Ñ%×.Ñ.ØØ× Ñ Ø×!Ñ!Ü Ø×(Ñ(¨*×*:Ñ*:¸J×<MÑ<Móð Ÿ™×-Ñ-ð /ó ˆFô 0Ó1ˆð $%ˆÜ�\‰\ñ 	XÜ×+Ñ+¨D¯H©H×,BÑ,BÀGÇKÁKÐQRÓSˆCØ�aŠxÜ"×;Ñ;¸G¿K¹KÈÏÉÐUVÓW�÷	Xô 	�#ŒÜ�,ÔØ×)Ñ)¨&¸eÐ)ÔDØ×%Ñ%Ô'à�;‰;�?‰?œc×0Ñ0Ò0Ø"Ÿh™h×0Ñ0ˆG�K‰KŒOàˆ÷	Xð 	Xús   Æ
A&I?É?JÚinputc                 óø  — |�|sd gS |}| j                   j                  t        j                  k7  r| j	                  |«      gS |j
                  j                  | j                  k7  sF|j                  | j                   j                  k7  s#|j                  | j                   j                  k7  r�| j                  st        «       | _	        | j                  j                  || j                   j                  | j                   j                  | j
                  | j                   j                  ¬«      }|j                   j                  t        j                  k(  r%| j                   j                   |j                   _        |gS )Nr=   )r)   rB   r   ÚNULLrW   rD   r5   rF   rG   rH   r   rI   rJ   rP   r    rQ   rR   )r:   rX   r;   s      r$   Ú_prepare_frames_for_encodez,VideoCodecContext._prepare_frames_for_encode‡   s  € àˆ=¡Ø�6ˆMà"ˆð �8‰8×!Ñ!¤V§[¡[Ò0Ø×-Ñ-¨fÓ5Ð6Ð6ð �M‰M×!Ñ! T§\¡\Ò1Ø�|‰|˜tŸx™xŸ~™~Ò-Ø�}‰} §¡§¡Ò/à×#Ò#Ü#3Ó#5�Ô à×%Ñ%×.Ñ.ØØ—‘—‘Ø—‘—‘Ø—‘ØŸ™×-Ñ-ð /ó ˆFð �:‰:�>‰>œS×/Ñ/Ò/Ø!ŸX™X×/Ñ/ˆF�J‰JŒNàˆxˆr&   c                 ó   — t        «       S ©N)r   ©r:   s    r$   Ú_alloc_next_framez#VideoCodecContext._alloc_next_frame§   s   € ä Ó"Ð"r&   ÚframeÚpacketc                 óV   — t        j                  | ||«       |}|j                  «        y r]   )r   Ú_setup_decoded_framerO   )r:   r`   ra   r;   s       r$   rc   z&VideoCodecContext._setup_decoded_frame«   s%   € ä×)Ñ)¨$°°vÔ>Ø"ˆØ×$Ñ$Õ&r&   c                 ó:  — | j                   €|S |j                  j                  | j                   j                  j                  j                  k7  r|S | j                   j
                  r5| j                   j                  t        j                  t        |«      _
        |S | j                  «       }t        j                  5  t        j                  |j                  |j                  d«      }d d d «       t        «       |j!                  |d¬«       |S # 1 sw Y   Œ)xY w)Nr   Fr?   )r1   r)   rD   r4   r5   Úis_hw_ownedÚ	device_idr   r   r   Ú
_device_idr_   rK   r    rM   r   rN   )r:   r`   Úframe_swrV   s       r$   Ú_transfer_hwframez#VideoCodecContext._transfer_hwframe±   sà   € à×ÑÐ#ØˆLØ�9‰9×Ñ˜t×/Ñ/×6Ñ6×:Ñ:×BÑBÒBð ˆLà×Ñ×'Ò'Ø8<×8HÑ8H×8RÑ8RŒF�K‰Kœ
 EÓ*Ô5ØˆLà×0Ñ0Ó2ˆä�\‰\ñ 	KÜ×.Ñ.¨x¯|©|¸U¿Y¹YÈÓJˆC÷	Kä�#ŒØ×*Ñ*¨5¸eÐ*ÔDØˆ÷		Kð 	Kús   Â=,DÄDc                 óØ   — t        t        j                  t        j                  | j
                  j                  «      | j
                  j                  | j
                  j                  «      S r]   )	r   r   r   r    ÚAVPixelFormatr)   r5   rF   rG   r^   s    r$   rD   zVideoCodecContext.formatÆ   sC   € äÜ�K‰Kœ×)Ñ)¨4¯8©8×+;Ñ+;Ó<Ø�H‰H�N‰NØ�H‰H�O‰Oó
ð 	
r&   rD   c                 óÈ   — | j                  d«       |j                  | j                  _        |j                  | j                  _        |j                  | j                  _        y )NrD   )Ú_assert_not_openr5   r)   rF   rG   )r:   rD   s     r$   rD   zVideoCodecContext.formatÎ   s>   € à×Ñ˜hÔ'Ø!Ÿ>™>ˆ�‰ÔØŸ™ˆ�‰ŒØ Ÿ-™-ˆ�‰�r&   c                 óh   — | j                   t        j                  u ry| j                   j                  S ©Nr   )r)   r   rZ   rF   r^   s    r$   rF   zVideoCodecContext.widthÕ   s#   € à�8‰8”v—{‘{Ñ"ØØ�x‰x�~‰~Ðr&   Úvaluec                 óH   — | j                  d«       || j                  _        y )NrF   )rm   r)   rF   ©r:   rp   s     r$   rF   zVideoCodecContext.widthÛ   s   € à×Ñ˜gÔ&Øˆ�‰�r&   c                 óh   — | j                   t        j                  u ry| j                   j                  S ro   )r)   r   rZ   rG   r^   s    r$   rG   zVideoCodecContext.heightà   s#   € à�8‰8”v—{‘{Ñ"ØØ�x‰x�‰Ðr&   c                 óH   — | j                  d«       || j                  _        y )NrG   )rm   r)   rG   rr   s     r$   rG   zVideoCodecContext.heightæ   s   € à×Ñ˜hÔ'Øˆ�‰�r&   c                 ó.   — | j                   j                  S )zÜ
        The number of bits per sample in the codedwords. It's mandatory for this to be set for some formats to decode properly.

        Wraps :ffmpeg:`AVCodecContext.bits_per_coded_sample`.

        :type: int
        )r)   Úbits_per_coded_sampler^   s    r$   rv   z'VideoCodecContext.bits_per_coded_sampleë   s   € ð �x‰x×-Ñ-Ð-r&   c                 óT   — | j                   rt        d«      ‚|| j                  _        y )NzNot supported for encoders)r/   Ú
ValueErrorr)   rv   rr   s     r$   rv   z'VideoCodecContext.bits_per_coded_sampleö   s!   € à�?Š?ÜÐ9Ó:Ð:à).ˆ�‰Õ&r&   c                 ó  — t        j                  t        j                  t         j                  | j
                  j                  «      «      }|t        j                  k(  ryt        j                  t        |j                  «      S )zE
        The pixel format's name.

        :type: str | None
        N)
r    Úav_pix_fmt_desc_getr   r   rk   r)   r5   rZ   ÚstrÚname)r:   Údescs     r$   r5   zVideoCodecContext.pix_fmtý   sX   € ô ×#Ñ#¤F§K¡K´×0AÑ0AÀ4Ç8Á8×CSÑCSÓ$TÓUð 	ð ”6—;‘;ÒØÜ�{‰{œ3 §	¡	Ó*Ð*r&   c                 óZ   — | j                  d«       t        |«      | j                  _        y )Nr5   )rm   r   r)   r5   rr   s     r$   r5   zVideoCodecContext.pix_fmt  s!   € à×Ñ˜iÔ(Ü& uÓ-ˆ�‰Õr&   c                 óx  — | j                   j                  s“| j                   j                  t        j                  k7  rkt        t        j                  t        j                  | j                   j                  «      | j                   j                  | j                   j                  «      S yt        j                  t        j                  t        j                     | j                   j                  j                  «      }t        |j                  | j                   j                  | j                   j                  «      S )zè
        For a hardware context (e.g. ``format.name == "cuda"``), the underlying
        software pixel format (``nv12``, ``p010le``, ...). ``None`` for a regular
        software context.

        :type: VideoFormat | None
        N)r)   rB   r   r    r!   r   r   r   rk   rF   rG   r   rA   rC   rE   )r:   rS   s     r$   rE   zVideoCodecContext.sw_format  sÈ   € ð �x‰x×%Ò%Ø�x‰x×"Ñ"¤c×&9Ñ&9Ò9Ü'Ü—K‘K¤× 1Ñ 1°4·8±8×3FÑ3FÓGØ—H‘H—N‘NØ—H‘H—O‘Oóð ð
 Ü<B¿K¹KÜ�N‰Nœ3×0Ñ0Ñ1°4·8±8×3IÑ3I×3NÑ3Nó=
ˆ
ô   
× 4Ñ 4°d·h±h·n±nÀdÇhÁhÇoÁoÓVÐVr&   c                 óZ   — | j                  d«       t        |«      | j                  _        y )NrE   )rm   r   r)   r   rr   s     r$   rE   zVideoCodecContext.sw_format&  s!   € à×Ñ˜kÔ*Ü)¨%Ó0ˆ�‰Õr&   c                 ó@   — t        | j                  j                  «      S )zR
        The frame rate, in frames per second.

        :type: AVRational
        )r   r)   Ú	framerater^   s    r$   r‚   zVideoCodecContext.framerate+  s   € ô ˜tŸx™x×1Ñ1Ó2Ð2r&   c                 óŒ   — | j                  d«       t        |t        j                  | j                  j
                  «      «       y )Nr‚   )rm   r	   r   r8   r)   r‚   rr   s     r$   r‚   zVideoCodecContext.framerate4  s-   € à×Ñ˜kÔ*Ü�eœVŸ^™^¨D¯H©H×,>Ñ,>Ó?Õ@r&   c                 ó   — | j                   S )z#Another name for :attr:`framerate`.©r‚   r^   s    r$   ÚratezVideoCodecContext.rate9  s   € ð �~‰~Ðr&   c                 ó   — || _         y r]   r…   rr   s     r$   r†   zVideoCodecContext.rate>  s	   € àˆ�r&   c                 ó\   — | j                   rt        d«      ‚| j                  j                  S )zj
        Sets the number of frames between keyframes. Used only for encoding.

        :type: int
        ú%Cannot access 'gop_size' as a decoder©Ú
is_decoderÚRuntimeErrorr)   Úgop_sizer^   s    r$   r�   zVideoCodecContext.gop_sizeB  s'   € ð �?Š?ÜÐFÓGÐGØ�x‰x× Ñ Ð r&   c                 óT   — | j                   rt        d«      ‚|| j                  _        y )Nr‰   rŠ   rr   s     r$   r�   zVideoCodecContext.gop_sizeM  s!   € à�?Š?ÜÐFÓGÐGØ!ˆ�‰Õr&   c                 ó@   — t        | j                  j                  «      S r]   )r   r)   Úsample_aspect_ratior^   s    r$   r�   z%VideoCodecContext.sample_aspect_ratioS  s   € ä˜tŸx™x×;Ñ;Ó<Ð<r&   c                 ój   — t        |t        j                  | j                  j                  «      «       y r]   )r	   r   r8   r)   r�   rr   s     r$   r�   z%VideoCodecContext.sample_aspect_ratioW  s   € ä�eœVŸ^™^¨D¯H©H×,HÑ,HÓIÕJr&   c                 ó’  — t        j                  t        j                  j                  «      t        j                  |j
                  «      | j                  j                  | j                  j                  j                  z  | j                  j                  | j                  j                  j
                  z  d«       t        |«      S )Ni   )r    Ú	av_reducer   r8   ÚnumÚdenr)   rF   r�   rG   r   )r:   Údars     r$   Údisplay_aspect_ratioz&VideoCodecContext.display_aspect_ratio[  s€   € ô 	�‰Ü�N‰N˜3Ÿ7™7Ó#Ü�N‰N˜3Ÿ7™7Ó#Ø�H‰H�N‰N˜TŸX™X×9Ñ9×=Ñ=Ñ=Ø�H‰H�O‰O˜dŸh™h×:Ñ:×>Ñ>Ñ>Øô	
ô ˜sÓ#Ð#r&   c                 ó@   — t        | j                  j                  «      S )z
        :type: bool
        )Úboolr)   Úhas_b_framesr^   s    r$   rš   zVideoCodecContext.has_b_framesh  s   € ô
 �D—H‘H×)Ñ)Ó*Ð*r&   c                 ó.   — | j                   j                  S )a  Raw ``has_b_frames`` value from FFmpeg (int, not bool).

        After :meth:`flush_buffers`, FFmpeg may reset the internal reorder
        heuristic. Set this to the known reorder depth *after* seeking to
        avoid dropped hierarchical B-frames.
        ©r)   rš   r^   s    r$   Úreorder_depthzVideoCodecContext.reorder_deptho  s   € ð �x‰x×$Ñ$Ð$r&   c                 ó&   — || j                   _        y r]   rœ   rr   s     r$   r�   zVideoCodecContext.reorder_depthy  ó   € à %ˆ�‰Õr&   c                 ó.   — | j                   j                  S ©z
        :type: int
        )r)   Úcoded_widthr^   s    r$   r¢   zVideoCodecContext.coded_width}  s   € ð
 �x‰x×#Ñ#Ð#r&   c                 ó.   — | j                   j                  S r¡   )r)   Úcoded_heightr^   s    r$   r¤   zVideoCodecContext.coded_height„  s   € ð
 �x‰x×$Ñ$Ð$r&   c                 ó.   — | j                   j                  S )zÖ
        Describes the signal range of the colorspace, as FFmpeg's raw integer
        value. :class:`.ColorRange` names the values.

        Wraps :ffmpeg:`AVCodecContext.color_range`.

        :type: int
        ©r)   Úcolor_ranger^   s    r$   r§   zVideoCodecContext.color_range‹  s   € ð �x‰x×#Ñ#Ð#r&   c                 ó&   — || j                   _        y r]   r¦   rr   s     r$   r§   zVideoCodecContext.color_range—  ó   € à$ˆ�‰Õr&   c                 ó.   — | j                   j                  S )zà
        Describes the RGB/XYZ matrix of the colorspace, as FFmpeg's raw integer
        value. :class:`.ColorPrimaries` names the values.

        Wraps :ffmpeg:`AVCodecContext.color_primaries`.

        :type: int
        ©r)   Úcolor_primariesr^   s    r$   r¬   z!VideoCodecContext.color_primaries›  s   € ð �x‰x×'Ñ'Ð'r&   c                 ó&   — || j                   _        y r]   r«   rr   s     r$   r¬   z!VideoCodecContext.color_primaries§  s   € à#(ˆ�‰Õ r&   c                 ó.   — | j                   j                  S )a  
        Describes the linearization function (a.k.a. transformation
        characteristics) of the colorspace, as FFmpeg's raw integer value.
        :class:`.ColorTrc` names the values.

        Wraps :ffmpeg:`AVCodecContext.color_trc`.

        :type: int
        ©r)   Ú	color_trcr^   s    r$   r°   zVideoCodecContext.color_trc«  s   € ð �x‰x×!Ñ!Ð!r&   c                 ó&   — || j                   _        y r]   r¯   rr   s     r$   r°   zVideoCodecContext.color_trc¸  s   € à"ˆ�‰Õr&   c                 ó.   — | j                   j                  S )zæ
        Describes the YUV/RGB transformation matrix of the colorspace, as
        FFmpeg's raw integer value. :class:`.Colorspace` names the values.

        Wraps :ffmpeg:`AVCodecContext.colorspace`.

        :type: int
        ©r)   Ú
colorspacer^   s    r$   r´   zVideoCodecContext.colorspace¼  s   € ð �x‰x×"Ñ"Ð"r&   c                 ó&   — || j                   _        y r]   r³   rr   s     r$   r´   zVideoCodecContext.colorspaceÈ  s   € à#ˆ�‰Õr&   c                 ó.   — | j                   j                  S )zsThe video field order as FFmpeg's raw integer value.

        Wraps :ffmpeg:`AVCodecContext.field_order`.

        )r)   Úfield_orderr^   s    r$   r·   zVideoCodecContext.field_orderÌ  s   € ð �x‰x×#Ñ#Ð#r&   c                 ój   — t        j                  t        j                  |«      | j                  _        y r]   )r   r   r    ÚAVFieldOrderr)   r·   rr   s     r$   r·   zVideoCodecContext.field_orderÕ  s   € ä%Ÿ{™{¬3×+;Ñ+;¸UÓCˆ�‰Õr&   c                 ó.   — | j                   j                  S )zd
        The maximum run of consecutive B frames when encoding a video.

        :type: int
        ©r)   Úmax_b_framesr^   s    r$   r¼   zVideoCodecContext.max_b_framesÙ  s   € ð �x‰x×$Ñ$Ð$r&   c                 ó&   — || j                   _        y r]   r»   rr   s     r$   r¼   zVideoCodecContext.max_b_framesâ  rŸ   r&   c                 ó.   — | j                   j                  S )z…
        The minimum quantiser value of an encoded stream.

        Wraps :ffmpeg:`AVCodecContext.qmin`.

        :type: int
        ©r)   Úqminr^   s    r$   rÀ   zVideoCodecContext.qminæ  ó   € ð �x‰x�}‰}Ðr&   c                 ó&   — || j                   _        y r]   r¿   rr   s     r$   rÀ   zVideoCodecContext.qminñ  ó   € àˆ�‰�r&   c                 ó.   — | j                   j                  S )z…
        The maximum quantiser value of an encoded stream.

        Wraps :ffmpeg:`AVCodecContext.qmax`.

        :type: int
        ©r)   Úqmaxr^   s    r$   rÆ   zVideoCodecContext.qmaxõ  rÁ   r&   c                 ó&   — || j                   _        y r]   rÅ   rr   s     r$   rÆ   zVideoCodecContext.qmax   rÃ   r&   c                 ó.   — | j                   j                  S )a€  
        The position of the chroma samples relative to the luma samples, as
        FFmpeg's raw integer value. :class:`.ChromaLocation` names the values.

        Wraps :ffmpeg:`AVCodecContext.chroma_sample_location`. FFmpeg spells
        the same field ``chroma_location`` on a frame, and so does PyAV: see
        :attr:`.VideoFrame.chroma_location`.

        :type: int
        )r)   Úchroma_sample_locationr^   s    r$   rÉ   z(VideoCodecContext.chroma_sample_location  s   € ð �x‰x×.Ñ.Ð.r&   c                 ój   — t        j                  t        j                  |«      | j                  _        y r]   )r   r   r    ÚAVChromaLocationr)   rÉ   rr   s     r$   rÉ   z(VideoCodecContext.chroma_sample_location  s   € ä*0¯+©+´c×6JÑ6JÈEÓ*Rˆ�‰Õ'r&   c                 ó.   — | j                   j                  S )zs
        The number of reference frames.

        Wraps :ffmpeg:`AVCodecContext.refs`.

        :type: int
        ©r)   Úrefsr^   s    r$   rÎ   zVideoCodecContext.refs  rÁ   r&   c                 ó&   — || j                   _        y r]   rÍ   rr   s     r$   rÎ   zVideoCodecContext.refs!  rÃ   r&   c                 ó.   — | j                   j                  S )z¡
        Macroblock decision mode: 0 (simple), 1 (bits) or 2 (rate distortion).

        Wraps :ffmpeg:`AVCodecContext.mb_decision`.

        :type: int
        ©r)   Úmb_decisionr^   s    r$   rÒ   zVideoCodecContext.mb_decision%  s   € ð �x‰x×#Ñ#Ð#r&   c                 ó&   — || j                   _        y r]   rÑ   rr   s     r$   rÒ   zVideoCodecContext.mb_decision0  r©   r&   )5Ú__name__Ú
__module__Ú__qualname__r   Úcfuncr   r    ÚAVCodecContextÚconstÚAVCodecr   Úvoidr.   r   rW   r   Úlistr[   r_   r   rc   ri   ÚpropertyrD   Úsetterr
   rF   ÚuintrG   rv   Úintr5   rE   r‚   r†   r�   r�   r—   rš   r�   r¢   r¤   r§   r¬   r°   r´   r·   r¼   rÀ   rÆ   rÉ   rÎ   rÒ   © r&   r$   r(   r(   *   sß  „ ð ‡\�\ð'$à�^‰^˜C×.Ñ.Ñ/ð'$ð �~‰~˜fŸl™l¨3¯;©;Ñ7Ñ8ð'$ð ˜4‘ð	'$ð
 
�‰ò'$ó ð'$ðR ‡\�\ð-¨:ð -¸*ò -ó ð-ð^ ‡\�\ð°¸±ð ÀÀeÈdÁlÑASò ó ðð> ‡\�\ð# 5ò #ó ð#ð ‡\�\ð'¨%ð '¸ð 'ÀFÇKÁKò 'ó ð'ð
 ‡\�\ð uò ó ðð( ñ
ó ð
ð ‡]�]ð(˜[ò (ó ð(ð ñó ðð
 ‡\�\ð˜6Ÿ;™;ò ó ðð ñó ðð
 ‡]�]ð ˜FŸK™Kò  ó ð ð ñ.ó ð.ð ×!Ñ!ð/¨6¯:©:ò /ó "ð/ð ñ+ó ð+ð ‡^�^ñ.ó ð.ð ñWó ðWð* ×Ññ1ó ð1ð ñ3ó ð3ð ×ÑñAó ðAð ñó ðð 
‡[�[ñó ðð ñ!ó ð!ð ‡_�_ð"˜fŸj™jò "ó ð"ð
 ñ=ó ð=ð ×ÑñKó  ðKð ñ
$ó ð
$ð ñ+ó ð+ð ñ%ó ð%ð ×Ñð& 6§:¡:ò &ó ð&ð ñ$ó ð$ð ñ%ó ð%ð ñ	$ó ð	$ð ×Ññ%ó ð%ð ñ	(ó ð	(ð ×Ññ)ó ð)ð ñ
"ó ð
"ð ×Ññ#ó ð#ð ñ	#ó ð	#ð ×Ññ$ó ð$ð ñ$ó ð$ð ×ÑðD §¡ò Dó ðDð ñ%ó ð%ð ×Ññ&ó ð&ð ñó ðð 
‡[�[ñó ðð ñó ðð 
‡[�[ñó ðð ñ/ó ð/ð ×"Ñ"ðS¨F¯J©Jò Só #ðSð ñó ðð 
‡[�[ð˜&Ÿ*™*ò ó ðð ñ$ó ð$ð ×Ñð% §¡ò %ó ñ%r&   r(   ))r   Úcython.cimports.libavÚcimportsÚlibavr    Ú cython.cimports.av.codec.contextr   Ú cython.cimports.av.codec.hwaccelr   Úcython.cimports.av.errorr   Úcython.cimports.av.framer   Úcython.cimports.av.packetr   Úcython.cimports.av.rationalr   Úcython.cimports.av.utilsr	   Úcython.cimports.av.video.formatr
   r   r   Úcython.cimports.av.video.framer   r   Ú$cython.cimports.av.video.reformatterr   Úcython.cimports.libc.stdintr   r×   rK   Ú	exceptvalr   rØ   rÙ   rk   r%   ÚfinalÚcclassr(   rá   r&   r$   ú<module>ró      sà   ðÛ ß #Ð #Ý 9Ý 4Ý .Ý *Ý ,Ý 7Ý 2ß VÑ Vß HÝ AÝ /ð ‡�Ø‡�Ø€×Ñ˜ÔðØ	�‰˜×*Ñ*Ñ	+ðà�n‰n˜VŸ\™\¨#×*;Ñ*;Ñ<Ñ=ðð 	×Ñòó ó ó ðð. ‡�Ø‡�ôF%˜ó F%ó ó ñF%r&   