decoding

How is video decoding corruption debugged?

ε祈祈猫儿з 提交于 2020-01-04 06:08:30
问题 I just started working for a new company and my new role demands that I help debug the video corruption that they are receiving through decoding frames. As much as I intend on digging down deep into the code and looking into the specifics of my problem, it made me think about video debugging in general. Since handling videos is very new to me, the whole process seems pretty complex and it seems there are a lot of places for corruption to present itself. The way I see it there is at least

Hex characters in varchar() is actually ascii. Need to decode it

Deadly 提交于 2020-01-03 11:46:50
问题 This is such an edge-case of a question, I'd be surprised if there is an easy way to do this. I have a MS SQL DB with a field of type varchar(255). It contains a hex string which is actually a Guid when you decode it using an ascii decoder. I know that sounds REALLY weird but here's an example: The contents of the field: "38353334373838622D393030302D343732392D383436622D383161336634396339663931" What it actually represents: "8534788b-9000-4729-846b-81a3f49c9f91" I need a way to decode this,

Replacing call to setImageResource() with setImageBitmap to reduce hiccup?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 02:48:30
问题 Android's setImageResource() documentation states: This does Bitmap reading and decoding on the UI thread, which can cause a latency hiccup. If that's a concern, consider using setImageDrawable(android.graphics.drawable.Drawable) or setImageBitmap(android.graphics.Bitmap) and BitmapFactory instead. I'm looking to solve this exact issue in my example application. I think I'm supposed to "read between the lines" here and and replace my call from : ((ImageView) rootView.findViewById(R.id.screen

Fastest PNG decoder for .NET

﹥>﹥吖頭↗ 提交于 2020-01-01 01:14:20
问题 Our web server needs to process many compositions of large images together before sending the results to web clients. This process is performance critical because the server can receive several thousands of requests per hour. Right now our solution loads PNG files (around 1MB each) from the HD and sends them to the video card so the composition is done on the GPU. We first tried loading our images using the PNG decoder exposed by the XNA API. We saw the performance was not too good. To

How can I do LZW decoding in Java?

佐手、 提交于 2019-12-29 06:59:19
问题 I have a database which contains picture data stored as a binary blob. The documentation says the data is encoded using LZW. I thought that I could decode it using the Zip or GZip input streams found in the Java library, but it didn't work - I got an exception that said the format of the data is not correct. From what I've read, the library uses DEFLATE, which is not LZW. Also, I've read about some licensing problems for using the LZW algorithm. What can I use to decode the data? Is there a

Request returns bytes and I'm failing to decode them

守給你的承諾、 提交于 2019-12-29 04:35:11
问题 Essentially I made a request to a website and got a byte response back: b'[{"geonameId:"703448"}..........'. I'm confused because although it is of type byte, it is very human readable and appears like a list of json. I do know that the response is encoded in latin1 from running r.encoding which returned ISO-859-1 and I have tried to decode it, but it just returns an empty string. Here's what I have so far: r = response.content string = r.decode("ISO-8859-1") print (string) and this is where

Memory Increase while Retriving data from database for loading image

坚强是说给别人听的谎言 提交于 2019-12-25 08:28:22
问题 I am working on application in which I store data of image into database like NSString *query = [NSString stringWithFormat:@"INSERT INTO Friends_user (f_id,f_name,f_image,f_mobile) VALUES('%ld','%@','%@','%@')",(long)id_, self.txt_name.text,[UIImagePNGRepresentation(self.img_userprofile.image) base64EncodedStringWithOptions:NSDataBase64Encoding64CharacterLineLength], self.txt_mobile_no.text ]; It stores Successfully but when I retrieve that data to display image, Memory Increases with every

Decoding GSM 6.10 parts in NAudio

感情迁移 提交于 2019-12-25 06:55:46
问题 How can I decode GSM 6.10 (Full-Rate) codec audio byte array on the fly in NAudio? Sources says that wave decoding is processed at one time and I can't process several bytes of wave (fix me if I'm wrong). My situation is that I receive bytes array of GSM 6.10 audio from the server, array size can be specified, but how can i decode it and write to the device? Edit: What am I doing wrong? According to Mark's solution this should work but all I hear is distorted sounds: WaveOut waveO = new

C# Binary Decoder based on XML specification

梦想与她 提交于 2019-12-25 02:37:35
问题 I want to develop decoder in .net C# for one binary file. Can you please give me some directions (I know that question is general and not code specific) So here is catch: There is XML schema (with syntax) for XML file XML file based on XML schema contains descriptions (names etc) of parameters and my encoded file have values for that parameters. There is also another XML for enumeration of some of values from binary file. So there is two XML file and one XML schema (Input to application will

Decoding non standard characters to UTF 8 in Python

大城市里の小女人 提交于 2019-12-24 12:11:10
问题 I have a program that takes in byte-encoded text via a webhook in Django (written in Python). I have decoding from byte -> utf-8 working for normal letters, but it breaks when an apostrophe ( ' ) is sent in. I have this written to decode the text: encoded = request.body decoded = parse_qs(encoded) body = decoded[b'body'][0].decode("utf-8") And this is the error: UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 5: ordinal not in range(128) I'd like for it to