This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(ptr_offset_from)] | |
use std::marker::PhantomData; | |
#[derive(Debug, Clone, Copy)] | |
struct PlaneInfo { | |
stride: usize, | |
w: usize, | |
h: usize, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Can you do better? | |
* | |
* The following code tries to initialize an array of somehow complex structures | |
* I added also the dumb way to do that with maps and vectors | |
* I wonder if adding some syntactic sugar such as | |
* | |
* let array = [{|index| generator(index)}; N]; | |
* | |
* Could be interesting or hadn't been proposed already. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY SHARED_SECRET > client.ovpn | |
## | |
server=${1?"The server address is required"} | |
cacert=${2?"The path to the ca certificate file is required"} | |
client_cert=${3?"The path to the client certificate file is required"} | |
client_key=${4?"The path to the client private key file is required"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(box_syntax, box_patterns)] | |
#![allow(dead_code, unused_variables)] | |
pub trait TraitObject { | |
fn safe_method(&mut self); | |
} | |
pub struct Description { | |
common_field: &'static str, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h | |
index ab4fe70..76ad89b 100644 | |
--- a/libavcodec/bitstream.h | |
+++ b/libavcodec/bitstream.h | |
@@ -44,8 +44,8 @@ typedef struct BitstreamContext { | |
} BitstreamContext; | |
/** | |
- * Return number of bits already read. | |
- */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c | |
index 820a7ae..51a1943 100644 | |
--- a/libavcodec/mpegaudiodec_template.c | |
+++ b/libavcodec/mpegaudiodec_template.c | |
@@ -33,6 +33,7 @@ | |
#include "internal.h" | |
#include "mathops.h" | |
#include "mpegaudiodsp.h" | |
+#include "bitstream_debug.h" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c | |
index 80bc46a..d651406 100644 | |
--- a/libavcodec/svq3.c | |
+++ b/libavcodec/svq3.c | |
@@ -75,6 +75,7 @@ typedef struct SVQ3Context { | |
H264Picture *cur_pic; | |
H264Picture *next_pic; | |
H264Picture *last_pic; | |
+ GetBitContext slice; | |
int halfpel_flag; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define get_bits_count(gb) \ | |
({ \ | |
int _ret = get_bits_count(gb); \ | |
printf("%s:%d %s, read_count %d\n", __FILE__, __LINE__, __func__, _ret); \ | |
_ret; \ | |
}) | |
#define get_bits1(gb) \ | |
({ \ | |
unsigned int _ret = get_bits1(gb); \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define bistream_read_count(bb) ({\ | |
int _ret = bitstream_read_count(bb); \ | |
printf("%s:%d %s, read_count %d\n", __FILE__, __LINE__, __func__, _ret); \ | |
_ret; \ | |
}) | |
#define bistream_read_bit(bb) ({\ | |
int _ret = bitstream_read_bit(bb); \ | |
printf("%s:%d %s, read_bit %d\n", __FILE__, __LINE__, __func__, _ret); \ | |
_ret; \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service | |
# | |
# Please report issues and/or improvements to Sam Hocevar <sam@hocevar.net> | |
# | |
# Prerequisites: | |
# — MSYS2 itself: http://sourceforge.net/projects/msys2/ | |
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights | |
# |
NewerOlder